diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index e409555f..161438d6 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -91,6 +91,7 @@ docs/AudienceIntegrationID.md
docs/AudienceMembership.md
docs/AudienceReference.md
docs/AwardGiveawayEffectProps.md
+docs/BaseBlock.md
docs/BaseCampaign.md
docs/BaseLoyaltyProgram.md
docs/BaseNotification.md
@@ -208,6 +209,7 @@ docs/CreateTemplateCampaign.md
docs/CreateTemplateCampaignResponse.md
docs/CustomEffect.md
docs/CustomEffectProps.md
+docs/CustomerAchievement.md
docs/CustomerActivityReport.md
docs/CustomerAnalytics.md
docs/CustomerInventory.md
@@ -548,6 +550,7 @@ docs/OutgoingIntegrationTemplateWithConfigurationDetails.md
docs/OutgoingIntegrationTemplates.md
docs/OutgoingIntegrationType.md
docs/OutgoingIntegrationTypes.md
+docs/PassthroughBlock.md
docs/PatchItemCatalogAction.md
docs/PatchManyItemsCatalogAction.md
docs/PendingActivePointsData.md
@@ -569,6 +572,8 @@ docs/ProductUnitAnalyticsTotals.md
docs/ProfileAudiencesChanges.md
docs/ProjectedTier.md
docs/PromoteExperiment.md
+docs/PromotionGroupBlock.md
+docs/PromotionRuleV2.md
docs/RedeemReferralEffectProps.md
docs/Referral.md
docs/ReferralConstraints.md
@@ -590,6 +595,9 @@ docs/RevisionActivationRequest.md
docs/RevisionVersion.md
docs/Reward.md
docs/RewardPointsRequired.md
+docs/Risk.md
+docs/RiskAffectedEntityItem.md
+docs/RiskDetail.md
docs/RiskNotification.md
docs/Role.md
docs/RoleAssign.md
@@ -614,7 +622,9 @@ docs/RuleEligibilityFailureDetails.md
docs/RuleFailureReason.md
docs/RuleMetadata.md
docs/RuleMetadataEligibility.md
+docs/RuleV2.md
docs/Ruleset.md
+docs/RulesetV2.md
docs/SSOConfig.md
docs/SamlConnection.md
docs/SamlConnectionInternal.md
@@ -656,7 +666,9 @@ docs/StrikethroughChangedItem.md
docs/StrikethroughCustomEffectPerItemProps.md
docs/StrikethroughDebugResponse.md
docs/StrikethroughEffect.md
+docs/StrikethroughGroupBlock.md
docs/StrikethroughLabelingNotification.md
+docs/StrikethroughRuleV2.md
docs/StrikethroughSetDiscountPerItemEffectProps.md
docs/StrikethroughSetDiscountPerItemMemberEffectProps.md
docs/StrikethroughTrigger.md
@@ -841,6 +853,7 @@ src/main/java/one/talon/model/AudienceIntegrationID.java
src/main/java/one/talon/model/AudienceMembership.java
src/main/java/one/talon/model/AudienceReference.java
src/main/java/one/talon/model/AwardGiveawayEffectProps.java
+src/main/java/one/talon/model/BaseBlock.java
src/main/java/one/talon/model/BaseCampaign.java
src/main/java/one/talon/model/BaseLoyaltyProgram.java
src/main/java/one/talon/model/BaseNotification.java
@@ -958,6 +971,7 @@ src/main/java/one/talon/model/CreateTemplateCampaign.java
src/main/java/one/talon/model/CreateTemplateCampaignResponse.java
src/main/java/one/talon/model/CustomEffect.java
src/main/java/one/talon/model/CustomEffectProps.java
+src/main/java/one/talon/model/CustomerAchievement.java
src/main/java/one/talon/model/CustomerActivityReport.java
src/main/java/one/talon/model/CustomerAnalytics.java
src/main/java/one/talon/model/CustomerInventory.java
@@ -1296,6 +1310,7 @@ src/main/java/one/talon/model/OutgoingIntegrationTemplateWithConfigurationDetail
src/main/java/one/talon/model/OutgoingIntegrationTemplates.java
src/main/java/one/talon/model/OutgoingIntegrationType.java
src/main/java/one/talon/model/OutgoingIntegrationTypes.java
+src/main/java/one/talon/model/PassthroughBlock.java
src/main/java/one/talon/model/PatchItemCatalogAction.java
src/main/java/one/talon/model/PatchManyItemsCatalogAction.java
src/main/java/one/talon/model/PendingActivePointsData.java
@@ -1317,6 +1332,8 @@ src/main/java/one/talon/model/ProductUnitAnalyticsTotals.java
src/main/java/one/talon/model/ProfileAudiencesChanges.java
src/main/java/one/talon/model/ProjectedTier.java
src/main/java/one/talon/model/PromoteExperiment.java
+src/main/java/one/talon/model/PromotionGroupBlock.java
+src/main/java/one/talon/model/PromotionRuleV2.java
src/main/java/one/talon/model/RedeemReferralEffectProps.java
src/main/java/one/talon/model/Referral.java
src/main/java/one/talon/model/ReferralConstraints.java
@@ -1338,6 +1355,9 @@ src/main/java/one/talon/model/RevisionActivationRequest.java
src/main/java/one/talon/model/RevisionVersion.java
src/main/java/one/talon/model/Reward.java
src/main/java/one/talon/model/RewardPointsRequired.java
+src/main/java/one/talon/model/Risk.java
+src/main/java/one/talon/model/RiskAffectedEntityItem.java
+src/main/java/one/talon/model/RiskDetail.java
src/main/java/one/talon/model/RiskNotification.java
src/main/java/one/talon/model/Role.java
src/main/java/one/talon/model/RoleAssign.java
@@ -1362,7 +1382,9 @@ src/main/java/one/talon/model/RuleEligibilityFailureDetails.java
src/main/java/one/talon/model/RuleFailureReason.java
src/main/java/one/talon/model/RuleMetadata.java
src/main/java/one/talon/model/RuleMetadataEligibility.java
+src/main/java/one/talon/model/RuleV2.java
src/main/java/one/talon/model/Ruleset.java
+src/main/java/one/talon/model/RulesetV2.java
src/main/java/one/talon/model/SSOConfig.java
src/main/java/one/talon/model/SamlConnection.java
src/main/java/one/talon/model/SamlConnectionInternal.java
@@ -1404,7 +1426,9 @@ src/main/java/one/talon/model/StrikethroughChangedItem.java
src/main/java/one/talon/model/StrikethroughCustomEffectPerItemProps.java
src/main/java/one/talon/model/StrikethroughDebugResponse.java
src/main/java/one/talon/model/StrikethroughEffect.java
+src/main/java/one/talon/model/StrikethroughGroupBlock.java
src/main/java/one/talon/model/StrikethroughLabelingNotification.java
+src/main/java/one/talon/model/StrikethroughRuleV2.java
src/main/java/one/talon/model/StrikethroughSetDiscountPerItemEffectProps.java
src/main/java/one/talon/model/StrikethroughSetDiscountPerItemMemberEffectProps.java
src/main/java/one/talon/model/StrikethroughTrigger.java
@@ -1562,6 +1586,7 @@ src/test/java/one/talon/model/AudienceMembershipTest.java
src/test/java/one/talon/model/AudienceReferenceTest.java
src/test/java/one/talon/model/AudienceTest.java
src/test/java/one/talon/model/AwardGiveawayEffectPropsTest.java
+src/test/java/one/talon/model/BaseBlockTest.java
src/test/java/one/talon/model/BaseCampaignTest.java
src/test/java/one/talon/model/BaseLoyaltyProgramTest.java
src/test/java/one/talon/model/BaseNotificationEntityTest.java
@@ -1679,6 +1704,7 @@ src/test/java/one/talon/model/CreateTemplateCampaignResponseTest.java
src/test/java/one/talon/model/CreateTemplateCampaignTest.java
src/test/java/one/talon/model/CustomEffectPropsTest.java
src/test/java/one/talon/model/CustomEffectTest.java
+src/test/java/one/talon/model/CustomerAchievementTest.java
src/test/java/one/talon/model/CustomerActivityReportTest.java
src/test/java/one/talon/model/CustomerAnalyticsTest.java
src/test/java/one/talon/model/CustomerInventoryTest.java
@@ -2017,6 +2043,7 @@ src/test/java/one/talon/model/OutgoingIntegrationTemplateWithConfigurationDetail
src/test/java/one/talon/model/OutgoingIntegrationTemplatesTest.java
src/test/java/one/talon/model/OutgoingIntegrationTypeTest.java
src/test/java/one/talon/model/OutgoingIntegrationTypesTest.java
+src/test/java/one/talon/model/PassthroughBlockTest.java
src/test/java/one/talon/model/PatchItemCatalogActionTest.java
src/test/java/one/talon/model/PatchManyItemsCatalogActionTest.java
src/test/java/one/talon/model/PendingActivePointsDataTest.java
@@ -2038,6 +2065,8 @@ src/test/java/one/talon/model/ProductUnitAnalyticsTotalsTest.java
src/test/java/one/talon/model/ProfileAudiencesChangesTest.java
src/test/java/one/talon/model/ProjectedTierTest.java
src/test/java/one/talon/model/PromoteExperimentTest.java
+src/test/java/one/talon/model/PromotionGroupBlockTest.java
+src/test/java/one/talon/model/PromotionRuleV2Test.java
src/test/java/one/talon/model/RedeemReferralEffectPropsTest.java
src/test/java/one/talon/model/ReferralConstraintsTest.java
src/test/java/one/talon/model/ReferralCreatedEffectPropsTest.java
@@ -2059,7 +2088,10 @@ src/test/java/one/talon/model/RevisionTest.java
src/test/java/one/talon/model/RevisionVersionTest.java
src/test/java/one/talon/model/RewardPointsRequiredTest.java
src/test/java/one/talon/model/RewardTest.java
+src/test/java/one/talon/model/RiskAffectedEntityItemTest.java
+src/test/java/one/talon/model/RiskDetailTest.java
src/test/java/one/talon/model/RiskNotificationTest.java
+src/test/java/one/talon/model/RiskTest.java
src/test/java/one/talon/model/RoleAssignTest.java
src/test/java/one/talon/model/RoleMembershipTest.java
src/test/java/one/talon/model/RoleTest.java
@@ -2083,7 +2115,9 @@ src/test/java/one/talon/model/RuleFailureReasonTest.java
src/test/java/one/talon/model/RuleMetadataEligibilityTest.java
src/test/java/one/talon/model/RuleMetadataTest.java
src/test/java/one/talon/model/RuleTest.java
+src/test/java/one/talon/model/RuleV2Test.java
src/test/java/one/talon/model/RulesetTest.java
+src/test/java/one/talon/model/RulesetV2Test.java
src/test/java/one/talon/model/SSOConfigTest.java
src/test/java/one/talon/model/SamlConnectionInternalTest.java
src/test/java/one/talon/model/SamlConnectionMetadataTest.java
@@ -2125,7 +2159,9 @@ src/test/java/one/talon/model/StrikethroughChangedItemTest.java
src/test/java/one/talon/model/StrikethroughCustomEffectPerItemPropsTest.java
src/test/java/one/talon/model/StrikethroughDebugResponseTest.java
src/test/java/one/talon/model/StrikethroughEffectTest.java
+src/test/java/one/talon/model/StrikethroughGroupBlockTest.java
src/test/java/one/talon/model/StrikethroughLabelingNotificationTest.java
+src/test/java/one/talon/model/StrikethroughRuleV2Test.java
src/test/java/one/talon/model/StrikethroughSetDiscountPerItemEffectPropsTest.java
src/test/java/one/talon/model/StrikethroughSetDiscountPerItemMemberEffectPropsTest.java
src/test/java/one/talon/model/StrikethroughTriggerTest.java
diff --git a/README.md b/README.md
index 572ec933..e1fd5b88 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ Add this dependency to your project's POM:
one.talontalon-one-client
- 26.12.0
+ 26.13.0compile
```
@@ -52,7 +52,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "one.talon:talon-one-client:26.12.0"
+compile "one.talon:talon-one-client:26.13.0"
```
### Others
@@ -232,6 +232,7 @@ Class | Method | HTTP request | Description
*IntegrationApi* | [**getLoyaltyProgramProfileTransactions**](docs/IntegrationApi.md#getLoyaltyProgramProfileTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions
*IntegrationApi* | [**getReservedCustomers**](docs/IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved
*IntegrationApi* | [**integrationGetAllCampaigns**](docs/IntegrationApi.md#integrationGetAllCampaigns) | **GET** /v1/integration/campaigns | List all running campaigns
+*IntegrationApi* | [**joinLoyaltyProgram**](docs/IntegrationApi.md#joinLoyaltyProgram) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/join | Join customer profile to loyalty program
*IntegrationApi* | [**linkLoyaltyCardToProfile**](docs/IntegrationApi.md#linkLoyaltyCardToProfile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card
*IntegrationApi* | [**reopenCustomerSession**](docs/IntegrationApi.md#reopenCustomerSession) | **PUT** /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session
*IntegrationApi* | [**returnCartItems**](docs/IntegrationApi.md#returnCartItems) | **POST** /v2/customer_sessions/{customerSessionId}/returns | Return cart items
@@ -364,6 +365,7 @@ Class | Method | HTTP request | Description
*ManagementApi* | [**getReferralsWithoutTotalCount**](docs/ManagementApi.md#getReferralsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List referrals
*ManagementApi* | [**getRoleV2**](docs/ManagementApi.md#getRoleV2) | **GET** /v2/roles/{roleId} | Get role
*ManagementApi* | [**getRuleset**](docs/ManagementApi.md#getRuleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset
+*ManagementApi* | [**getRulesetV2**](docs/ManagementApi.md#getRulesetV2) | **GET** /v2/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset (V2)
*ManagementApi* | [**getRulesets**](docs/ManagementApi.md#getRulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List campaign rulesets
*ManagementApi* | [**getStore**](docs/ManagementApi.md#getStore) | **GET** /v1/applications/{applicationId}/stores/{storeId} | Get store
*ManagementApi* | [**getUser**](docs/ManagementApi.md#getUser) | **GET** /v1/users/{userId} | Get user
@@ -512,6 +514,7 @@ Class | Method | HTTP request | Description
- [AudienceMembership](docs/AudienceMembership.md)
- [AudienceReference](docs/AudienceReference.md)
- [AwardGiveawayEffectProps](docs/AwardGiveawayEffectProps.md)
+- [BaseBlock](docs/BaseBlock.md)
- [BaseCampaign](docs/BaseCampaign.md)
- [BaseLoyaltyProgram](docs/BaseLoyaltyProgram.md)
- [BaseNotification](docs/BaseNotification.md)
@@ -629,6 +632,7 @@ Class | Method | HTTP request | Description
- [CreateTemplateCampaignResponse](docs/CreateTemplateCampaignResponse.md)
- [CustomEffect](docs/CustomEffect.md)
- [CustomEffectProps](docs/CustomEffectProps.md)
+- [CustomerAchievement](docs/CustomerAchievement.md)
- [CustomerActivityReport](docs/CustomerActivityReport.md)
- [CustomerAnalytics](docs/CustomerAnalytics.md)
- [CustomerInventory](docs/CustomerInventory.md)
@@ -967,6 +971,7 @@ Class | Method | HTTP request | Description
- [OutgoingIntegrationTemplates](docs/OutgoingIntegrationTemplates.md)
- [OutgoingIntegrationType](docs/OutgoingIntegrationType.md)
- [OutgoingIntegrationTypes](docs/OutgoingIntegrationTypes.md)
+- [PassthroughBlock](docs/PassthroughBlock.md)
- [PatchItemCatalogAction](docs/PatchItemCatalogAction.md)
- [PatchManyItemsCatalogAction](docs/PatchManyItemsCatalogAction.md)
- [PendingActivePointsData](docs/PendingActivePointsData.md)
@@ -988,6 +993,8 @@ Class | Method | HTTP request | Description
- [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md)
- [ProjectedTier](docs/ProjectedTier.md)
- [PromoteExperiment](docs/PromoteExperiment.md)
+- [PromotionGroupBlock](docs/PromotionGroupBlock.md)
+- [PromotionRuleV2](docs/PromotionRuleV2.md)
- [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md)
- [Referral](docs/Referral.md)
- [ReferralConstraints](docs/ReferralConstraints.md)
@@ -1009,6 +1016,9 @@ Class | Method | HTTP request | Description
- [RevisionVersion](docs/RevisionVersion.md)
- [Reward](docs/Reward.md)
- [RewardPointsRequired](docs/RewardPointsRequired.md)
+- [Risk](docs/Risk.md)
+- [RiskAffectedEntityItem](docs/RiskAffectedEntityItem.md)
+- [RiskDetail](docs/RiskDetail.md)
- [RiskNotification](docs/RiskNotification.md)
- [Role](docs/Role.md)
- [RoleAssign](docs/RoleAssign.md)
@@ -1033,7 +1043,9 @@ Class | Method | HTTP request | Description
- [RuleFailureReason](docs/RuleFailureReason.md)
- [RuleMetadata](docs/RuleMetadata.md)
- [RuleMetadataEligibility](docs/RuleMetadataEligibility.md)
+- [RuleV2](docs/RuleV2.md)
- [Ruleset](docs/Ruleset.md)
+- [RulesetV2](docs/RulesetV2.md)
- [SSOConfig](docs/SSOConfig.md)
- [SamlConnection](docs/SamlConnection.md)
- [SamlConnectionInternal](docs/SamlConnectionInternal.md)
@@ -1075,7 +1087,9 @@ Class | Method | HTTP request | Description
- [StrikethroughCustomEffectPerItemProps](docs/StrikethroughCustomEffectPerItemProps.md)
- [StrikethroughDebugResponse](docs/StrikethroughDebugResponse.md)
- [StrikethroughEffect](docs/StrikethroughEffect.md)
+- [StrikethroughGroupBlock](docs/StrikethroughGroupBlock.md)
- [StrikethroughLabelingNotification](docs/StrikethroughLabelingNotification.md)
+- [StrikethroughRuleV2](docs/StrikethroughRuleV2.md)
- [StrikethroughSetDiscountPerItemEffectProps](docs/StrikethroughSetDiscountPerItemEffectProps.md)
- [StrikethroughSetDiscountPerItemMemberEffectProps](docs/StrikethroughSetDiscountPerItemMemberEffectProps.md)
- [StrikethroughTrigger](docs/StrikethroughTrigger.md)
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 2302cbfd..73c87bc5 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -24,20 +24,20 @@ security:
- api_key_v1: []
tags:
- description: |
- Operations for updating account information such as billing email addresses, inviting users, etc.
+ Represents account and user management, including billing email addresses and user invitations.
name: Accounts and users
- description: |
- Achievements allow you to reward a customer profile for performing a number of specific actions or reaching a transactional milestone within a defined period.
+ Represents achievements that reward a customer profile for performing a number of specific actions or reaching a transactional milestone within a defined period.
For example, you can use achievements to award your customers when they purchase five cups of coffee in one week or when they purchase items worth $3000 in three months.
name: Achievements
- description: |
- An extra fee applied to the cart. For example, shipping fees or processing fees.
+ Represents an extra fee applied to the cart, for example, shipping fees or processing fees.
See the [docs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).
name: Additional costs
- description: |
- Analytics are used to retrieve statistical data about the performance of campaigns within an Application.
+ Represents analytics used to retrieve statistical data about the performance of campaigns within an Application.
name: Analytics
- description: |
Represents an Application in the Campaign Manager.
@@ -51,7 +51,7 @@ tags:
See the [docs](https://docs.talon.one/docs/product/applications/overview).
name: Applications
- description: |
- Represents a piece of information related to one of the entities avaialbe in the Campaign Manager. Use
+ Represents a piece of information related to one of the entities available in the Campaign Manager. Use
them to create highly customized rules.
See the [docs](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes).
@@ -87,7 +87,7 @@ tags:
See the [docs](https://docs.talon.one/docs/product/campaigns/managing-collections).
name: Collections
- description: |
- Coupons are unique codes belonging to a particular campaign. They don't define any behavior on their own.
+ Represents unique codes belonging to a particular campaign. Coupons don't define any behavior on their own.
Instead the campaign ruleset can include rules that validate coupons and carry out particular effects.
See the [docs](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview).
@@ -122,7 +122,7 @@ tags:
See the [docs](https://docs.talon.one/docs/product/giveaways/overview).
name: Giveaways
- description: |
- Operations to query the Talon.One logs. They contain all incoming and outgoing requests.
+ Represents the Talon.One logs, which contain all incoming and outgoing requests.
name: Logs
- description: |
Represents loyalty programs or concepts related to them.
@@ -138,7 +138,7 @@ tags:
[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) allow your customers to collect and spend loyalty points within a card-based loyalty program.
name: Loyalty cards
- description: |
- A referral is a code shared between a customer and a prospect.
+ Represents a referral code shared between a customer (advocate) and a prospect (friend).
A referral is defined by:
- an advocate: person who invited their friend via referral program.
@@ -166,7 +166,7 @@ tags:
ruleset.
name: Value maps
- description: |
- A way to send information from Talon.One to the URI of your choice.
+ Represents webhooks, which send information from Talon.One to the URI of your choice.
See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks).
name: Webhooks
@@ -187,6 +187,7 @@ paths:
You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the
[List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
+ **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp).
explode: false
in: path
name: customerSessionId
@@ -290,6 +291,7 @@ paths:
You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the
[List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
+ **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp).
explode: false
in: path
name: customerSessionId
@@ -646,6 +648,7 @@ paths:
- Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID.
Once set, you cannot update this identifier.
+ **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp).
explode: false
in: path
name: integrationId
@@ -1437,6 +1440,25 @@ paths:
format: date-time
type: string
style: form
+ - description: Filter results to campaigns linked to the specified store ID.
+ explode: true
+ in: query
+ name: storeId
+ required: false
+ schema:
+ format: int64
+ type: integer
+ style: form
+ - description: Filter results to campaigns linked to the specified audience
+ ID.
+ explode: true
+ in: query
+ name: audienceId
+ required: false
+ schema:
+ format: int64
+ type: integer
+ style: form
responses:
"200":
content:
@@ -3193,6 +3215,72 @@ paths:
x-content-type: application/json
x-accepts:
- application/json
+ /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/join:
+ post:
+ description: |
+ Join a customer profile to the specified loyalty program.
+
+ If the customer profile does not exist, it will be created first using the
+ provided `integrationId`, then joined to the loyalty program.
+
+ > [!note] This endpoint only works with profile-based loyalty programs.
+
+ **Behavior**:
+ - If the loyalty program does not exist, the request fails.
+ - If the customer profile is already joined to the loyalty program, the request fails.
+ - If the customer profile does not exist, it is created and then joined to the loyalty program.
+ operationId: joinLoyaltyProgram
+ parameters:
+ - description: |
+ Identifier of the profile-based loyalty program. You can get the ID with
+ the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
+ explode: false
+ in: path
+ name: loyaltyProgramId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ - description: |
+ The integration ID of the customer profile. You can get the `integrationId` of a profile using:
+ - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.
+ - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint.
+ explode: false
+ in: path
+ name: integrationId
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorResponseWithStatus"
+ description: Bad request
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorResponseWithStatus"
+ description: Unauthorized
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorResponseWithStatus"
+ description: Not found
+ security:
+ - api_key_v1: []
+ summary: Join customer profile to loyalty program
+ tags:
+ - integration
+ x-accepts:
+ - application/json
/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/points:
get:
description: |
@@ -3908,6 +3996,35 @@ paths:
- management
x-accepts:
- application/json
+ /v2/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}:
+ get:
+ description: Retrieve the specified ruleset as a JSON object.
+ operationId: getRulesetV2
+ parameters:
+ - $ref: "#/components/parameters/applicationId"
+ - $ref: "#/components/parameters/campaignId"
+ - description: The ID of the ruleset.
+ explode: false
+ in: path
+ name: rulesetId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RulesetV2"
+ description: OK
+ summary: Get ruleset (V2)
+ tags:
+ - management
+ x-scalar-stability: experimental
+ x-accepts:
+ - application/json
/v1/applications/{applicationId}/campaigns/{campaignId}/coupons:
delete:
description: Deletes all the coupons matching the specified criteria.
@@ -9626,6 +9743,16 @@ paths:
schema:
type: string
style: form
+ - description: "Returned attributes will be filtered by the specified loyalty\
+ \ program ids, separated by commas. You can only use this parameter when\
+ \ `entity` is `LoyaltyCard`."
+ explode: true
+ in: query
+ name: loyaltyProgramIds
+ required: false
+ schema:
+ type: string
+ style: form
- description: Returned attributes will be filtered by supplied type
explode: true
in: query
@@ -10875,6 +11002,30 @@ paths:
default: false
type: boolean
style: form
+ - description: |-
+ Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
+
+ **Note:** Only coupons deleted in the last 7 days will appear in the results.
+ explode: true
+ in: query
+ name: deletedBefore
+ required: false
+ schema:
+ format: date-time
+ type: string
+ style: form
+ - description: |-
+ Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally.
+
+ **Note:** Only coupons deleted in the last 7 days will appear in the results.
+ explode: true
+ in: query
+ name: deletedAfter
+ required: false
+ schema:
+ format: date-time
+ type: string
+ style: form
responses:
"200":
content:
@@ -15401,6 +15552,7 @@ components:
- value
title: acceptReferral
RedeemReferralEffectProps:
+ deprecated: true
description: |
This effect is **deprecated**. It has been replaced by the `acceptReferral` effect.
This effect indicates that the referral code is valid and has been redeemed.
@@ -16235,6 +16387,7 @@ components:
- value
title: rollbackDeductedLoyaltyPoints
ShowBundleMetadataEffectProps:
+ deprecated: true
description: |-
This effect is **deprecated**.
@@ -17067,6 +17220,7 @@ components:
- ruleFailureReasons
- previousReturns
- campaignEligibility
+ - achievements
type: string
type: array
default: null
@@ -17164,6 +17318,7 @@ components:
title: Total Sales
type: number
loyaltyMemberships:
+ deprecated: true
description: |
**DEPRECATED. Always returns `null`.** A list of loyalty programs joined by the customer.
items:
@@ -17294,12 +17449,14 @@ components:
title: Negative balance
type: number
expiredBalance:
+ deprecated: true
description: |
**DEPRECATED** Value is shown as 0.
example: 0
title: Expired balance
type: number
spentBalance:
+ deprecated: true
description: |
**DEPRECATED** Value is shown as 0.
example: 0
@@ -18000,6 +18157,7 @@ components:
type: array
default: null
couponRedemptionCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Number of coupons redeemed in the campaign.
@@ -18007,6 +18165,7 @@ components:
format: int64
type: integer
referralRedemptionCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Number of referral codes redeemed in the campaign.
@@ -18014,12 +18173,14 @@ components:
format: int64
type: integer
discountCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total amount of discounts redeemed in the campaign.
example: 288
type: number
discountEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of times discounts were redeemed in this campaign.
@@ -18027,6 +18188,7 @@ components:
format: int64
type: integer
couponCreationCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of coupons created by rules in this campaign.
@@ -18034,6 +18196,7 @@ components:
format: int64
type: integer
customEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of custom effects triggered by rules in this campaign.
@@ -18041,6 +18204,7 @@ components:
format: int64
type: integer
referralCreationCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of referrals created by rules in this campaign.
@@ -18048,6 +18212,7 @@ components:
format: int64
type: integer
addFreeItemEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign.
@@ -18055,6 +18220,7 @@ components:
format: int64
type: integer
awardedGiveawaysCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of giveaways awarded by rules in this campaign.
@@ -18062,12 +18228,14 @@ components:
format: int64
type: integer
createdLoyaltyPointsCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty points created by rules in this campaign.
example: 9
type: number
createdLoyaltyPointsEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty point creation effects triggered by rules in this campaign.
@@ -18075,12 +18243,14 @@ components:
format: int64
type: integer
redeemedLoyaltyPointsCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty points redeemed by rules in this campaign.
example: 8
type: number
redeemedLoyaltyPointsEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of loyalty point redemption effects triggered by rules in this campaign.
@@ -18088,6 +18258,7 @@ components:
format: int64
type: integer
callApiEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of webhooks triggered by rules in this campaign.
@@ -18095,6 +18266,7 @@ components:
format: int64
type: integer
reservecouponEffectCount:
+ deprecated: true
description: |
This property is **deprecated**. The count should be available under *budgets* property.
Total number of reserve coupon effects triggered by rules in this campaign.
@@ -19147,6 +19319,149 @@ components:
importId: 4
profileIntegrationId: R195412
profileId: 1
+ AchievementProgress:
+ description: The current progress of the customer in the achievement.
+ example:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
+ properties:
+ status:
+ description: The status of the achievement.
+ enum:
+ - inprogress
+ - completed
+ - expired
+ - not_started
+ example: completed
+ type: string
+ progress:
+ description: The current progress of the customer in the achievement.
+ example: 10
+ type: number
+ startDate:
+ description: Timestamp at which the customer started the achievement.
+ example: 2024-01-01T15:04:05Z07:00
+ format: date-time
+ type: string
+ completionDate:
+ description: Timestamp at which point the customer completed the achievement.
+ example: 2024-01-15T15:04:05Z07:00
+ format: date-time
+ type: string
+ endDate:
+ description: Timestamp at which point the achievement ends and resets for
+ the customer.
+ example: 2024-02-01T15:04:05Z07:00
+ format: date-time
+ type: string
+ required:
+ - progress
+ - status
+ CustomerAchievement:
+ description: "A customer's progress in an achievement, together with the achievement\
+ \ definition."
+ example:
+ id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
+ properties:
+ id:
+ description: The internal ID of the achievement.
+ example: 3
+ format: int64
+ type: integer
+ name:
+ description: |
+ The internal name of the achievement used in API requests.
+ example: FreeCoffee10Orders
+ maxLength: 1000
+ minLength: 1
+ pattern: "^[a-zA-Z]\\w+$"
+ type: string
+ title:
+ description: The display name of the achievement in the Campaign Manager.
+ example: 50% off on 50th purchase.
+ type: string
+ description:
+ description: The description of the achievement in the Campaign Manager.
+ example: 50% off for every 50th purchase in a year.
+ format: string
+ type: string
+ target:
+ description: The required number of actions or the transactional milestone
+ to complete the achievement.
+ example: 10
+ type: number
+ recurrencePolicy:
+ description: |
+ The policy that determines if and how the achievement recurs.
+ - `no_recurrence`: The achievement can be completed only once.
+ - `on_expiration`: The achievement resets after it expires and becomes available again.
+ - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again.
+ enum:
+ - no_recurrence
+ - on_expiration
+ - on_completion
+ example: no_recurrence
+ type: string
+ activationPolicy:
+ description: |
+ The policy that determines how the achievement starts, ends, or resets.
+ - `user_action`: The achievement ends or resets relative to when the customer started the achievement.
+ - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ enum:
+ - user_action
+ - fixed_schedule
+ example: fixed_schedule
+ type: string
+ fixedStartDate:
+ description: |
+ The achievement's start date when `activationPolicy` is equal to `fixed_schedule`.
+
+ **Note:** It is an RFC3339 timestamp string.
+ example: 2024-01-15T15:04:05Z07:00
+ format: date-time
+ type: string
+ endDate:
+ description: |
+ The achievement's end date. If defined, customers cannot participate in the achievement after this date.
+
+ **Note:** It is an RFC3339 timestamp string.
+ example: 2024-02-15T15:04:05Z07:00
+ format: date-time
+ type: string
+ allowRollbackAfterCompletion:
+ description: "When `true`, customer progress can be rolled back in completed\
+ \ achievements."
+ example: false
+ type: boolean
+ currentProgress:
+ $ref: "#/components/schemas/AchievementProgress"
+ required:
+ - activationPolicy
+ - allowRollbackAfterCompletion
+ - description
+ - id
+ - name
+ - recurrencePolicy
+ - target
+ - title
IntegrationResponse:
description: |
Contains entities that might be valuable in Talon.One integrations.
@@ -19209,6 +19524,12 @@ components:
$ref: "#/components/schemas/Giveaway"
type: array
default: null
+ achievements:
+ description: The achievements progress of the customer.
+ items:
+ $ref: "#/components/schemas/CustomerAchievement"
+ type: array
+ default: null
required:
- createdCoupons
- createdReferrals
@@ -20326,6 +20647,39 @@ components:
importId: 4
profileIntegrationId: R195412
profileId: 1
+ achievements:
+ - id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
+ - id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
referral: ""
coupons:
- id: 6
@@ -20535,6 +20889,7 @@ components:
- awardedGiveaways
- ruleFailureReasons
- campaignEligibility
+ - achievements
type: string
type: array
default: null
@@ -21735,6 +22090,26 @@ components:
$ref: "#/components/schemas/RuleMetadata"
type: array
default: null
+ linkedStoreIds:
+ description: A list of store IDs linked to this campaign.
+ example:
+ - 1
+ - 2
+ items:
+ format: int64
+ type: integer
+ type: array
+ default: null
+ linkedAudienceIds:
+ description: A list of audience IDs linked to this campaign.
+ example:
+ - 3
+ - 4
+ items:
+ format: int64
+ type: integer
+ type: array
+ default: null
required:
- rules
example:
@@ -21762,6 +22137,12 @@ components:
displayDescription: Get a 20% discount on all shoes during Thanksgiving!
Offer valid till Dec 5 only.
relatedData: https://example.com/discounts/20-off-shoes.png
+ linkedStoreIds:
+ - 1
+ - 2
+ linkedAudienceIds:
+ - 3
+ - 4
NewAttribute:
allOf:
- properties:
@@ -23678,6 +24059,39 @@ components:
importId: 4
profileIntegrationId: R195412
profileId: 1
+ achievements:
+ - id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
+ - id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
event: ""
NewReferralsForMultipleAdvocates:
allOf:
@@ -23804,47 +24218,6 @@ components:
default: null
required:
- integrationIDs
- AchievementProgress:
- description: The current progress of the customer in the achievement.
- example:
- status: completed
- progress: 10
- startDate: 2024-01-01T15:04:05Z07:00
- completionDate: 2024-01-15T15:04:05Z07:00
- endDate: 2024-02-01T15:04:05Z07:00
- properties:
- status:
- description: The status of the achievement.
- enum:
- - inprogress
- - completed
- - expired
- - not_started
- example: completed
- type: string
- progress:
- description: The current progress of the customer in the achievement.
- example: 10
- type: number
- startDate:
- description: Timestamp at which the customer started the achievement.
- example: 2024-01-01T15:04:05Z07:00
- format: date-time
- type: string
- completionDate:
- description: Timestamp at which point the customer completed the achievement.
- example: 2024-01-15T15:04:05Z07:00
- format: date-time
- type: string
- endDate:
- description: Timestamp at which point the achievement ends and resets for
- the customer.
- example: 2024-02-01T15:04:05Z07:00
- format: date-time
- type: string
- required:
- - progress
- - status
AchievementProgressWithDefinition:
allOf:
- $ref: "#/components/schemas/AchievementProgress"
@@ -27604,6 +27977,314 @@ components:
campaignId: 320
templateId: 3
activatedAt: 2000-01-23T04:56:07.000+00:00
+ RuleV2:
+ description: Shared fields common to all V2 rule types.
+ properties:
+ id:
+ description: Unique identifier of the rule.
+ example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ type: string
+ parentId:
+ description: "ID of the parent rule, if any."
+ type: string
+ title:
+ description: A short description of the rule.
+ example: 10% off for loyalty members
+ type: string
+ description:
+ description: A longer description of the rule.
+ type: string
+ required:
+ - title
+ title: RuleV2
+ BaseBlock:
+ description: Common properties shared by all block types.
+ properties:
+ id:
+ description: Unique identifier for this block.
+ example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ type: string
+ type:
+ description: Identifies the block variant and determines which additional
+ properties are present in it.
+ type: string
+ tags:
+ description: Semantic labels attached to this block.
+ items:
+ type: string
+ type: array
+ default: null
+ required:
+ - id
+ - type
+ title: BaseBlock
+ PromotionBlock: {}
+ PromotionGroupBlock:
+ allOf:
+ - $ref: "#/components/schemas/BaseBlock"
+ - description: A structural combinator block that groups child promotion blocks
+ using a logical operator. Evaluates to true when its operator condition
+ is satisfied across all child blocks.
+ properties:
+ operator:
+ description: "Logical operator applied across child blocks. `all` requires\
+ \ every child to pass, `atLeastOne` requires at least one, `none` requires\
+ \ all to fail."
+ enum:
+ - all
+ - atLeastOne
+ - none
+ type: string
+ blocks:
+ description: Child blocks evaluated according to the operator.
+ items:
+ $ref: "#/components/schemas/PromotionBlock"
+ type: array
+ default: null
+ onFailure:
+ description: Promotion blocks evaluated when this block fails or returns
+ false.
+ items:
+ $ref: "#/components/schemas/PromotionBlock"
+ type: array
+ default: null
+ onError:
+ additionalProperties:
+ items:
+ $ref: "#/components/schemas/PromotionBlock"
+ description: Named error handlers evaluated when a specific error occurs.
+ required:
+ - blocks
+ - operator
+ title: PromotionGroupBlock
+ PassthroughBlock:
+ description: A block representing a Talang expression that could not be mapped
+ to a typed block. The expression is preserved in its raw Talang array form
+ for diagnostic and round-trip purposes.
+ properties:
+ id:
+ description: Unique identifier for this block.
+ example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ type: string
+ type:
+ description: The type discriminator for this block.
+ enum:
+ - passthrough
+ type: string
+ expression:
+ description: "The raw Talang expression as an array. The first element is\
+ \ the function name; subsequent elements are its arguments, which may\
+ \ themselves be nested expressions."
+ items: {}
+ type: array
+ default: null
+ required:
+ - expression
+ - id
+ - type
+ title: PassthroughBlock
+ PromotionRuleV2:
+ allOf:
+ - $ref: "#/components/schemas/RuleV2"
+ - description: A single promotion rule in V2 block format.
+ properties:
+ blocks:
+ description: The condition and effect blocks that make up this promotion
+ rule.
+ items:
+ $ref: "#/components/schemas/PromotionBlock"
+ type: array
+ default: null
+ required:
+ - blocks
+ title: PromotionRuleV2
+ example:
+ id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ parentId: parentId
+ title: 10% off for loyalty members
+ description: description
+ blocks:
+ - null
+ - null
+ StrikethroughBlock: {}
+ StrikethroughGroupBlock:
+ allOf:
+ - $ref: "#/components/schemas/BaseBlock"
+ - description: A structural combinator block that groups child strikethrough
+ blocks using a logical operator. Evaluates to true when its operator condition
+ is satisfied across all child blocks.
+ properties:
+ operator:
+ description: "Logical operator applied across child blocks. `all` requires\
+ \ every child to pass, `atLeastOne` requires at least one, `none` requires\
+ \ all to fail."
+ enum:
+ - all
+ - atLeastOne
+ - none
+ type: string
+ blocks:
+ description: Child blocks evaluated according to the operator.
+ items:
+ $ref: "#/components/schemas/StrikethroughBlock"
+ type: array
+ default: null
+ onFailure:
+ description: Strikethrough blocks evaluated when this block fails or returns
+ false.
+ items:
+ $ref: "#/components/schemas/StrikethroughBlock"
+ type: array
+ default: null
+ onError:
+ additionalProperties:
+ items:
+ $ref: "#/components/schemas/StrikethroughBlock"
+ description: Named error handlers evaluated when a specific error occurs.
+ required:
+ - blocks
+ - operator
+ title: StrikethroughGroupBlock
+ StrikethroughRuleV2:
+ allOf:
+ - $ref: "#/components/schemas/RuleV2"
+ - description: A single strikethrough rule.
+ properties:
+ blocks:
+ description: The condition and effect blocks that make up this strikethrough
+ rule.
+ items:
+ $ref: "#/components/schemas/StrikethroughBlock"
+ type: array
+ default: null
+ required:
+ - blocks
+ title: StrikethroughRuleV2
+ example:
+ id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ parentId: parentId
+ title: 10% off for loyalty members
+ description: description
+ blocks:
+ - null
+ - null
+ RulesetV2:
+ description: Ruleset in the V2 JSON block format.
+ example:
+ id: 6
+ created: 2000-01-23T04:56:07.000+00:00
+ userId: 385
+ campaignId: 320
+ templateId: 3
+ activatedAt: 2000-01-23T04:56:07.000+00:00
+ promotionRules:
+ - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ parentId: parentId
+ title: 10% off for loyalty members
+ description: description
+ blocks:
+ - null
+ - null
+ - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ parentId: parentId
+ title: 10% off for loyalty members
+ description: description
+ blocks:
+ - null
+ - null
+ strikethroughRules:
+ - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ parentId: parentId
+ title: 10% off for loyalty members
+ description: description
+ blocks:
+ - null
+ - null
+ - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+ parentId: parentId
+ title: 10% off for loyalty members
+ description: description
+ blocks:
+ - null
+ - null
+ selectors:
+ - key: ""
+ - key: ""
+ bundles:
+ - key: ""
+ - key: ""
+ parameters:
+ - key: ""
+ - key: ""
+ properties:
+ id:
+ description: Internal ID of this entity.
+ example: 6
+ format: int64
+ type: integer
+ created:
+ description: The time this entity was created.
+ format: date-time
+ type: string
+ userId:
+ description: The ID of the user that created this ruleset.
+ example: 385
+ format: int64
+ type: integer
+ campaignId:
+ description: The ID of the campaign that owns this entity.
+ example: 320
+ format: int64
+ type: integer
+ templateId:
+ description: The ID of the campaign template that owns this entity.
+ example: 3
+ format: int64
+ type: integer
+ activatedAt:
+ description: Timestamp indicating when this ruleset was activated.
+ format: date-time
+ type: string
+ promotionRules:
+ description: Set of promotion rules.
+ items:
+ $ref: "#/components/schemas/PromotionRuleV2"
+ type: array
+ default: null
+ strikethroughRules:
+ description: Set of strikethrough rules.
+ items:
+ $ref: "#/components/schemas/StrikethroughRuleV2"
+ type: array
+ default: null
+ selectors:
+ description: Variable bindings of type selector.
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ default: null
+ bundles:
+ description: Variable bindings of type bundle.
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ default: null
+ parameters:
+ description: Variable bindings of type template parameter.
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ default: null
+ required:
+ - created
+ - id
+ - promotionRules
+ - strikethroughRules
+ - userId
+ title: RulesetV2
UpdateCouponBatch:
allOf:
- $ref: "#/components/schemas/CouponConstraints"
@@ -27634,6 +28315,7 @@ components:
format: int64
type: integer
uniquePrefix:
+ deprecated: true
description: |
**DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#tag/Coupons/operation/createCouponsAsync) endpoint.
example: ""
@@ -31058,6 +31740,7 @@ components:
description: Ledger of Balance in Loyalty Program for a Customer.
properties:
total:
+ deprecated: true
description: |
**DEPRECATED** Use `totalActivePoints` property instead. Total amount of currently active and available points in the customer's balance.
title: Current Balance (Deprecated)
@@ -33482,8 +34165,8 @@ components:
BestPriorPriceRequest:
example:
skus:
- - comma
- - period
+ - SKU1241028
+ - SKU7345278
timeframeEndDate: 2020-11-10T23:00:00Z
timeframe: "30"
timeframeEndDateType: sale
@@ -33495,8 +34178,8 @@ components:
description: List of product SKUs to check when determining the best prior
price.
example:
- - comma
- - period
+ - SKU1241028
+ - SKU7345278
items:
type: string
minItems: 1
@@ -33592,7 +34275,7 @@ components:
BestPriorPrice:
example:
id: 1
- sku: NVR-GN-GV-UUP
+ sku: SKU7345278
observedAt: 2025-11-10T23:00:00Z
contextIds:
- SpringSale
@@ -33615,7 +34298,7 @@ components:
type: integer
sku:
description: sku
- example: NVR-GN-GV-UUP
+ example: SKU7345278
type: string
observedAt:
description: The date and time when the price was observed.
@@ -33634,6 +34317,7 @@ components:
default: null
contextId:
default: ""
+ deprecated: true
description: |
This property is **deprecated**. Use `contextIds` instead. Defaults to an empty string.
example: ""
@@ -33661,16 +34345,14 @@ components:
default: null
PriceHistoryRequest:
example:
- sku:
- - sku-124
+ sku: SKU1241028
startDate: 2020-11-10T23:00:00Z
endDate: 2020-12-10T23:00:00Z
properties:
sku:
description: The SKU of the item for which the historical prices are being
retrieved.
- example:
- - sku-124
+ example: SKU1241028
type: string
startDate:
description: The start date of the period for which historical prices should
@@ -33728,6 +34410,7 @@ components:
default: null
contextId:
default: ""
+ deprecated: true
description: |
This property is **deprecated**. Use `contextIds` instead. Defaults to an empty string.
example: ""
@@ -33749,8 +34432,7 @@ components:
- target
PriceHistoryResponse:
example:
- sku:
- - SKU1241028
+ sku: SKU1241028
history:
- id: 1
observedAt: 2025-11-10T23:00:00Z
@@ -33785,8 +34467,7 @@ components:
properties:
sku:
description: The SKU of the item for which historical prices should be retrieved.
- example:
- - SKU1241028
+ example: SKU1241028
type: string
history:
items:
@@ -35347,6 +36028,156 @@ components:
required:
- active
description: Data for updating a risk notification.
+ Risk:
+ allOf:
+ - $ref: "#/components/schemas/Entity"
+ - properties:
+ notificationId:
+ description: The ID of the risk notification rule that flagged this risk.
+ example: 3
+ format: int64
+ type: integer
+ runDate:
+ description: The date of the ML pipeline run that detected this risk.
+ example: 2026-06-05
+ format: date
+ type: string
+ groupKey:
+ description: |
+ The Application group this risk was detected in. Contains the Application ID,
+ or `__GLOBAL__` for metrics that are not grouped by Application.
+ example: "7"
+ type: string
+ applicationId:
+ description: The ID of the Application this risk belongs to. Absent for
+ global metrics.
+ example: 7
+ format: int64
+ type: integer
+ status:
+ description: The triage lifecycle status of this risk.
+ enum:
+ - active
+ - in_review
+ - confirmed
+ - discarded
+ example: active
+ type: string
+ criticality:
+ description: The critical classification bucket of this risk.
+ enum:
+ - critical
+ - not_critical
+ example: critical
+ type: string
+ entity:
+ description: The entity type the risk was detected in.
+ enum:
+ - customer_profile
+ - customer_session
+ example: customer_profile
+ type: string
+ activity:
+ description: The activity metric the risk was detected in.
+ enum:
+ - loyalty_points_earned
+ - discounted_amount
+ - completed_orders
+ - coupon_attempts
+ example: discounted_amount
+ type: string
+ timeFrame:
+ description: The rolling time window of the risk evaluation.
+ enum:
+ - 1_day
+ - 1_week
+ - 1_month
+ example: 1_week
+ type: string
+ reportedDate:
+ description: The time the ML service reported this risk.
+ example: 2026-06-05T06:26:13.698884Z
+ format: date-time
+ type: string
+ affectedEntityCount:
+ description: The total number of entities affected by this risk.
+ example: 4437
+ format: int64
+ type: integer
+ description:
+ description: Human-readable description of the detected anomaly.
+ example: Unusual discount usage detected for 4437 customer profiles.
+ type: string
+ modified:
+ description: Timestamp of the most recent update.
+ example: 2026-06-05T06:26:13.698884Z
+ format: date-time
+ type: string
+ required:
+ - activity
+ - affectedEntityCount
+ - criticality
+ - entity
+ - groupKey
+ - modified
+ - notificationId
+ - reportedDate
+ - runDate
+ - status
+ - timeFrame
+ description: A risk detected by the anomaly detection service for one Application
+ group.
+ RiskAffectedEntityItem:
+ description: A single entity flagged as anomalous within a risk.
+ properties:
+ entityId:
+ description: The integration ID of the affected entity.
+ example: "174165415"
+ type: string
+ activityValue:
+ description: The observed value of the monitored activity metric for this
+ entity.
+ example: 2898.2
+ format: double
+ type: number
+ threshold:
+ description: The anomaly threshold computed for the entity's Application
+ group.
+ example: 60
+ format: double
+ type: number
+ severityRatio:
+ description: The ratio of the observed value to the threshold.
+ example: 48.3
+ format: double
+ type: number
+ criticality:
+ description: The critical classification bucket of this entity.
+ enum:
+ - critical
+ - not_critical
+ example: critical
+ type: string
+ required:
+ - activityValue
+ - criticality
+ - entityId
+ - severityRatio
+ - threshold
+ RiskDetail:
+ allOf:
+ - $ref: "#/components/schemas/Risk"
+ - properties:
+ affectedEntities:
+ description: "The affected entities with the highest severity ratios,\
+ \ in descending order."
+ items:
+ $ref: "#/components/schemas/RiskAffectedEntityItem"
+ type: array
+ default: null
+ required:
+ - affectedEntities
+ description: "Details of a risk, including its most severely affected entities."
Change:
allOf:
- $ref: "#/components/schemas/Entity"
@@ -38437,7 +39268,7 @@ components:
- $ref: "#/components/schemas/AccountEntity"
- $ref: "#/components/schemas/NewReward"
- properties:
- visibilityConditions:
+ eligibilityConditions:
allOf:
- $ref: "#/components/schemas/Rule"
description: |
@@ -38504,7 +39335,7 @@ components:
- inactive
example: active
type: string
- visibilityConditions:
+ eligibilityConditions:
allOf:
- $ref: "#/components/schemas/Rule"
description: |
@@ -39224,6 +40055,39 @@ components:
importId: 4
profileIntegrationId: R195412
profileId: 1
+ achievements:
+ - id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
+ - id: 3
+ name: FreeCoffee10Orders
+ title: 50% off on 50th purchase.
+ description: 50% off for every 50th purchase in a year.
+ target: 10
+ recurrencePolicy: no_recurrence
+ activationPolicy: fixed_schedule
+ fixedStartDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-15T15:04:05Z07:00
+ allowRollbackAfterCompletion: false
+ currentProgress:
+ status: completed
+ progress: 10
+ startDate: 2024-01-01T15:04:05Z07:00
+ completionDate: 2024-01-15T15:04:05Z07:00
+ endDate: 2024-02-01T15:04:05Z07:00
advancedEvent: ""
EmbeddedDashboardConfiguration:
properties:
@@ -40898,6 +41762,11 @@ components:
CurrentTier:
description: The name of the customer's current tier.
type: string
+ SessionIntegrationID:
+ description: The integration ID of the session through which the points
+ were earned or lost. Only set when the change results from a rule engine
+ execution; empty otherwise.
+ type: string
EmployeeName:
type: string
UserID:
@@ -41151,6 +42020,12 @@ components:
displayDescription: Get a 20% discount on all shoes during Thanksgiving!
Offer valid till Dec 5 only.
relatedData: https://example.com/discounts/20-off-shoes.png
+ linkedStoreIds:
+ - 1
+ - 2
+ linkedAudienceIds:
+ - 3
+ - 4
- applicationId: 322
id: 4
name: Summer promotions
@@ -41175,6 +42050,12 @@ components:
displayDescription: Get a 20% discount on all shoes during Thanksgiving!
Offer valid till Dec 5 only.
relatedData: https://example.com/discounts/20-off-shoes.png
+ linkedStoreIds:
+ - 1
+ - 2
+ linkedAudienceIds:
+ - 3
+ - 4
properties:
hasMore:
type: boolean
diff --git a/build.gradle b/build.gradle
index 8bcf0177..8dd49c3d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
group = 'one.talon'
-version = '26.12.0'
+version = '26.13.0'
buildscript {
repositories {
diff --git a/build.sbt b/build.sbt
index 41cd5816..210d9abb 100644
--- a/build.sbt
+++ b/build.sbt
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "one.talon",
name := "talon-one-client",
- version := "26.12.0",
+ version := "26.13.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
diff --git a/docs/BaseBlock.md b/docs/BaseBlock.md
new file mode 100644
index 00000000..565bb6a4
--- /dev/null
+++ b/docs/BaseBlock.md
@@ -0,0 +1,16 @@
+
+
+# BaseBlock
+
+Common properties shared by all block types.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier for this block. | |
+|**type** | **String** | Identifies the block variant and determines which additional properties are present in it. | |
+|**tags** | **List<String>** | Semantic labels attached to this block. | [optional] |
+
+
+
diff --git a/docs/CustomerAchievement.md b/docs/CustomerAchievement.md
new file mode 100644
index 00000000..0a7029f0
--- /dev/null
+++ b/docs/CustomerAchievement.md
@@ -0,0 +1,43 @@
+
+
+# CustomerAchievement
+
+A customer's progress in an achievement, together with the achievement definition.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | The internal ID of the achievement. | |
+|**name** | **String** | The internal name of the achievement used in API requests. | |
+|**title** | **String** | The display name of the achievement in the Campaign Manager. | |
+|**description** | **String** | The description of the achievement in the Campaign Manager. | |
+|**target** | **BigDecimal** | The required number of actions or the transactional milestone to complete the achievement. | |
+|**recurrencePolicy** | [**RecurrencePolicyEnum**](#RecurrencePolicyEnum) | The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again. | |
+|**activationPolicy** | [**ActivationPolicyEnum**](#ActivationPolicyEnum) | The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule. | |
+|**fixedStartDate** | **OffsetDateTime** | The achievement's start date when `activationPolicy` is equal to `fixed_schedule`. **Note:** It is an RFC3339 timestamp string. | [optional] |
+|**endDate** | **OffsetDateTime** | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It is an RFC3339 timestamp string. | [optional] |
+|**allowRollbackAfterCompletion** | **Boolean** | When `true`, customer progress can be rolled back in completed achievements. | |
+|**currentProgress** | [**AchievementProgress**](AchievementProgress.md) | | [optional] |
+
+
+
+## Enum: RecurrencePolicyEnum
+
+| Name | Value |
+|---- | -----|
+| NO_RECURRENCE | "no_recurrence" |
+| ON_EXPIRATION | "on_expiration" |
+| ON_COMPLETION | "on_completion" |
+
+
+
+## Enum: ActivationPolicyEnum
+
+| Name | Value |
+|---- | -----|
+| USER_ACTION | "user_action" |
+| FIXED_SCHEDULE | "fixed_schedule" |
+
+
+
diff --git a/docs/CustomerProfileIntegrationRequestV2.md b/docs/CustomerProfileIntegrationRequestV2.md
index b2246870..9055a0a2 100644
--- a/docs/CustomerProfileIntegrationRequestV2.md
+++ b/docs/CustomerProfileIntegrationRequestV2.md
@@ -25,6 +25,7 @@
| AWARDED_GIVEAWAYS | "awardedGiveaways" |
| RULE_FAILURE_REASONS | "ruleFailureReasons" |
| CAMPAIGN_ELIGIBILITY | "campaignEligibility" |
+| ACHIEVEMENTS | "achievements" |
diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md
index f564aabd..c77045a1 100644
--- a/docs/IntegrationApi.md
+++ b/docs/IntegrationApi.md
@@ -29,6 +29,7 @@ All URIs are relative to *https://yourbaseurl.talon.one*
| [**getLoyaltyProgramProfileTransactions**](IntegrationApi.md#getLoyaltyProgramProfileTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions |
| [**getReservedCustomers**](IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved |
| [**integrationGetAllCampaigns**](IntegrationApi.md#integrationGetAllCampaigns) | **GET** /v1/integration/campaigns | List all running campaigns |
+| [**joinLoyaltyProgram**](IntegrationApi.md#joinLoyaltyProgram) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/join | Join customer profile to loyalty program |
| [**linkLoyaltyCardToProfile**](IntegrationApi.md#linkLoyaltyCardToProfile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card |
| [**reopenCustomerSession**](IntegrationApi.md#reopenCustomerSession) | **PUT** /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session |
| [**returnCartItems**](IntegrationApi.md#returnCartItems) | **POST** /v2/customer_sessions/{customerSessionId}/returns | Return cart items |
@@ -1191,7 +1192,7 @@ public class Example {
//api_key_v1.setApiKeyPrefix("Token");
IntegrationApi apiInstance = new IntegrationApi(defaultClient);
- String customerSessionId = "customerSessionId_example"; // String | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
+ String customerSessionId = "customerSessionId_example"; // String | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp).
try {
IntegrationCustomerSessionResponse result = apiInstance.getCustomerSession(customerSessionId);
System.out.println(result);
@@ -1210,7 +1211,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **customerSessionId** | **String**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. | |
+| **customerSessionId** | **String**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). | |
### Return type
@@ -1896,7 +1897,7 @@ public class Example {
# **integrationGetAllCampaigns**
-> IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore)
+> IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, storeId, audienceId)
List all running campaigns
@@ -1931,8 +1932,10 @@ public class Example {
OffsetDateTime startBefore = OffsetDateTime.now(); // OffsetDateTime | Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
OffsetDateTime endAfter = OffsetDateTime.now(); // OffsetDateTime | Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
OffsetDateTime endBefore = OffsetDateTime.now(); // OffsetDateTime | Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
+ Long storeId = 56L; // Long | Filter results to campaigns linked to the specified store ID.
+ Long audienceId = 56L; // Long | Filter results to campaigns linked to the specified audience ID.
try {
- IntegrationGetAllCampaigns200Response result = apiInstance.integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore);
+ IntegrationGetAllCampaigns200Response result = apiInstance.integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, storeId, audienceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IntegrationApi#integrationGetAllCampaigns");
@@ -1956,6 +1959,8 @@ public class Example {
| **startBefore** | **OffsetDateTime**| Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] |
| **endAfter** | **OffsetDateTime**| Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] |
| **endBefore** | **OffsetDateTime**| Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | [optional] |
+| **storeId** | **Long**| Filter results to campaigns linked to the specified store ID. | [optional] |
+| **audienceId** | **Long**| Filter results to campaigns linked to the specified audience ID. | [optional] |
### Return type
@@ -1978,6 +1983,79 @@ public class Example {
| **401** | Unauthorized | - |
| **404** | Not found | - |
+
+# **joinLoyaltyProgram**
+> joinLoyaltyProgram(loyaltyProgramId, integrationId)
+
+Join customer profile to loyalty program
+
+Join a customer profile to the specified loyalty program. If the customer profile does not exist, it will be created first using the provided `integrationId`, then joined to the loyalty program. > [!note] This endpoint only works with profile-based loyalty programs. **Behavior**: - If the loyalty program does not exist, the request fails. - If the customer profile is already joined to the loyalty program, the request fails. - If the customer profile does not exist, it is created and then joined to the loyalty program.
+
+### Example
+```java
+// Import classes:
+import one.talon.ApiClient;
+import one.talon.ApiException;
+import one.talon.Configuration;
+import one.talon.auth.*;
+import one.talon.models.*;
+import one.talon.api.IntegrationApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://yourbaseurl.talon.one");
+
+ // Configure API key authorization: api_key_v1
+ ApiKeyAuth api_key_v1 = (ApiKeyAuth) defaultClient.getAuthentication("api_key_v1");
+ api_key_v1.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key_v1.setApiKeyPrefix("Token");
+
+ IntegrationApi apiInstance = new IntegrationApi(defaultClient);
+ Long loyaltyProgramId = 56L; // Long | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
+ String integrationId = "integrationId_example"; // String | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint.
+ try {
+ apiInstance.joinLoyaltyProgram(loyaltyProgramId, integrationId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling IntegrationApi#joinLoyaltyProgram");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **loyaltyProgramId** | **Long**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | |
+| **integrationId** | **String**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[api_key_v1](../README.md#api_key_v1)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **400** | Bad request | - |
+| **401** | Unauthorized | - |
+| **404** | Not found | - |
+
# **linkLoyaltyCardToProfile**
> LoyaltyCard linkLoyaltyCardToProfile(loyaltyProgramId, loyaltyCardId, loyaltyCardRegistration)
@@ -2755,7 +2833,7 @@ public class Example {
//api_key_v1.setApiKeyPrefix("Token");
IntegrationApi apiInstance = new IntegrationApi(defaultClient);
- String integrationId = "integrationId_example"; // String | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
+ String integrationId = "integrationId_example"; // String | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp).
CustomerProfileIntegrationRequestV2 customerProfileIntegrationRequestV2 = new CustomerProfileIntegrationRequestV2(); // CustomerProfileIntegrationRequestV2 | body
Boolean runRuleEngine = false; // Boolean | Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body.
Boolean dry = true; // Boolean | (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run.
@@ -2777,7 +2855,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **integrationId** | **String**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | |
+| **integrationId** | **String**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). | |
| **customerProfileIntegrationRequestV2** | [**CustomerProfileIntegrationRequestV2**](CustomerProfileIntegrationRequestV2.md)| body | |
| **runRuleEngine** | **Boolean**| Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. | [optional] [default to false] |
| **dry** | **Boolean**| (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. | [optional] |
@@ -2907,7 +2985,7 @@ public class Example {
//api_key_v1.setApiKeyPrefix("Token");
IntegrationApi apiInstance = new IntegrationApi(defaultClient);
- String customerSessionId = "customerSessionId_example"; // String | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.
+ String customerSessionId = "customerSessionId_example"; // String | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp).
IntegrationRequest integrationRequest = new IntegrationRequest(); // IntegrationRequest | body
Boolean dry = true; // Boolean | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests).
OffsetDateTime now = OffsetDateTime.now(); // OffsetDateTime | A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). > [!note] **Note** > - It must be an RFC3339 timestamp string. > - It can **only** be a date in the future. > - It can **only** be used if the `dry` parameter in the query is set to `true`.
@@ -2929,7 +3007,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **customerSessionId** | **String**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. | |
+| **customerSessionId** | **String**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). | |
| **integrationRequest** | [**IntegrationRequest**](IntegrationRequest.md)| body | |
| **dry** | **Boolean**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). | [optional] |
| **now** | **OffsetDateTime**| A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). > [!note] **Note** > - It must be an RFC3339 timestamp string. > - It can **only** be a date in the future. > - It can **only** be used if the `dry` parameter in the query is set to `true`. | [optional] |
diff --git a/docs/IntegrationCampaign.md b/docs/IntegrationCampaign.md
index b14fcd68..ced4fdd2 100644
--- a/docs/IntegrationCampaign.md
+++ b/docs/IntegrationCampaign.md
@@ -18,6 +18,8 @@
|**tags** | **List<String>** | A list of tags for the campaign. | |
|**features** | [**List<FeaturesEnum>**](#List<FeaturesEnum>) | The features enabled in this campaign. | |
|**rules** | [**List<RuleMetadata>**](RuleMetadata.md) | A list of rules containing customer-facing details of the rewards defined in the campaign. | |
+|**linkedStoreIds** | **List<Long>** | A list of store IDs linked to this campaign. | [optional] |
+|**linkedAudienceIds** | **List<Long>** | A list of audience IDs linked to this campaign. | [optional] |
diff --git a/docs/IntegrationEventV2Request.md b/docs/IntegrationEventV2Request.md
index 418bd2f4..01c836de 100644
--- a/docs/IntegrationEventV2Request.md
+++ b/docs/IntegrationEventV2Request.md
@@ -28,6 +28,7 @@
| AWARDED_GIVEAWAYS | "awardedGiveaways" |
| RULE_FAILURE_REASONS | "ruleFailureReasons" |
| CAMPAIGN_ELIGIBILITY | "campaignEligibility" |
+| ACHIEVEMENTS | "achievements" |
diff --git a/docs/IntegrationEventV2Response.md b/docs/IntegrationEventV2Response.md
index 4af0eb96..dfd7f635 100644
--- a/docs/IntegrationEventV2Response.md
+++ b/docs/IntegrationEventV2Response.md
@@ -16,6 +16,7 @@
|**createdCoupons** | [**List<Coupon>**](Coupon.md) | The coupons that were created during the event processing. | |
|**createdReferrals** | [**List<Referral>**](Referral.md) | The referrals that were created during the event processing. | |
|**awardedGiveaways** | [**List<Giveaway>**](Giveaway.md) | The giveaways that were awarded during the event processing. | [optional] |
+|**achievements** | [**List<CustomerAchievement>**](CustomerAchievement.md) | The achievements progress of the customer. | [optional] |
|**event** | [**Event**](Event.md) | The event that was processed. | [optional] |
diff --git a/docs/IntegrationEventV3Response.md b/docs/IntegrationEventV3Response.md
index 58fe8cd3..39e163db 100644
--- a/docs/IntegrationEventV3Response.md
+++ b/docs/IntegrationEventV3Response.md
@@ -16,6 +16,7 @@
|**createdCoupons** | [**List<Coupon>**](Coupon.md) | The coupons that were created during the event processing. | |
|**createdReferrals** | [**List<Referral>**](Referral.md) | The referrals that were created during the event processing. | |
|**awardedGiveaways** | [**List<Giveaway>**](Giveaway.md) | The giveaways that were awarded during the event processing. | [optional] |
+|**achievements** | [**List<CustomerAchievement>**](CustomerAchievement.md) | The achievements progress of the customer. | [optional] |
|**advancedEvent** | [**EventV3**](EventV3.md) | The advanced event that was processed. | [optional] |
diff --git a/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md
index 98c5b69c..71b7d23b 100644
--- a/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md
+++ b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md
@@ -13,6 +13,7 @@
|**subledgerID** | **String** | | |
|**sourceOfEvent** | **String** | | |
|**currentTier** | **String** | The name of the customer's current tier. | |
+|**sessionIntegrationID** | **String** | The integration ID of the session through which the points were earned or lost. Only set when the change results from a rule engine execution; empty otherwise. | [optional] |
|**employeeName** | **String** | | [optional] |
|**userID** | **Long** | | [optional] |
|**currentPoints** | **Float** | | |
diff --git a/docs/IntegrationRequest.md b/docs/IntegrationRequest.md
index 902ccf75..071774c2 100644
--- a/docs/IntegrationRequest.md
+++ b/docs/IntegrationRequest.md
@@ -28,6 +28,7 @@ The body of a V2 integration API request (customer session update). Next to the
| RULE_FAILURE_REASONS | "ruleFailureReasons" |
| PREVIOUS_RETURNS | "previousReturns" |
| CAMPAIGN_ELIGIBILITY | "campaignEligibility" |
+| ACHIEVEMENTS | "achievements" |
diff --git a/docs/IntegrationResponse.md b/docs/IntegrationResponse.md
index 869e5552..cdcb228f 100644
--- a/docs/IntegrationResponse.md
+++ b/docs/IntegrationResponse.md
@@ -17,6 +17,7 @@ Contains entities that might be valuable in Talon.One integrations.
|**createdCoupons** | [**List<Coupon>**](Coupon.md) | The coupons that were created during the event processing. | |
|**createdReferrals** | [**List<Referral>**](Referral.md) | The referrals that were created during the event processing. | |
|**awardedGiveaways** | [**List<Giveaway>**](Giveaway.md) | The giveaways that were awarded during the event processing. | [optional] |
+|**achievements** | [**List<CustomerAchievement>**](CustomerAchievement.md) | The achievements progress of the customer. | [optional] |
diff --git a/docs/IntegrationStateV2.md b/docs/IntegrationStateV2.md
index c9c42fb3..ce5f9103 100644
--- a/docs/IntegrationStateV2.md
+++ b/docs/IntegrationStateV2.md
@@ -16,6 +16,7 @@
|**createdCoupons** | [**List<Coupon>**](Coupon.md) | The coupons that were created during the event processing. | |
|**createdReferrals** | [**List<Referral>**](Referral.md) | The referrals that were created during the event processing. | |
|**awardedGiveaways** | [**List<Giveaway>**](Giveaway.md) | The giveaways that were awarded during the event processing. | [optional] |
+|**achievements** | [**List<CustomerAchievement>**](CustomerAchievement.md) | The achievements progress of the customer. | [optional] |
|**referral** | [**InventoryReferral**](InventoryReferral.md) | The referral that was processed. | [optional] |
|**coupons** | [**List<IntegrationCoupon>**](IntegrationCoupon.md) | The coupons that were processed. | [optional] |
|**event** | [**Event**](Event.md) | The event that was processed. | [optional] |
diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md
index e52489f2..87a2d4ff 100644
--- a/docs/ManagementApi.md
+++ b/docs/ManagementApi.md
@@ -123,6 +123,7 @@ All URIs are relative to *https://yourbaseurl.talon.one*
| [**getReferralsWithoutTotalCount**](ManagementApi.md#getReferralsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List referrals |
| [**getRoleV2**](ManagementApi.md#getRoleV2) | **GET** /v2/roles/{roleId} | Get role |
| [**getRuleset**](ManagementApi.md#getRuleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset |
+| [**getRulesetV2**](ManagementApi.md#getRulesetV2) | **GET** /v2/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset (V2) |
| [**getRulesets**](ManagementApi.md#getRulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List campaign rulesets |
| [**getStore**](ManagementApi.md#getStore) | **GET** /v1/applications/{applicationId}/stores/{storeId} | Get store |
| [**getUser**](ManagementApi.md#getUser) | **GET** /v1/users/{userId} | Get user |
@@ -3466,7 +3467,7 @@ public class Example {
# **exportCoupons**
-> String exportCoupons(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly)
+> String exportCoupons(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, deletedBefore, deletedAfter)
Export coupons
@@ -3509,8 +3510,10 @@ public class Example {
String dateFormat = "excel"; // String | Determines the format of dates in the export document.
String campaignState = "enabled"; // String | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived.
Boolean valuesOnly = false; // Boolean | Filter results to only return the coupon codes (`value` column) without the associated coupon data.
+ OffsetDateTime deletedBefore = OffsetDateTime.now(); // OffsetDateTime | Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results.
+ OffsetDateTime deletedAfter = OffsetDateTime.now(); // OffsetDateTime | Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results.
try {
- String result = apiInstance.exportCoupons(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly);
+ String result = apiInstance.exportCoupons(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, deletedBefore, deletedAfter);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ManagementApi#exportCoupons");
@@ -3542,6 +3545,8 @@ public class Example {
| **dateFormat** | **String**| Determines the format of dates in the export document. | [optional] [enum: excel, ISO8601] |
| **campaignState** | **String**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. | [optional] [enum: enabled, disabled, archived, scheduled, running, expired, staged] |
| **valuesOnly** | **Boolean**| Filter results to only return the coupon codes (`value` column) without the associated coupon data. | [optional] [default to false] |
+| **deletedBefore** | **OffsetDateTime**| Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. | [optional] |
+| **deletedAfter** | **OffsetDateTime**| Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. | [optional] |
### Return type
@@ -6064,7 +6069,7 @@ public class Example {
# **getAttributes**
-> GetAttributes200Response getAttributes(pageSize, skip, sort, entity, applicationIds, type, kind, search)
+> GetAttributes200Response getAttributes(pageSize, skip, sort, entity, applicationIds, loyaltyProgramIds, type, kind, search)
List custom attributes
@@ -6097,11 +6102,12 @@ public class Example {
String sort = "sort_example"; // String | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations.
String entity = "entity_example"; // String | Returned attributes will be filtered by supplied entity.
String applicationIds = "applicationIds_example"; // String | Returned attributes will be filtered by supplied application ids
+ String loyaltyProgramIds = "loyaltyProgramIds_example"; // String | Returned attributes will be filtered by the specified loyalty program ids, separated by commas. You can only use this parameter when `entity` is `LoyaltyCard`.
String type = "type_example"; // String | Returned attributes will be filtered by supplied type
String kind = "builtin"; // String | Returned attributes will be filtered by supplied kind (builtin or custom)
String search = "search_example"; // String | Returned attributes will be filtered by searching case insensitive through Attribute name, description and type
try {
- GetAttributes200Response result = apiInstance.getAttributes(pageSize, skip, sort, entity, applicationIds, type, kind, search);
+ GetAttributes200Response result = apiInstance.getAttributes(pageSize, skip, sort, entity, applicationIds, loyaltyProgramIds, type, kind, search);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ManagementApi#getAttributes");
@@ -6123,6 +6129,7 @@ public class Example {
| **sort** | **String**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. | [optional] |
| **entity** | **String**| Returned attributes will be filtered by supplied entity. | [optional] |
| **applicationIds** | **String**| Returned attributes will be filtered by supplied application ids | [optional] |
+| **loyaltyProgramIds** | **String**| Returned attributes will be filtered by the specified loyalty program ids, separated by commas. You can only use this parameter when `entity` is `LoyaltyCard`. | [optional] |
| **type** | **String**| Returned attributes will be filtered by supplied type | [optional] |
| **kind** | **String**| Returned attributes will be filtered by supplied kind (builtin or custom) | [optional] [enum: builtin, custom] |
| **search** | **String**| Returned attributes will be filtered by searching case insensitive through Attribute name, description and type | [optional] |
@@ -9212,6 +9219,79 @@ public class Example {
|-------------|-------------|------------------|
| **200** | OK | - |
+
+# **getRulesetV2**
+> RulesetV2 getRulesetV2(applicationId, campaignId, rulesetId)
+
+Get ruleset (V2)
+
+Retrieve the specified ruleset as a JSON object.
+
+### Example
+```java
+// Import classes:
+import one.talon.ApiClient;
+import one.talon.ApiException;
+import one.talon.Configuration;
+import one.talon.auth.*;
+import one.talon.models.*;
+import one.talon.api.ManagementApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://yourbaseurl.talon.one");
+
+ // Configure API key authorization: api_key_v1
+ ApiKeyAuth api_key_v1 = (ApiKeyAuth) defaultClient.getAuthentication("api_key_v1");
+ api_key_v1.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key_v1.setApiKeyPrefix("Token");
+
+ ManagementApi apiInstance = new ManagementApi(defaultClient);
+ Long applicationId = 56L; // Long | The ID of the Application. It is displayed in your Talon.One deployment URL.
+ Long campaignId = 56L; // Long | The ID of the campaign. It is displayed in your Talon.One deployment URL.
+ Long rulesetId = 56L; // Long | The ID of the ruleset.
+ try {
+ RulesetV2 result = apiInstance.getRulesetV2(applicationId, campaignId, rulesetId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ManagementApi#getRulesetV2");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **applicationId** | **Long**| The ID of the Application. It is displayed in your Talon.One deployment URL. | |
+| **campaignId** | **Long**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | |
+| **rulesetId** | **Long**| The ID of the ruleset. | |
+
+### Return type
+
+[**RulesetV2**](RulesetV2.md)
+
+### Authorization
+
+[api_key_v1](../README.md#api_key_v1)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+
# **getRulesets**
> GetRulesets200Response getRulesets(applicationId, campaignId, pageSize, skip, sort)
diff --git a/docs/PassthroughBlock.md b/docs/PassthroughBlock.md
new file mode 100644
index 00000000..0251d823
--- /dev/null
+++ b/docs/PassthroughBlock.md
@@ -0,0 +1,24 @@
+
+
+# PassthroughBlock
+
+A block representing a Talang expression that could not be mapped to a typed block. The expression is preserved in its raw Talang array form for diagnostic and round-trip purposes.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier for this block. | |
+|**type** | [**TypeEnum**](#TypeEnum) | The type discriminator for this block. | |
+|**expression** | **List<Object>** | The raw Talang expression as an array. The first element is the function name; subsequent elements are its arguments, which may themselves be nested expressions. | |
+
+
+
+## Enum: TypeEnum
+
+| Name | Value |
+|---- | -----|
+| PASSTHROUGH | "passthrough" |
+
+
+
diff --git a/docs/PromotionGroupBlock.md b/docs/PromotionGroupBlock.md
new file mode 100644
index 00000000..263290b4
--- /dev/null
+++ b/docs/PromotionGroupBlock.md
@@ -0,0 +1,29 @@
+
+
+# PromotionGroupBlock
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier for this block. | |
+|**type** | **String** | Identifies the block variant and determines which additional properties are present in it. | |
+|**tags** | **List<String>** | Semantic labels attached to this block. | [optional] |
+|**operator** | [**OperatorEnum**](#OperatorEnum) | Logical operator applied across child blocks. `all` requires every child to pass, `atLeastOne` requires at least one, `none` requires all to fail. | |
+|**blocks** | **List<Object>** | Child blocks evaluated according to the operator. | |
+|**onFailure** | **List<Object>** | Promotion blocks evaluated when this block fails or returns false. | [optional] |
+|**onError** | **Map<String, List<Object>>** | Named error handlers evaluated when a specific error occurs. | [optional] |
+
+
+
+## Enum: OperatorEnum
+
+| Name | Value |
+|---- | -----|
+| ALL | "all" |
+| AT_LEAST_ONE | "atLeastOne" |
+| NONE | "none" |
+
+
+
diff --git a/docs/PromotionRuleV2.md b/docs/PromotionRuleV2.md
new file mode 100644
index 00000000..48e073c4
--- /dev/null
+++ b/docs/PromotionRuleV2.md
@@ -0,0 +1,17 @@
+
+
+# PromotionRuleV2
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier of the rule. | [optional] |
+|**parentId** | **String** | ID of the parent rule, if any. | [optional] |
+|**title** | **String** | A short description of the rule. | |
+|**description** | **String** | A longer description of the rule. | [optional] |
+|**blocks** | **List<Object>** | The condition and effect blocks that make up this promotion rule. | |
+
+
+
diff --git a/docs/ResponseContentObject.md b/docs/ResponseContentObject.md
index 7573fb9c..3187d4fb 100644
--- a/docs/ResponseContentObject.md
+++ b/docs/ResponseContentObject.md
@@ -22,6 +22,7 @@
| AWARDED_GIVEAWAYS | "awardedGiveaways" |
| RULE_FAILURE_REASONS | "ruleFailureReasons" |
| CAMPAIGN_ELIGIBILITY | "campaignEligibility" |
+| ACHIEVEMENTS | "achievements" |
diff --git a/docs/Reward.md b/docs/Reward.md
index 8a62048a..c8a6d498 100644
--- a/docs/Reward.md
+++ b/docs/Reward.md
@@ -15,7 +15,7 @@
|**description** | **String** | A description of the reward. | [optional] |
|**applicationIds** | **List<Long>** | The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. | |
|**sandbox** | **Boolean** | Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type. | |
-|**visibilityConditions** | [**Rule**](Rule.md) | An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. | [optional] |
+|**eligibilityConditions** | [**Rule**](Rule.md) | An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. | [optional] |
|**rule** | [**Rule**](Rule.md) | Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. | [optional] |
|**bindings** | [**List<Binding>**](Binding.md) | A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules. | [optional] |
|**modified** | **OffsetDateTime** | The timestamp when the reward was last updated in RFC3339 format. | [optional] |
diff --git a/docs/Risk.md b/docs/Risk.md
new file mode 100644
index 00000000..9f1ab2fb
--- /dev/null
+++ b/docs/Risk.md
@@ -0,0 +1,78 @@
+
+
+# Risk
+
+A risk detected by the anomaly detection service for one Application group.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | The internal ID of this entity. | |
+|**created** | **OffsetDateTime** | The time this entity was created. | |
+|**notificationId** | **Long** | The ID of the risk notification rule that flagged this risk. | |
+|**runDate** | **LocalDate** | The date of the ML pipeline run that detected this risk. | |
+|**groupKey** | **String** | The Application group this risk was detected in. Contains the Application ID, or `__GLOBAL__` for metrics that are not grouped by Application. | |
+|**applicationId** | **Long** | The ID of the Application this risk belongs to. Absent for global metrics. | [optional] |
+|**status** | [**StatusEnum**](#StatusEnum) | The triage lifecycle status of this risk. | |
+|**criticality** | [**CriticalityEnum**](#CriticalityEnum) | The critical classification bucket of this risk. | |
+|**entity** | [**EntityEnum**](#EntityEnum) | The entity type the risk was detected in. | |
+|**activity** | [**ActivityEnum**](#ActivityEnum) | The activity metric the risk was detected in. | |
+|**timeFrame** | [**TimeFrameEnum**](#TimeFrameEnum) | The rolling time window of the risk evaluation. | |
+|**reportedDate** | **OffsetDateTime** | The time the ML service reported this risk. | |
+|**affectedEntityCount** | **Long** | The total number of entities affected by this risk. | |
+|**description** | **String** | Human-readable description of the detected anomaly. | [optional] |
+|**modified** | **OffsetDateTime** | Timestamp of the most recent update. | |
+
+
+
+## Enum: StatusEnum
+
+| Name | Value |
+|---- | -----|
+| ACTIVE | "active" |
+| IN_REVIEW | "in_review" |
+| CONFIRMED | "confirmed" |
+| DISCARDED | "discarded" |
+
+
+
+## Enum: CriticalityEnum
+
+| Name | Value |
+|---- | -----|
+| CRITICAL | "critical" |
+| NOT_CRITICAL | "not_critical" |
+
+
+
+## Enum: EntityEnum
+
+| Name | Value |
+|---- | -----|
+| CUSTOMER_PROFILE | "customer_profile" |
+| CUSTOMER_SESSION | "customer_session" |
+
+
+
+## Enum: ActivityEnum
+
+| Name | Value |
+|---- | -----|
+| LOYALTY_POINTS_EARNED | "loyalty_points_earned" |
+| DISCOUNTED_AMOUNT | "discounted_amount" |
+| COMPLETED_ORDERS | "completed_orders" |
+| COUPON_ATTEMPTS | "coupon_attempts" |
+
+
+
+## Enum: TimeFrameEnum
+
+| Name | Value |
+|---- | -----|
+| _1_DAY | "1_day" |
+| _1_WEEK | "1_week" |
+| _1_MONTH | "1_month" |
+
+
+
diff --git a/docs/RiskAffectedEntityItem.md b/docs/RiskAffectedEntityItem.md
new file mode 100644
index 00000000..45e4295d
--- /dev/null
+++ b/docs/RiskAffectedEntityItem.md
@@ -0,0 +1,27 @@
+
+
+# RiskAffectedEntityItem
+
+A single entity flagged as anomalous within a risk.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**entityId** | **String** | The integration ID of the affected entity. | |
+|**activityValue** | **Double** | The observed value of the monitored activity metric for this entity. | |
+|**threshold** | **Double** | The anomaly threshold computed for the entity's Application group. | |
+|**severityRatio** | **Double** | The ratio of the observed value to the threshold. | |
+|**criticality** | [**CriticalityEnum**](#CriticalityEnum) | The critical classification bucket of this entity. | |
+
+
+
+## Enum: CriticalityEnum
+
+| Name | Value |
+|---- | -----|
+| CRITICAL | "critical" |
+| NOT_CRITICAL | "not_critical" |
+
+
+
diff --git a/docs/RiskDetail.md b/docs/RiskDetail.md
new file mode 100644
index 00000000..5555999a
--- /dev/null
+++ b/docs/RiskDetail.md
@@ -0,0 +1,79 @@
+
+
+# RiskDetail
+
+Details of a risk, including its most severely affected entities.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | The internal ID of this entity. | |
+|**created** | **OffsetDateTime** | The time this entity was created. | |
+|**notificationId** | **Long** | The ID of the risk notification rule that flagged this risk. | |
+|**runDate** | **LocalDate** | The date of the ML pipeline run that detected this risk. | |
+|**groupKey** | **String** | The Application group this risk was detected in. Contains the Application ID, or `__GLOBAL__` for metrics that are not grouped by Application. | |
+|**applicationId** | **Long** | The ID of the Application this risk belongs to. Absent for global metrics. | [optional] |
+|**status** | [**StatusEnum**](#StatusEnum) | The triage lifecycle status of this risk. | |
+|**criticality** | [**CriticalityEnum**](#CriticalityEnum) | The critical classification bucket of this risk. | |
+|**entity** | [**EntityEnum**](#EntityEnum) | The entity type the risk was detected in. | |
+|**activity** | [**ActivityEnum**](#ActivityEnum) | The activity metric the risk was detected in. | |
+|**timeFrame** | [**TimeFrameEnum**](#TimeFrameEnum) | The rolling time window of the risk evaluation. | |
+|**reportedDate** | **OffsetDateTime** | The time the ML service reported this risk. | |
+|**affectedEntityCount** | **Long** | The total number of entities affected by this risk. | |
+|**description** | **String** | Human-readable description of the detected anomaly. | [optional] |
+|**modified** | **OffsetDateTime** | Timestamp of the most recent update. | |
+|**affectedEntities** | [**List<RiskAffectedEntityItem>**](RiskAffectedEntityItem.md) | The affected entities with the highest severity ratios, in descending order. | |
+
+
+
+## Enum: StatusEnum
+
+| Name | Value |
+|---- | -----|
+| ACTIVE | "active" |
+| IN_REVIEW | "in_review" |
+| CONFIRMED | "confirmed" |
+| DISCARDED | "discarded" |
+
+
+
+## Enum: CriticalityEnum
+
+| Name | Value |
+|---- | -----|
+| CRITICAL | "critical" |
+| NOT_CRITICAL | "not_critical" |
+
+
+
+## Enum: EntityEnum
+
+| Name | Value |
+|---- | -----|
+| CUSTOMER_PROFILE | "customer_profile" |
+| CUSTOMER_SESSION | "customer_session" |
+
+
+
+## Enum: ActivityEnum
+
+| Name | Value |
+|---- | -----|
+| LOYALTY_POINTS_EARNED | "loyalty_points_earned" |
+| DISCOUNTED_AMOUNT | "discounted_amount" |
+| COMPLETED_ORDERS | "completed_orders" |
+| COUPON_ATTEMPTS | "coupon_attempts" |
+
+
+
+## Enum: TimeFrameEnum
+
+| Name | Value |
+|---- | -----|
+| _1_DAY | "1_day" |
+| _1_WEEK | "1_week" |
+| _1_MONTH | "1_month" |
+
+
+
diff --git a/docs/RuleV2.md b/docs/RuleV2.md
new file mode 100644
index 00000000..1f565a4f
--- /dev/null
+++ b/docs/RuleV2.md
@@ -0,0 +1,17 @@
+
+
+# RuleV2
+
+Shared fields common to all V2 rule types.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier of the rule. | [optional] |
+|**parentId** | **String** | ID of the parent rule, if any. | [optional] |
+|**title** | **String** | A short description of the rule. | |
+|**description** | **String** | A longer description of the rule. | [optional] |
+
+
+
diff --git a/docs/RulesetV2.md b/docs/RulesetV2.md
new file mode 100644
index 00000000..455300b8
--- /dev/null
+++ b/docs/RulesetV2.md
@@ -0,0 +1,24 @@
+
+
+# RulesetV2
+
+Ruleset in the V2 JSON block format.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | Internal ID of this entity. | |
+|**created** | **OffsetDateTime** | The time this entity was created. | |
+|**userId** | **Long** | The ID of the user that created this ruleset. | |
+|**campaignId** | **Long** | The ID of the campaign that owns this entity. | [optional] |
+|**templateId** | **Long** | The ID of the campaign template that owns this entity. | [optional] |
+|**activatedAt** | **OffsetDateTime** | Timestamp indicating when this ruleset was activated. | [optional] |
+|**promotionRules** | [**List<PromotionRuleV2>**](PromotionRuleV2.md) | Set of promotion rules. | |
+|**strikethroughRules** | [**List<StrikethroughRuleV2>**](StrikethroughRuleV2.md) | Set of strikethrough rules. | |
+|**selectors** | **List<Map<String, Object>>** | Variable bindings of type selector. | [optional] |
+|**bundles** | **List<Map<String, Object>>** | Variable bindings of type bundle. | [optional] |
+|**parameters** | **List<Map<String, Object>>** | Variable bindings of type template parameter. | [optional] |
+
+
+
diff --git a/docs/StrikethroughGroupBlock.md b/docs/StrikethroughGroupBlock.md
new file mode 100644
index 00000000..36309b6e
--- /dev/null
+++ b/docs/StrikethroughGroupBlock.md
@@ -0,0 +1,29 @@
+
+
+# StrikethroughGroupBlock
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier for this block. | |
+|**type** | **String** | Identifies the block variant and determines which additional properties are present in it. | |
+|**tags** | **List<String>** | Semantic labels attached to this block. | [optional] |
+|**operator** | [**OperatorEnum**](#OperatorEnum) | Logical operator applied across child blocks. `all` requires every child to pass, `atLeastOne` requires at least one, `none` requires all to fail. | |
+|**blocks** | **List<Object>** | Child blocks evaluated according to the operator. | |
+|**onFailure** | **List<Object>** | Strikethrough blocks evaluated when this block fails or returns false. | [optional] |
+|**onError** | **Map<String, List<Object>>** | Named error handlers evaluated when a specific error occurs. | [optional] |
+
+
+
+## Enum: OperatorEnum
+
+| Name | Value |
+|---- | -----|
+| ALL | "all" |
+| AT_LEAST_ONE | "atLeastOne" |
+| NONE | "none" |
+
+
+
diff --git a/docs/StrikethroughRuleV2.md b/docs/StrikethroughRuleV2.md
new file mode 100644
index 00000000..87671155
--- /dev/null
+++ b/docs/StrikethroughRuleV2.md
@@ -0,0 +1,17 @@
+
+
+# StrikethroughRuleV2
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Unique identifier of the rule. | [optional] |
+|**parentId** | **String** | ID of the parent rule, if any. | [optional] |
+|**title** | **String** | A short description of the rule. | |
+|**description** | **String** | A longer description of the rule. | [optional] |
+|**blocks** | **List<Object>** | The condition and effect blocks that make up this strikethrough rule. | |
+
+
+
diff --git a/docs/UpdateReward.md b/docs/UpdateReward.md
index 07577c6c..6ef0ba76 100644
--- a/docs/UpdateReward.md
+++ b/docs/UpdateReward.md
@@ -10,7 +10,7 @@
|**name** | **String** | The name of the reward. | |
|**description** | **String** | A description of the reward. | [optional] |
|**status** | [**StatusEnum**](#StatusEnum) | The status of the reward. | |
-|**visibilityConditions** | [**Rule**](Rule.md) | An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. | [optional] |
+|**eligibilityConditions** | [**Rule**](Rule.md) | An optional rule that manages who can see this reward. If not specified, the reward is visible to all customers. **Note:** Only the `condition` field is evaluated within this rule. The `effects` field must be an empty array, and `bindings` are not supported. | [optional] |
|**rule** | [**Rule**](Rule.md) | Rule to apply. **Note**: The `bindings` field inside the rule must not be used in this endpoint. All bindings should be defined at the reward level via the top-level `bindings` field. | [optional] |
|**bindings** | [**List<Binding>**](Binding.md) | A list of named variables created before the reward's rules are evaluated. Each binding pairs a name with a talang expression. The expression is evaluated once and its result is available by name in any rule condition or effect. Bindings must be defined outside of individual rules. | [optional] |
|**pointsRequired** | [**List<RewardPointsRequired>**](RewardPointsRequired.md) | The loyalty points required to activate the reward. Each object defines the specific loyalty program and subledger from which points are deducted when activating the reward. **Note:** - Objects with an `id` are updated. - Objects without an `id` are created. - Existing objects omitted from the payload are deleted. | [optional] |
diff --git a/pom.xml b/pom.xml
index a617cff0..65a37cb5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
talon-one-clientjartalon-one-client
- 26.12.0
+ 26.13.0https://github.com/talon-one/talon-one-maven-artifactsTalon.One unified JAVA SDK. It allows for programmatic access to the integration and management API with their respective authentication strategies
diff --git a/src/main/java/one/talon/ApiClient.java b/src/main/java/one/talon/ApiClient.java
index 869d3253..b9bffd90 100644
--- a/src/main/java/one/talon/ApiClient.java
+++ b/src/main/java/one/talon/ApiClient.java
@@ -142,7 +142,7 @@ protected void init() {
json = new JSON();
// Set default User-Agent.
- setUserAgent("OpenAPI-Generator/26.12.0/java");
+ setUserAgent("OpenAPI-Generator/26.13.0/java");
authentications = new HashMap();
}
diff --git a/src/main/java/one/talon/Configuration.java b/src/main/java/one/talon/Configuration.java
index 4a3bd1b4..ff6f2922 100644
--- a/src/main/java/one/talon/Configuration.java
+++ b/src/main/java/one/talon/Configuration.java
@@ -19,7 +19,7 @@
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0")
public class Configuration {
- public static final String VERSION = "26.12.0";
+ public static final String VERSION = "26.13.0";
private static final AtomicReference defaultApiClient = new AtomicReference<>();
private static volatile Supplier apiClientFactory = ApiClient::new;
diff --git a/src/main/java/one/talon/JSON.java b/src/main/java/one/talon/JSON.java
index 7909e6ed..8de94c25 100644
--- a/src/main/java/one/talon/JSON.java
+++ b/src/main/java/one/talon/JSON.java
@@ -175,6 +175,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.AudienceMembership.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.AudienceReference.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.AwardGiveawayEffectProps.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.BaseBlock.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.BaseCampaign.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.BaseLoyaltyProgram.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.BaseNotification.CustomTypeAdapterFactory());
@@ -292,6 +293,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateTemplateCampaignResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CustomEffect.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CustomEffectProps.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CustomerAchievement.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CustomerActivityReport.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CustomerAnalytics.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CustomerInventory.CustomTypeAdapterFactory());
@@ -629,6 +631,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.OutgoingIntegrationTemplates.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.OutgoingIntegrationType.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.OutgoingIntegrationTypes.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PassthroughBlock.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PatchItemCatalogAction.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PatchManyItemsCatalogAction.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PendingActivePointsData.CustomTypeAdapterFactory());
@@ -650,6 +653,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProfileAudiencesChanges.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProjectedTier.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PromoteExperiment.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PromotionGroupBlock.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PromotionRuleV2.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RedeemReferralEffectProps.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Referral.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ReferralConstraints.CustomTypeAdapterFactory());
@@ -671,6 +676,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RevisionVersion.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Reward.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RewardPointsRequired.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Risk.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RiskAffectedEntityItem.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RiskDetail.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RiskNotification.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Role.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RoleAssign.CustomTypeAdapterFactory());
@@ -695,7 +703,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RuleFailureReason.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RuleMetadata.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RuleMetadataEligibility.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RuleV2.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Ruleset.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RulesetV2.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.SSOConfig.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.SamlConnection.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.SamlConnectionInternal.CustomTypeAdapterFactory());
@@ -737,7 +747,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughCustomEffectPerItemProps.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughDebugResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughEffect.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughGroupBlock.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughLabelingNotification.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughRuleV2.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughSetDiscountPerItemEffectProps.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughSetDiscountPerItemMemberEffectProps.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new one.talon.model.StrikethroughTrigger.CustomTypeAdapterFactory());
diff --git a/src/main/java/one/talon/api/IntegrationApi.java b/src/main/java/one/talon/api/IntegrationApi.java
index 700db9a9..b01b3f28 100644
--- a/src/main/java/one/talon/api/IntegrationApi.java
+++ b/src/main/java/one/talon/api/IntegrationApi.java
@@ -2369,7 +2369,7 @@ public okhttp3.Call getCustomerInventoryAsync(@javax.annotation.Nonnull String i
}
/**
* Build call for getCustomerSession
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -2441,7 +2441,7 @@ private okhttp3.Call getCustomerSessionValidateBeforeCall(@javax.annotation.Nonn
/**
* Get customer session
* Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - [Update customer session](#tag/Customer-sessions/operation/updateCustomerSessionV2) - [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2)
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @return IntegrationCustomerSessionResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -2461,7 +2461,7 @@ public IntegrationCustomerSessionResponse getCustomerSession(@javax.annotation.N
/**
* Get customer session
* Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - [Update customer session](#tag/Customer-sessions/operation/updateCustomerSessionV2) - [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2)
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @return ApiResponse<IntegrationCustomerSessionResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -2482,7 +2482,7 @@ public ApiResponse getCustomerSessionWithHtt
/**
* Get customer session (asynchronously)
* Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - [Update customer session](#tag/Customer-sessions/operation/updateCustomerSessionV2) - [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2)
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -3979,6 +3979,8 @@ public okhttp3.Call getReservedCustomersAsync(@javax.annotation.Nonnull String c
* @param startBefore Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endAfter Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endBefore Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
+ * @param storeId Filter results to campaigns linked to the specified store ID. (optional)
+ * @param audienceId Filter results to campaigns linked to the specified audience ID. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -3992,7 +3994,7 @@ public okhttp3.Call getReservedCustomersAsync(@javax.annotation.Nonnull String c
404
Not found
-
*/
- public okhttp3.Call integrationGetAllCampaignsCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call integrationGetAllCampaignsCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, @javax.annotation.Nullable Long storeId, @javax.annotation.Nullable Long audienceId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -4045,6 +4047,14 @@ public okhttp3.Call integrationGetAllCampaignsCall(@javax.annotation.Nullable Lo
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endBefore", endBefore));
}
+ if (storeId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("storeId", storeId));
+ }
+
+ if (audienceId != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("audienceId", audienceId));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -4065,8 +4075,8 @@ public okhttp3.Call integrationGetAllCampaignsCall(@javax.annotation.Nullable Lo
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call integrationGetAllCampaignsValidateBeforeCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, final ApiCallback _callback) throws ApiException {
- return integrationGetAllCampaignsCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, _callback);
+ private okhttp3.Call integrationGetAllCampaignsValidateBeforeCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, @javax.annotation.Nullable Long storeId, @javax.annotation.Nullable Long audienceId, final ApiCallback _callback) throws ApiException {
+ return integrationGetAllCampaignsCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, storeId, audienceId, _callback);
}
@@ -4080,6 +4090,8 @@ private okhttp3.Call integrationGetAllCampaignsValidateBeforeCall(@javax.annotat
* @param startBefore Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endAfter Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endBefore Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
+ * @param storeId Filter results to campaigns linked to the specified store ID. (optional)
+ * @param audienceId Filter results to campaigns linked to the specified audience ID. (optional)
* @return IntegrationGetAllCampaigns200Response
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -4092,8 +4104,8 @@ private okhttp3.Call integrationGetAllCampaignsValidateBeforeCall(@javax.annotat
404
Not found
-
*/
- public IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore) throws ApiException {
- ApiResponse localVarResp = integrationGetAllCampaignsWithHttpInfo(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore);
+ public IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, @javax.annotation.Nullable Long storeId, @javax.annotation.Nullable Long audienceId) throws ApiException {
+ ApiResponse localVarResp = integrationGetAllCampaignsWithHttpInfo(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, storeId, audienceId);
return localVarResp.getData();
}
@@ -4107,6 +4119,8 @@ public IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(@javax.a
* @param startBefore Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endAfter Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endBefore Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
+ * @param storeId Filter results to campaigns linked to the specified store ID. (optional)
+ * @param audienceId Filter results to campaigns linked to the specified audience ID. (optional)
* @return ApiResponse<IntegrationGetAllCampaigns200Response>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -4119,8 +4133,8 @@ public IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(@javax.a
404
Not found
-
*/
- public ApiResponse integrationGetAllCampaignsWithHttpInfo(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore) throws ApiException {
- okhttp3.Call localVarCall = integrationGetAllCampaignsValidateBeforeCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, null);
+ public ApiResponse integrationGetAllCampaignsWithHttpInfo(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, @javax.annotation.Nullable Long storeId, @javax.annotation.Nullable Long audienceId) throws ApiException {
+ okhttp3.Call localVarCall = integrationGetAllCampaignsValidateBeforeCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, storeId, audienceId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
@@ -4135,6 +4149,8 @@ public ApiResponse integrationGetAllCampa
* @param startBefore Filter results to only include campaigns that start on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endAfter Filter results to only include campaigns that end on or after the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
* @param endBefore Filter results to only include campaigns that end on or before the specified timestamp. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. (optional)
+ * @param storeId Filter results to campaigns linked to the specified store ID. (optional)
+ * @param audienceId Filter results to campaigns linked to the specified audience ID. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -4148,13 +4164,158 @@ public ApiResponse integrationGetAllCampa
404
Not found
-
*/
- public okhttp3.Call integrationGetAllCampaignsAsync(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call integrationGetAllCampaignsAsync(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable List campaignIds, @javax.annotation.Nullable OffsetDateTime startAfter, @javax.annotation.Nullable OffsetDateTime startBefore, @javax.annotation.Nullable OffsetDateTime endAfter, @javax.annotation.Nullable OffsetDateTime endBefore, @javax.annotation.Nullable Long storeId, @javax.annotation.Nullable Long audienceId, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = integrationGetAllCampaignsValidateBeforeCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, _callback);
+ okhttp3.Call localVarCall = integrationGetAllCampaignsValidateBeforeCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, storeId, audienceId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for joinLoyaltyProgram
+ * @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required)
+ * @param integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad request
-
+
401
Unauthorized
-
+
404
Not found
-
+
+ */
+ public okhttp3.Call joinLoyaltyProgramCall(@javax.annotation.Nonnull Long loyaltyProgramId, @javax.annotation.Nonnull String integrationId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/join"
+ .replace("{" + "loyaltyProgramId" + "}", localVarApiClient.escapeString(loyaltyProgramId.toString()))
+ .replace("{" + "integrationId" + "}", localVarApiClient.escapeString(integrationId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_key_v1" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call joinLoyaltyProgramValidateBeforeCall(@javax.annotation.Nonnull Long loyaltyProgramId, @javax.annotation.Nonnull String integrationId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'loyaltyProgramId' is set
+ if (loyaltyProgramId == null) {
+ throw new ApiException("Missing the required parameter 'loyaltyProgramId' when calling joinLoyaltyProgram(Async)");
+ }
+
+ // verify the required parameter 'integrationId' is set
+ if (integrationId == null) {
+ throw new ApiException("Missing the required parameter 'integrationId' when calling joinLoyaltyProgram(Async)");
+ }
+
+ return joinLoyaltyProgramCall(loyaltyProgramId, integrationId, _callback);
+
+ }
+
+ /**
+ * Join customer profile to loyalty program
+ * Join a customer profile to the specified loyalty program. If the customer profile does not exist, it will be created first using the provided `integrationId`, then joined to the loyalty program. > [!note] This endpoint only works with profile-based loyalty programs. **Behavior**: - If the loyalty program does not exist, the request fails. - If the customer profile is already joined to the loyalty program, the request fails. - If the customer profile does not exist, it is created and then joined to the loyalty program.
+ * @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required)
+ * @param integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad request
-
+
401
Unauthorized
-
+
404
Not found
-
+
+ */
+ public void joinLoyaltyProgram(@javax.annotation.Nonnull Long loyaltyProgramId, @javax.annotation.Nonnull String integrationId) throws ApiException {
+ joinLoyaltyProgramWithHttpInfo(loyaltyProgramId, integrationId);
+ }
+
+ /**
+ * Join customer profile to loyalty program
+ * Join a customer profile to the specified loyalty program. If the customer profile does not exist, it will be created first using the provided `integrationId`, then joined to the loyalty program. > [!note] This endpoint only works with profile-based loyalty programs. **Behavior**: - If the loyalty program does not exist, the request fails. - If the customer profile is already joined to the loyalty program, the request fails. - If the customer profile does not exist, it is created and then joined to the loyalty program.
+ * @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required)
+ * @param integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad request
-
+
401
Unauthorized
-
+
404
Not found
-
+
+ */
+ public ApiResponse joinLoyaltyProgramWithHttpInfo(@javax.annotation.Nonnull Long loyaltyProgramId, @javax.annotation.Nonnull String integrationId) throws ApiException {
+ okhttp3.Call localVarCall = joinLoyaltyProgramValidateBeforeCall(loyaltyProgramId, integrationId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Join customer profile to loyalty program (asynchronously)
+ * Join a customer profile to the specified loyalty program. If the customer profile does not exist, it will be created first using the provided `integrationId`, then joined to the loyalty program. > [!note] This endpoint only works with profile-based loyalty programs. **Behavior**: - If the loyalty program does not exist, the request fails. - If the customer profile is already joined to the loyalty program, the request fails. - If the customer profile does not exist, it is created and then joined to the loyalty program.
+ * @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required)
+ * @param integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration ID with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad request
-
+
401
Unauthorized
-
+
404
Not found
-
+
+ */
+ public okhttp3.Call joinLoyaltyProgramAsync(@javax.annotation.Nonnull Long loyaltyProgramId, @javax.annotation.Nonnull String integrationId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = joinLoyaltyProgramValidateBeforeCall(loyaltyProgramId, integrationId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
/**
* Build call for linkLoyaltyCardToProfile
* @param loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required)
@@ -5671,7 +5832,7 @@ public okhttp3.Call updateCustomerProfileAudiencesAsync(@javax.annotation.Nonnul
}
/**
* Build call for updateCustomerProfileV2
- * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required)
+ * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param customerProfileIntegrationRequestV2 body (required)
* @param runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false)
* @param dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional)
@@ -5761,7 +5922,7 @@ private okhttp3.Call updateCustomerProfileV2ValidateBeforeCall(@javax.annotation
/**
* Update customer profile
* Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. > [!note] **Note** > - Updating a customer profile returns a response with the requested integration state. > - You can use the `responseContent` property to save yourself extra API calls. For example, you can get > the customer profile details directly without extra requests. > - We recommend sending requests sequentially. > See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). > - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered in rule evaluation when `runRuleEngine` is `true`.
- * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required)
+ * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param customerProfileIntegrationRequestV2 body (required)
* @param runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false)
* @param dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional)
@@ -5785,7 +5946,7 @@ public CustomerProfileIntegrationResponseV2 updateCustomerProfileV2(@javax.annot
/**
* Update customer profile
* Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. > [!note] **Note** > - Updating a customer profile returns a response with the requested integration state. > - You can use the `responseContent` property to save yourself extra API calls. For example, you can get > the customer profile details directly without extra requests. > - We recommend sending requests sequentially. > See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). > - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered in rule evaluation when `runRuleEngine` is `true`.
- * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required)
+ * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param customerProfileIntegrationRequestV2 body (required)
* @param runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false)
* @param dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional)
@@ -5810,7 +5971,7 @@ public ApiResponse updateCustomerProfileV2
/**
* Update customer profile (asynchronously)
* Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. > [!note] **Note** > - Updating a customer profile returns a response with the requested integration state. > - You can use the `responseContent` property to save yourself extra API calls. For example, you can get > the customer profile details directly without extra requests. > - We recommend sending requests sequentially. > See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). > - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered in rule evaluation when `runRuleEngine` is `true`.
- * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required)
+ * @param integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. **Note**: It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param customerProfileIntegrationRequestV2 body (required)
* @param runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false)
* @param dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional)
@@ -5983,7 +6144,7 @@ public okhttp3.Call updateCustomerProfilesV2Async(@javax.annotation.Nonnull Mult
}
/**
* Build call for updateCustomerSessionV2
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param integrationRequest body (required)
* @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional)
* @param now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). > [!note] **Note** > - It must be an RFC3339 timestamp string. > - It can **only** be a date in the future. > - It can **only** be used if the `dry` parameter in the query is set to `true`. (optional)
@@ -6073,7 +6234,7 @@ private okhttp3.Call updateCustomerSessionV2ValidateBeforeCall(@javax.annotation
/**
* Update customer session
* Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. > [!note] **Note** > - The currency for the session and the cart items in it is the currency set for the Application linked to this session. > - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered for rule evaluation. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. > [!note] **Note** > - If the specified profile does not exist, an empty profile is **created automatically**. > You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). > - Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. > For example, you can get the customer profile details directly without extra requests. > - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param integrationRequest body (required)
* @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional)
* @param now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). > [!note] **Note** > - It must be an RFC3339 timestamp string. > - It can **only** be a date in the future. > - It can **only** be used if the `dry` parameter in the query is set to `true`. (optional)
@@ -6097,7 +6258,7 @@ public IntegrationStateV2 updateCustomerSessionV2(@javax.annotation.Nonnull Stri
/**
* Update customer session
* Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. > [!note] **Note** > - The currency for the session and the cart items in it is the currency set for the Application linked to this session. > - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered for rule evaluation. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. > [!note] **Note** > - If the specified profile does not exist, an empty profile is **created automatically**. > You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). > - Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. > For example, you can get the customer profile details directly without extra requests. > - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param integrationRequest body (required)
* @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional)
* @param now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). > [!note] **Note** > - It must be an RFC3339 timestamp string. > - It can **only** be a date in the future. > - It can **only** be used if the `dry` parameter in the query is set to `true`. (optional)
@@ -6122,7 +6283,7 @@ public ApiResponse updateCustomerSessionV2WithHttpInfo(@java
/**
* Update customer session (asynchronously)
* Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. > [!note] **Note** > - The currency for the session and the cart items in it is the currency set for the Application linked to this session. > - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered for rule evaluation. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. > [!note] **Note** > - If the specified profile does not exist, an empty profile is **created automatically**. > You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). > - Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. > For example, you can get the customer profile details directly without extra requests. > - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
- * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required)
+ * @param customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. **Notes**: - There is no length limit for this ID. - It must be URL-encoded. For example, replace spaces with `%20`. [Learn more](https://www.w3schools.com/tags/ref_urlencode.asp). (required)
* @param integrationRequest body (required)
* @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint considers **only** the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). (optional)
* @param now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). > [!note] **Note** > - It must be an RFC3339 timestamp string. > - It can **only** be a date in the future. > - It can **only** be used if the `dry` parameter in the query is set to `true`. (optional)
diff --git a/src/main/java/one/talon/api/ManagementApi.java b/src/main/java/one/talon/api/ManagementApi.java
index 2aa369a2..e1810484 100644
--- a/src/main/java/one/talon/api/ManagementApi.java
+++ b/src/main/java/one/talon/api/ManagementApi.java
@@ -140,6 +140,7 @@
import one.talon.model.RoleV2;
import one.talon.model.RoleV2Base;
import one.talon.model.Ruleset;
+import one.talon.model.RulesetV2;
import one.talon.model.ScimBaseGroup;
import one.talon.model.ScimGroup;
import one.talon.model.ScimGroupsListResponse;
@@ -6715,6 +6716,8 @@ public okhttp3.Call exportCollectionItemsAsync(@javax.annotation.Nonnull Long ap
* @param dateFormat Determines the format of dates in the export document. (optional)
* @param campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. (optional)
* @param valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false)
+ * @param deletedBefore Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
+ * @param deletedAfter Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -6725,7 +6728,7 @@ public okhttp3.Call exportCollectionItemsAsync(@javax.annotation.Nonnull Long ap
200
OK
-
*/
- public okhttp3.Call exportCouponsCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call exportCouponsCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, @javax.annotation.Nullable OffsetDateTime deletedBefore, @javax.annotation.Nullable OffsetDateTime deletedAfter, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -6807,6 +6810,14 @@ public okhttp3.Call exportCouponsCall(@javax.annotation.Nonnull Long application
localVarQueryParams.addAll(localVarApiClient.parameterToPair("valuesOnly", valuesOnly));
}
+ if (deletedBefore != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("deletedBefore", deletedBefore));
+ }
+
+ if (deletedAfter != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("deletedAfter", deletedAfter));
+ }
+
final String[] localVarAccepts = {
"application/csv"
};
@@ -6827,13 +6838,13 @@ public okhttp3.Call exportCouponsCall(@javax.annotation.Nonnull Long application
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call exportCouponsValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call exportCouponsValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, @javax.annotation.Nullable OffsetDateTime deletedBefore, @javax.annotation.Nullable OffsetDateTime deletedAfter, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'applicationId' is set
if (applicationId == null) {
throw new ApiException("Missing the required parameter 'applicationId' when calling exportCoupons(Async)");
}
- return exportCouponsCall(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, _callback);
+ return exportCouponsCall(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, deletedBefore, deletedAfter, _callback);
}
@@ -6855,6 +6866,8 @@ private okhttp3.Call exportCouponsValidateBeforeCall(@javax.annotation.Nonnull L
* @param dateFormat Determines the format of dates in the export document. (optional)
* @param campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. (optional)
* @param valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false)
+ * @param deletedBefore Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
+ * @param deletedAfter Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -6864,8 +6877,8 @@ private okhttp3.Call exportCouponsValidateBeforeCall(@javax.annotation.Nonnull L
200
OK
-
*/
- public String exportCoupons(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly) throws ApiException {
- ApiResponse localVarResp = exportCouponsWithHttpInfo(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly);
+ public String exportCoupons(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, @javax.annotation.Nullable OffsetDateTime deletedBefore, @javax.annotation.Nullable OffsetDateTime deletedAfter) throws ApiException {
+ ApiResponse localVarResp = exportCouponsWithHttpInfo(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, deletedBefore, deletedAfter);
return localVarResp.getData();
}
@@ -6887,6 +6900,8 @@ public String exportCoupons(@javax.annotation.Nonnull Long applicationId, @javax
* @param dateFormat Determines the format of dates in the export document. (optional)
* @param campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. (optional)
* @param valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false)
+ * @param deletedBefore Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
+ * @param deletedAfter Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -6896,8 +6911,8 @@ public String exportCoupons(@javax.annotation.Nonnull Long applicationId, @javax
200
OK
-
*/
- public ApiResponse exportCouponsWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly) throws ApiException {
- okhttp3.Call localVarCall = exportCouponsValidateBeforeCall(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, null);
+ public ApiResponse exportCouponsWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, @javax.annotation.Nullable OffsetDateTime deletedBefore, @javax.annotation.Nullable OffsetDateTime deletedAfter) throws ApiException {
+ okhttp3.Call localVarCall = exportCouponsValidateBeforeCall(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, deletedBefore, deletedAfter, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
@@ -6920,6 +6935,8 @@ public ApiResponse exportCouponsWithHttpInfo(@javax.annotation.Nonnull L
* @param dateFormat Determines the format of dates in the export document. (optional)
* @param campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. (optional)
* @param valuesOnly Filter results to only return the coupon codes (`value` column) without the associated coupon data. (optional, default to false)
+ * @param deletedBefore Timestamp that filters the results to only contain coupons deleted before this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
+ * @param deletedAfter Timestamp that filters the results to only contain coupons deleted after this date. Must be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. **Note:** Only coupons deleted in the last 7 days will appear in the results. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -6930,9 +6947,9 @@ public ApiResponse exportCouponsWithHttpInfo(@javax.annotation.Nonnull L
200
OK
-
*/
- public okhttp3.Call exportCouponsAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call exportCouponsAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable BigDecimal campaignId, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String value, @javax.annotation.Nullable OffsetDateTime createdBefore, @javax.annotation.Nullable OffsetDateTime createdAfter, @javax.annotation.Nullable String valid, @javax.annotation.Nullable String usable, @javax.annotation.Nullable Long referralId, @javax.annotation.Nullable String recipientIntegrationId, @javax.annotation.Nullable String batchId, @javax.annotation.Nullable Boolean exactMatch, @javax.annotation.Nullable String dateFormat, @javax.annotation.Nullable String campaignState, @javax.annotation.Nullable Boolean valuesOnly, @javax.annotation.Nullable OffsetDateTime deletedBefore, @javax.annotation.Nullable OffsetDateTime deletedAfter, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = exportCouponsValidateBeforeCall(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, _callback);
+ okhttp3.Call localVarCall = exportCouponsValidateBeforeCall(applicationId, campaignId, sort, value, createdBefore, createdAfter, valid, usable, referralId, recipientIntegrationId, batchId, exactMatch, dateFormat, campaignState, valuesOnly, deletedBefore, deletedAfter, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
@@ -12089,6 +12106,7 @@ public okhttp3.Call getAttributeAsync(@javax.annotation.Nonnull Long attributeId
* @param sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional)
* @param entity Returned attributes will be filtered by supplied entity. (optional)
* @param applicationIds Returned attributes will be filtered by supplied application ids (optional)
+ * @param loyaltyProgramIds Returned attributes will be filtered by the specified loyalty program ids, separated by commas. You can only use this parameter when `entity` is `LoyaltyCard`. (optional)
* @param type Returned attributes will be filtered by supplied type (optional)
* @param kind Returned attributes will be filtered by supplied kind (builtin or custom) (optional)
* @param search Returned attributes will be filtered by searching case insensitive through Attribute name, description and type (optional)
@@ -12102,7 +12120,7 @@ public okhttp3.Call getAttributeAsync(@javax.annotation.Nonnull Long attributeId
200
OK
-
*/
- public okhttp3.Call getAttributesCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getAttributesCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String loyaltyProgramIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -12147,6 +12165,10 @@ public okhttp3.Call getAttributesCall(@javax.annotation.Nullable Long pageSize,
localVarQueryParams.addAll(localVarApiClient.parameterToPair("applicationIds", applicationIds));
}
+ if (loyaltyProgramIds != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("loyaltyProgramIds", loyaltyProgramIds));
+ }
+
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
@@ -12179,8 +12201,8 @@ public okhttp3.Call getAttributesCall(@javax.annotation.Nullable Long pageSize,
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getAttributesValidateBeforeCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
- return getAttributesCall(pageSize, skip, sort, entity, applicationIds, type, kind, search, _callback);
+ private okhttp3.Call getAttributesValidateBeforeCall(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String loyaltyProgramIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
+ return getAttributesCall(pageSize, skip, sort, entity, applicationIds, loyaltyProgramIds, type, kind, search, _callback);
}
@@ -12192,6 +12214,7 @@ private okhttp3.Call getAttributesValidateBeforeCall(@javax.annotation.Nullable
* @param sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional)
* @param entity Returned attributes will be filtered by supplied entity. (optional)
* @param applicationIds Returned attributes will be filtered by supplied application ids (optional)
+ * @param loyaltyProgramIds Returned attributes will be filtered by the specified loyalty program ids, separated by commas. You can only use this parameter when `entity` is `LoyaltyCard`. (optional)
* @param type Returned attributes will be filtered by supplied type (optional)
* @param kind Returned attributes will be filtered by supplied kind (builtin or custom) (optional)
* @param search Returned attributes will be filtered by searching case insensitive through Attribute name, description and type (optional)
@@ -12204,8 +12227,8 @@ private okhttp3.Call getAttributesValidateBeforeCall(@javax.annotation.Nullable
200
OK
-
*/
- public GetAttributes200Response getAttributes(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search) throws ApiException {
- ApiResponse localVarResp = getAttributesWithHttpInfo(pageSize, skip, sort, entity, applicationIds, type, kind, search);
+ public GetAttributes200Response getAttributes(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String loyaltyProgramIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search) throws ApiException {
+ ApiResponse localVarResp = getAttributesWithHttpInfo(pageSize, skip, sort, entity, applicationIds, loyaltyProgramIds, type, kind, search);
return localVarResp.getData();
}
@@ -12217,6 +12240,7 @@ public GetAttributes200Response getAttributes(@javax.annotation.Nullable Long pa
* @param sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional)
* @param entity Returned attributes will be filtered by supplied entity. (optional)
* @param applicationIds Returned attributes will be filtered by supplied application ids (optional)
+ * @param loyaltyProgramIds Returned attributes will be filtered by the specified loyalty program ids, separated by commas. You can only use this parameter when `entity` is `LoyaltyCard`. (optional)
* @param type Returned attributes will be filtered by supplied type (optional)
* @param kind Returned attributes will be filtered by supplied kind (builtin or custom) (optional)
* @param search Returned attributes will be filtered by searching case insensitive through Attribute name, description and type (optional)
@@ -12229,8 +12253,8 @@ public GetAttributes200Response getAttributes(@javax.annotation.Nullable Long pa
200
OK
-
*/
- public ApiResponse getAttributesWithHttpInfo(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search) throws ApiException {
- okhttp3.Call localVarCall = getAttributesValidateBeforeCall(pageSize, skip, sort, entity, applicationIds, type, kind, search, null);
+ public ApiResponse getAttributesWithHttpInfo(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String loyaltyProgramIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search) throws ApiException {
+ okhttp3.Call localVarCall = getAttributesValidateBeforeCall(pageSize, skip, sort, entity, applicationIds, loyaltyProgramIds, type, kind, search, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
@@ -12243,6 +12267,7 @@ public ApiResponse getAttributesWithHttpInfo(@javax.an
* @param sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** You may not be able to use all fields for sorting. This is due to performance limitations. (optional)
* @param entity Returned attributes will be filtered by supplied entity. (optional)
* @param applicationIds Returned attributes will be filtered by supplied application ids (optional)
+ * @param loyaltyProgramIds Returned attributes will be filtered by the specified loyalty program ids, separated by commas. You can only use this parameter when `entity` is `LoyaltyCard`. (optional)
* @param type Returned attributes will be filtered by supplied type (optional)
* @param kind Returned attributes will be filtered by supplied kind (builtin or custom) (optional)
* @param search Returned attributes will be filtered by searching case insensitive through Attribute name, description and type (optional)
@@ -12256,9 +12281,9 @@ public ApiResponse getAttributesWithHttpInfo(@javax.an
200
OK
-
*/
- public okhttp3.Call getAttributesAsync(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getAttributesAsync(@javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String entity, @javax.annotation.Nullable String applicationIds, @javax.annotation.Nullable String loyaltyProgramIds, @javax.annotation.Nullable String type, @javax.annotation.Nullable String kind, @javax.annotation.Nullable String search, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getAttributesValidateBeforeCall(pageSize, skip, sort, entity, applicationIds, type, kind, search, _callback);
+ okhttp3.Call localVarCall = getAttributesValidateBeforeCall(pageSize, skip, sort, entity, applicationIds, loyaltyProgramIds, type, kind, search, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
@@ -18812,6 +18837,153 @@ public okhttp3.Call getRulesetAsync(@javax.annotation.Nonnull Long applicationId
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for getRulesetV2
+ * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required)
+ * @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required)
+ * @param rulesetId The ID of the ruleset. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
+ */
+ public okhttp3.Call getRulesetV2Call(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long rulesetId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}"
+ .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString()))
+ .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString()))
+ .replace("{" + "rulesetId" + "}", localVarApiClient.escapeString(rulesetId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_key_v1" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getRulesetV2ValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long rulesetId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'applicationId' is set
+ if (applicationId == null) {
+ throw new ApiException("Missing the required parameter 'applicationId' when calling getRulesetV2(Async)");
+ }
+
+ // verify the required parameter 'campaignId' is set
+ if (campaignId == null) {
+ throw new ApiException("Missing the required parameter 'campaignId' when calling getRulesetV2(Async)");
+ }
+
+ // verify the required parameter 'rulesetId' is set
+ if (rulesetId == null) {
+ throw new ApiException("Missing the required parameter 'rulesetId' when calling getRulesetV2(Async)");
+ }
+
+ return getRulesetV2Call(applicationId, campaignId, rulesetId, _callback);
+
+ }
+
+ /**
+ * Get ruleset (V2)
+ * Retrieve the specified ruleset as a JSON object.
+ * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required)
+ * @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required)
+ * @param rulesetId The ID of the ruleset. (required)
+ * @return RulesetV2
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
+ */
+ public RulesetV2 getRulesetV2(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long rulesetId) throws ApiException {
+ ApiResponse localVarResp = getRulesetV2WithHttpInfo(applicationId, campaignId, rulesetId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get ruleset (V2)
+ * Retrieve the specified ruleset as a JSON object.
+ * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required)
+ * @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required)
+ * @param rulesetId The ID of the ruleset. (required)
+ * @return ApiResponse<RulesetV2>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
+ */
+ public ApiResponse getRulesetV2WithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long rulesetId) throws ApiException {
+ okhttp3.Call localVarCall = getRulesetV2ValidateBeforeCall(applicationId, campaignId, rulesetId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get ruleset (V2) (asynchronously)
+ * Retrieve the specified ruleset as a JSON object.
+ * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required)
+ * @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required)
+ * @param rulesetId The ID of the ruleset. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Response Details
+
Status Code
Description
Response Headers
+
200
OK
-
+
+ */
+ public okhttp3.Call getRulesetV2Async(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long rulesetId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getRulesetV2ValidateBeforeCall(applicationId, campaignId, rulesetId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for getRulesets
* @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required)
diff --git a/src/main/java/one/talon/model/AdditionalCampaignProperties.java b/src/main/java/one/talon/model/AdditionalCampaignProperties.java
index 4964fc32..66822b57 100644
--- a/src/main/java/one/talon/model/AdditionalCampaignProperties.java
+++ b/src/main/java/one/talon/model/AdditionalCampaignProperties.java
@@ -61,76 +61,91 @@ public class AdditionalCampaignProperties {
private List budgets;
public static final String SERIALIZED_NAME_COUPON_REDEMPTION_COUNT = "couponRedemptionCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_COUPON_REDEMPTION_COUNT)
@javax.annotation.Nullable
private Long couponRedemptionCount;
public static final String SERIALIZED_NAME_REFERRAL_REDEMPTION_COUNT = "referralRedemptionCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REFERRAL_REDEMPTION_COUNT)
@javax.annotation.Nullable
private Long referralRedemptionCount;
public static final String SERIALIZED_NAME_DISCOUNT_COUNT = "discountCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_DISCOUNT_COUNT)
@javax.annotation.Nullable
private BigDecimal discountCount;
public static final String SERIALIZED_NAME_DISCOUNT_EFFECT_COUNT = "discountEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_DISCOUNT_EFFECT_COUNT)
@javax.annotation.Nullable
private Long discountEffectCount;
public static final String SERIALIZED_NAME_COUPON_CREATION_COUNT = "couponCreationCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_COUPON_CREATION_COUNT)
@javax.annotation.Nullable
private Long couponCreationCount;
public static final String SERIALIZED_NAME_CUSTOM_EFFECT_COUNT = "customEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CUSTOM_EFFECT_COUNT)
@javax.annotation.Nullable
private Long customEffectCount;
public static final String SERIALIZED_NAME_REFERRAL_CREATION_COUNT = "referralCreationCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REFERRAL_CREATION_COUNT)
@javax.annotation.Nullable
private Long referralCreationCount;
public static final String SERIALIZED_NAME_ADD_FREE_ITEM_EFFECT_COUNT = "addFreeItemEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_ADD_FREE_ITEM_EFFECT_COUNT)
@javax.annotation.Nullable
private Long addFreeItemEffectCount;
public static final String SERIALIZED_NAME_AWARDED_GIVEAWAYS_COUNT = "awardedGiveawaysCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_AWARDED_GIVEAWAYS_COUNT)
@javax.annotation.Nullable
private Long awardedGiveawaysCount;
public static final String SERIALIZED_NAME_CREATED_LOYALTY_POINTS_COUNT = "createdLoyaltyPointsCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CREATED_LOYALTY_POINTS_COUNT)
@javax.annotation.Nullable
private BigDecimal createdLoyaltyPointsCount;
public static final String SERIALIZED_NAME_CREATED_LOYALTY_POINTS_EFFECT_COUNT = "createdLoyaltyPointsEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CREATED_LOYALTY_POINTS_EFFECT_COUNT)
@javax.annotation.Nullable
private Long createdLoyaltyPointsEffectCount;
public static final String SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_COUNT = "redeemedLoyaltyPointsCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_COUNT)
@javax.annotation.Nullable
private BigDecimal redeemedLoyaltyPointsCount;
public static final String SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_EFFECT_COUNT = "redeemedLoyaltyPointsEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_EFFECT_COUNT)
@javax.annotation.Nullable
private Long redeemedLoyaltyPointsEffectCount;
public static final String SERIALIZED_NAME_CALL_API_EFFECT_COUNT = "callApiEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CALL_API_EFFECT_COUNT)
@javax.annotation.Nullable
private Long callApiEffectCount;
public static final String SERIALIZED_NAME_RESERVECOUPON_EFFECT_COUNT = "reservecouponEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_RESERVECOUPON_EFFECT_COUNT)
@javax.annotation.Nullable
private Long reservecouponEffectCount;
@@ -270,6 +285,7 @@ public void setBudgets(@javax.annotation.Nullable List budgets)
}
+ @Deprecated
public AdditionalCampaignProperties couponRedemptionCount(@javax.annotation.Nullable Long couponRedemptionCount) {
this.couponRedemptionCount = couponRedemptionCount;
return this;
@@ -278,17 +294,21 @@ public AdditionalCampaignProperties couponRedemptionCount(@javax.annotation.Null
/**
* This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign.
* @return couponRedemptionCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCouponRedemptionCount() {
return couponRedemptionCount;
}
+ @Deprecated
public void setCouponRedemptionCount(@javax.annotation.Nullable Long couponRedemptionCount) {
this.couponRedemptionCount = couponRedemptionCount;
}
+ @Deprecated
public AdditionalCampaignProperties referralRedemptionCount(@javax.annotation.Nullable Long referralRedemptionCount) {
this.referralRedemptionCount = referralRedemptionCount;
return this;
@@ -297,17 +317,21 @@ public AdditionalCampaignProperties referralRedemptionCount(@javax.annotation.Nu
/**
* This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign.
* @return referralRedemptionCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getReferralRedemptionCount() {
return referralRedemptionCount;
}
+ @Deprecated
public void setReferralRedemptionCount(@javax.annotation.Nullable Long referralRedemptionCount) {
this.referralRedemptionCount = referralRedemptionCount;
}
+ @Deprecated
public AdditionalCampaignProperties discountCount(@javax.annotation.Nullable BigDecimal discountCount) {
this.discountCount = discountCount;
return this;
@@ -316,17 +340,21 @@ public AdditionalCampaignProperties discountCount(@javax.annotation.Nullable Big
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign.
* @return discountCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public BigDecimal getDiscountCount() {
return discountCount;
}
+ @Deprecated
public void setDiscountCount(@javax.annotation.Nullable BigDecimal discountCount) {
this.discountCount = discountCount;
}
+ @Deprecated
public AdditionalCampaignProperties discountEffectCount(@javax.annotation.Nullable Long discountEffectCount) {
this.discountEffectCount = discountEffectCount;
return this;
@@ -335,17 +363,21 @@ public AdditionalCampaignProperties discountEffectCount(@javax.annotation.Nullab
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign.
* @return discountEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getDiscountEffectCount() {
return discountEffectCount;
}
+ @Deprecated
public void setDiscountEffectCount(@javax.annotation.Nullable Long discountEffectCount) {
this.discountEffectCount = discountEffectCount;
}
+ @Deprecated
public AdditionalCampaignProperties couponCreationCount(@javax.annotation.Nullable Long couponCreationCount) {
this.couponCreationCount = couponCreationCount;
return this;
@@ -354,17 +386,21 @@ public AdditionalCampaignProperties couponCreationCount(@javax.annotation.Nullab
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign.
* @return couponCreationCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCouponCreationCount() {
return couponCreationCount;
}
+ @Deprecated
public void setCouponCreationCount(@javax.annotation.Nullable Long couponCreationCount) {
this.couponCreationCount = couponCreationCount;
}
+ @Deprecated
public AdditionalCampaignProperties customEffectCount(@javax.annotation.Nullable Long customEffectCount) {
this.customEffectCount = customEffectCount;
return this;
@@ -373,17 +409,21 @@ public AdditionalCampaignProperties customEffectCount(@javax.annotation.Nullable
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign.
* @return customEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCustomEffectCount() {
return customEffectCount;
}
+ @Deprecated
public void setCustomEffectCount(@javax.annotation.Nullable Long customEffectCount) {
this.customEffectCount = customEffectCount;
}
+ @Deprecated
public AdditionalCampaignProperties referralCreationCount(@javax.annotation.Nullable Long referralCreationCount) {
this.referralCreationCount = referralCreationCount;
return this;
@@ -392,17 +432,21 @@ public AdditionalCampaignProperties referralCreationCount(@javax.annotation.Null
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign.
* @return referralCreationCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getReferralCreationCount() {
return referralCreationCount;
}
+ @Deprecated
public void setReferralCreationCount(@javax.annotation.Nullable Long referralCreationCount) {
this.referralCreationCount = referralCreationCount;
}
+ @Deprecated
public AdditionalCampaignProperties addFreeItemEffectCount(@javax.annotation.Nullable Long addFreeItemEffectCount) {
this.addFreeItemEffectCount = addFreeItemEffectCount;
return this;
@@ -411,17 +455,21 @@ public AdditionalCampaignProperties addFreeItemEffectCount(@javax.annotation.Nul
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign.
* @return addFreeItemEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getAddFreeItemEffectCount() {
return addFreeItemEffectCount;
}
+ @Deprecated
public void setAddFreeItemEffectCount(@javax.annotation.Nullable Long addFreeItemEffectCount) {
this.addFreeItemEffectCount = addFreeItemEffectCount;
}
+ @Deprecated
public AdditionalCampaignProperties awardedGiveawaysCount(@javax.annotation.Nullable Long awardedGiveawaysCount) {
this.awardedGiveawaysCount = awardedGiveawaysCount;
return this;
@@ -430,17 +478,21 @@ public AdditionalCampaignProperties awardedGiveawaysCount(@javax.annotation.Null
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign.
* @return awardedGiveawaysCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getAwardedGiveawaysCount() {
return awardedGiveawaysCount;
}
+ @Deprecated
public void setAwardedGiveawaysCount(@javax.annotation.Nullable Long awardedGiveawaysCount) {
this.awardedGiveawaysCount = awardedGiveawaysCount;
}
+ @Deprecated
public AdditionalCampaignProperties createdLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal createdLoyaltyPointsCount) {
this.createdLoyaltyPointsCount = createdLoyaltyPointsCount;
return this;
@@ -449,17 +501,21 @@ public AdditionalCampaignProperties createdLoyaltyPointsCount(@javax.annotation.
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign.
* @return createdLoyaltyPointsCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public BigDecimal getCreatedLoyaltyPointsCount() {
return createdLoyaltyPointsCount;
}
+ @Deprecated
public void setCreatedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal createdLoyaltyPointsCount) {
this.createdLoyaltyPointsCount = createdLoyaltyPointsCount;
}
+ @Deprecated
public AdditionalCampaignProperties createdLoyaltyPointsEffectCount(@javax.annotation.Nullable Long createdLoyaltyPointsEffectCount) {
this.createdLoyaltyPointsEffectCount = createdLoyaltyPointsEffectCount;
return this;
@@ -468,17 +524,21 @@ public AdditionalCampaignProperties createdLoyaltyPointsEffectCount(@javax.annot
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign.
* @return createdLoyaltyPointsEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCreatedLoyaltyPointsEffectCount() {
return createdLoyaltyPointsEffectCount;
}
+ @Deprecated
public void setCreatedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long createdLoyaltyPointsEffectCount) {
this.createdLoyaltyPointsEffectCount = createdLoyaltyPointsEffectCount;
}
+ @Deprecated
public AdditionalCampaignProperties redeemedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal redeemedLoyaltyPointsCount) {
this.redeemedLoyaltyPointsCount = redeemedLoyaltyPointsCount;
return this;
@@ -487,17 +547,21 @@ public AdditionalCampaignProperties redeemedLoyaltyPointsCount(@javax.annotation
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign.
* @return redeemedLoyaltyPointsCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public BigDecimal getRedeemedLoyaltyPointsCount() {
return redeemedLoyaltyPointsCount;
}
+ @Deprecated
public void setRedeemedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal redeemedLoyaltyPointsCount) {
this.redeemedLoyaltyPointsCount = redeemedLoyaltyPointsCount;
}
+ @Deprecated
public AdditionalCampaignProperties redeemedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long redeemedLoyaltyPointsEffectCount) {
this.redeemedLoyaltyPointsEffectCount = redeemedLoyaltyPointsEffectCount;
return this;
@@ -506,17 +570,21 @@ public AdditionalCampaignProperties redeemedLoyaltyPointsEffectCount(@javax.anno
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign.
* @return redeemedLoyaltyPointsEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getRedeemedLoyaltyPointsEffectCount() {
return redeemedLoyaltyPointsEffectCount;
}
+ @Deprecated
public void setRedeemedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long redeemedLoyaltyPointsEffectCount) {
this.redeemedLoyaltyPointsEffectCount = redeemedLoyaltyPointsEffectCount;
}
+ @Deprecated
public AdditionalCampaignProperties callApiEffectCount(@javax.annotation.Nullable Long callApiEffectCount) {
this.callApiEffectCount = callApiEffectCount;
return this;
@@ -525,17 +593,21 @@ public AdditionalCampaignProperties callApiEffectCount(@javax.annotation.Nullabl
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign.
* @return callApiEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCallApiEffectCount() {
return callApiEffectCount;
}
+ @Deprecated
public void setCallApiEffectCount(@javax.annotation.Nullable Long callApiEffectCount) {
this.callApiEffectCount = callApiEffectCount;
}
+ @Deprecated
public AdditionalCampaignProperties reservecouponEffectCount(@javax.annotation.Nullable Long reservecouponEffectCount) {
this.reservecouponEffectCount = reservecouponEffectCount;
return this;
@@ -544,12 +616,15 @@ public AdditionalCampaignProperties reservecouponEffectCount(@javax.annotation.N
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign.
* @return reservecouponEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getReservecouponEffectCount() {
return reservecouponEffectCount;
}
+ @Deprecated
public void setReservecouponEffectCount(@javax.annotation.Nullable Long reservecouponEffectCount) {
this.reservecouponEffectCount = reservecouponEffectCount;
}
diff --git a/src/main/java/one/talon/model/ApplicationCustomer.java b/src/main/java/one/talon/model/ApplicationCustomer.java
index 569ebf47..11069ae8 100644
--- a/src/main/java/one/talon/model/ApplicationCustomer.java
+++ b/src/main/java/one/talon/model/ApplicationCustomer.java
@@ -94,6 +94,7 @@ public class ApplicationCustomer {
private BigDecimal totalSales;
public static final String SERIALIZED_NAME_LOYALTY_MEMBERSHIPS = "loyaltyMemberships";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_LOYALTY_MEMBERSHIPS)
@javax.annotation.Nullable
private List loyaltyMemberships;
@@ -262,6 +263,7 @@ public void setTotalSales(@javax.annotation.Nonnull BigDecimal totalSales) {
}
+ @Deprecated
public ApplicationCustomer loyaltyMemberships(@javax.annotation.Nullable List loyaltyMemberships) {
this.loyaltyMemberships = loyaltyMemberships;
return this;
@@ -278,12 +280,15 @@ public ApplicationCustomer addLoyaltyMembershipsItem(LoyaltyMembership loyaltyMe
/**
* **DEPRECATED. Always returns `null`.** A list of loyalty programs joined by the customer.
* @return loyaltyMemberships
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public List getLoyaltyMemberships() {
return loyaltyMemberships;
}
+ @Deprecated
public void setLoyaltyMemberships(@javax.annotation.Nullable List loyaltyMemberships) {
this.loyaltyMemberships = loyaltyMemberships;
}
diff --git a/src/main/java/one/talon/model/AudienceCustomer.java b/src/main/java/one/talon/model/AudienceCustomer.java
index 97e8ef52..84a2bdc8 100644
--- a/src/main/java/one/talon/model/AudienceCustomer.java
+++ b/src/main/java/one/talon/model/AudienceCustomer.java
@@ -94,6 +94,7 @@ public class AudienceCustomer {
private BigDecimal totalSales;
public static final String SERIALIZED_NAME_LOYALTY_MEMBERSHIPS = "loyaltyMemberships";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_LOYALTY_MEMBERSHIPS)
@javax.annotation.Nullable
private List loyaltyMemberships;
@@ -267,6 +268,7 @@ public void setTotalSales(@javax.annotation.Nonnull BigDecimal totalSales) {
}
+ @Deprecated
public AudienceCustomer loyaltyMemberships(@javax.annotation.Nullable List loyaltyMemberships) {
this.loyaltyMemberships = loyaltyMemberships;
return this;
@@ -283,12 +285,15 @@ public AudienceCustomer addLoyaltyMembershipsItem(LoyaltyMembership loyaltyMembe
/**
* **DEPRECATED. Always returns `null`.** A list of loyalty programs joined by the customer.
* @return loyaltyMemberships
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public List getLoyaltyMemberships() {
return loyaltyMemberships;
}
+ @Deprecated
public void setLoyaltyMemberships(@javax.annotation.Nullable List loyaltyMemberships) {
this.loyaltyMemberships = loyaltyMemberships;
}
diff --git a/src/main/java/one/talon/model/BaseBlock.java b/src/main/java/one/talon/model/BaseBlock.java
new file mode 100644
index 00000000..ab166413
--- /dev/null
+++ b/src/main/java/one/talon/model/BaseBlock.java
@@ -0,0 +1,359 @@
+/*
+ * Talon.One API
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`.
+ *
+ * The version of the OpenAPI document:
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package one.talon.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import one.talon.JSON;
+
+/**
+ * Common properties shared by all block types.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0")
+public class BaseBlock {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ @javax.annotation.Nonnull
+ private String id;
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ @javax.annotation.Nonnull
+ private String type;
+
+ public static final String SERIALIZED_NAME_TAGS = "tags";
+ @SerializedName(SERIALIZED_NAME_TAGS)
+ @javax.annotation.Nullable
+ private List tags;
+
+ public BaseBlock() {
+ }
+
+ public BaseBlock id(@javax.annotation.Nonnull String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique identifier for this block.
+ * @return id
+ */
+ @javax.annotation.Nonnull
+ public String getId() {
+ return id;
+ }
+
+ public void setId(@javax.annotation.Nonnull String id) {
+ this.id = id;
+ }
+
+
+ public BaseBlock type(@javax.annotation.Nonnull String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Identifies the block variant and determines which additional properties are present in it.
+ * @return type
+ */
+ @javax.annotation.Nonnull
+ public String getType() {
+ return type;
+ }
+
+ public void setType(@javax.annotation.Nonnull String type) {
+ this.type = type;
+ }
+
+
+ public BaseBlock tags(@javax.annotation.Nullable List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public BaseBlock addTagsItem(String tagsItem) {
+ if (this.tags == null) {
+ this.tags = new ArrayList<>();
+ }
+ this.tags.add(tagsItem);
+ return this;
+ }
+
+ /**
+ * Semantic labels attached to this block.
+ * @return tags
+ */
+ @javax.annotation.Nullable
+ public List getTags() {
+ return tags;
+ }
+
+ public void setTags(@javax.annotation.Nullable List tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the BaseBlock instance itself
+ */
+ public BaseBlock putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BaseBlock baseBlock = (BaseBlock) o;
+ return Objects.equals(this.id, baseBlock.id) &&
+ Objects.equals(this.type, baseBlock.type) &&
+ Objects.equals(this.tags, baseBlock.tags)&&
+ Objects.equals(this.additionalProperties, baseBlock.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, type, tags, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BaseBlock {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ return o == null ? "null" : o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet(Arrays.asList("id", "type", "tags"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("id", "type"));
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BaseBlock
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BaseBlock.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in BaseBlock is not found in the empty JSON string", BaseBlock.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : BaseBlock.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if (!jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ if (!jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // ensure the optional json data is an array if present
+ if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BaseBlock.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BaseBlock' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BaseBlock.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BaseBlock value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BaseBlock read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ BaseBlock instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BaseBlock given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BaseBlock
+ * @throws IOException if the JSON string is invalid with respect to BaseBlock
+ */
+ public static BaseBlock fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BaseBlock.class);
+ }
+
+ /**
+ * Convert an instance of BaseBlock to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/one/talon/model/BestPriorPrice.java b/src/main/java/one/talon/model/BestPriorPrice.java
index 8e458aff..70c02aea 100644
--- a/src/main/java/one/talon/model/BestPriorPrice.java
+++ b/src/main/java/one/talon/model/BestPriorPrice.java
@@ -76,6 +76,7 @@ public class BestPriorPrice {
private List contextIds = new ArrayList<>();
public static final String SERIALIZED_NAME_CONTEXT_ID = "contextId";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CONTEXT_ID)
@javax.annotation.Nullable
private String contextId = "";
@@ -182,6 +183,7 @@ public void setContextIds(@javax.annotation.Nonnull List contextIds) {
}
+ @Deprecated
public BestPriorPrice contextId(@javax.annotation.Nullable String contextId) {
this.contextId = contextId;
return this;
@@ -190,12 +192,15 @@ public BestPriorPrice contextId(@javax.annotation.Nullable String contextId) {
/**
* This property is **deprecated**. Use `contextIds` instead. Defaults to an empty string.
* @return contextId
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public String getContextId() {
return contextId;
}
+ @Deprecated
public void setContextId(@javax.annotation.Nullable String contextId) {
this.contextId = contextId;
}
diff --git a/src/main/java/one/talon/model/Campaign.java b/src/main/java/one/talon/model/Campaign.java
index 236ae264..c3159d5e 100644
--- a/src/main/java/one/talon/model/Campaign.java
+++ b/src/main/java/one/talon/model/Campaign.java
@@ -336,76 +336,91 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private List budgets;
public static final String SERIALIZED_NAME_COUPON_REDEMPTION_COUNT = "couponRedemptionCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_COUPON_REDEMPTION_COUNT)
@javax.annotation.Nullable
private Long couponRedemptionCount;
public static final String SERIALIZED_NAME_REFERRAL_REDEMPTION_COUNT = "referralRedemptionCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REFERRAL_REDEMPTION_COUNT)
@javax.annotation.Nullable
private Long referralRedemptionCount;
public static final String SERIALIZED_NAME_DISCOUNT_COUNT = "discountCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_DISCOUNT_COUNT)
@javax.annotation.Nullable
private BigDecimal discountCount;
public static final String SERIALIZED_NAME_DISCOUNT_EFFECT_COUNT = "discountEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_DISCOUNT_EFFECT_COUNT)
@javax.annotation.Nullable
private Long discountEffectCount;
public static final String SERIALIZED_NAME_COUPON_CREATION_COUNT = "couponCreationCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_COUPON_CREATION_COUNT)
@javax.annotation.Nullable
private Long couponCreationCount;
public static final String SERIALIZED_NAME_CUSTOM_EFFECT_COUNT = "customEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CUSTOM_EFFECT_COUNT)
@javax.annotation.Nullable
private Long customEffectCount;
public static final String SERIALIZED_NAME_REFERRAL_CREATION_COUNT = "referralCreationCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REFERRAL_CREATION_COUNT)
@javax.annotation.Nullable
private Long referralCreationCount;
public static final String SERIALIZED_NAME_ADD_FREE_ITEM_EFFECT_COUNT = "addFreeItemEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_ADD_FREE_ITEM_EFFECT_COUNT)
@javax.annotation.Nullable
private Long addFreeItemEffectCount;
public static final String SERIALIZED_NAME_AWARDED_GIVEAWAYS_COUNT = "awardedGiveawaysCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_AWARDED_GIVEAWAYS_COUNT)
@javax.annotation.Nullable
private Long awardedGiveawaysCount;
public static final String SERIALIZED_NAME_CREATED_LOYALTY_POINTS_COUNT = "createdLoyaltyPointsCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CREATED_LOYALTY_POINTS_COUNT)
@javax.annotation.Nullable
private BigDecimal createdLoyaltyPointsCount;
public static final String SERIALIZED_NAME_CREATED_LOYALTY_POINTS_EFFECT_COUNT = "createdLoyaltyPointsEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CREATED_LOYALTY_POINTS_EFFECT_COUNT)
@javax.annotation.Nullable
private Long createdLoyaltyPointsEffectCount;
public static final String SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_COUNT = "redeemedLoyaltyPointsCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_COUNT)
@javax.annotation.Nullable
private BigDecimal redeemedLoyaltyPointsCount;
public static final String SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_EFFECT_COUNT = "redeemedLoyaltyPointsEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_REDEEMED_LOYALTY_POINTS_EFFECT_COUNT)
@javax.annotation.Nullable
private Long redeemedLoyaltyPointsEffectCount;
public static final String SERIALIZED_NAME_CALL_API_EFFECT_COUNT = "callApiEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CALL_API_EFFECT_COUNT)
@javax.annotation.Nullable
private Long callApiEffectCount;
public static final String SERIALIZED_NAME_RESERVECOUPON_EFFECT_COUNT = "reservecouponEffectCount";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_RESERVECOUPON_EFFECT_COUNT)
@javax.annotation.Nullable
private Long reservecouponEffectCount;
@@ -1071,6 +1086,7 @@ public void setBudgets(@javax.annotation.Nullable List budgets)
}
+ @Deprecated
public Campaign couponRedemptionCount(@javax.annotation.Nullable Long couponRedemptionCount) {
this.couponRedemptionCount = couponRedemptionCount;
return this;
@@ -1079,17 +1095,21 @@ public Campaign couponRedemptionCount(@javax.annotation.Nullable Long couponRede
/**
* This property is **deprecated**. The count should be available under *budgets* property. Number of coupons redeemed in the campaign.
* @return couponRedemptionCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCouponRedemptionCount() {
return couponRedemptionCount;
}
+ @Deprecated
public void setCouponRedemptionCount(@javax.annotation.Nullable Long couponRedemptionCount) {
this.couponRedemptionCount = couponRedemptionCount;
}
+ @Deprecated
public Campaign referralRedemptionCount(@javax.annotation.Nullable Long referralRedemptionCount) {
this.referralRedemptionCount = referralRedemptionCount;
return this;
@@ -1098,17 +1118,21 @@ public Campaign referralRedemptionCount(@javax.annotation.Nullable Long referral
/**
* This property is **deprecated**. The count should be available under *budgets* property. Number of referral codes redeemed in the campaign.
* @return referralRedemptionCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getReferralRedemptionCount() {
return referralRedemptionCount;
}
+ @Deprecated
public void setReferralRedemptionCount(@javax.annotation.Nullable Long referralRedemptionCount) {
this.referralRedemptionCount = referralRedemptionCount;
}
+ @Deprecated
public Campaign discountCount(@javax.annotation.Nullable BigDecimal discountCount) {
this.discountCount = discountCount;
return this;
@@ -1117,17 +1141,21 @@ public Campaign discountCount(@javax.annotation.Nullable BigDecimal discountCoun
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total amount of discounts redeemed in the campaign.
* @return discountCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public BigDecimal getDiscountCount() {
return discountCount;
}
+ @Deprecated
public void setDiscountCount(@javax.annotation.Nullable BigDecimal discountCount) {
this.discountCount = discountCount;
}
+ @Deprecated
public Campaign discountEffectCount(@javax.annotation.Nullable Long discountEffectCount) {
this.discountEffectCount = discountEffectCount;
return this;
@@ -1136,17 +1164,21 @@ public Campaign discountEffectCount(@javax.annotation.Nullable Long discountEffe
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of times discounts were redeemed in this campaign.
* @return discountEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getDiscountEffectCount() {
return discountEffectCount;
}
+ @Deprecated
public void setDiscountEffectCount(@javax.annotation.Nullable Long discountEffectCount) {
this.discountEffectCount = discountEffectCount;
}
+ @Deprecated
public Campaign couponCreationCount(@javax.annotation.Nullable Long couponCreationCount) {
this.couponCreationCount = couponCreationCount;
return this;
@@ -1155,17 +1187,21 @@ public Campaign couponCreationCount(@javax.annotation.Nullable Long couponCreati
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of coupons created by rules in this campaign.
* @return couponCreationCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCouponCreationCount() {
return couponCreationCount;
}
+ @Deprecated
public void setCouponCreationCount(@javax.annotation.Nullable Long couponCreationCount) {
this.couponCreationCount = couponCreationCount;
}
+ @Deprecated
public Campaign customEffectCount(@javax.annotation.Nullable Long customEffectCount) {
this.customEffectCount = customEffectCount;
return this;
@@ -1174,17 +1210,21 @@ public Campaign customEffectCount(@javax.annotation.Nullable Long customEffectCo
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of custom effects triggered by rules in this campaign.
* @return customEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCustomEffectCount() {
return customEffectCount;
}
+ @Deprecated
public void setCustomEffectCount(@javax.annotation.Nullable Long customEffectCount) {
this.customEffectCount = customEffectCount;
}
+ @Deprecated
public Campaign referralCreationCount(@javax.annotation.Nullable Long referralCreationCount) {
this.referralCreationCount = referralCreationCount;
return this;
@@ -1193,17 +1233,21 @@ public Campaign referralCreationCount(@javax.annotation.Nullable Long referralCr
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of referrals created by rules in this campaign.
* @return referralCreationCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getReferralCreationCount() {
return referralCreationCount;
}
+ @Deprecated
public void setReferralCreationCount(@javax.annotation.Nullable Long referralCreationCount) {
this.referralCreationCount = referralCreationCount;
}
+ @Deprecated
public Campaign addFreeItemEffectCount(@javax.annotation.Nullable Long addFreeItemEffectCount) {
this.addFreeItemEffectCount = addFreeItemEffectCount;
return this;
@@ -1212,17 +1256,21 @@ public Campaign addFreeItemEffectCount(@javax.annotation.Nullable Long addFreeIt
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign.
* @return addFreeItemEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getAddFreeItemEffectCount() {
return addFreeItemEffectCount;
}
+ @Deprecated
public void setAddFreeItemEffectCount(@javax.annotation.Nullable Long addFreeItemEffectCount) {
this.addFreeItemEffectCount = addFreeItemEffectCount;
}
+ @Deprecated
public Campaign awardedGiveawaysCount(@javax.annotation.Nullable Long awardedGiveawaysCount) {
this.awardedGiveawaysCount = awardedGiveawaysCount;
return this;
@@ -1231,17 +1279,21 @@ public Campaign awardedGiveawaysCount(@javax.annotation.Nullable Long awardedGiv
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of giveaways awarded by rules in this campaign.
* @return awardedGiveawaysCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getAwardedGiveawaysCount() {
return awardedGiveawaysCount;
}
+ @Deprecated
public void setAwardedGiveawaysCount(@javax.annotation.Nullable Long awardedGiveawaysCount) {
this.awardedGiveawaysCount = awardedGiveawaysCount;
}
+ @Deprecated
public Campaign createdLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal createdLoyaltyPointsCount) {
this.createdLoyaltyPointsCount = createdLoyaltyPointsCount;
return this;
@@ -1250,17 +1302,21 @@ public Campaign createdLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points created by rules in this campaign.
* @return createdLoyaltyPointsCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public BigDecimal getCreatedLoyaltyPointsCount() {
return createdLoyaltyPointsCount;
}
+ @Deprecated
public void setCreatedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal createdLoyaltyPointsCount) {
this.createdLoyaltyPointsCount = createdLoyaltyPointsCount;
}
+ @Deprecated
public Campaign createdLoyaltyPointsEffectCount(@javax.annotation.Nullable Long createdLoyaltyPointsEffectCount) {
this.createdLoyaltyPointsEffectCount = createdLoyaltyPointsEffectCount;
return this;
@@ -1269,17 +1325,21 @@ public Campaign createdLoyaltyPointsEffectCount(@javax.annotation.Nullable Long
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point creation effects triggered by rules in this campaign.
* @return createdLoyaltyPointsEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCreatedLoyaltyPointsEffectCount() {
return createdLoyaltyPointsEffectCount;
}
+ @Deprecated
public void setCreatedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long createdLoyaltyPointsEffectCount) {
this.createdLoyaltyPointsEffectCount = createdLoyaltyPointsEffectCount;
}
+ @Deprecated
public Campaign redeemedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal redeemedLoyaltyPointsCount) {
this.redeemedLoyaltyPointsCount = redeemedLoyaltyPointsCount;
return this;
@@ -1288,17 +1348,21 @@ public Campaign redeemedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty points redeemed by rules in this campaign.
* @return redeemedLoyaltyPointsCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public BigDecimal getRedeemedLoyaltyPointsCount() {
return redeemedLoyaltyPointsCount;
}
+ @Deprecated
public void setRedeemedLoyaltyPointsCount(@javax.annotation.Nullable BigDecimal redeemedLoyaltyPointsCount) {
this.redeemedLoyaltyPointsCount = redeemedLoyaltyPointsCount;
}
+ @Deprecated
public Campaign redeemedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long redeemedLoyaltyPointsEffectCount) {
this.redeemedLoyaltyPointsEffectCount = redeemedLoyaltyPointsEffectCount;
return this;
@@ -1307,17 +1371,21 @@ public Campaign redeemedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of loyalty point redemption effects triggered by rules in this campaign.
* @return redeemedLoyaltyPointsEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getRedeemedLoyaltyPointsEffectCount() {
return redeemedLoyaltyPointsEffectCount;
}
+ @Deprecated
public void setRedeemedLoyaltyPointsEffectCount(@javax.annotation.Nullable Long redeemedLoyaltyPointsEffectCount) {
this.redeemedLoyaltyPointsEffectCount = redeemedLoyaltyPointsEffectCount;
}
+ @Deprecated
public Campaign callApiEffectCount(@javax.annotation.Nullable Long callApiEffectCount) {
this.callApiEffectCount = callApiEffectCount;
return this;
@@ -1326,17 +1394,21 @@ public Campaign callApiEffectCount(@javax.annotation.Nullable Long callApiEffect
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of webhooks triggered by rules in this campaign.
* @return callApiEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getCallApiEffectCount() {
return callApiEffectCount;
}
+ @Deprecated
public void setCallApiEffectCount(@javax.annotation.Nullable Long callApiEffectCount) {
this.callApiEffectCount = callApiEffectCount;
}
+ @Deprecated
public Campaign reservecouponEffectCount(@javax.annotation.Nullable Long reservecouponEffectCount) {
this.reservecouponEffectCount = reservecouponEffectCount;
return this;
@@ -1345,12 +1417,15 @@ public Campaign reservecouponEffectCount(@javax.annotation.Nullable Long reserve
/**
* This property is **deprecated**. The count should be available under *budgets* property. Total number of reserve coupon effects triggered by rules in this campaign.
* @return reservecouponEffectCount
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public Long getReservecouponEffectCount() {
return reservecouponEffectCount;
}
+ @Deprecated
public void setReservecouponEffectCount(@javax.annotation.Nullable Long reservecouponEffectCount) {
this.reservecouponEffectCount = reservecouponEffectCount;
}
diff --git a/src/main/java/one/talon/model/CustomerAchievement.java b/src/main/java/one/talon/model/CustomerAchievement.java
new file mode 100644
index 00000000..0d01b73e
--- /dev/null
+++ b/src/main/java/one/talon/model/CustomerAchievement.java
@@ -0,0 +1,679 @@
+/*
+ * Talon.One API
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`.
+ *
+ * The version of the OpenAPI document:
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package one.talon.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.Arrays;
+import one.talon.model.AchievementProgress;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import one.talon.JSON;
+
+/**
+ * A customer's progress in an achievement, together with the achievement definition.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0")
+public class CustomerAchievement {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ @javax.annotation.Nonnull
+ private Long id;
+
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ @javax.annotation.Nonnull
+ private String name;
+
+ public static final String SERIALIZED_NAME_TITLE = "title";
+ @SerializedName(SERIALIZED_NAME_TITLE)
+ @javax.annotation.Nonnull
+ private String title;
+
+ public static final String SERIALIZED_NAME_DESCRIPTION = "description";
+ @SerializedName(SERIALIZED_NAME_DESCRIPTION)
+ @javax.annotation.Nonnull
+ private String description;
+
+ public static final String SERIALIZED_NAME_TARGET = "target";
+ @SerializedName(SERIALIZED_NAME_TARGET)
+ @javax.annotation.Nonnull
+ private BigDecimal target;
+
+ /**
+ * The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again.
+ */
+ @JsonAdapter(RecurrencePolicyEnum.Adapter.class)
+ public enum RecurrencePolicyEnum {
+ NO_RECURRENCE("no_recurrence"),
+
+ ON_EXPIRATION("on_expiration"),
+
+ ON_COMPLETION("on_completion");
+
+ private String value;
+
+ RecurrencePolicyEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static RecurrencePolicyEnum fromValue(String value) {
+ for (RecurrencePolicyEnum b : RecurrencePolicyEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final RecurrencePolicyEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public RecurrencePolicyEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return RecurrencePolicyEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ RecurrencePolicyEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_RECURRENCE_POLICY = "recurrencePolicy";
+ @SerializedName(SERIALIZED_NAME_RECURRENCE_POLICY)
+ @javax.annotation.Nonnull
+ private RecurrencePolicyEnum recurrencePolicy;
+
+ /**
+ * The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ */
+ @JsonAdapter(ActivationPolicyEnum.Adapter.class)
+ public enum ActivationPolicyEnum {
+ USER_ACTION("user_action"),
+
+ FIXED_SCHEDULE("fixed_schedule");
+
+ private String value;
+
+ ActivationPolicyEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static ActivationPolicyEnum fromValue(String value) {
+ for (ActivationPolicyEnum b : ActivationPolicyEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final ActivationPolicyEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public ActivationPolicyEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return ActivationPolicyEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ ActivationPolicyEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_ACTIVATION_POLICY = "activationPolicy";
+ @SerializedName(SERIALIZED_NAME_ACTIVATION_POLICY)
+ @javax.annotation.Nonnull
+ private ActivationPolicyEnum activationPolicy;
+
+ public static final String SERIALIZED_NAME_FIXED_START_DATE = "fixedStartDate";
+ @SerializedName(SERIALIZED_NAME_FIXED_START_DATE)
+ @javax.annotation.Nullable
+ private OffsetDateTime fixedStartDate;
+
+ public static final String SERIALIZED_NAME_END_DATE = "endDate";
+ @SerializedName(SERIALIZED_NAME_END_DATE)
+ @javax.annotation.Nullable
+ private OffsetDateTime endDate;
+
+ public static final String SERIALIZED_NAME_ALLOW_ROLLBACK_AFTER_COMPLETION = "allowRollbackAfterCompletion";
+ @SerializedName(SERIALIZED_NAME_ALLOW_ROLLBACK_AFTER_COMPLETION)
+ @javax.annotation.Nonnull
+ private Boolean allowRollbackAfterCompletion;
+
+ public static final String SERIALIZED_NAME_CURRENT_PROGRESS = "currentProgress";
+ @SerializedName(SERIALIZED_NAME_CURRENT_PROGRESS)
+ @javax.annotation.Nullable
+ private AchievementProgress currentProgress;
+
+ public CustomerAchievement() {
+ }
+
+ public CustomerAchievement id(@javax.annotation.Nonnull Long id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The internal ID of the achievement.
+ * @return id
+ */
+ @javax.annotation.Nonnull
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(@javax.annotation.Nonnull Long id) {
+ this.id = id;
+ }
+
+
+ public CustomerAchievement name(@javax.annotation.Nonnull String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The internal name of the achievement used in API requests.
+ * @return name
+ */
+ @javax.annotation.Nonnull
+ public String getName() {
+ return name;
+ }
+
+ public void setName(@javax.annotation.Nonnull String name) {
+ this.name = name;
+ }
+
+
+ public CustomerAchievement title(@javax.annotation.Nonnull String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * The display name of the achievement in the Campaign Manager.
+ * @return title
+ */
+ @javax.annotation.Nonnull
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(@javax.annotation.Nonnull String title) {
+ this.title = title;
+ }
+
+
+ public CustomerAchievement description(@javax.annotation.Nonnull String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the achievement in the Campaign Manager.
+ * @return description
+ */
+ @javax.annotation.Nonnull
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(@javax.annotation.Nonnull String description) {
+ this.description = description;
+ }
+
+
+ public CustomerAchievement target(@javax.annotation.Nonnull BigDecimal target) {
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * The required number of actions or the transactional milestone to complete the achievement.
+ * @return target
+ */
+ @javax.annotation.Nonnull
+ public BigDecimal getTarget() {
+ return target;
+ }
+
+ public void setTarget(@javax.annotation.Nonnull BigDecimal target) {
+ this.target = target;
+ }
+
+
+ public CustomerAchievement recurrencePolicy(@javax.annotation.Nonnull RecurrencePolicyEnum recurrencePolicy) {
+ this.recurrencePolicy = recurrencePolicy;
+ return this;
+ }
+
+ /**
+ * The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again.
+ * @return recurrencePolicy
+ */
+ @javax.annotation.Nonnull
+ public RecurrencePolicyEnum getRecurrencePolicy() {
+ return recurrencePolicy;
+ }
+
+ public void setRecurrencePolicy(@javax.annotation.Nonnull RecurrencePolicyEnum recurrencePolicy) {
+ this.recurrencePolicy = recurrencePolicy;
+ }
+
+
+ public CustomerAchievement activationPolicy(@javax.annotation.Nonnull ActivationPolicyEnum activationPolicy) {
+ this.activationPolicy = activationPolicy;
+ return this;
+ }
+
+ /**
+ * The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
+ * @return activationPolicy
+ */
+ @javax.annotation.Nonnull
+ public ActivationPolicyEnum getActivationPolicy() {
+ return activationPolicy;
+ }
+
+ public void setActivationPolicy(@javax.annotation.Nonnull ActivationPolicyEnum activationPolicy) {
+ this.activationPolicy = activationPolicy;
+ }
+
+
+ public CustomerAchievement fixedStartDate(@javax.annotation.Nullable OffsetDateTime fixedStartDate) {
+ this.fixedStartDate = fixedStartDate;
+ return this;
+ }
+
+ /**
+ * The achievement's start date when `activationPolicy` is equal to `fixed_schedule`. **Note:** It is an RFC3339 timestamp string.
+ * @return fixedStartDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getFixedStartDate() {
+ return fixedStartDate;
+ }
+
+ public void setFixedStartDate(@javax.annotation.Nullable OffsetDateTime fixedStartDate) {
+ this.fixedStartDate = fixedStartDate;
+ }
+
+
+ public CustomerAchievement endDate(@javax.annotation.Nullable OffsetDateTime endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It is an RFC3339 timestamp string.
+ * @return endDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getEndDate() {
+ return endDate;
+ }
+
+ public void setEndDate(@javax.annotation.Nullable OffsetDateTime endDate) {
+ this.endDate = endDate;
+ }
+
+
+ public CustomerAchievement allowRollbackAfterCompletion(@javax.annotation.Nonnull Boolean allowRollbackAfterCompletion) {
+ this.allowRollbackAfterCompletion = allowRollbackAfterCompletion;
+ return this;
+ }
+
+ /**
+ * When `true`, customer progress can be rolled back in completed achievements.
+ * @return allowRollbackAfterCompletion
+ */
+ @javax.annotation.Nonnull
+ public Boolean getAllowRollbackAfterCompletion() {
+ return allowRollbackAfterCompletion;
+ }
+
+ public void setAllowRollbackAfterCompletion(@javax.annotation.Nonnull Boolean allowRollbackAfterCompletion) {
+ this.allowRollbackAfterCompletion = allowRollbackAfterCompletion;
+ }
+
+
+ public CustomerAchievement currentProgress(@javax.annotation.Nullable AchievementProgress currentProgress) {
+ this.currentProgress = currentProgress;
+ return this;
+ }
+
+ /**
+ * Get currentProgress
+ * @return currentProgress
+ */
+ @javax.annotation.Nullable
+ public AchievementProgress getCurrentProgress() {
+ return currentProgress;
+ }
+
+ public void setCurrentProgress(@javax.annotation.Nullable AchievementProgress currentProgress) {
+ this.currentProgress = currentProgress;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the CustomerAchievement instance itself
+ */
+ public CustomerAchievement putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CustomerAchievement customerAchievement = (CustomerAchievement) o;
+ return Objects.equals(this.id, customerAchievement.id) &&
+ Objects.equals(this.name, customerAchievement.name) &&
+ Objects.equals(this.title, customerAchievement.title) &&
+ Objects.equals(this.description, customerAchievement.description) &&
+ Objects.equals(this.target, customerAchievement.target) &&
+ Objects.equals(this.recurrencePolicy, customerAchievement.recurrencePolicy) &&
+ Objects.equals(this.activationPolicy, customerAchievement.activationPolicy) &&
+ Objects.equals(this.fixedStartDate, customerAchievement.fixedStartDate) &&
+ Objects.equals(this.endDate, customerAchievement.endDate) &&
+ Objects.equals(this.allowRollbackAfterCompletion, customerAchievement.allowRollbackAfterCompletion) &&
+ Objects.equals(this.currentProgress, customerAchievement.currentProgress)&&
+ Objects.equals(this.additionalProperties, customerAchievement.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, title, description, target, recurrencePolicy, activationPolicy, fixedStartDate, endDate, allowRollbackAfterCompletion, currentProgress, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CustomerAchievement {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" target: ").append(toIndentedString(target)).append("\n");
+ sb.append(" recurrencePolicy: ").append(toIndentedString(recurrencePolicy)).append("\n");
+ sb.append(" activationPolicy: ").append(toIndentedString(activationPolicy)).append("\n");
+ sb.append(" fixedStartDate: ").append(toIndentedString(fixedStartDate)).append("\n");
+ sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
+ sb.append(" allowRollbackAfterCompletion: ").append(toIndentedString(allowRollbackAfterCompletion)).append("\n");
+ sb.append(" currentProgress: ").append(toIndentedString(currentProgress)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ return o == null ? "null" : o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet(Arrays.asList("id", "name", "title", "description", "target", "recurrencePolicy", "activationPolicy", "fixedStartDate", "endDate", "allowRollbackAfterCompletion", "currentProgress"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "title", "description", "target", "recurrencePolicy", "activationPolicy", "allowRollbackAfterCompletion"));
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to CustomerAchievement
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CustomerAchievement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in CustomerAchievement is not found in the empty JSON string", CustomerAchievement.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CustomerAchievement.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if (!jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if (!jsonObj.get("title").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString()));
+ }
+ if (!jsonObj.get("description").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString()));
+ }
+ if (!jsonObj.get("recurrencePolicy").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recurrencePolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recurrencePolicy").toString()));
+ }
+ // validate the required field `recurrencePolicy`
+ RecurrencePolicyEnum.validateJsonElement(jsonObj.get("recurrencePolicy"));
+ if (!jsonObj.get("activationPolicy").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `activationPolicy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("activationPolicy").toString()));
+ }
+ // validate the required field `activationPolicy`
+ ActivationPolicyEnum.validateJsonElement(jsonObj.get("activationPolicy"));
+ // validate the optional field `currentProgress`
+ if (jsonObj.get("currentProgress") != null && !jsonObj.get("currentProgress").isJsonNull()) {
+ AchievementProgress.validateJsonElement(jsonObj.get("currentProgress"));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CustomerAchievement.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CustomerAchievement' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CustomerAchievement.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CustomerAchievement value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public CustomerAchievement read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ CustomerAchievement instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of CustomerAchievement given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CustomerAchievement
+ * @throws IOException if the JSON string is invalid with respect to CustomerAchievement
+ */
+ public static CustomerAchievement fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CustomerAchievement.class);
+ }
+
+ /**
+ * Convert an instance of CustomerAchievement to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/one/talon/model/CustomerProfile.java b/src/main/java/one/talon/model/CustomerProfile.java
index 66b7d657..8395ec22 100644
--- a/src/main/java/one/talon/model/CustomerProfile.java
+++ b/src/main/java/one/talon/model/CustomerProfile.java
@@ -94,6 +94,7 @@ public class CustomerProfile {
private BigDecimal totalSales;
public static final String SERIALIZED_NAME_LOYALTY_MEMBERSHIPS = "loyaltyMemberships";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_LOYALTY_MEMBERSHIPS)
@javax.annotation.Nullable
private List loyaltyMemberships;
@@ -257,6 +258,7 @@ public void setTotalSales(@javax.annotation.Nonnull BigDecimal totalSales) {
}
+ @Deprecated
public CustomerProfile loyaltyMemberships(@javax.annotation.Nullable List loyaltyMemberships) {
this.loyaltyMemberships = loyaltyMemberships;
return this;
@@ -273,12 +275,15 @@ public CustomerProfile addLoyaltyMembershipsItem(LoyaltyMembership loyaltyMember
/**
* **DEPRECATED. Always returns `null`.** A list of loyalty programs joined by the customer.
* @return loyaltyMemberships
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public List getLoyaltyMemberships() {
return loyaltyMemberships;
}
+ @Deprecated
public void setLoyaltyMemberships(@javax.annotation.Nullable List loyaltyMemberships) {
this.loyaltyMemberships = loyaltyMemberships;
}
diff --git a/src/main/java/one/talon/model/CustomerProfileIntegrationRequestV2.java b/src/main/java/one/talon/model/CustomerProfileIntegrationRequestV2.java
index bd4ea14d..9299d16b 100644
--- a/src/main/java/one/talon/model/CustomerProfileIntegrationRequestV2.java
+++ b/src/main/java/one/talon/model/CustomerProfileIntegrationRequestV2.java
@@ -82,7 +82,9 @@ public enum ResponseContentEnum {
RULE_FAILURE_REASONS("ruleFailureReasons"),
- CAMPAIGN_ELIGIBILITY("campaignEligibility");
+ CAMPAIGN_ELIGIBILITY("campaignEligibility"),
+
+ ACHIEVEMENTS("achievements");
private String value;
diff --git a/src/main/java/one/talon/model/History.java b/src/main/java/one/talon/model/History.java
index a5c2e507..d116703e 100644
--- a/src/main/java/one/talon/model/History.java
+++ b/src/main/java/one/talon/model/History.java
@@ -71,6 +71,7 @@ public class History {
private List contextIds = new ArrayList<>();
public static final String SERIALIZED_NAME_CONTEXT_ID = "contextId";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_CONTEXT_ID)
@javax.annotation.Nullable
private String contextId = "";
@@ -158,6 +159,7 @@ public void setContextIds(@javax.annotation.Nonnull List contextIds) {
}
+ @Deprecated
public History contextId(@javax.annotation.Nullable String contextId) {
this.contextId = contextId;
return this;
@@ -166,12 +168,15 @@ public History contextId(@javax.annotation.Nullable String contextId) {
/**
* This property is **deprecated**. Use `contextIds` instead. Defaults to an empty string.
* @return contextId
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public String getContextId() {
return contextId;
}
+ @Deprecated
public void setContextId(@javax.annotation.Nullable String contextId) {
this.contextId = contextId;
}
diff --git a/src/main/java/one/talon/model/IntegrationCampaign.java b/src/main/java/one/talon/model/IntegrationCampaign.java
index 08b59aef..2dff90f9 100644
--- a/src/main/java/one/talon/model/IntegrationCampaign.java
+++ b/src/main/java/one/talon/model/IntegrationCampaign.java
@@ -219,6 +219,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
@javax.annotation.Nonnull
private List rules = new ArrayList<>();
+ public static final String SERIALIZED_NAME_LINKED_STORE_IDS = "linkedStoreIds";
+ @SerializedName(SERIALIZED_NAME_LINKED_STORE_IDS)
+ @javax.annotation.Nullable
+ private List linkedStoreIds;
+
+ public static final String SERIALIZED_NAME_LINKED_AUDIENCE_IDS = "linkedAudienceIds";
+ @SerializedName(SERIALIZED_NAME_LINKED_AUDIENCE_IDS)
+ @javax.annotation.Nullable
+ private List linkedAudienceIds;
+
public IntegrationCampaign() {
}
@@ -454,6 +464,60 @@ public void setRules(@javax.annotation.Nonnull List rules) {
this.rules = rules;
}
+
+ public IntegrationCampaign linkedStoreIds(@javax.annotation.Nullable List linkedStoreIds) {
+ this.linkedStoreIds = linkedStoreIds;
+ return this;
+ }
+
+ public IntegrationCampaign addLinkedStoreIdsItem(Long linkedStoreIdsItem) {
+ if (this.linkedStoreIds == null) {
+ this.linkedStoreIds = new ArrayList<>();
+ }
+ this.linkedStoreIds.add(linkedStoreIdsItem);
+ return this;
+ }
+
+ /**
+ * A list of store IDs linked to this campaign.
+ * @return linkedStoreIds
+ */
+ @javax.annotation.Nullable
+ public List getLinkedStoreIds() {
+ return linkedStoreIds;
+ }
+
+ public void setLinkedStoreIds(@javax.annotation.Nullable List linkedStoreIds) {
+ this.linkedStoreIds = linkedStoreIds;
+ }
+
+
+ public IntegrationCampaign linkedAudienceIds(@javax.annotation.Nullable List linkedAudienceIds) {
+ this.linkedAudienceIds = linkedAudienceIds;
+ return this;
+ }
+
+ public IntegrationCampaign addLinkedAudienceIdsItem(Long linkedAudienceIdsItem) {
+ if (this.linkedAudienceIds == null) {
+ this.linkedAudienceIds = new ArrayList<>();
+ }
+ this.linkedAudienceIds.add(linkedAudienceIdsItem);
+ return this;
+ }
+
+ /**
+ * A list of audience IDs linked to this campaign.
+ * @return linkedAudienceIds
+ */
+ @javax.annotation.Nullable
+ public List getLinkedAudienceIds() {
+ return linkedAudienceIds;
+ }
+
+ public void setLinkedAudienceIds(@javax.annotation.Nullable List linkedAudienceIds) {
+ this.linkedAudienceIds = linkedAudienceIds;
+ }
+
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
@@ -519,13 +583,15 @@ public boolean equals(Object o) {
Objects.equals(this.state, integrationCampaign.state) &&
Objects.equals(this.tags, integrationCampaign.tags) &&
Objects.equals(this.features, integrationCampaign.features) &&
- Objects.equals(this.rules, integrationCampaign.rules)&&
+ Objects.equals(this.rules, integrationCampaign.rules) &&
+ Objects.equals(this.linkedStoreIds, integrationCampaign.linkedStoreIds) &&
+ Objects.equals(this.linkedAudienceIds, integrationCampaign.linkedAudienceIds)&&
Objects.equals(this.additionalProperties, integrationCampaign.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(applicationId, id, name, description, startTime, endTime, attributes, state, tags, features, rules, additionalProperties);
+ return Objects.hash(applicationId, id, name, description, startTime, endTime, attributes, state, tags, features, rules, linkedStoreIds, linkedAudienceIds, additionalProperties);
}
@Override
@@ -543,6 +609,8 @@ public String toString() {
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" features: ").append(toIndentedString(features)).append("\n");
sb.append(" rules: ").append(toIndentedString(rules)).append("\n");
+ sb.append(" linkedStoreIds: ").append(toIndentedString(linkedStoreIds)).append("\n");
+ sb.append(" linkedAudienceIds: ").append(toIndentedString(linkedAudienceIds)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
@@ -562,7 +630,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("applicationId", "id", "name", "description", "startTime", "endTime", "attributes", "state", "tags", "features", "rules"));
+ openapiFields = new HashSet(Arrays.asList("applicationId", "id", "name", "description", "startTime", "endTime", "attributes", "state", "tags", "features", "rules", "linkedStoreIds", "linkedAudienceIds"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "id", "name", "state", "tags", "features", "rules"));
@@ -621,6 +689,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
RuleMetadata.validateJsonElement(jsonArrayrules.get(i));
}
}
+ // ensure the optional json data is an array if present
+ if (jsonObj.get("linkedStoreIds") != null && !jsonObj.get("linkedStoreIds").isJsonNull() && !jsonObj.get("linkedStoreIds").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `linkedStoreIds` to be an array in the JSON string but got `%s`", jsonObj.get("linkedStoreIds").toString()));
+ }
+ // ensure the optional json data is an array if present
+ if (jsonObj.get("linkedAudienceIds") != null && !jsonObj.get("linkedAudienceIds").isJsonNull() && !jsonObj.get("linkedAudienceIds").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `linkedAudienceIds` to be an array in the JSON string but got `%s`", jsonObj.get("linkedAudienceIds").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/src/main/java/one/talon/model/IntegrationEventV2Request.java b/src/main/java/one/talon/model/IntegrationEventV2Request.java
index da573297..a34aa2fd 100644
--- a/src/main/java/one/talon/model/IntegrationEventV2Request.java
+++ b/src/main/java/one/talon/model/IntegrationEventV2Request.java
@@ -94,7 +94,9 @@ public enum ResponseContentEnum {
RULE_FAILURE_REASONS("ruleFailureReasons"),
- CAMPAIGN_ELIGIBILITY("campaignEligibility");
+ CAMPAIGN_ELIGIBILITY("campaignEligibility"),
+
+ ACHIEVEMENTS("achievements");
private String value;
diff --git a/src/main/java/one/talon/model/IntegrationEventV2Response.java b/src/main/java/one/talon/model/IntegrationEventV2Response.java
index 8a909397..19ab4e7e 100644
--- a/src/main/java/one/talon/model/IntegrationEventV2Response.java
+++ b/src/main/java/one/talon/model/IntegrationEventV2Response.java
@@ -26,6 +26,7 @@
import one.talon.model.Campaign;
import one.talon.model.CampaignEligibility;
import one.talon.model.Coupon;
+import one.talon.model.CustomerAchievement;
import one.talon.model.CustomerProfile;
import one.talon.model.Effect;
import one.talon.model.Event;
@@ -107,6 +108,11 @@ public class IntegrationEventV2Response {
@javax.annotation.Nullable
private List awardedGiveaways;
+ public static final String SERIALIZED_NAME_ACHIEVEMENTS = "achievements";
+ @SerializedName(SERIALIZED_NAME_ACHIEVEMENTS)
+ @javax.annotation.Nullable
+ private List achievements;
+
public static final String SERIALIZED_NAME_EVENT = "event";
@SerializedName(SERIALIZED_NAME_EVENT)
@javax.annotation.Nullable
@@ -342,6 +348,33 @@ public void setAwardedGiveaways(@javax.annotation.Nullable List awarde
}
+ public IntegrationEventV2Response achievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ return this;
+ }
+
+ public IntegrationEventV2Response addAchievementsItem(CustomerAchievement achievementsItem) {
+ if (this.achievements == null) {
+ this.achievements = new ArrayList<>();
+ }
+ this.achievements.add(achievementsItem);
+ return this;
+ }
+
+ /**
+ * The achievements progress of the customer.
+ * @return achievements
+ */
+ @javax.annotation.Nullable
+ public List getAchievements() {
+ return achievements;
+ }
+
+ public void setAchievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ }
+
+
public IntegrationEventV2Response event(@javax.annotation.Nullable Event event) {
this.event = event;
return this;
@@ -424,13 +457,14 @@ public boolean equals(Object o) {
Objects.equals(this.createdCoupons, integrationEventV2Response.createdCoupons) &&
Objects.equals(this.createdReferrals, integrationEventV2Response.createdReferrals) &&
Objects.equals(this.awardedGiveaways, integrationEventV2Response.awardedGiveaways) &&
+ Objects.equals(this.achievements, integrationEventV2Response.achievements) &&
Objects.equals(this.event, integrationEventV2Response.event)&&
Objects.equals(this.additionalProperties, integrationEventV2Response.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, event, additionalProperties);
+ return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, achievements, event, additionalProperties);
}
@Override
@@ -446,6 +480,7 @@ public String toString() {
sb.append(" createdCoupons: ").append(toIndentedString(createdCoupons)).append("\n");
sb.append(" createdReferrals: ").append(toIndentedString(createdReferrals)).append("\n");
sb.append(" awardedGiveaways: ").append(toIndentedString(awardedGiveaways)).append("\n");
+ sb.append(" achievements: ").append(toIndentedString(achievements)).append("\n");
sb.append(" event: ").append(toIndentedString(event)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
@@ -466,7 +501,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "event"));
+ openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "achievements", "event"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(Arrays.asList("effects", "createdCoupons", "createdReferrals"));
@@ -586,6 +621,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
};
}
}
+ if (jsonObj.get("achievements") != null && !jsonObj.get("achievements").isJsonNull()) {
+ JsonArray jsonArrayachievements = jsonObj.getAsJsonArray("achievements");
+ if (jsonArrayachievements != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("achievements").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `achievements` to be an array in the JSON string but got `%s`", jsonObj.get("achievements").toString()));
+ }
+
+ // validate the optional field `achievements` (array)
+ for (int i = 0; i < jsonArrayachievements.size(); i++) {
+ CustomerAchievement.validateJsonElement(jsonArrayachievements.get(i));
+ };
+ }
+ }
// validate the optional field `event`
if (jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) {
Event.validateJsonElement(jsonObj.get("event"));
diff --git a/src/main/java/one/talon/model/IntegrationEventV3Response.java b/src/main/java/one/talon/model/IntegrationEventV3Response.java
index 1d9034b3..d2a7a64b 100644
--- a/src/main/java/one/talon/model/IntegrationEventV3Response.java
+++ b/src/main/java/one/talon/model/IntegrationEventV3Response.java
@@ -26,6 +26,7 @@
import one.talon.model.Campaign;
import one.talon.model.CampaignEligibility;
import one.talon.model.Coupon;
+import one.talon.model.CustomerAchievement;
import one.talon.model.CustomerProfile;
import one.talon.model.Effect;
import one.talon.model.EventV3;
@@ -107,6 +108,11 @@ public class IntegrationEventV3Response {
@javax.annotation.Nullable
private List awardedGiveaways;
+ public static final String SERIALIZED_NAME_ACHIEVEMENTS = "achievements";
+ @SerializedName(SERIALIZED_NAME_ACHIEVEMENTS)
+ @javax.annotation.Nullable
+ private List achievements;
+
public static final String SERIALIZED_NAME_ADVANCED_EVENT = "advancedEvent";
@SerializedName(SERIALIZED_NAME_ADVANCED_EVENT)
@javax.annotation.Nullable
@@ -342,6 +348,33 @@ public void setAwardedGiveaways(@javax.annotation.Nullable List awarde
}
+ public IntegrationEventV3Response achievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ return this;
+ }
+
+ public IntegrationEventV3Response addAchievementsItem(CustomerAchievement achievementsItem) {
+ if (this.achievements == null) {
+ this.achievements = new ArrayList<>();
+ }
+ this.achievements.add(achievementsItem);
+ return this;
+ }
+
+ /**
+ * The achievements progress of the customer.
+ * @return achievements
+ */
+ @javax.annotation.Nullable
+ public List getAchievements() {
+ return achievements;
+ }
+
+ public void setAchievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ }
+
+
public IntegrationEventV3Response advancedEvent(@javax.annotation.Nullable EventV3 advancedEvent) {
this.advancedEvent = advancedEvent;
return this;
@@ -424,13 +457,14 @@ public boolean equals(Object o) {
Objects.equals(this.createdCoupons, integrationEventV3Response.createdCoupons) &&
Objects.equals(this.createdReferrals, integrationEventV3Response.createdReferrals) &&
Objects.equals(this.awardedGiveaways, integrationEventV3Response.awardedGiveaways) &&
+ Objects.equals(this.achievements, integrationEventV3Response.achievements) &&
Objects.equals(this.advancedEvent, integrationEventV3Response.advancedEvent)&&
Objects.equals(this.additionalProperties, integrationEventV3Response.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, advancedEvent, additionalProperties);
+ return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, achievements, advancedEvent, additionalProperties);
}
@Override
@@ -446,6 +480,7 @@ public String toString() {
sb.append(" createdCoupons: ").append(toIndentedString(createdCoupons)).append("\n");
sb.append(" createdReferrals: ").append(toIndentedString(createdReferrals)).append("\n");
sb.append(" awardedGiveaways: ").append(toIndentedString(awardedGiveaways)).append("\n");
+ sb.append(" achievements: ").append(toIndentedString(achievements)).append("\n");
sb.append(" advancedEvent: ").append(toIndentedString(advancedEvent)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
@@ -466,7 +501,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "advancedEvent"));
+ openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "achievements", "advancedEvent"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(Arrays.asList("effects", "createdCoupons", "createdReferrals"));
@@ -586,6 +621,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
};
}
}
+ if (jsonObj.get("achievements") != null && !jsonObj.get("achievements").isJsonNull()) {
+ JsonArray jsonArrayachievements = jsonObj.getAsJsonArray("achievements");
+ if (jsonArrayachievements != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("achievements").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `achievements` to be an array in the JSON string but got `%s`", jsonObj.get("achievements").toString()));
+ }
+
+ // validate the optional field `achievements` (array)
+ for (int i = 0; i < jsonArrayachievements.size(); i++) {
+ CustomerAchievement.validateJsonElement(jsonArrayachievements.get(i));
+ };
+ }
+ }
// validate the optional field `advancedEvent`
if (jsonObj.get("advancedEvent") != null && !jsonObj.get("advancedEvent").isJsonNull()) {
EventV3.validateJsonElement(jsonObj.get("advancedEvent"));
diff --git a/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java
index f1527c5c..898f9ad6 100644
--- a/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java
+++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java
@@ -84,6 +84,11 @@ public class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificat
@javax.annotation.Nonnull
private String currentTier;
+ public static final String SERIALIZED_NAME_SESSION_INTEGRATION_I_D = "SessionIntegrationID";
+ @SerializedName(SERIALIZED_NAME_SESSION_INTEGRATION_I_D)
+ @javax.annotation.Nullable
+ private String sessionIntegrationID;
+
public static final String SERIALIZED_NAME_EMPLOYEE_NAME = "EmployeeName";
@SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME)
@javax.annotation.Nullable
@@ -226,6 +231,25 @@ public void setCurrentTier(@javax.annotation.Nonnull String currentTier) {
}
+ public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification sessionIntegrationID(@javax.annotation.Nullable String sessionIntegrationID) {
+ this.sessionIntegrationID = sessionIntegrationID;
+ return this;
+ }
+
+ /**
+ * The integration ID of the session through which the points were earned or lost. Only set when the change results from a rule engine execution; empty otherwise.
+ * @return sessionIntegrationID
+ */
+ @javax.annotation.Nullable
+ public String getSessionIntegrationID() {
+ return sessionIntegrationID;
+ }
+
+ public void setSessionIntegrationID(@javax.annotation.Nullable String sessionIntegrationID) {
+ this.sessionIntegrationID = sessionIntegrationID;
+ }
+
+
public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification employeeName(@javax.annotation.Nullable String employeeName) {
this.employeeName = employeeName;
return this;
@@ -389,6 +413,7 @@ public boolean equals(Object o) {
Objects.equals(this.subledgerID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.subledgerID) &&
Objects.equals(this.sourceOfEvent, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.sourceOfEvent) &&
Objects.equals(this.currentTier, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.currentTier) &&
+ Objects.equals(this.sessionIntegrationID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.sessionIntegrationID) &&
Objects.equals(this.employeeName, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.employeeName) &&
Objects.equals(this.userID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.userID) &&
Objects.equals(this.currentPoints, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.currentPoints) &&
@@ -399,7 +424,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(profileIntegrationID, loyaltyProgramID, loyaltyProgramName, subledgerID, sourceOfEvent, currentTier, employeeName, userID, currentPoints, actions, publishedAt, additionalProperties);
+ return Objects.hash(profileIntegrationID, loyaltyProgramID, loyaltyProgramName, subledgerID, sourceOfEvent, currentTier, sessionIntegrationID, employeeName, userID, currentPoints, actions, publishedAt, additionalProperties);
}
@Override
@@ -412,6 +437,7 @@ public String toString() {
sb.append(" subledgerID: ").append(toIndentedString(subledgerID)).append("\n");
sb.append(" sourceOfEvent: ").append(toIndentedString(sourceOfEvent)).append("\n");
sb.append(" currentTier: ").append(toIndentedString(currentTier)).append("\n");
+ sb.append(" sessionIntegrationID: ").append(toIndentedString(sessionIntegrationID)).append("\n");
sb.append(" employeeName: ").append(toIndentedString(employeeName)).append("\n");
sb.append(" userID: ").append(toIndentedString(userID)).append("\n");
sb.append(" currentPoints: ").append(toIndentedString(currentPoints)).append("\n");
@@ -436,7 +462,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("ProfileIntegrationID", "LoyaltyProgramID", "LoyaltyProgramName", "SubledgerID", "SourceOfEvent", "CurrentTier", "EmployeeName", "UserID", "CurrentPoints", "Actions", "PublishedAt"));
+ openapiFields = new HashSet(Arrays.asList("ProfileIntegrationID", "LoyaltyProgramID", "LoyaltyProgramName", "SubledgerID", "SourceOfEvent", "CurrentTier", "SessionIntegrationID", "EmployeeName", "UserID", "CurrentPoints", "Actions", "PublishedAt"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(Arrays.asList("ProfileIntegrationID", "LoyaltyProgramID", "LoyaltyProgramName", "SubledgerID", "SourceOfEvent", "CurrentTier", "CurrentPoints", "PublishedAt"));
@@ -477,6 +503,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (!jsonObj.get("CurrentTier").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `CurrentTier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("CurrentTier").toString()));
}
+ if ((jsonObj.get("SessionIntegrationID") != null && !jsonObj.get("SessionIntegrationID").isJsonNull()) && !jsonObj.get("SessionIntegrationID").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `SessionIntegrationID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("SessionIntegrationID").toString()));
+ }
if ((jsonObj.get("EmployeeName") != null && !jsonObj.get("EmployeeName").isJsonNull()) && !jsonObj.get("EmployeeName").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `EmployeeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("EmployeeName").toString()));
}
diff --git a/src/main/java/one/talon/model/IntegrationRequest.java b/src/main/java/one/talon/model/IntegrationRequest.java
index b71f34a1..d9623d38 100644
--- a/src/main/java/one/talon/model/IntegrationRequest.java
+++ b/src/main/java/one/talon/model/IntegrationRequest.java
@@ -83,7 +83,9 @@ public enum ResponseContentEnum {
PREVIOUS_RETURNS("previousReturns"),
- CAMPAIGN_ELIGIBILITY("campaignEligibility");
+ CAMPAIGN_ELIGIBILITY("campaignEligibility"),
+
+ ACHIEVEMENTS("achievements");
private String value;
diff --git a/src/main/java/one/talon/model/IntegrationResponse.java b/src/main/java/one/talon/model/IntegrationResponse.java
index 5a925dd7..b039969a 100644
--- a/src/main/java/one/talon/model/IntegrationResponse.java
+++ b/src/main/java/one/talon/model/IntegrationResponse.java
@@ -26,6 +26,7 @@
import one.talon.model.Campaign;
import one.talon.model.CampaignEligibility;
import one.talon.model.Coupon;
+import one.talon.model.CustomerAchievement;
import one.talon.model.CustomerProfile;
import one.talon.model.Effect;
import one.talon.model.Giveaway;
@@ -106,6 +107,11 @@ public class IntegrationResponse {
@javax.annotation.Nullable
private List awardedGiveaways;
+ public static final String SERIALIZED_NAME_ACHIEVEMENTS = "achievements";
+ @SerializedName(SERIALIZED_NAME_ACHIEVEMENTS)
+ @javax.annotation.Nullable
+ private List achievements;
+
public IntegrationResponse() {
}
@@ -335,6 +341,33 @@ public void setAwardedGiveaways(@javax.annotation.Nullable List awarde
this.awardedGiveaways = awardedGiveaways;
}
+
+ public IntegrationResponse achievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ return this;
+ }
+
+ public IntegrationResponse addAchievementsItem(CustomerAchievement achievementsItem) {
+ if (this.achievements == null) {
+ this.achievements = new ArrayList<>();
+ }
+ this.achievements.add(achievementsItem);
+ return this;
+ }
+
+ /**
+ * The achievements progress of the customer.
+ * @return achievements
+ */
+ @javax.annotation.Nullable
+ public List getAchievements() {
+ return achievements;
+ }
+
+ public void setAchievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ }
+
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
@@ -398,13 +431,14 @@ public boolean equals(Object o) {
Objects.equals(this.ruleFailureReasons, integrationResponse.ruleFailureReasons) &&
Objects.equals(this.createdCoupons, integrationResponse.createdCoupons) &&
Objects.equals(this.createdReferrals, integrationResponse.createdReferrals) &&
- Objects.equals(this.awardedGiveaways, integrationResponse.awardedGiveaways)&&
+ Objects.equals(this.awardedGiveaways, integrationResponse.awardedGiveaways) &&
+ Objects.equals(this.achievements, integrationResponse.achievements)&&
Objects.equals(this.additionalProperties, integrationResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, additionalProperties);
+ return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, achievements, additionalProperties);
}
@Override
@@ -420,6 +454,7 @@ public String toString() {
sb.append(" createdCoupons: ").append(toIndentedString(createdCoupons)).append("\n");
sb.append(" createdReferrals: ").append(toIndentedString(createdReferrals)).append("\n");
sb.append(" awardedGiveaways: ").append(toIndentedString(awardedGiveaways)).append("\n");
+ sb.append(" achievements: ").append(toIndentedString(achievements)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
@@ -439,7 +474,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways"));
+ openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "achievements"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(Arrays.asList("effects", "createdCoupons", "createdReferrals"));
@@ -559,6 +594,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
};
}
}
+ if (jsonObj.get("achievements") != null && !jsonObj.get("achievements").isJsonNull()) {
+ JsonArray jsonArrayachievements = jsonObj.getAsJsonArray("achievements");
+ if (jsonArrayachievements != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("achievements").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `achievements` to be an array in the JSON string but got `%s`", jsonObj.get("achievements").toString()));
+ }
+
+ // validate the optional field `achievements` (array)
+ for (int i = 0; i < jsonArrayachievements.size(); i++) {
+ CustomerAchievement.validateJsonElement(jsonArrayachievements.get(i));
+ };
+ }
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/src/main/java/one/talon/model/IntegrationStateV2.java b/src/main/java/one/talon/model/IntegrationStateV2.java
index f89b4f5a..0e9a191f 100644
--- a/src/main/java/one/talon/model/IntegrationStateV2.java
+++ b/src/main/java/one/talon/model/IntegrationStateV2.java
@@ -26,6 +26,7 @@
import one.talon.model.Campaign;
import one.talon.model.CampaignEligibility;
import one.talon.model.Coupon;
+import one.talon.model.CustomerAchievement;
import one.talon.model.CustomerProfile;
import one.talon.model.CustomerSessionV2;
import one.talon.model.Effect;
@@ -112,6 +113,11 @@ public class IntegrationStateV2 {
@javax.annotation.Nullable
private List awardedGiveaways;
+ public static final String SERIALIZED_NAME_ACHIEVEMENTS = "achievements";
+ @SerializedName(SERIALIZED_NAME_ACHIEVEMENTS)
+ @javax.annotation.Nullable
+ private List achievements;
+
public static final String SERIALIZED_NAME_REFERRAL = "referral";
@SerializedName(SERIALIZED_NAME_REFERRAL)
@javax.annotation.Nullable
@@ -377,6 +383,33 @@ public void setAwardedGiveaways(@javax.annotation.Nullable List awarde
}
+ public IntegrationStateV2 achievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ return this;
+ }
+
+ public IntegrationStateV2 addAchievementsItem(CustomerAchievement achievementsItem) {
+ if (this.achievements == null) {
+ this.achievements = new ArrayList<>();
+ }
+ this.achievements.add(achievementsItem);
+ return this;
+ }
+
+ /**
+ * The achievements progress of the customer.
+ * @return achievements
+ */
+ @javax.annotation.Nullable
+ public List getAchievements() {
+ return achievements;
+ }
+
+ public void setAchievements(@javax.annotation.Nullable List achievements) {
+ this.achievements = achievements;
+ }
+
+
public IntegrationStateV2 referral(@javax.annotation.Nullable InventoryReferral referral) {
this.referral = referral;
return this;
@@ -589,6 +622,7 @@ public boolean equals(Object o) {
Objects.equals(this.createdCoupons, integrationStateV2.createdCoupons) &&
Objects.equals(this.createdReferrals, integrationStateV2.createdReferrals) &&
Objects.equals(this.awardedGiveaways, integrationStateV2.awardedGiveaways) &&
+ Objects.equals(this.achievements, integrationStateV2.achievements) &&
Objects.equals(this.referral, integrationStateV2.referral) &&
Objects.equals(this.coupons, integrationStateV2.coupons) &&
Objects.equals(this.event, integrationStateV2.event) &&
@@ -601,7 +635,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, referral, coupons, event, advancedEvent, customerSession, _return, previousReturns, additionalProperties);
+ return Objects.hash(customerProfile, loyalty, triggeredCampaigns, campaignEligibility, effects, ruleFailureReasons, createdCoupons, createdReferrals, awardedGiveaways, achievements, referral, coupons, event, advancedEvent, customerSession, _return, previousReturns, additionalProperties);
}
@Override
@@ -617,6 +651,7 @@ public String toString() {
sb.append(" createdCoupons: ").append(toIndentedString(createdCoupons)).append("\n");
sb.append(" createdReferrals: ").append(toIndentedString(createdReferrals)).append("\n");
sb.append(" awardedGiveaways: ").append(toIndentedString(awardedGiveaways)).append("\n");
+ sb.append(" achievements: ").append(toIndentedString(achievements)).append("\n");
sb.append(" referral: ").append(toIndentedString(referral)).append("\n");
sb.append(" coupons: ").append(toIndentedString(coupons)).append("\n");
sb.append(" event: ").append(toIndentedString(event)).append("\n");
@@ -643,7 +678,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
- openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "referral", "coupons", "event", "advancedEvent", "customerSession", "return", "previousReturns"));
+ openapiFields = new HashSet(Arrays.asList("customerProfile", "loyalty", "triggeredCampaigns", "campaignEligibility", "effects", "ruleFailureReasons", "createdCoupons", "createdReferrals", "awardedGiveaways", "achievements", "referral", "coupons", "event", "advancedEvent", "customerSession", "return", "previousReturns"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(Arrays.asList("effects", "createdCoupons", "createdReferrals"));
@@ -763,6 +798,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
};
}
}
+ if (jsonObj.get("achievements") != null && !jsonObj.get("achievements").isJsonNull()) {
+ JsonArray jsonArrayachievements = jsonObj.getAsJsonArray("achievements");
+ if (jsonArrayachievements != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("achievements").isJsonArray()) {
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `achievements` to be an array in the JSON string but got `%s`", jsonObj.get("achievements").toString()));
+ }
+
+ // validate the optional field `achievements` (array)
+ for (int i = 0; i < jsonArrayachievements.size(); i++) {
+ CustomerAchievement.validateJsonElement(jsonArrayachievements.get(i));
+ };
+ }
+ }
// validate the optional field `referral`
if (jsonObj.get("referral") != null && !jsonObj.get("referral").isJsonNull()) {
InventoryReferral.validateJsonElement(jsonObj.get("referral"));
diff --git a/src/main/java/one/talon/model/LedgerInfo.java b/src/main/java/one/talon/model/LedgerInfo.java
index f48ddd28..b5fd3dea 100644
--- a/src/main/java/one/talon/model/LedgerInfo.java
+++ b/src/main/java/one/talon/model/LedgerInfo.java
@@ -68,11 +68,13 @@ public class LedgerInfo {
private BigDecimal negativeBalance;
public static final String SERIALIZED_NAME_EXPIRED_BALANCE = "expiredBalance";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_EXPIRED_BALANCE)
@javax.annotation.Nonnull
private BigDecimal expiredBalance;
public static final String SERIALIZED_NAME_SPENT_BALANCE = "spentBalance";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_SPENT_BALANCE)
@javax.annotation.Nonnull
private BigDecimal spentBalance;
@@ -167,6 +169,7 @@ public void setNegativeBalance(@javax.annotation.Nullable BigDecimal negativeBal
}
+ @Deprecated
public LedgerInfo expiredBalance(@javax.annotation.Nonnull BigDecimal expiredBalance) {
this.expiredBalance = expiredBalance;
return this;
@@ -175,17 +178,21 @@ public LedgerInfo expiredBalance(@javax.annotation.Nonnull BigDecimal expiredBal
/**
* **DEPRECATED** Value is shown as 0.
* @return expiredBalance
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nonnull
public BigDecimal getExpiredBalance() {
return expiredBalance;
}
+ @Deprecated
public void setExpiredBalance(@javax.annotation.Nonnull BigDecimal expiredBalance) {
this.expiredBalance = expiredBalance;
}
+ @Deprecated
public LedgerInfo spentBalance(@javax.annotation.Nonnull BigDecimal spentBalance) {
this.spentBalance = spentBalance;
return this;
@@ -194,12 +201,15 @@ public LedgerInfo spentBalance(@javax.annotation.Nonnull BigDecimal spentBalance
/**
* **DEPRECATED** Value is shown as 0.
* @return spentBalance
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nonnull
public BigDecimal getSpentBalance() {
return spentBalance;
}
+ @Deprecated
public void setSpentBalance(@javax.annotation.Nonnull BigDecimal spentBalance) {
this.spentBalance = spentBalance;
}
diff --git a/src/main/java/one/talon/model/LoyaltyProgramBalance.java b/src/main/java/one/talon/model/LoyaltyProgramBalance.java
index 4d518368..10761d09 100644
--- a/src/main/java/one/talon/model/LoyaltyProgramBalance.java
+++ b/src/main/java/one/talon/model/LoyaltyProgramBalance.java
@@ -67,11 +67,13 @@ public class LoyaltyProgramBalance {
private BigDecimal negativeBalance;
public static final String SERIALIZED_NAME_EXPIRED_BALANCE = "expiredBalance";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_EXPIRED_BALANCE)
@javax.annotation.Nonnull
private BigDecimal expiredBalance;
public static final String SERIALIZED_NAME_SPENT_BALANCE = "spentBalance";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_SPENT_BALANCE)
@javax.annotation.Nonnull
private BigDecimal spentBalance;
@@ -151,6 +153,7 @@ public void setNegativeBalance(@javax.annotation.Nullable BigDecimal negativeBal
}
+ @Deprecated
public LoyaltyProgramBalance expiredBalance(@javax.annotation.Nonnull BigDecimal expiredBalance) {
this.expiredBalance = expiredBalance;
return this;
@@ -159,17 +162,21 @@ public LoyaltyProgramBalance expiredBalance(@javax.annotation.Nonnull BigDecimal
/**
* **DEPRECATED** Value is shown as 0.
* @return expiredBalance
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nonnull
public BigDecimal getExpiredBalance() {
return expiredBalance;
}
+ @Deprecated
public void setExpiredBalance(@javax.annotation.Nonnull BigDecimal expiredBalance) {
this.expiredBalance = expiredBalance;
}
+ @Deprecated
public LoyaltyProgramBalance spentBalance(@javax.annotation.Nonnull BigDecimal spentBalance) {
this.spentBalance = spentBalance;
return this;
@@ -178,12 +185,15 @@ public LoyaltyProgramBalance spentBalance(@javax.annotation.Nonnull BigDecimal s
/**
* **DEPRECATED** Value is shown as 0.
* @return spentBalance
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nonnull
public BigDecimal getSpentBalance() {
return spentBalance;
}
+ @Deprecated
public void setSpentBalance(@javax.annotation.Nonnull BigDecimal spentBalance) {
this.spentBalance = spentBalance;
}
diff --git a/src/main/java/one/talon/model/LoyaltySubLedger.java b/src/main/java/one/talon/model/LoyaltySubLedger.java
index fc35df30..a929b29a 100644
--- a/src/main/java/one/talon/model/LoyaltySubLedger.java
+++ b/src/main/java/one/talon/model/LoyaltySubLedger.java
@@ -56,6 +56,7 @@
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0")
public class LoyaltySubLedger {
public static final String SERIALIZED_NAME_TOTAL = "total";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_TOTAL)
@javax.annotation.Nonnull
private BigDecimal total;
@@ -118,6 +119,7 @@ public class LoyaltySubLedger {
public LoyaltySubLedger() {
}
+ @Deprecated
public LoyaltySubLedger total(@javax.annotation.Nonnull BigDecimal total) {
this.total = total;
return this;
@@ -126,12 +128,15 @@ public LoyaltySubLedger total(@javax.annotation.Nonnull BigDecimal total) {
/**
* **DEPRECATED** Use `totalActivePoints` property instead. Total amount of currently active and available points in the customer's balance.
* @return total
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nonnull
public BigDecimal getTotal() {
return total;
}
+ @Deprecated
public void setTotal(@javax.annotation.Nonnull BigDecimal total) {
this.total = total;
}
diff --git a/src/main/java/one/talon/model/NewCoupons.java b/src/main/java/one/talon/model/NewCoupons.java
index 1ae55754..960872e5 100644
--- a/src/main/java/one/talon/model/NewCoupons.java
+++ b/src/main/java/one/talon/model/NewCoupons.java
@@ -91,6 +91,7 @@ public class NewCoupons {
private Long numberOfCoupons;
public static final String SERIALIZED_NAME_UNIQUE_PREFIX = "uniquePrefix";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_UNIQUE_PREFIX)
@javax.annotation.Nullable
private String uniquePrefix;
@@ -275,6 +276,7 @@ public void setNumberOfCoupons(@javax.annotation.Nonnull Long numberOfCoupons) {
}
+ @Deprecated
public NewCoupons uniquePrefix(@javax.annotation.Nullable String uniquePrefix) {
this.uniquePrefix = uniquePrefix;
return this;
@@ -283,12 +285,15 @@ public NewCoupons uniquePrefix(@javax.annotation.Nullable String uniquePrefix) {
/**
* **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#tag/Coupons/operation/createCouponsAsync) endpoint.
* @return uniquePrefix
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable
public String getUniquePrefix() {
return uniquePrefix;
}
+ @Deprecated
public void setUniquePrefix(@javax.annotation.Nullable String uniquePrefix) {
this.uniquePrefix = uniquePrefix;
}
diff --git a/src/main/java/one/talon/model/PassthroughBlock.java b/src/main/java/one/talon/model/PassthroughBlock.java
new file mode 100644
index 00000000..a2589c2b
--- /dev/null
+++ b/src/main/java/one/talon/model/PassthroughBlock.java
@@ -0,0 +1,413 @@
+/*
+ * Talon.One API
+ * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) to integrate with our platform. - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`.
+ *
+ * The version of the OpenAPI document:
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package one.talon.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import one.talon.JSON;
+
+/**
+ * A block representing a Talang expression that could not be mapped to a typed block. The expression is preserved in its raw Talang array form for diagnostic and round-trip purposes.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0")
+public class PassthroughBlock {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ @javax.annotation.Nonnull
+ private String id;
+
+ /**
+ * The type discriminator for this block.
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ PASSTHROUGH("passthrough");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ @javax.annotation.Nonnull
+ private TypeEnum type;
+
+ public static final String SERIALIZED_NAME_EXPRESSION = "expression";
+ @SerializedName(SERIALIZED_NAME_EXPRESSION)
+ @javax.annotation.Nonnull
+ private List