From f270390cdecb558d32a76b2a7f49dff246424ad6 Mon Sep 17 00:00:00 2001 From: Talon-One SDK Generator Date: Thu, 16 Apr 2026 08:03:41 +0000 Subject: [PATCH] update to 26.08.0 --- .openapi-generator/FILES | 39 + README.md | 23 +- api/openapi.yaml | 824 ++++++++++++++++-- build.gradle | 2 +- build.sbt | 2 +- docs/AchievementV2.md | 18 +- docs/BestPriorPriceRequest.md | 3 +- docs/CreateAchievementV2.md | 2 +- docs/CreateMCPKey.md | 14 + docs/ExperimentSegmentInsight.md | 40 + docs/ExperimentSegmentInsightMetric.md | 24 + docs/ExperimentSegmentInsightVariant.md | 16 + docs/ExperimentSegmentInsights.md | 16 + docs/ExperimentVerdict.md | 17 + docs/ExperimentVerdictResponse.md | 14 + docs/IntegrationApi.md | 91 +- docs/IntegrationGetAllCampaigns200Response.md | 14 + docs/LedgerInfo.md | 1 + ...stApplicationCartItemFilters200Response.md | 14 + docs/LoyaltyBalanceWithTier.md | 2 +- docs/MCPKey.md | 20 + docs/ManagementApi.md | 283 +++++- docs/NewMCPKey.md | 21 + docs/NewReward.md | 17 + docs/Reward.md | 30 + docs/RuleMetadata.md | 6 +- docs/SetDiscountPerItemEffectProps.md | 1 + ...ikethroughSetDiscountPerItemEffectProps.md | 2 +- pom.xml | 2 +- src/main/java/one/talon/ApiClient.java | 2 +- src/main/java/one/talon/Configuration.java | 2 +- src/main/java/one/talon/JSON.java | 13 + .../java/one/talon/api/IntegrationApi.java | 212 ++++- .../java/one/talon/api/ManagementApi.java | 578 ++++++++++-- .../java/one/talon/model/AchievementV2.java | 106 ++- .../talon/model/BestPriorPriceRequest.java | 57 +- .../one/talon/model/CreateAchievementV2.java | 18 +- .../java/one/talon/model/CreateMCPKey.java | 240 +++++ .../talon/model/ExperimentSegmentInsight.java | 461 ++++++++++ .../model/ExperimentSegmentInsightMetric.java | 316 +++++++ .../ExperimentSegmentInsightVariant.java | 291 +++++++ .../model/ExperimentSegmentInsights.java | 312 +++++++ .../one/talon/model/ExperimentVerdict.java | 342 ++++++++ .../model/ExperimentVerdictResponse.java | 240 +++++ ...IntegrationGetAllCampaigns200Response.java | 257 ++++++ src/main/java/one/talon/model/LedgerInfo.java | 35 +- ...ApplicationCartItemFilters200Response.java | 257 ++++++ .../talon/model/LoyaltyBalanceWithTier.java | 2 +- src/main/java/one/talon/model/MCPKey.java | 396 +++++++++ src/main/java/one/talon/model/NewMCPKey.java | 425 +++++++++ src/main/java/one/talon/model/NewReward.java | 339 +++++++ src/main/java/one/talon/model/Reward.java | 501 +++++++++++ .../java/one/talon/model/RuleMetadata.java | 6 +- .../model/SetDiscountPerItemEffectProps.java | 32 +- ...ethroughSetDiscountPerItemEffectProps.java | 30 +- .../one/talon/api/IntegrationApiTest.java | 24 +- .../java/one/talon/api/ManagementApiTest.java | 59 +- .../model/BestPriorPriceRequestTest.java | 8 - .../one/talon/model/CreateMCPKeyTest.java | 57 ++ .../ExperimentSegmentInsightMetricTest.java | 59 ++ .../model/ExperimentSegmentInsightTest.java | 83 ++ .../ExperimentSegmentInsightVariantTest.java | 72 ++ .../model/ExperimentSegmentInsightsTest.java | 75 ++ .../model/ExperimentVerdictResponseTest.java | 58 ++ .../talon/model/ExperimentVerdictTest.java | 82 ++ ...grationGetAllCampaigns200ResponseTest.java | 59 ++ .../java/one/talon/model/LedgerInfoTest.java | 8 + ...icationCartItemFilters200ResponseTest.java | 59 ++ src/test/java/one/talon/model/MCPKeyTest.java | 105 +++ .../java/one/talon/model/NewMCPKeyTest.java | 113 +++ .../java/one/talon/model/NewRewardTest.java | 82 ++ src/test/java/one/talon/model/RewardTest.java | 115 +++ .../SetDiscountPerItemEffectPropsTest.java | 8 + ...oughSetDiscountPerItemEffectPropsTest.java | 6 +- 74 files changed, 7830 insertions(+), 330 deletions(-) create mode 100644 docs/CreateMCPKey.md create mode 100644 docs/ExperimentSegmentInsight.md create mode 100644 docs/ExperimentSegmentInsightMetric.md create mode 100644 docs/ExperimentSegmentInsightVariant.md create mode 100644 docs/ExperimentSegmentInsights.md create mode 100644 docs/ExperimentVerdict.md create mode 100644 docs/ExperimentVerdictResponse.md create mode 100644 docs/IntegrationGetAllCampaigns200Response.md create mode 100644 docs/ListApplicationCartItemFilters200Response.md create mode 100644 docs/MCPKey.md create mode 100644 docs/NewMCPKey.md create mode 100644 docs/NewReward.md create mode 100644 docs/Reward.md create mode 100644 src/main/java/one/talon/model/CreateMCPKey.java create mode 100644 src/main/java/one/talon/model/ExperimentSegmentInsight.java create mode 100644 src/main/java/one/talon/model/ExperimentSegmentInsightMetric.java create mode 100644 src/main/java/one/talon/model/ExperimentSegmentInsightVariant.java create mode 100644 src/main/java/one/talon/model/ExperimentSegmentInsights.java create mode 100644 src/main/java/one/talon/model/ExperimentVerdict.java create mode 100644 src/main/java/one/talon/model/ExperimentVerdictResponse.java create mode 100644 src/main/java/one/talon/model/IntegrationGetAllCampaigns200Response.java create mode 100644 src/main/java/one/talon/model/ListApplicationCartItemFilters200Response.java create mode 100644 src/main/java/one/talon/model/MCPKey.java create mode 100644 src/main/java/one/talon/model/NewMCPKey.java create mode 100644 src/main/java/one/talon/model/NewReward.java create mode 100644 src/main/java/one/talon/model/Reward.java create mode 100644 src/test/java/one/talon/model/CreateMCPKeyTest.java create mode 100644 src/test/java/one/talon/model/ExperimentSegmentInsightMetricTest.java create mode 100644 src/test/java/one/talon/model/ExperimentSegmentInsightTest.java create mode 100644 src/test/java/one/talon/model/ExperimentSegmentInsightVariantTest.java create mode 100644 src/test/java/one/talon/model/ExperimentSegmentInsightsTest.java create mode 100644 src/test/java/one/talon/model/ExperimentVerdictResponseTest.java create mode 100644 src/test/java/one/talon/model/ExperimentVerdictTest.java create mode 100644 src/test/java/one/talon/model/IntegrationGetAllCampaigns200ResponseTest.java create mode 100644 src/test/java/one/talon/model/ListApplicationCartItemFilters200ResponseTest.java create mode 100644 src/test/java/one/talon/model/MCPKeyTest.java create mode 100644 src/test/java/one/talon/model/NewMCPKeyTest.java create mode 100644 src/test/java/one/talon/model/NewRewardTest.java create mode 100644 src/test/java/one/talon/model/RewardTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b8d61479..5e4b8dc2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -194,6 +194,7 @@ docs/CreateAchievementV2.md docs/CreateApplicationAPIKey.md docs/CreateCouponData.md docs/CreateCoupons200Response.md +docs/CreateMCPKey.md docs/CreateManagementKey.md docs/CreateReferralsForMultipleAdvocates201Response.md docs/CreateTemplateCampaign.md @@ -247,10 +248,16 @@ docs/ExperimentListResults.md docs/ExperimentListResultsRequest.md docs/ExperimentResult.md docs/ExperimentResults.md +docs/ExperimentSegmentInsight.md +docs/ExperimentSegmentInsightMetric.md +docs/ExperimentSegmentInsightVariant.md +docs/ExperimentSegmentInsights.md docs/ExperimentVariant.md docs/ExperimentVariantAllocation.md docs/ExperimentVariantResult.md docs/ExperimentVariantResultConfidence.md +docs/ExperimentVerdict.md +docs/ExperimentVerdictResponse.md docs/ExpiringCardPointsData.md docs/ExpiringCardPointsNotification.md docs/ExpiringCouponsData.md @@ -345,6 +352,7 @@ docs/IntegrationEventV2Request.md docs/IntegrationEventV2Response.md docs/IntegrationEventV3Request.md docs/IntegrationEventV3Response.md +docs/IntegrationGetAllCampaigns200Response.md docs/IntegrationHubConfig.md docs/IntegrationHubEventPayloadCouponBasedNotifications.md docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md @@ -382,6 +390,7 @@ docs/LimitCounter.md docs/ListAccountCollections200Response.md docs/ListAchievements200Response.md docs/ListAllRolesV2200Response.md +docs/ListApplicationCartItemFilters200Response.md docs/ListCampaignStoreBudgetLimits200Response.md docs/ListCampaignStoreBudgets.md docs/ListCampaignStoreBudgetsStore.md @@ -415,6 +424,7 @@ docs/LoyaltyProgramLedgers.md docs/LoyaltyProgramTransaction.md docs/LoyaltySubLedger.md docs/LoyaltyTier.md +docs/MCPKey.md docs/ManagementApi.md docs/ManagementKey.md docs/ManagerConfig.md @@ -478,6 +488,7 @@ docs/NewInvitation.md docs/NewInviteEmail.md docs/NewLoyaltyProgram.md docs/NewLoyaltyTier.md +docs/NewMCPKey.md docs/NewManagementKey.md docs/NewMessageTest.md docs/NewMultipleAudiencesItem.md @@ -492,6 +503,7 @@ docs/NewReferral.md docs/NewReferralsForMultipleAdvocates.md docs/NewReturn.md docs/NewRevisionVersion.md +docs/NewReward.md docs/NewRole.md docs/NewRoleV2.md docs/NewRuleset.md @@ -559,6 +571,7 @@ docs/Revision.md docs/RevisionActivation.md docs/RevisionActivationRequest.md docs/RevisionVersion.md +docs/Reward.md docs/Role.md docs/RoleAssign.md docs/RoleMembership.md @@ -909,6 +922,7 @@ src/main/java/one/talon/model/CreateAchievementV2.java src/main/java/one/talon/model/CreateApplicationAPIKey.java src/main/java/one/talon/model/CreateCouponData.java src/main/java/one/talon/model/CreateCoupons200Response.java +src/main/java/one/talon/model/CreateMCPKey.java src/main/java/one/talon/model/CreateManagementKey.java src/main/java/one/talon/model/CreateReferralsForMultipleAdvocates201Response.java src/main/java/one/talon/model/CreateTemplateCampaign.java @@ -962,10 +976,16 @@ src/main/java/one/talon/model/ExperimentListResults.java src/main/java/one/talon/model/ExperimentListResultsRequest.java src/main/java/one/talon/model/ExperimentResult.java src/main/java/one/talon/model/ExperimentResults.java +src/main/java/one/talon/model/ExperimentSegmentInsight.java +src/main/java/one/talon/model/ExperimentSegmentInsightMetric.java +src/main/java/one/talon/model/ExperimentSegmentInsightVariant.java +src/main/java/one/talon/model/ExperimentSegmentInsights.java src/main/java/one/talon/model/ExperimentVariant.java src/main/java/one/talon/model/ExperimentVariantAllocation.java src/main/java/one/talon/model/ExperimentVariantResult.java src/main/java/one/talon/model/ExperimentVariantResultConfidence.java +src/main/java/one/talon/model/ExperimentVerdict.java +src/main/java/one/talon/model/ExperimentVerdictResponse.java src/main/java/one/talon/model/ExpiringCardPointsData.java src/main/java/one/talon/model/ExpiringCardPointsNotification.java src/main/java/one/talon/model/ExpiringCouponsData.java @@ -1059,6 +1079,7 @@ src/main/java/one/talon/model/IntegrationEventV2Request.java src/main/java/one/talon/model/IntegrationEventV2Response.java src/main/java/one/talon/model/IntegrationEventV3Request.java src/main/java/one/talon/model/IntegrationEventV3Response.java +src/main/java/one/talon/model/IntegrationGetAllCampaigns200Response.java src/main/java/one/talon/model/IntegrationHubConfig.java src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotifications.java src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimits.java @@ -1096,6 +1117,7 @@ src/main/java/one/talon/model/LimitCounter.java src/main/java/one/talon/model/ListAccountCollections200Response.java src/main/java/one/talon/model/ListAchievements200Response.java src/main/java/one/talon/model/ListAllRolesV2200Response.java +src/main/java/one/talon/model/ListApplicationCartItemFilters200Response.java src/main/java/one/talon/model/ListCampaignStoreBudgetLimits200Response.java src/main/java/one/talon/model/ListCampaignStoreBudgets.java src/main/java/one/talon/model/ListCampaignStoreBudgetsStore.java @@ -1129,6 +1151,7 @@ src/main/java/one/talon/model/LoyaltyProgramLedgers.java src/main/java/one/talon/model/LoyaltyProgramTransaction.java src/main/java/one/talon/model/LoyaltySubLedger.java src/main/java/one/talon/model/LoyaltyTier.java +src/main/java/one/talon/model/MCPKey.java src/main/java/one/talon/model/ManagementKey.java src/main/java/one/talon/model/ManagerConfig.java src/main/java/one/talon/model/MessageLogEntries.java @@ -1191,6 +1214,7 @@ src/main/java/one/talon/model/NewInvitation.java src/main/java/one/talon/model/NewInviteEmail.java src/main/java/one/talon/model/NewLoyaltyProgram.java src/main/java/one/talon/model/NewLoyaltyTier.java +src/main/java/one/talon/model/NewMCPKey.java src/main/java/one/talon/model/NewManagementKey.java src/main/java/one/talon/model/NewMessageTest.java src/main/java/one/talon/model/NewMultipleAudiencesItem.java @@ -1205,6 +1229,7 @@ src/main/java/one/talon/model/NewReferral.java src/main/java/one/talon/model/NewReferralsForMultipleAdvocates.java src/main/java/one/talon/model/NewReturn.java src/main/java/one/talon/model/NewRevisionVersion.java +src/main/java/one/talon/model/NewReward.java src/main/java/one/talon/model/NewRole.java src/main/java/one/talon/model/NewRoleV2.java src/main/java/one/talon/model/NewRuleset.java @@ -1272,6 +1297,7 @@ src/main/java/one/talon/model/Revision.java src/main/java/one/talon/model/RevisionActivation.java 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/Role.java src/main/java/one/talon/model/RoleAssign.java src/main/java/one/talon/model/RoleMembership.java @@ -1595,6 +1621,7 @@ src/test/java/one/talon/model/CreateAchievementV2Test.java src/test/java/one/talon/model/CreateApplicationAPIKeyTest.java src/test/java/one/talon/model/CreateCouponDataTest.java src/test/java/one/talon/model/CreateCoupons200ResponseTest.java +src/test/java/one/talon/model/CreateMCPKeyTest.java src/test/java/one/talon/model/CreateManagementKeyTest.java src/test/java/one/talon/model/CreateReferralsForMultipleAdvocates201ResponseTest.java src/test/java/one/talon/model/CreateTemplateCampaignResponseTest.java @@ -1647,11 +1674,17 @@ src/test/java/one/talon/model/ExperimentListResultsRequestTest.java src/test/java/one/talon/model/ExperimentListResultsTest.java src/test/java/one/talon/model/ExperimentResultTest.java src/test/java/one/talon/model/ExperimentResultsTest.java +src/test/java/one/talon/model/ExperimentSegmentInsightMetricTest.java +src/test/java/one/talon/model/ExperimentSegmentInsightTest.java +src/test/java/one/talon/model/ExperimentSegmentInsightVariantTest.java +src/test/java/one/talon/model/ExperimentSegmentInsightsTest.java src/test/java/one/talon/model/ExperimentTest.java src/test/java/one/talon/model/ExperimentVariantAllocationTest.java src/test/java/one/talon/model/ExperimentVariantResultConfidenceTest.java src/test/java/one/talon/model/ExperimentVariantResultTest.java src/test/java/one/talon/model/ExperimentVariantTest.java +src/test/java/one/talon/model/ExperimentVerdictResponseTest.java +src/test/java/one/talon/model/ExperimentVerdictTest.java src/test/java/one/talon/model/ExpiringCardPointsDataTest.java src/test/java/one/talon/model/ExpiringCardPointsNotificationTest.java src/test/java/one/talon/model/ExpiringCouponsDataTest.java @@ -1745,6 +1778,7 @@ src/test/java/one/talon/model/IntegrationEventV2RequestTest.java src/test/java/one/talon/model/IntegrationEventV2ResponseTest.java src/test/java/one/talon/model/IntegrationEventV3RequestTest.java src/test/java/one/talon/model/IntegrationEventV3ResponseTest.java +src/test/java/one/talon/model/IntegrationGetAllCampaigns200ResponseTest.java src/test/java/one/talon/model/IntegrationHubConfigTest.java src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimitsTest.java src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsTest.java @@ -1782,6 +1816,7 @@ src/test/java/one/talon/model/LimitCounterTest.java src/test/java/one/talon/model/ListAccountCollections200ResponseTest.java src/test/java/one/talon/model/ListAchievements200ResponseTest.java src/test/java/one/talon/model/ListAllRolesV2200ResponseTest.java +src/test/java/one/talon/model/ListApplicationCartItemFilters200ResponseTest.java src/test/java/one/talon/model/ListCampaignStoreBudgetLimits200ResponseTest.java src/test/java/one/talon/model/ListCampaignStoreBudgetsStoreTest.java src/test/java/one/talon/model/ListCampaignStoreBudgetsTest.java @@ -1815,6 +1850,7 @@ src/test/java/one/talon/model/LoyaltyProgramTransactionTest.java src/test/java/one/talon/model/LoyaltySubLedgerTest.java src/test/java/one/talon/model/LoyaltyTest.java src/test/java/one/talon/model/LoyaltyTierTest.java +src/test/java/one/talon/model/MCPKeyTest.java src/test/java/one/talon/model/ManagementKeyTest.java src/test/java/one/talon/model/ManagerConfigTest.java src/test/java/one/talon/model/MessageLogEntriesTest.java @@ -1877,6 +1913,7 @@ src/test/java/one/talon/model/NewInvitationTest.java src/test/java/one/talon/model/NewInviteEmailTest.java src/test/java/one/talon/model/NewLoyaltyProgramTest.java src/test/java/one/talon/model/NewLoyaltyTierTest.java +src/test/java/one/talon/model/NewMCPKeyTest.java src/test/java/one/talon/model/NewManagementKeyTest.java src/test/java/one/talon/model/NewMessageTestTest.java src/test/java/one/talon/model/NewMultipleAudiencesItemTest.java @@ -1891,6 +1928,7 @@ src/test/java/one/talon/model/NewReferralTest.java src/test/java/one/talon/model/NewReferralsForMultipleAdvocatesTest.java src/test/java/one/talon/model/NewReturnTest.java src/test/java/one/talon/model/NewRevisionVersionTest.java +src/test/java/one/talon/model/NewRewardTest.java src/test/java/one/talon/model/NewRoleTest.java src/test/java/one/talon/model/NewRoleV2Test.java src/test/java/one/talon/model/NewRulesetTest.java @@ -1958,6 +1996,7 @@ src/test/java/one/talon/model/RevisionActivationRequestTest.java src/test/java/one/talon/model/RevisionActivationTest.java src/test/java/one/talon/model/RevisionTest.java src/test/java/one/talon/model/RevisionVersionTest.java +src/test/java/one/talon/model/RewardTest.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 diff --git a/README.md b/README.md index 19178791..52ab7b13 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Add this dependency to your project's POM: one.talon talon-one-client - 26.07.0 + 26.08.0 compile ``` @@ -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.07.0" +compile "one.talon:talon-one-client:26.08.0" ``` ### Others @@ -230,6 +230,7 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**getLoyaltyProgramProfilePoints**](docs/IntegrationApi.md#getLoyaltyProgramProfilePoints) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points | List customer's unused loyalty points *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* | [**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 @@ -255,7 +256,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**createCampaignStoreBudget**](docs/ManagementApi.md#createCampaignStoreBudget) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | Create campaign store budget *ManagementApi* | [**createCollection**](docs/ManagementApi.md#createCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create campaign-level collection *ManagementApi* | [**createCoupons**](docs/ManagementApi.md#createCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons -*ManagementApi* | [**createCouponsAsync**](docs/ManagementApi.md#createCouponsAsync) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously +*ManagementApi* | [**createCouponsAsynchronously**](docs/ManagementApi.md#createCouponsAsynchronously) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously *ManagementApi* | [**createCouponsDeletionJob**](docs/ManagementApi.md#createCouponsDeletionJob) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs | Creates a coupon deletion job *ManagementApi* | [**createCouponsForMultipleRecipients**](docs/ManagementApi.md#createCouponsForMultipleRecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients *ManagementApi* | [**createInviteEmail**](docs/ManagementApi.md#createInviteEmail) | **POST** /v1/invite_emails | Resend invitation email @@ -285,6 +286,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**exportAudiencesMemberships**](docs/ManagementApi.md#exportAudiencesMemberships) | **GET** /v1/audiences/{audienceId}/memberships/export | Export audience members *ManagementApi* | [**exportCampaignStoreBudgets**](docs/ManagementApi.md#exportCampaignStoreBudgets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/export | Export campaign store budgets *ManagementApi* | [**exportCampaignStores**](docs/ManagementApi.md#exportCampaignStores) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores +*ManagementApi* | [**exportCampaignValueMap**](docs/ManagementApi.md#exportCampaignValueMap) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export | Export campaign value map *ManagementApi* | [**exportCollectionItems**](docs/ManagementApi.md#exportCollectionItems) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items *ManagementApi* | [**exportCoupons**](docs/ManagementApi.md#exportCoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons *ManagementApi* | [**exportCustomerSessions**](docs/ManagementApi.md#exportCustomerSessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions @@ -309,6 +311,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getAdditionalCosts**](docs/ManagementApi.md#getAdditionalCosts) | **GET** /v1/additional_costs | List additional costs *ManagementApi* | [**getApplication**](docs/ManagementApi.md#getApplication) | **GET** /v1/applications/{applicationId} | Get Application *ManagementApi* | [**getApplicationApiHealth**](docs/ManagementApi.md#getApplicationApiHealth) | **GET** /v1/applications/{applicationId}/health_report | Get Application health +*ManagementApi* | [**getApplicationCartItemFilterExpression**](docs/ManagementApi.md#getApplicationCartItemFilterExpression) | **GET** /v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId} | Get Application cart item filter expression *ManagementApi* | [**getApplicationCustomer**](docs/ManagementApi.md#getApplicationCustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer *ManagementApi* | [**getApplicationCustomerFriends**](docs/ManagementApi.md#getApplicationCustomerFriends) | **GET** /v1/applications/{applicationId}/profile/{integrationId}/friends | List friends referred by customer profile *ManagementApi* | [**getApplicationCustomers**](docs/ManagementApi.md#getApplicationCustomers) | **GET** /v1/applications/{applicationId}/customers | List application's customers @@ -381,6 +384,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**listAccountCollections**](docs/ManagementApi.md#listAccountCollections) | **GET** /v1/collections | List collections in account *ManagementApi* | [**listAchievements**](docs/ManagementApi.md#listAchievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements *ManagementApi* | [**listAllRolesV2**](docs/ManagementApi.md#listAllRolesV2) | **GET** /v2/roles | List roles +*ManagementApi* | [**listApplicationCartItemFilters**](docs/ManagementApi.md#listApplicationCartItemFilters) | **GET** /v1/applications/{applicationId}/cart_item_filters | List Application cart item filters *ManagementApi* | [**listCampaignStoreBudgetLimits**](docs/ManagementApi.md#listCampaignStoreBudgetLimits) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | List campaign store budget limits *ManagementApi* | [**listCatalogItems**](docs/ManagementApi.md#listCatalogItems) | **GET** /v1/catalogs/{catalogId}/items | List items in a catalog *ManagementApi* | [**listCollections**](docs/ManagementApi.md#listCollections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign @@ -610,6 +614,7 @@ Class | Method | HTTP request | Description - [CreateApplicationAPIKey](docs/CreateApplicationAPIKey.md) - [CreateCouponData](docs/CreateCouponData.md) - [CreateCoupons200Response](docs/CreateCoupons200Response.md) +- [CreateMCPKey](docs/CreateMCPKey.md) - [CreateManagementKey](docs/CreateManagementKey.md) - [CreateReferralsForMultipleAdvocates201Response](docs/CreateReferralsForMultipleAdvocates201Response.md) - [CreateTemplateCampaign](docs/CreateTemplateCampaign.md) @@ -663,10 +668,16 @@ Class | Method | HTTP request | Description - [ExperimentListResultsRequest](docs/ExperimentListResultsRequest.md) - [ExperimentResult](docs/ExperimentResult.md) - [ExperimentResults](docs/ExperimentResults.md) +- [ExperimentSegmentInsight](docs/ExperimentSegmentInsight.md) +- [ExperimentSegmentInsightMetric](docs/ExperimentSegmentInsightMetric.md) +- [ExperimentSegmentInsightVariant](docs/ExperimentSegmentInsightVariant.md) +- [ExperimentSegmentInsights](docs/ExperimentSegmentInsights.md) - [ExperimentVariant](docs/ExperimentVariant.md) - [ExperimentVariantAllocation](docs/ExperimentVariantAllocation.md) - [ExperimentVariantResult](docs/ExperimentVariantResult.md) - [ExperimentVariantResultConfidence](docs/ExperimentVariantResultConfidence.md) +- [ExperimentVerdict](docs/ExperimentVerdict.md) +- [ExperimentVerdictResponse](docs/ExperimentVerdictResponse.md) - [ExpiringCardPointsData](docs/ExpiringCardPointsData.md) - [ExpiringCardPointsNotification](docs/ExpiringCardPointsNotification.md) - [ExpiringCouponsData](docs/ExpiringCouponsData.md) @@ -760,6 +771,7 @@ Class | Method | HTTP request | Description - [IntegrationEventV2Response](docs/IntegrationEventV2Response.md) - [IntegrationEventV3Request](docs/IntegrationEventV3Request.md) - [IntegrationEventV3Response](docs/IntegrationEventV3Response.md) +- [IntegrationGetAllCampaigns200Response](docs/IntegrationGetAllCampaigns200Response.md) - [IntegrationHubConfig](docs/IntegrationHubConfig.md) - [IntegrationHubEventPayloadCouponBasedNotifications](docs/IntegrationHubEventPayloadCouponBasedNotifications.md) - [IntegrationHubEventPayloadCouponBasedNotificationsLimits](docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md) @@ -797,6 +809,7 @@ Class | Method | HTTP request | Description - [ListAccountCollections200Response](docs/ListAccountCollections200Response.md) - [ListAchievements200Response](docs/ListAchievements200Response.md) - [ListAllRolesV2200Response](docs/ListAllRolesV2200Response.md) +- [ListApplicationCartItemFilters200Response](docs/ListApplicationCartItemFilters200Response.md) - [ListCampaignStoreBudgetLimits200Response](docs/ListCampaignStoreBudgetLimits200Response.md) - [ListCampaignStoreBudgets](docs/ListCampaignStoreBudgets.md) - [ListCampaignStoreBudgetsStore](docs/ListCampaignStoreBudgetsStore.md) @@ -830,6 +843,7 @@ Class | Method | HTTP request | Description - [LoyaltyProgramTransaction](docs/LoyaltyProgramTransaction.md) - [LoyaltySubLedger](docs/LoyaltySubLedger.md) - [LoyaltyTier](docs/LoyaltyTier.md) +- [MCPKey](docs/MCPKey.md) - [ManagementKey](docs/ManagementKey.md) - [ManagerConfig](docs/ManagerConfig.md) - [MessageLogEntries](docs/MessageLogEntries.md) @@ -892,6 +906,7 @@ Class | Method | HTTP request | Description - [NewInviteEmail](docs/NewInviteEmail.md) - [NewLoyaltyProgram](docs/NewLoyaltyProgram.md) - [NewLoyaltyTier](docs/NewLoyaltyTier.md) +- [NewMCPKey](docs/NewMCPKey.md) - [NewManagementKey](docs/NewManagementKey.md) - [NewMessageTest](docs/NewMessageTest.md) - [NewMultipleAudiencesItem](docs/NewMultipleAudiencesItem.md) @@ -906,6 +921,7 @@ Class | Method | HTTP request | Description - [NewReferralsForMultipleAdvocates](docs/NewReferralsForMultipleAdvocates.md) - [NewReturn](docs/NewReturn.md) - [NewRevisionVersion](docs/NewRevisionVersion.md) +- [NewReward](docs/NewReward.md) - [NewRole](docs/NewRole.md) - [NewRoleV2](docs/NewRoleV2.md) - [NewRuleset](docs/NewRuleset.md) @@ -973,6 +989,7 @@ Class | Method | HTTP request | Description - [RevisionActivation](docs/RevisionActivation.md) - [RevisionActivationRequest](docs/RevisionActivationRequest.md) - [RevisionVersion](docs/RevisionVersion.md) +- [Reward](docs/Reward.md) - [Role](docs/Role.md) - [RoleAssign](docs/RoleAssign.md) - [RoleMembership](docs/RoleMembership.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index c8bb77a1..9e68f5ea 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -162,6 +162,9 @@ tags: - description: | Represents physical or digital stores, branches, and franchises. name: Stores +- description: Represents the value maps that the user can create within a campaign + ruleset. + name: Value maps - description: | A way to send information from Talon.One to the URI of your choice. @@ -493,6 +496,15 @@ paths: schema: type: string style: simple + - description: | + When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. + explode: true + in: query + name: runRuleEngine + required: false + schema: + type: boolean + style: form requestBody: $ref: "#/components/requestBodies/ReturnIntegrationRequest" responses: @@ -1328,6 +1340,128 @@ paths: x-content-type: application/json x-accepts: - application/json + /v1/integration/campaigns: + get: + description: "Retrieve all running campaigns for the specified Application.\ + \ You\ncan filter the results by providing specific campaign IDs or a range\ + \ of \nstart and end dates.\n" + operationId: integrationGetAllCampaigns + parameters: + - description: The number of items in the response. + explode: true + in: query + name: pageSize + required: false + schema: + default: 50 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + style: form + - $ref: "#/components/parameters/skip" + - description: | + Filter by one or more campaign IDs, separated by a comma. + + **Note:** If no campaigns are specified, data for all the campaigns in + the Application is returned. + explode: false + in: query + name: campaignIds + required: false + schema: + items: + type: string + type: array + style: form + - description: "Filter results to only include campaigns that start on or after\ + \ \nthe specified timestamp.\n\n**Note:**\n\n- It must be an RFC3339 timestamp\ + \ string.\n\n- You can include a time component in your string, for example,\n\ + `T23:59:59` to specify the end of the day. The time zone setting\nconsidered\ + \ is `UTC`. If you do not include a time component, a default\ntime value\ + \ of `T00:00:00` (midnight) in `UTC` is considered.\n" + explode: true + in: query + name: startAfter + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter results to only include campaigns that start on or before\ + \ \nthe specified timestamp.\n\n**Note:**\n\n- It must be an RFC3339 timestamp\ + \ string.\n\n- You can include a time component in your string, for example,\n\ + `T23:59:59` to specify the end of the day. The time zone setting\nconsidered\ + \ is `UTC`. If you do not include a time component, a default\ntime value\ + \ of `T00:00:00` (midnight) in `UTC` is considered.\n" + explode: true + in: query + name: startBefore + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter results to only include campaigns that end on or after\ + \ \nthe specified timestamp.\n\n**Note:**\n\n- It must be an RFC3339 timestamp\ + \ string.\n\n- You can include a time component in your string, for example,\n\ + `T23:59:59` to specify the end of the day. The time zone setting\nconsidered\ + \ is `UTC`. If you do not include a time component, a default\ntime value\ + \ of `T00:00:00` (midnight) in `UTC` is considered.\n" + explode: true + in: query + name: endAfter + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter results to only include campaigns that end on or before\ + \ \nthe specified timestamp.\n\n**Note:**\n\n- It must be an RFC3339 timestamp\ + \ string.\n\n- You can include a time component in your string, for example,\n\ + `T23:59:59` to specify the end of the day. The time zone setting\nconsidered\ + \ is `UTC`. If you do not include a time component, a default\ntime value\ + \ of `T00:00:00` (midnight) in `UTC` is considered.\n" + explode: true + in: query + name: endBefore + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/integrationGetAllCampaigns_200_response" + 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: List all running campaigns + tags: + - integration + x-accepts: + - application/json /v2/events: post: description: | @@ -3340,7 +3474,7 @@ paths: - application/json /v1/applications: get: - description: List all applications in the current account. + description: List all the Applications in the current account. operationId: getApplications parameters: - $ref: "#/components/parameters/pageSize" @@ -3360,7 +3494,7 @@ paths: - application/json /v1/applications/{applicationId}: get: - description: Get the application specified by the ID. + description: Get the Application specified by the ID. operationId: getApplication parameters: - $ref: "#/components/parameters/applicationId" @@ -4014,7 +4148,7 @@ paths: Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete. If you want to create less than 20,001 coupons, you can use the [Create coupons](https://docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint. - operationId: createCouponsAsync + operationId: createCouponsAsynchronously parameters: - $ref: "#/components/parameters/applicationId" - $ref: "#/components/parameters/campaignId" @@ -7370,10 +7504,10 @@ paths: - $ref: "#/components/parameters/skip" - $ref: "#/components/parameters/sort" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -7622,10 +7756,10 @@ paths: - $ref: "#/components/parameters/skip" - $ref: "#/components/parameters/sort" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -7670,10 +7804,10 @@ paths: - $ref: "#/components/parameters/skip" - $ref: "#/components/parameters/sort" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -8276,10 +8410,10 @@ paths: - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/skip" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -8311,10 +8445,10 @@ paths: - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/skip" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -8951,10 +9085,10 @@ paths: - $ref: "#/components/parameters/skip" - $ref: "#/components/parameters/sort" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -9189,10 +9323,10 @@ paths: - $ref: "#/components/parameters/sort" - $ref: "#/components/parameters/applicationId" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -9237,6 +9371,7 @@ paths: summary: Fetch best prior price tags: - integration + x-scalar-stability: experimental x-content-type: application/json x-accepts: - application/json @@ -9520,10 +9655,10 @@ paths: - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/skip" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -11550,10 +11685,10 @@ paths: type: string style: form - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -11943,6 +12078,72 @@ paths: x-content-type: application/json x-accepts: - application/json + /v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export: + get: + description: | + Download a CSV file containing all the value map items in a campaign. If + there are multiple versions of the value map, only the items of the current + version are exported. + + > [!tip] If the exported CSV file is too large to view, you can + > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). + + The generated file can contain the following columns: + + - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. + - `value`: The value that is associated with the identifier, for example, the item's price. + operationId: exportCampaignValueMap + parameters: + - $ref: "#/components/parameters/applicationId" + - $ref: "#/components/parameters/campaignId" + - description: | + The ID of the value map. + explode: false + in: path + name: valueMapId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/csv: + examples: + response: + value: | + identifier,value + sku-123,10.11 + sku-234,595 + schema: + format: csv + type: string + description: OK + "400": + content: + application/csv: + schema: + $ref: "#/components/schemas/ErrorResponseWithStatus" + description: Bad request + "401": + content: + application/csv: + schema: + $ref: "#/components/schemas/ErrorResponseWithStatus" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponseWithStatus" + description: Not found + summary: Export campaign value map + tags: + - management + x-accepts: + - application/csv + - application/json /v1/applications/{applicationId}/stores: get: description: List all stores for a specific Application. @@ -11953,10 +12154,10 @@ paths: - $ref: "#/components/parameters/skip" - $ref: "#/components/parameters/sort" - description: | - When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. + When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + - When `true`: `totalResultSize` contains the total number of results for this query. + - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. explode: true in: query name: withTotalResultSize @@ -12199,6 +12400,86 @@ paths: - management x-accepts: - application/csv + /v1/applications/{applicationId}/cart_item_filters: + get: + description: Return all the Application cart item filters for a specific Application. + operationId: listApplicationCartItemFilters + parameters: + - $ref: "#/components/parameters/applicationId" + - description: The number of items in the response. + explode: true + in: query + name: pageSize + required: false + schema: + default: 50 + format: int64 + maximum: 50 + minimum: 1 + type: integer + style: form + - $ref: "#/components/parameters/skip" + - description: | + Filter by the display name of the Application cart item filter in the Application. + + **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. + explode: true + in: query + name: title + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listApplicationCartItemFilters_200_response" + description: OK + summary: List Application cart item filters + tags: + - management + x-accepts: + - application/json + /v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId}: + get: + description: Get an Application cart item filter expression for a specific Application. + operationId: getApplicationCartItemFilterExpression + parameters: + - $ref: "#/components/parameters/applicationId" + - description: "The ID of the Application cart item filter. You can get this\ + \ ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters)\ + \ endpoint." + explode: false + in: path + name: cartItemFilterId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The ID of the Application cart item filter expression. + explode: false + in: path + name: expressionId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationCIFExpression" + description: Ok + summary: Get Application cart item filter expression + tags: + - management + x-accepts: + - application/json /v1/applications/{applicationId}/campaigns/{campaignId}/stores: delete: description: Disconnect the stores linked to a specific campaign. @@ -13508,6 +13789,13 @@ components: $ref: "#/components/schemas/NewStore" description: body required: true + NewReward: + content: + application/json: + schema: + $ref: "#/components/schemas/NewReward" + description: body + required: true IntegrationEventV3Request: content: application/json: @@ -14883,6 +15171,10 @@ components: description: | The sub-position of the targeted bundle item on which the applied discount is based. type: number + excludedFromPriceHistory: + description: "When set to `true`, the applied discount is excluded from\ + \ the item's price history." + type: boolean required: - name - position @@ -16271,8 +16563,18 @@ components: description: Points required to move up a tier. example: 20 type: number + nextTierName: + description: | + The name of the next higher tier level in the loyalty program. + + **Note**: + - Returns `null` if the customer has reached the highest available tier. + - Returns the lowest level tier name if the customer is not currently assigned to any tier. + example: Silver + type: string example: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -16348,6 +16650,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -16374,6 +16677,7 @@ components: subLedgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -16439,6 +16743,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -16470,6 +16775,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -16495,6 +16801,7 @@ components: subLedgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -19376,6 +19683,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -19407,6 +19715,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -19432,6 +19741,7 @@ components: subLedgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -19983,20 +20293,19 @@ components: example: Give discount via coupon type: string displayName: - description: A customer-facing name used to identify the reward defined - within the rule. + description: A customer-facing name for the rule. example: 20% off all shoes! type: string displayDescription: - description: "A customer-facing description of the reward defined in the\ - \ rule. \n\nFor example, this property can contain details about eligibility\ + description: "A customer-facing description that explains the details of\ + \ the rule. \n\nFor example, this property can contain details about eligibility\ \ requirements, reward timelines, or terms and conditions.\n" example: Get a 20% discount on all shoes during Thanksgiving! Offer valid till Dec 5 only. type: string relatedData: description: | - Data related to the reward, such as a vendor name, an image URL, or a content management system (CMS) ID. + Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. example: https://example.com/discounts/20-off-shoes.png type: string required: @@ -20074,6 +20383,20 @@ components: - name - state - tags + example: + features: + - coupons + - referrals + name: Summer promotions + description: Campaign for all summer 2021 promotions + startTime: 2021-07-20T22:00:00Z + attributes: null + id: 4 + endTime: 2021-09-22T22:00:00Z + state: enabled + applicationId: 322 + tags: + - summer NewAttribute: allOf: - properties: @@ -22317,6 +22640,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -22348,6 +22672,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -22373,6 +22698,7 @@ components: subLedgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -22765,8 +23091,13 @@ components: example: 20 type: number nextTierName: - description: The name of the tier consecutive to the current tier. - example: silver + description: | + The name of the next higher tier level in the loyalty program. + + **Note**: + - Returns `null` if the customer has reached the highest available tier. + - Returns the lowest level tier name if the customer is not currently assigned to any tier. + example: Silver type: string LoyaltyBalancesWithTiers: description: List of loyalty balances for a ledger and its subledgers. @@ -24946,7 +25277,7 @@ components: example: 1EuroOff type: string value: {} - excludeFromBestPriorPriceHistory: + excludedFromPriceHistory: type: boolean required: - name @@ -27928,6 +28259,168 @@ components: - campaign - targetApplicationId - variantId + ExperimentVerdict: + properties: + winnerVariantName: + description: "The name of the winning variant. If no variant shows a statistically\ + \ significant advantage on key business metrics, return 'Inconclusive'." + type: string + verdictSummary: + description: "A one-sentence summary of the outcome, including the key metric\ + \ and confidence level that led to the decision." + type: string + keyFindings: + description: "A bullet point stating the most important finding, including\ + \ the metric, the percentage change, and the confidence." + items: + type: string + type: array + aiConfidenceLevel: + description: "Your confidence in this overall verdict, from 0 to 100." + type: string + recommendation: + description: "A short, actionable recommendation based on the findings.\ + \ If inconclusive, suggest running the test longer. If there is a clear\ + \ winner, recommend promoting it." + type: string + required: + - aiConfidenceLevel + - keyFindings + - recommendation + - verdictSummary + - winnerVariantName + ExperimentVerdictResponse: + properties: + verdict: + $ref: "#/components/schemas/ExperimentVerdict" + generated: + description: Timestamp of the moment when the verdict was generated. + format: date-time + type: string + required: + - generated + - verdict + ExperimentSegmentInsightVariant: + properties: + variantId: + description: The ID of the experiment variant. + example: 41 + format: int64 + type: integer + variantName: + description: The name of the experiment variant. + example: Control + type: string + sessionsCount: + description: The number of sessions in this segment for this variant. + example: 161 + format: int64 + type: integer + value: + description: The metric value for this variant in the segment. + example: 13.13 + format: double + type: number + required: + - sessionsCount + - value + - variantId + - variantName + ExperimentSegmentInsight: + properties: + dimension: + description: The segmentation dimension used to group customers or purchases + for analysis. + enum: + - cart_value + - item_count + - customer_type + example: cart_value + type: string + bucket: + description: The specific group within the segmentation dimension. + enum: + - low + - medium + - high + - new + - returning + - loyal + example: high + type: string + confidence: + description: | + The raw (unadjusted) confidence score expressed as a percentage. Only segments with a confidence score greater than or equal to 95% are returned. + example: 99.2 + format: double + maximum: 100 + minimum: 95 + type: number + winnerVariantId: + description: The ID of the variant that performed better in this segment. + example: 42 + format: int64 + type: integer + variants: + description: Per-variant metric values for this segment. + items: + $ref: "#/components/schemas/ExperimentSegmentInsightVariant" + type: array + required: + - bucket + - confidence + - dimension + - variants + - winnerVariantId + ExperimentSegmentInsightMetric: + properties: + metric: + description: The metric being measured. + enum: + - avg_session_value + - avg_discounted_session_value + - avg_items_per_session + example: avg_session_value + type: string + segments: + description: | + Segments with statistically significant results for this metric. An empty array means no significant segments were found. Segments are sorted by confidence score from highest to lowest. + items: + $ref: "#/components/schemas/ExperimentSegmentInsight" + type: array + required: + - metric + - segments + ExperimentSegmentInsights: + properties: + metrics: + description: | + Segment insights grouped by metric. This array always contains exactly three metric objects. Each metric includes a segments array, which is empty if no significant results were found. The metrics array itself is empty if the `reason` property is populated. + items: + $ref: "#/components/schemas/ExperimentSegmentInsightMetric" + type: array + totalSegmentsTested: + description: | + Total number of segment-metric combinations that were tested for statistical significance. + example: 24 + format: int64 + type: integer + dimensionsTested: + description: | + Number of segmentation dimensions that had sufficient data variance to test. Dimensions where all sessions fall into a single bucket are excluded. + example: 3 + format: int64 + type: integer + reason: + description: | + Empty string when segment insights are available. Contains a reason code when insights could not be computed (e.g., "insufficient_data" when the experiment has fewer than 100 sessions per variant). + example: "" + type: string + required: + - dimensionsTested + - metrics + - reason + - totalSegmentsTested CreateTemplateCampaign: example: campaignAttributesOverrides: "{}" @@ -31110,6 +31603,16 @@ components: type: integer required: - applicationId + example: + createdBy: 216 + created: 2020-06-10T09:05:27.993483Z + name: Filter items by product + description: This filter allows filtering by shoes + modified: 2000-01-23T04:56:07.000+00:00 + modifiedBy: 334 + id: 6 + applicationId: 322 + activeExpressionId: 1 Environment: allOf: - $ref: "#/components/schemas/Entity" @@ -31275,7 +31778,6 @@ components: skus: - comma - period - strictEndDate: true timeframeEndDateType: sale target: targetType: AUDIENCE @@ -31302,22 +31804,12 @@ components: within this look back period are considered for the best prior price evaluation. example: "30" type: string - strictEndDate: - deprecated: true - description: | - This property is **deprecated**. Use `timeframeEndDateType` instead. - - Indicates whether the timeframe includes the start of the current sale. - - When `false`, the timeframe includes the start date of the current sale. - - When `true`, the timeframe strictly uses the number of days specified in `timeframe`. - example: true - type: boolean timeframeEndDateType: description: | Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - - `price`: The timeframe ends at the start of the current `contextId` with the current price value. Identical price records are merged. If there is no `contextId` for the most recent price, the most recent timestamp for the price is used. - - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. + - `price`: The timeframe ends at the start of current price value and takes the prices prior to the start of the current price value into account. + - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. enum: - strict - price @@ -31328,9 +31820,9 @@ components: $ref: "#/components/schemas/BestPriorTarget" required: - skus - - strictEndDate - timeframe - timeframeEndDate + - timeframeEndDateType InfluencingCampaignDetails: description: Details about a campaign that influenced the final price. example: @@ -34073,6 +34565,69 @@ components: type: string required: - key + CreateMCPKey: + properties: + name: + description: Name for the MCP key. + example: My MCP key + type: string + expiryDate: + description: The date the MCP key expires. + example: 2026-08-24T14:00:00Z + format: date-time + type: string + required: + - expiryDate + - name + MCPKey: + allOf: + - $ref: "#/components/schemas/CreateMCPKey" + - properties: + id: + description: ID of the MCP key. + example: 34 + format: int64 + type: integer + createdBy: + description: ID of the user who created it. + example: 280 + format: int64 + type: integer + accountID: + description: ID of account the key is used for. + example: 13 + format: int64 + type: integer + created: + description: The date the MCP key was created. + example: 2026-03-02T16:46:17.758585Z + format: date-time + type: string + disabled: + description: The MCP key is disabled (this property is set to `true`) + when the user who created the key is disabled or deleted. + example: true + type: boolean + lastUsed: + description: The last time the MCP key was used. + example: 2026-03-02T16:46:17.758585Z + format: date-time + type: string + required: + - accountID + - created + - createdBy + - id + NewMCPKey: + allOf: + - $ref: "#/components/schemas/MCPKey" + - properties: + key: + description: The generated MCP key. Only returned once on creation. + example: f45f90d21dcd9bac965c45e547e9754a3196891d09948e35adbcbedc4e9e4b01 + type: string + required: + - key NewValueMap: type: object ValueMap: @@ -34281,6 +34836,26 @@ components: type: integer required: - applicationId + example: + expression: + expr: + - filter + - - "." + - Session + - CartItems + - - - Item + - - catch + - false + - - = + - - "." + - Item + - Category + - Kitchen + cartItemFilterId: 216 + createdBy: 216 + created: 2020-06-10T09:05:27.993483Z + id: 6 + applicationId: 322 CatalogRule: description: "A rule template stored in a catalog entry. Rules in catalog entries\ \ only contain title (no description, as description is at the catalog entry\ @@ -34797,7 +35372,17 @@ components: - $ref: "#/components/schemas/Entity" - $ref: "#/components/schemas/AchievementBaseV2" - $ref: "#/components/schemas/AchievementAdditionalPropertiesV2" - - type: object + - required: + - activationPolicy + - description + - name + - recurrencePolicy + - sandbox + - subscribedApplications + - target + - timezone + - title + type: object CreateAchievementV2: allOf: - $ref: "#/components/schemas/AchievementBaseV2" @@ -34805,7 +35390,6 @@ components: - description - name - sandbox - - subscribedApplications - target - timezone - title @@ -35816,6 +36400,59 @@ components: required: - applicationId - applicationName + NewReward: + properties: + name: + description: The name of the reward. + example: Free Coffee + minLength: 1 + type: string + apiName: + description: A unique identifier used to reference the reward in API integrations. + example: free-coffee + minLength: 1 + type: string + description: + description: A description of the reward. + example: This reward gets you one free coffee. + type: string + applicationIds: + description: "The IDs of the Applications this reward is connected to. \n\ + \n**Note**: Currently, a reward can only be connected to one Application.\n" + example: + - 1 + - 2 + - 3 + items: + format: int64 + type: integer + type: array + sandbox: + description: Indicates if this is a live or sandbox reward. Rewards of a + given type can only be connected to Applications of the same type. + example: true + title: Sandbox + type: boolean + required: + - apiName + - applicationIds + - name + - sandbox + Reward: + allOf: + - $ref: "#/components/schemas/Entity" + - $ref: "#/components/schemas/AccountEntity" + - $ref: "#/components/schemas/NewReward" + - properties: + status: + description: The status of the reward. + enum: + - active + - inactive + example: active + type: string + required: + - status IntegrationEventV3Request: allOf: - $ref: "#/components/schemas/EventV3" @@ -37515,6 +38152,46 @@ components: example: 409 format: int64 type: integer + integrationGetAllCampaigns_200_response: + example: + data: + - features: + - coupons + - referrals + name: Summer promotions + description: Campaign for all summer 2021 promotions + startTime: 2021-07-20T22:00:00Z + attributes: null + id: 4 + endTime: 2021-09-22T22:00:00Z + state: enabled + applicationId: 322 + tags: + - summer + - features: + - coupons + - referrals + name: Summer promotions + description: Campaign for all summer 2021 promotions + startTime: 2021-07-20T22:00:00Z + attributes: null + id: 4 + endTime: 2021-09-22T22:00:00Z + state: enabled + applicationId: 322 + tags: + - summer + hasMore: true + properties: + hasMore: + type: boolean + data: + items: + $ref: "#/components/schemas/IntegrationCampaign" + type: array + required: + - data + - hasMore createReferralsForMultipleAdvocates_201_response: example: data: @@ -40855,6 +41532,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -40886,6 +41564,7 @@ components: subledgers: key: pendingBalance: 10 + nextTierName: Silver negativeBalance: 10 currentBalance: 100 spentBalance: 0 @@ -42344,6 +43023,37 @@ components: type: array required: - data + listApplicationCartItemFilters_200_response: + example: + data: + - createdBy: 216 + created: 2020-06-10T09:05:27.993483Z + name: Filter items by product + description: This filter allows filtering by shoes + modified: 2000-01-23T04:56:07.000+00:00 + modifiedBy: 334 + id: 6 + applicationId: 322 + activeExpressionId: 1 + - createdBy: 216 + created: 2020-06-10T09:05:27.993483Z + name: Filter items by product + description: This filter allows filtering by shoes + modified: 2000-01-23T04:56:07.000+00:00 + modifiedBy: 334 + id: 6 + applicationId: 322 + activeExpressionId: 1 + hasMore: true + properties: + hasMore: + type: boolean + data: + items: + $ref: "#/components/schemas/ApplicationCIF" + type: array + required: + - data listCampaignStoreBudgetLimits_200_response: example: data: diff --git a/build.gradle b/build.gradle index 4bd706fe..bdfd28bd 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'one.talon' -version = '26.07.0' +version = '26.08.0' buildscript { repositories { diff --git a/build.sbt b/build.sbt index 9bd8b28f..292b2533 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.07.0", + version := "26.08.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AchievementV2.md b/docs/AchievementV2.md index 6dbb0f9b..881105fc 100644 --- a/docs/AchievementV2.md +++ b/docs/AchievementV2.md @@ -9,19 +9,19 @@ |------------ | ------------- | ------------- | -------------| |**id** | **Long** | The internal ID of this entity. | | |**created** | **OffsetDateTime** | The time this entity was created. | | -|**name** | **String** | The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. | [optional] | -|**title** | **String** | The display name for the achievement in the Campaign Manager. | [optional] | -|**description** | **String** | A description of the achievement. | [optional] | -|**target** | **BigDecimal** | The required number of actions or the transactional milestone to complete the achievement. | [optional] | +|**name** | **String** | The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. | | +|**title** | **String** | The display name for the achievement in the Campaign Manager. | | +|**description** | **String** | A description of the achievement. | | +|**target** | **BigDecimal** | The required number of actions or the transactional milestone to complete the achievement. | | |**period** | **String** | The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. | [optional] | -|**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. | [optional] | -|**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. | [optional] | +|**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 set to `fixed_schedule`. **Note:** It must be 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 must be an RFC3339 timestamp string. | [optional] | |**allowRollbackAfterCompletion** | **Boolean** | When `true`, customer progress can be rolled back in completed achievements. | [optional] | -|**sandbox** | **Boolean** | Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. | [optional] | -|**subscribedApplications** | **List<Long>** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | [optional] | -|**timezone** | **String** | A string containing an IANA timezone descriptor. | [optional] | +|**sandbox** | **Boolean** | Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. | | +|**subscribedApplications** | **List<Long>** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | | +|**timezone** | **String** | A string containing an IANA timezone descriptor. | | |**userId** | **Long** | The ID of the user that created this achievement. | | |**createdBy** | **String** | Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. | [optional] | |**hasProgress** | **Boolean** | Indicates if a customer has made progress in the achievement. | [optional] | diff --git a/docs/BestPriorPriceRequest.md b/docs/BestPriorPriceRequest.md index 67519fc2..74260498 100644 --- a/docs/BestPriorPriceRequest.md +++ b/docs/BestPriorPriceRequest.md @@ -10,8 +10,7 @@ |**skus** | **List<String>** | List of product SKUs to check when determining the best prior price. | | |**timeframeEndDate** | **OffsetDateTime** | The end date and time that defines the latest time for retrieving historical SKU prices. | | |**timeframe** | **String** | The number of days prior to the timeframeEndDate. Only prices within this look back period are considered for the best prior price evaluation. | | -|**strictEndDate** | **Boolean** | This property is **deprecated**. Use `timeframeEndDateType` instead. Indicates whether the timeframe includes the start of the current sale. - When `false`, the timeframe includes the start date of the current sale. - When `true`, the timeframe strictly uses the number of days specified in `timeframe`. | | -|**timeframeEndDateType** | [**TimeframeEndDateTypeEnum**](#TimeframeEndDateTypeEnum) | Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of the current `contextId` with the current price value. Identical price records are merged. If there is no `contextId` for the most recent price, the most recent timestamp for the price is used. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. | [optional] | +|**timeframeEndDateType** | [**TimeframeEndDateTypeEnum**](#TimeframeEndDateTypeEnum) | Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of current price value and takes the prices prior to the start of the current price value into account. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. | | |**target** | [**BestPriorTarget**](BestPriorTarget.md) | | [optional] | diff --git a/docs/CreateAchievementV2.md b/docs/CreateAchievementV2.md index 91a691b1..79c8da48 100644 --- a/docs/CreateAchievementV2.md +++ b/docs/CreateAchievementV2.md @@ -18,7 +18,7 @@ |**endDate** | **OffsetDateTime** | The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string. | [optional] | |**allowRollbackAfterCompletion** | **Boolean** | When `true`, customer progress can be rolled back in completed achievements. | [optional] | |**sandbox** | **Boolean** | Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. | | -|**subscribedApplications** | **List<Long>** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | | +|**subscribedApplications** | **List<Long>** | A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. | [optional] | |**timezone** | **String** | A string containing an IANA timezone descriptor. | | diff --git a/docs/CreateMCPKey.md b/docs/CreateMCPKey.md new file mode 100644 index 00000000..9a84ce7f --- /dev/null +++ b/docs/CreateMCPKey.md @@ -0,0 +1,14 @@ + + +# CreateMCPKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name for the MCP key. | | +|**expiryDate** | **OffsetDateTime** | The date the MCP key expires. | | + + + diff --git a/docs/ExperimentSegmentInsight.md b/docs/ExperimentSegmentInsight.md new file mode 100644 index 00000000..8a933dc3 --- /dev/null +++ b/docs/ExperimentSegmentInsight.md @@ -0,0 +1,40 @@ + + +# ExperimentSegmentInsight + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dimension** | [**DimensionEnum**](#DimensionEnum) | The segmentation dimension used to group customers or purchases for analysis. | | +|**bucket** | [**BucketEnum**](#BucketEnum) | The specific group within the segmentation dimension. | | +|**confidence** | **Double** | The raw (unadjusted) confidence score expressed as a percentage. Only segments with a confidence score greater than or equal to 95% are returned. | | +|**winnerVariantId** | **Long** | The ID of the variant that performed better in this segment. | | +|**variants** | [**List<ExperimentSegmentInsightVariant>**](ExperimentSegmentInsightVariant.md) | Per-variant metric values for this segment. | | + + + +## Enum: DimensionEnum + +| Name | Value | +|---- | -----| +| CART_VALUE | "cart_value" | +| ITEM_COUNT | "item_count" | +| CUSTOMER_TYPE | "customer_type" | + + + +## Enum: BucketEnum + +| Name | Value | +|---- | -----| +| LOW | "low" | +| MEDIUM | "medium" | +| HIGH | "high" | +| NEW | "new" | +| RETURNING | "returning" | +| LOYAL | "loyal" | + + + diff --git a/docs/ExperimentSegmentInsightMetric.md b/docs/ExperimentSegmentInsightMetric.md new file mode 100644 index 00000000..0d8651d9 --- /dev/null +++ b/docs/ExperimentSegmentInsightMetric.md @@ -0,0 +1,24 @@ + + +# ExperimentSegmentInsightMetric + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metric** | [**MetricEnum**](#MetricEnum) | The metric being measured. | | +|**segments** | [**List<ExperimentSegmentInsight>**](ExperimentSegmentInsight.md) | Segments with statistically significant results for this metric. An empty array means no significant segments were found. Segments are sorted by confidence score from highest to lowest. | | + + + +## Enum: MetricEnum + +| Name | Value | +|---- | -----| +| AVG_SESSION_VALUE | "avg_session_value" | +| AVG_DISCOUNTED_SESSION_VALUE | "avg_discounted_session_value" | +| AVG_ITEMS_PER_SESSION | "avg_items_per_session" | + + + diff --git a/docs/ExperimentSegmentInsightVariant.md b/docs/ExperimentSegmentInsightVariant.md new file mode 100644 index 00000000..40f2209b --- /dev/null +++ b/docs/ExperimentSegmentInsightVariant.md @@ -0,0 +1,16 @@ + + +# ExperimentSegmentInsightVariant + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**variantId** | **Long** | The ID of the experiment variant. | | +|**variantName** | **String** | The name of the experiment variant. | | +|**sessionsCount** | **Long** | The number of sessions in this segment for this variant. | | +|**value** | **Double** | The metric value for this variant in the segment. | | + + + diff --git a/docs/ExperimentSegmentInsights.md b/docs/ExperimentSegmentInsights.md new file mode 100644 index 00000000..2eb0e2c0 --- /dev/null +++ b/docs/ExperimentSegmentInsights.md @@ -0,0 +1,16 @@ + + +# ExperimentSegmentInsights + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metrics** | [**List<ExperimentSegmentInsightMetric>**](ExperimentSegmentInsightMetric.md) | Segment insights grouped by metric. This array always contains exactly three metric objects. Each metric includes a segments array, which is empty if no significant results were found. The metrics array itself is empty if the `reason` property is populated. | | +|**totalSegmentsTested** | **Long** | Total number of segment-metric combinations that were tested for statistical significance. | | +|**dimensionsTested** | **Long** | Number of segmentation dimensions that had sufficient data variance to test. Dimensions where all sessions fall into a single bucket are excluded. | | +|**reason** | **String** | Empty string when segment insights are available. Contains a reason code when insights could not be computed (e.g., \"insufficient_data\" when the experiment has fewer than 100 sessions per variant). | | + + + diff --git a/docs/ExperimentVerdict.md b/docs/ExperimentVerdict.md new file mode 100644 index 00000000..11744569 --- /dev/null +++ b/docs/ExperimentVerdict.md @@ -0,0 +1,17 @@ + + +# ExperimentVerdict + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**winnerVariantName** | **String** | The name of the winning variant. If no variant shows a statistically significant advantage on key business metrics, return 'Inconclusive'. | | +|**verdictSummary** | **String** | A one-sentence summary of the outcome, including the key metric and confidence level that led to the decision. | | +|**keyFindings** | **List<String>** | A bullet point stating the most important finding, including the metric, the percentage change, and the confidence. | | +|**aiConfidenceLevel** | **String** | Your confidence in this overall verdict, from 0 to 100. | | +|**recommendation** | **String** | A short, actionable recommendation based on the findings. If inconclusive, suggest running the test longer. If there is a clear winner, recommend promoting it. | | + + + diff --git a/docs/ExperimentVerdictResponse.md b/docs/ExperimentVerdictResponse.md new file mode 100644 index 00000000..7c7de2f7 --- /dev/null +++ b/docs/ExperimentVerdictResponse.md @@ -0,0 +1,14 @@ + + +# ExperimentVerdictResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**verdict** | [**ExperimentVerdict**](ExperimentVerdict.md) | | | +|**generated** | **OffsetDateTime** | Timestamp of the moment when the verdict was generated. | | + + + diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md index 0ede64fd..5ca8bdac 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -27,6 +27,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**getLoyaltyProgramProfilePoints**](IntegrationApi.md#getLoyaltyProgramProfilePoints) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points | List customer's unused loyalty points | | [**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 | | [**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 | @@ -1821,6 +1822,90 @@ public class Example { | **401** | Unauthorized - Invalid API key | - | | **404** | Not found | - | + +# **integrationGetAllCampaigns** +> IntegrationGetAllCampaigns200Response integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore) + +List all running campaigns + +Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + +### 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 pageSize = 50L; // Long | The number of items in the response. + Long skip = 56L; // Long | The number of items to skip when paging through large result sets. + List campaignIds = Arrays.asList(); // List | Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. + OffsetDateTime startAfter = OffsetDateTime.now(); // OffsetDateTime | Filter results to only include campaigns that start 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 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. + try { + IntegrationGetAllCampaigns200Response result = apiInstance.integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IntegrationApi#integrationGetAllCampaigns"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **pageSize** | **Long**| The number of items in the response. | [optional] [default to 50] | +| **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | +| **campaignIds** | [**List<String>**](String.md)| Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. | [optional] | +| **startAfter** | **OffsetDateTime**| Filter results to only include campaigns that start 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] | +| **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] | + +### Return type + +[**IntegrationGetAllCampaigns200Response**](IntegrationGetAllCampaigns200Response.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 | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Not found | - | + # **linkLoyaltyCardToProfile** > LoyaltyCard linkLoyaltyCardToProfile(loyaltyProgramId, loyaltyCardId, loyaltyCardRegistration) @@ -1970,7 +2055,7 @@ public class Example { # **returnCartItems** -> IntegrationStateV2 returnCartItems(customerSessionId, returnIntegrationRequest, dry) +> IntegrationStateV2 returnCartItems(customerSessionId, returnIntegrationRequest, dry, runRuleEngine) Return cart items @@ -2001,8 +2086,9 @@ public class Example { 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. ReturnIntegrationRequest returnIntegrationRequest = new ReturnIntegrationRequest(); // ReturnIntegrationRequest | body Boolean dry = true; // Boolean | Indicates whether to persist the changes. Changes are ignored when `dry=true`. + Boolean runRuleEngine = true; // Boolean | When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. try { - IntegrationStateV2 result = apiInstance.returnCartItems(customerSessionId, returnIntegrationRequest, dry); + IntegrationStateV2 result = apiInstance.returnCartItems(customerSessionId, returnIntegrationRequest, dry, runRuleEngine); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IntegrationApi#returnCartItems"); @@ -2022,6 +2108,7 @@ public class Example { | **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. | | | **returnIntegrationRequest** | [**ReturnIntegrationRequest**](ReturnIntegrationRequest.md)| body | | | **dry** | **Boolean**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] | +| **runRuleEngine** | **Boolean**| When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. | [optional] | ### Return type diff --git a/docs/IntegrationGetAllCampaigns200Response.md b/docs/IntegrationGetAllCampaigns200Response.md new file mode 100644 index 00000000..374fa863 --- /dev/null +++ b/docs/IntegrationGetAllCampaigns200Response.md @@ -0,0 +1,14 @@ + + +# IntegrationGetAllCampaigns200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasMore** | **Boolean** | | | +|**data** | [**List<IntegrationCampaign>**](IntegrationCampaign.md) | | | + + + diff --git a/docs/LedgerInfo.md b/docs/LedgerInfo.md index 24649c4f..4b058102 100644 --- a/docs/LedgerInfo.md +++ b/docs/LedgerInfo.md @@ -17,6 +17,7 @@ |**tentativeNegativeBalance** | **BigDecimal** | The tentative negative balance after all additions and deductions from the current customer session are applied to `negativeBalance`. When the session is closed, the tentative effects are applied and `negativeBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer. | [optional] | |**currentTier** | [**Tier**](Tier.md) | Tier for which the ledger is eligible. | [optional] | |**pointsToNextTier** | **BigDecimal** | Points required to move up a tier. | [optional] | +|**nextTierName** | **String** | The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. | [optional] | diff --git a/docs/ListApplicationCartItemFilters200Response.md b/docs/ListApplicationCartItemFilters200Response.md new file mode 100644 index 00000000..3a98d5af --- /dev/null +++ b/docs/ListApplicationCartItemFilters200Response.md @@ -0,0 +1,14 @@ + + +# ListApplicationCartItemFilters200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasMore** | **Boolean** | | [optional] | +|**data** | [**List<ApplicationCIF>**](ApplicationCIF.md) | | | + + + diff --git a/docs/LoyaltyBalanceWithTier.md b/docs/LoyaltyBalanceWithTier.md index 35c4632f..a9556252 100644 --- a/docs/LoyaltyBalanceWithTier.md +++ b/docs/LoyaltyBalanceWithTier.md @@ -15,7 +15,7 @@ |**currentTier** | [**Tier**](Tier.md) | Customer's current tier. | [optional] | |**projectedTier** | [**ProjectedTier**](ProjectedTier.md) | | [optional] | |**pointsToNextTier** | **BigDecimal** | The number of points required to move up a tier. | [optional] | -|**nextTierName** | **String** | The name of the tier consecutive to the current tier. | [optional] | +|**nextTierName** | **String** | The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. | [optional] | diff --git a/docs/MCPKey.md b/docs/MCPKey.md new file mode 100644 index 00000000..fa1a4524 --- /dev/null +++ b/docs/MCPKey.md @@ -0,0 +1,20 @@ + + +# MCPKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name for the MCP key. | | +|**expiryDate** | **OffsetDateTime** | The date the MCP key expires. | | +|**id** | **Long** | ID of the MCP key. | | +|**createdBy** | **Long** | ID of the user who created it. | | +|**accountID** | **Long** | ID of account the key is used for. | | +|**created** | **OffsetDateTime** | The date the MCP key was created. | | +|**disabled** | **Boolean** | The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted. | [optional] | +|**lastUsed** | **OffsetDateTime** | The last time the MCP key was used. | [optional] | + + + diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index ce3714dc..f819aa3f 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -17,7 +17,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**createCampaignStoreBudget**](ManagementApi.md#createCampaignStoreBudget) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | Create campaign store budget | | [**createCollection**](ManagementApi.md#createCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | Create campaign-level collection | | [**createCoupons**](ManagementApi.md#createCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons | -| [**createCouponsAsync**](ManagementApi.md#createCouponsAsync) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously | +| [**createCouponsAsynchronously**](ManagementApi.md#createCouponsAsynchronously) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously | | [**createCouponsDeletionJob**](ManagementApi.md#createCouponsDeletionJob) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs | Creates a coupon deletion job | | [**createCouponsForMultipleRecipients**](ManagementApi.md#createCouponsForMultipleRecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients | | [**createInviteEmail**](ManagementApi.md#createInviteEmail) | **POST** /v1/invite_emails | Resend invitation email | @@ -47,6 +47,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**exportAudiencesMemberships**](ManagementApi.md#exportAudiencesMemberships) | **GET** /v1/audiences/{audienceId}/memberships/export | Export audience members | | [**exportCampaignStoreBudgets**](ManagementApi.md#exportCampaignStoreBudgets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets/export | Export campaign store budgets | | [**exportCampaignStores**](ManagementApi.md#exportCampaignStores) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/export | Export stores | +| [**exportCampaignValueMap**](ManagementApi.md#exportCampaignValueMap) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export | Export campaign value map | | [**exportCollectionItems**](ManagementApi.md#exportCollectionItems) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items | | [**exportCoupons**](ManagementApi.md#exportCoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons | | [**exportCustomerSessions**](ManagementApi.md#exportCustomerSessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions | @@ -71,6 +72,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**getAdditionalCosts**](ManagementApi.md#getAdditionalCosts) | **GET** /v1/additional_costs | List additional costs | | [**getApplication**](ManagementApi.md#getApplication) | **GET** /v1/applications/{applicationId} | Get Application | | [**getApplicationApiHealth**](ManagementApi.md#getApplicationApiHealth) | **GET** /v1/applications/{applicationId}/health_report | Get Application health | +| [**getApplicationCartItemFilterExpression**](ManagementApi.md#getApplicationCartItemFilterExpression) | **GET** /v1/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId} | Get Application cart item filter expression | | [**getApplicationCustomer**](ManagementApi.md#getApplicationCustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer | | [**getApplicationCustomerFriends**](ManagementApi.md#getApplicationCustomerFriends) | **GET** /v1/applications/{applicationId}/profile/{integrationId}/friends | List friends referred by customer profile | | [**getApplicationCustomers**](ManagementApi.md#getApplicationCustomers) | **GET** /v1/applications/{applicationId}/customers | List application's customers | @@ -143,6 +145,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**listAccountCollections**](ManagementApi.md#listAccountCollections) | **GET** /v1/collections | List collections in account | | [**listAchievements**](ManagementApi.md#listAchievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements | | [**listAllRolesV2**](ManagementApi.md#listAllRolesV2) | **GET** /v2/roles | List roles | +| [**listApplicationCartItemFilters**](ManagementApi.md#listApplicationCartItemFilters) | **GET** /v1/applications/{applicationId}/cart_item_filters | List Application cart item filters | | [**listCampaignStoreBudgetLimits**](ManagementApi.md#listCampaignStoreBudgetLimits) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/stores/budgets | List campaign store budget limits | | [**listCatalogItems**](ManagementApi.md#listCatalogItems) | **GET** /v1/catalogs/{catalogId}/items | List items in a catalog | | [**listCollections**](ManagementApi.md#listCollections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign | @@ -1132,9 +1135,9 @@ public class Example { | **200** | OK | - | | **204** | No Content | - | - -# **createCouponsAsync** -> AsyncCouponCreationResponse createCouponsAsync(applicationId, campaignId, newCouponCreationJob) + +# **createCouponsAsynchronously** +> AsyncCouponCreationResponse createCouponsAsynchronously(applicationId, campaignId, newCouponCreationJob) Create coupons asynchronously @@ -1166,10 +1169,10 @@ public class Example { Long campaignId = 56L; // Long | The ID of the campaign. It is displayed in your Talon.One deployment URL. NewCouponCreationJob newCouponCreationJob = new NewCouponCreationJob(); // NewCouponCreationJob | body try { - AsyncCouponCreationResponse result = apiInstance.createCouponsAsync(applicationId, campaignId, newCouponCreationJob); + AsyncCouponCreationResponse result = apiInstance.createCouponsAsynchronously(applicationId, campaignId, newCouponCreationJob); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ManagementApi#createCouponsAsync"); + System.err.println("Exception when calling ManagementApi#createCouponsAsynchronously"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3309,6 +3312,82 @@ public class Example { | **401** | Unauthorized - Invalid API key | - | | **404** | Not found | - | + +# **exportCampaignValueMap** +> String exportCampaignValueMap(applicationId, campaignId, valueMapId) + +Export campaign value map + +Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + +### 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 valueMapId = 56L; // Long | The ID of the value map. + try { + String result = apiInstance.exportCampaignValueMap(applicationId, campaignId, valueMapId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#exportCampaignValueMap"); + 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. | | +| **valueMapId** | **Long**| The ID of the value map. | | + +### Return type + +**String** + +### Authorization + +[api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/csv, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **404** | Not found | - | + # **exportCollectionItems** > String exportCollectionItems(applicationId, campaignId, collectionId) @@ -4983,7 +5062,7 @@ public class Example { Get Application -Get the application specified by the ID. +Get the Application specified by the ID. ### Example ```java @@ -5115,6 +5194,79 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | + +# **getApplicationCartItemFilterExpression** +> ApplicationCIFExpression getApplicationCartItemFilterExpression(applicationId, cartItemFilterId, expressionId) + +Get Application cart item filter expression + +Get an Application cart item filter expression for a specific Application. + +### 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 cartItemFilterId = 56L; // Long | The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. + Long expressionId = 56L; // Long | The ID of the Application cart item filter expression. + try { + ApplicationCIFExpression result = apiInstance.getApplicationCartItemFilterExpression(applicationId, cartItemFilterId, expressionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#getApplicationCartItemFilterExpression"); + 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. | | +| **cartItemFilterId** | **Long**| The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. | | +| **expressionId** | **Long**| The ID of the Application cart item filter expression. | | + +### Return type + +[**ApplicationCIFExpression**](ApplicationCIFExpression.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 | - | + # **getApplicationCustomer** > ApplicationCustomer getApplicationCustomer(applicationId, customerId) @@ -5221,7 +5373,7 @@ public class Example { Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. 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. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. try { GetApplicationCustomerFriends200Response result = apiInstance.getApplicationCustomerFriends(applicationId, integrationId, pageSize, skip, sort, withTotalResultSize); System.out.println(result); @@ -5245,7 +5397,7 @@ public class Example { | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | | **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] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | ### Return type @@ -5299,7 +5451,7 @@ public class Example { String integrationId = "integrationId_example"; // String | Filter results performing an exact matching against the profile integration identifier. Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. try { GetApplicationCustomers200Response result = apiInstance.getApplicationCustomers(applicationId, integrationId, pageSize, skip, withTotalResultSize); System.out.println(result); @@ -5322,7 +5474,7 @@ public class Example { | **integrationId** | **String**| Filter results performing an exact matching against the profile integration identifier. | [optional] | | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | ### Return type @@ -5376,7 +5528,7 @@ public class Example { CustomerProfileSearchQuery customerProfileSearchQuery = new CustomerProfileSearchQuery(); // CustomerProfileSearchQuery | body Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. try { GetApplicationCustomersByAttributes200Response result = apiInstance.getApplicationCustomersByAttributes(applicationId, customerProfileSearchQuery, pageSize, skip, withTotalResultSize); System.out.println(result); @@ -5399,7 +5551,7 @@ public class Example { | **customerProfileSearchQuery** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md)| body | | | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | ### Return type @@ -5763,7 +5915,7 @@ public class Example { List Applications -List all applications in the current account. +List all the Applications in the current account. ### Example ```java @@ -6093,7 +6245,7 @@ public class Example { Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. 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. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. try { GetAudiences200Response result = apiInstance.getAudiences(pageSize, skip, sort, withTotalResultSize); System.out.println(result); @@ -6115,7 +6267,7 @@ public class Example { | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | | **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] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | ### Return type @@ -6794,7 +6946,7 @@ public class Example { Long userId = 56L; // Long | Filter results by user ID. OffsetDateTime createdBefore = OffsetDateTime.now(); // OffsetDateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. OffsetDateTime createdAfter = OffsetDateTime.now(); // OffsetDateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. Long managementKeyId = 56L; // Long | Filter results that match the given management key ID. Boolean includeOld = true; // Boolean | When this flag is set to false, the state without the change will not be returned. The default value is true. try { @@ -6823,7 +6975,7 @@ public class Example { | **userId** | **Long**| Filter results by user ID. | [optional] | | **createdBefore** | **OffsetDateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] | | **createdAfter** | **OffsetDateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | [optional] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | | **managementKeyId** | **Long**| Filter results that match the given management key ID. | [optional] | | **includeOld** | **Boolean**| When this flag is set to false, the state without the change will not be returned. The default value is true. | [optional] | @@ -10483,7 +10635,7 @@ public class Example { Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. 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. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. String name = "name_example"; // String | Filter by collection name. try { ListAccountCollections200Response result = apiInstance.listAccountCollections(pageSize, skip, sort, withTotalResultSize, name); @@ -10506,7 +10658,7 @@ public class Example { | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | | **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] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | | **name** | **String**| Filter by collection name. | [optional] | ### Return type @@ -10672,6 +10824,81 @@ This endpoint does not need any parameter. |-------------|-------------|------------------| | **200** | OK | - | + +# **listApplicationCartItemFilters** +> ListApplicationCartItemFilters200Response listApplicationCartItemFilters(applicationId, pageSize, skip, title) + +List Application cart item filters + +Return all the Application cart item filters for a specific Application. + +### 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 pageSize = 50L; // Long | The number of items in the response. + Long skip = 56L; // Long | The number of items to skip when paging through large result sets. + String title = "title_example"; // String | Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. + try { + ListApplicationCartItemFilters200Response result = apiInstance.listApplicationCartItemFilters(applicationId, pageSize, skip, title); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#listApplicationCartItemFilters"); + 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. | | +| **pageSize** | **Long**| The number of items in the response. | [optional] [default to 50] | +| **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | +| **title** | **String**| Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. | [optional] | + +### Return type + +[**ListApplicationCartItemFilters200Response**](ListApplicationCartItemFilters200Response.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 | - | + # **listCampaignStoreBudgetLimits** > ListCampaignStoreBudgetLimits200Response listCampaignStoreBudgetLimits(applicationId, campaignId, action, period) @@ -10783,7 +11010,7 @@ public class Example { Long catalogId = 56L; // Long | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. List sku = Arrays.asList(); // List | Filter results by one or more SKUs. Must be exact match. List productNames = Arrays.asList(); // List | Filter results by one or more product names. Must be exact match. try { @@ -10807,7 +11034,7 @@ public class Example { | **catalogId** | **Long**| The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. | | | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | | **sku** | [**List<String>**](String.md)| Filter results by one or more SKUs. Must be exact match. | [optional] | | **productNames** | [**List<String>**](String.md)| Filter results by one or more product names. Must be exact match. | [optional] | @@ -10864,7 +11091,7 @@ public class Example { Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. 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. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. String name = "name_example"; // String | Filter by collection name. try { ListAccountCollections200Response result = apiInstance.listCollections(applicationId, campaignId, pageSize, skip, sort, withTotalResultSize, name); @@ -10889,7 +11116,7 @@ public class Example { | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | | **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] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | | **name** | **String**| Filter by collection name. | [optional] | ### Return type @@ -10945,7 +11172,7 @@ public class Example { Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. 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. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. String name = "name_example"; // String | Filter by collection name. try { ListAccountCollections200Response result = apiInstance.listCollectionsInApplication(applicationId, pageSize, skip, sort, withTotalResultSize, name); @@ -10969,7 +11196,7 @@ public class Example { | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | | **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] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | | **name** | **String**| Filter by collection name. | [optional] | ### Return type @@ -11100,7 +11327,7 @@ public class Example { Long pageSize = 1000L; // Long | The number of items in the response. Long skip = 56L; // Long | The number of items to skip when paging through large result sets. 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. - Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. + Boolean withTotalResultSize = true; // Boolean | When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. BigDecimal campaignId = new BigDecimal(78); // BigDecimal | Filter results by campaign ID. String name = "name_example"; // String | The name of the store. String integrationId = "integrationId_example"; // String | The integration ID of the store. @@ -11127,7 +11354,7 @@ public class Example { | **pageSize** | **Long**| The number of items in the response. | [optional] [default to 1000] | | **skip** | **Long**| The number of items to skip when paging through large result sets. | [optional] | | **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] | -| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] | +| **withTotalResultSize** | **Boolean**| When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. | [optional] | | **campaignId** | **BigDecimal**| Filter results by campaign ID. | [optional] | | **name** | **String**| The name of the store. | [optional] | | **integrationId** | **String**| The integration ID of the store. | [optional] | diff --git a/docs/NewMCPKey.md b/docs/NewMCPKey.md new file mode 100644 index 00000000..58212ebf --- /dev/null +++ b/docs/NewMCPKey.md @@ -0,0 +1,21 @@ + + +# NewMCPKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name for the MCP key. | | +|**expiryDate** | **OffsetDateTime** | The date the MCP key expires. | | +|**id** | **Long** | ID of the MCP key. | | +|**createdBy** | **Long** | ID of the user who created it. | | +|**accountID** | **Long** | ID of account the key is used for. | | +|**created** | **OffsetDateTime** | The date the MCP key was created. | | +|**disabled** | **Boolean** | The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted. | [optional] | +|**lastUsed** | **OffsetDateTime** | The last time the MCP key was used. | [optional] | +|**key** | **String** | The generated MCP key. Only returned once on creation. | | + + + diff --git a/docs/NewReward.md b/docs/NewReward.md new file mode 100644 index 00000000..a2e8d10d --- /dev/null +++ b/docs/NewReward.md @@ -0,0 +1,17 @@ + + +# NewReward + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the reward. | | +|**apiName** | **String** | A unique identifier used to reference the reward in API integrations. | | +|**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. | | + + + diff --git a/docs/Reward.md b/docs/Reward.md new file mode 100644 index 00000000..446c51e6 --- /dev/null +++ b/docs/Reward.md @@ -0,0 +1,30 @@ + + +# Reward + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | The internal ID of this entity. | | +|**created** | **OffsetDateTime** | The time this entity was created. | | +|**accountId** | **Long** | The ID of the account that owns this entity. | | +|**name** | **String** | The name of the reward. | | +|**apiName** | **String** | A unique identifier used to reference the reward in API integrations. | | +|**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. | | +|**status** | [**StatusEnum**](#StatusEnum) | The status of the reward. | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| ACTIVE | "active" | +| INACTIVE | "inactive" | + + + diff --git a/docs/RuleMetadata.md b/docs/RuleMetadata.md index 03a7d9c8..69096ca6 100644 --- a/docs/RuleMetadata.md +++ b/docs/RuleMetadata.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**title** | **String** | A short description of the rule. | | -|**displayName** | **String** | A customer-facing name used to identify the reward defined within the rule. | [optional] | -|**displayDescription** | **String** | A customer-facing description of the reward defined in the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. | [optional] | -|**relatedData** | **String** | Data related to the reward, such as a vendor name, an image URL, or a content management system (CMS) ID. | [optional] | +|**displayName** | **String** | A customer-facing name for the rule. | [optional] | +|**displayDescription** | **String** | A customer-facing description that explains the details of the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. | [optional] | +|**relatedData** | **String** | Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. | [optional] | diff --git a/docs/SetDiscountPerItemEffectProps.md b/docs/SetDiscountPerItemEffectProps.md index 3d26d4e6..5ddcda54 100644 --- a/docs/SetDiscountPerItemEffectProps.md +++ b/docs/SetDiscountPerItemEffectProps.md @@ -20,6 +20,7 @@ The properties specific to the `setDiscountPerItem` effect, triggered whenever a |**bundleName** | **String** | The name of the bundle definition. | [optional] | |**targetedItemPosition** | **BigDecimal** | The index of the targeted bundle item on which the applied discount is based. | [optional] | |**targetedItemSubPosition** | **BigDecimal** | The sub-position of the targeted bundle item on which the applied discount is based. | [optional] | +|**excludedFromPriceHistory** | **Boolean** | When set to `true`, the applied discount is excluded from the item's price history. | [optional] | diff --git a/docs/StrikethroughSetDiscountPerItemEffectProps.md b/docs/StrikethroughSetDiscountPerItemEffectProps.md index 1202e3bf..94e5d7ee 100644 --- a/docs/StrikethroughSetDiscountPerItemEffectProps.md +++ b/docs/StrikethroughSetDiscountPerItemEffectProps.md @@ -10,7 +10,7 @@ setDiscountPerItem effect in strikethrough pricing payload. |------------ | ------------- | ------------- | -------------| |**name** | **String** | effect name. | | |**value** | **Object** | | | -|**excludeFromBestPriorPriceHistory** | **Boolean** | | [optional] | +|**excludedFromPriceHistory** | **Boolean** | | [optional] | diff --git a/pom.xml b/pom.xml index 56ed5cca..27478ff4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ talon-one-client jar talon-one-client - 26.07.0 + 26.08.0 https://github.com/talon-one/talon-one-maven-artifacts Talon.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 1ba9ae80..9ce06d1b 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.07.0/java"); + setUserAgent("OpenAPI-Generator/26.08.0/java"); authentications = new HashMap(); } diff --git a/src/main/java/one/talon/Configuration.java b/src/main/java/one/talon/Configuration.java index 7884d449..8ac9a302 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.21.0") public class Configuration { - public static final String VERSION = "26.07.0"; + public static final String VERSION = "26.08.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 7e1993d3..531da1ea 100644 --- a/src/main/java/one/talon/JSON.java +++ b/src/main/java/one/talon/JSON.java @@ -280,6 +280,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateApplicationAPIKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateCouponData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateCoupons200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateMCPKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateManagementKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateReferralsForMultipleAdvocates201Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.CreateTemplateCampaign.CustomTypeAdapterFactory()); @@ -333,10 +334,16 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentListResultsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentResults.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentSegmentInsight.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentSegmentInsightMetric.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentSegmentInsightVariant.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentSegmentInsights.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVariant.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVariantAllocation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVariantResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVariantResultConfidence.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVerdict.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVerdictResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExpiringCardPointsData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExpiringCardPointsNotification.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExpiringCouponsData.CustomTypeAdapterFactory()); @@ -430,6 +437,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationEventV2Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationEventV3Request.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationEventV3Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationGetAllCampaigns200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadCouponBasedNotifications.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadCouponBasedNotificationsLimits.CustomTypeAdapterFactory()); @@ -467,6 +475,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListAccountCollections200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListAchievements200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListAllRolesV2200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListApplicationCartItemFilters200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListCampaignStoreBudgetLimits200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListCampaignStoreBudgets.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListCampaignStoreBudgetsStore.CustomTypeAdapterFactory()); @@ -500,6 +509,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.LoyaltyProgramTransaction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.LoyaltySubLedger.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.LoyaltyTier.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.MCPKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ManagementKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ManagerConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.MessageLogEntries.CustomTypeAdapterFactory()); @@ -562,6 +572,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewInviteEmail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewLoyaltyProgram.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewLoyaltyTier.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewMCPKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewManagementKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewMessageTest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewMultipleAudiencesItem.CustomTypeAdapterFactory()); @@ -576,6 +587,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewReferralsForMultipleAdvocates.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewReturn.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewRevisionVersion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewReward.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewRole.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewRoleV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.NewRuleset.CustomTypeAdapterFactory()); @@ -643,6 +655,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RevisionActivation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RevisionActivationRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RevisionVersion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Reward.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Role.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RoleAssign.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RoleMembership.CustomTypeAdapterFactory()); diff --git a/src/main/java/one/talon/api/IntegrationApi.java b/src/main/java/one/talon/api/IntegrationApi.java index d874dc58..0c1394b0 100644 --- a/src/main/java/one/talon/api/IntegrationApi.java +++ b/src/main/java/one/talon/api/IntegrationApi.java @@ -55,6 +55,7 @@ import one.talon.model.IntegrationCustomerSessionResponse; import one.talon.model.IntegrationEventV2Request; import one.talon.model.IntegrationEventV2Response; +import one.talon.model.IntegrationGetAllCampaigns200Response; import one.talon.model.IntegrationRequest; import one.talon.model.IntegrationStateV2; import one.talon.model.LoyaltyBalancesWithTiers; @@ -3836,6 +3837,191 @@ public okhttp3.Call getReservedCustomersAsync(@javax.annotation.Nonnull String c localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for integrationGetAllCampaigns + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param campaignIds Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. (optional) + * @param startAfter Filter results to only include campaigns that start 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 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 _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 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 { + 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/integration/campaigns"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + + if (campaignIds != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "campaignIds", campaignIds)); + } + + if (startAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAfter", startAfter)); + } + + if (startBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startBefore", startBefore)); + } + + if (endAfter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAfter", endAfter)); + } + + if (endBefore != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endBefore", endBefore)); + } + + 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 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); + + } + + /** + * List all running campaigns + * Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param campaignIds Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. (optional) + * @param startAfter Filter results to only include campaigns that start 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 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) + * @return IntegrationGetAllCampaigns200Response + * @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 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); + return localVarResp.getData(); + } + + /** + * List all running campaigns + * Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param campaignIds Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. (optional) + * @param startAfter Filter results to only include campaigns that start 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 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) + * @return ApiResponse<IntegrationGetAllCampaigns200Response> + * @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 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); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all running campaigns (asynchronously) + * Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param campaignIds Filter by one or more campaign IDs, separated by a comma. **Note:** If no campaigns are specified, data for all the campaigns in the Application is returned. (optional) + * @param startAfter Filter results to only include campaigns that start 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 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 _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 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 { + + okhttp3.Call localVarCall = integrationGetAllCampaignsValidateBeforeCall(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _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) @@ -4135,6 +4321,7 @@ public okhttp3.Call reopenCustomerSessionAsync(@javax.annotation.Nonnull String * @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 returnIntegrationRequest body (required) * @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param runRuleEngine When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4147,7 +4334,7 @@ public okhttp3.Call reopenCustomerSessionAsync(@javax.annotation.Nonnull String 401 Unauthorized - Invalid API key - */ - public okhttp3.Call returnCartItemsCall(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, final ApiCallback _callback) throws ApiException { + public okhttp3.Call returnCartItemsCall(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, @javax.annotation.Nullable Boolean runRuleEngine, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4177,6 +4364,10 @@ public okhttp3.Call returnCartItemsCall(@javax.annotation.Nonnull String custome localVarQueryParams.addAll(localVarApiClient.parameterToPair("dry", dry)); } + if (runRuleEngine != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("runRuleEngine", runRuleEngine)); + } + final String[] localVarAccepts = { "application/json" }; @@ -4198,7 +4389,7 @@ public okhttp3.Call returnCartItemsCall(@javax.annotation.Nonnull String custome } @SuppressWarnings("rawtypes") - private okhttp3.Call returnCartItemsValidateBeforeCall(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, final ApiCallback _callback) throws ApiException { + private okhttp3.Call returnCartItemsValidateBeforeCall(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, @javax.annotation.Nullable Boolean runRuleEngine, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customerSessionId' is set if (customerSessionId == null) { throw new ApiException("Missing the required parameter 'customerSessionId' when calling returnCartItems(Async)"); @@ -4209,7 +4400,7 @@ private okhttp3.Call returnCartItemsValidateBeforeCall(@javax.annotation.Nonnull throw new ApiException("Missing the required parameter 'returnIntegrationRequest' when calling returnCartItems(Async)"); } - return returnCartItemsCall(customerSessionId, returnIntegrationRequest, dry, _callback); + return returnCartItemsCall(customerSessionId, returnIntegrationRequest, dry, runRuleEngine, _callback); } @@ -4219,6 +4410,7 @@ private okhttp3.Call returnCartItemsValidateBeforeCall(@javax.annotation.Nonnull * @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 returnIntegrationRequest body (required) * @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param runRuleEngine When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. (optional) * @return IntegrationStateV2 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4230,8 +4422,8 @@ private okhttp3.Call returnCartItemsValidateBeforeCall(@javax.annotation.Nonnull 401 Unauthorized - Invalid API key - */ - public IntegrationStateV2 returnCartItems(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry) throws ApiException { - ApiResponse localVarResp = returnCartItemsWithHttpInfo(customerSessionId, returnIntegrationRequest, dry); + public IntegrationStateV2 returnCartItems(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, @javax.annotation.Nullable Boolean runRuleEngine) throws ApiException { + ApiResponse localVarResp = returnCartItemsWithHttpInfo(customerSessionId, returnIntegrationRequest, dry, runRuleEngine); return localVarResp.getData(); } @@ -4241,6 +4433,7 @@ public IntegrationStateV2 returnCartItems(@javax.annotation.Nonnull String custo * @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 returnIntegrationRequest body (required) * @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param runRuleEngine When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. (optional) * @return ApiResponse<IntegrationStateV2> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4252,8 +4445,8 @@ public IntegrationStateV2 returnCartItems(@javax.annotation.Nonnull String custo 401 Unauthorized - Invalid API key - */ - public ApiResponse returnCartItemsWithHttpInfo(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry) throws ApiException { - okhttp3.Call localVarCall = returnCartItemsValidateBeforeCall(customerSessionId, returnIntegrationRequest, dry, null); + public ApiResponse returnCartItemsWithHttpInfo(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, @javax.annotation.Nullable Boolean runRuleEngine) throws ApiException { + okhttp3.Call localVarCall = returnCartItemsValidateBeforeCall(customerSessionId, returnIntegrationRequest, dry, runRuleEngine, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -4264,6 +4457,7 @@ public ApiResponse returnCartItemsWithHttpInfo(@javax.annota * @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 returnIntegrationRequest body (required) * @param dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param runRuleEngine When set to `true`, reevaluates the updated session after items are returned. Only reevaluates campaigns where `reevaluateOnReturn` is set to `true` and which produced an effect when the session was closed. (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 @@ -4276,9 +4470,9 @@ public ApiResponse returnCartItemsWithHttpInfo(@javax.annota 401 Unauthorized - Invalid API key - */ - public okhttp3.Call returnCartItemsAsync(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, final ApiCallback _callback) throws ApiException { + public okhttp3.Call returnCartItemsAsync(@javax.annotation.Nonnull String customerSessionId, @javax.annotation.Nonnull ReturnIntegrationRequest returnIntegrationRequest, @javax.annotation.Nullable Boolean dry, @javax.annotation.Nullable Boolean runRuleEngine, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = returnCartItemsValidateBeforeCall(customerSessionId, returnIntegrationRequest, dry, _callback); + okhttp3.Call localVarCall = returnCartItemsValidateBeforeCall(customerSessionId, returnIntegrationRequest, dry, runRuleEngine, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/one/talon/api/ManagementApi.java b/src/main/java/one/talon/api/ManagementApi.java index 234dabe9..928904c7 100644 --- a/src/main/java/one/talon/api/ManagementApi.java +++ b/src/main/java/one/talon/api/ManagementApi.java @@ -35,6 +35,7 @@ import one.talon.model.AddLoyaltyPoints; import one.talon.model.Application; import one.talon.model.ApplicationApiHealth; +import one.talon.model.ApplicationCIFExpression; import one.talon.model.ApplicationCustomer; import one.talon.model.ApplicationSession; import one.talon.model.AsyncCouponCreationResponse; @@ -101,6 +102,7 @@ import one.talon.model.ListAccountCollections200Response; import one.talon.model.ListAchievements200Response; import one.talon.model.ListAllRolesV2200Response; +import one.talon.model.ListApplicationCartItemFilters200Response; import one.talon.model.ListCampaignStoreBudgetLimits200Response; import one.talon.model.ListCatalogItems200Response; import one.talon.model.ListExperiments200Response; @@ -2081,7 +2083,7 @@ public okhttp3.Call createCouponsAsync(@javax.annotation.Nonnull Long applicatio return localVarCall; } /** - * Build call for createCouponsAsync + * Build call for createCouponsAsynchronously * @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 newCouponCreationJob body (required) @@ -2095,7 +2097,7 @@ public okhttp3.Call createCouponsAsync(@javax.annotation.Nonnull Long applicatio 200 OK - */ - public okhttp3.Call createCouponsAsyncCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCouponsAsynchronouslyCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2143,23 +2145,23 @@ public okhttp3.Call createCouponsAsyncCall(@javax.annotation.Nonnull Long applic } @SuppressWarnings("rawtypes") - private okhttp3.Call createCouponsAsyncValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCouponsAsynchronouslyValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob, 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 createCouponsAsync(Async)"); + throw new ApiException("Missing the required parameter 'applicationId' when calling createCouponsAsynchronously(Async)"); } // verify the required parameter 'campaignId' is set if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling createCouponsAsync(Async)"); + throw new ApiException("Missing the required parameter 'campaignId' when calling createCouponsAsynchronously(Async)"); } // verify the required parameter 'newCouponCreationJob' is set if (newCouponCreationJob == null) { - throw new ApiException("Missing the required parameter 'newCouponCreationJob' when calling createCouponsAsync(Async)"); + throw new ApiException("Missing the required parameter 'newCouponCreationJob' when calling createCouponsAsynchronously(Async)"); } - return createCouponsAsyncCall(applicationId, campaignId, newCouponCreationJob, _callback); + return createCouponsAsynchronouslyCall(applicationId, campaignId, newCouponCreationJob, _callback); } @@ -2178,8 +2180,8 @@ private okhttp3.Call createCouponsAsyncValidateBeforeCall(@javax.annotation.Nonn 200 OK - */ - public AsyncCouponCreationResponse createCouponsAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob) throws ApiException { - ApiResponse localVarResp = createCouponsAsyncWithHttpInfo(applicationId, campaignId, newCouponCreationJob); + public AsyncCouponCreationResponse createCouponsAsynchronously(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob) throws ApiException { + ApiResponse localVarResp = createCouponsAsynchronouslyWithHttpInfo(applicationId, campaignId, newCouponCreationJob); return localVarResp.getData(); } @@ -2198,8 +2200,8 @@ public AsyncCouponCreationResponse createCouponsAsync(@javax.annotation.Nonnull 200 OK - */ - public ApiResponse createCouponsAsyncWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob) throws ApiException { - okhttp3.Call localVarCall = createCouponsAsyncValidateBeforeCall(applicationId, campaignId, newCouponCreationJob, null); + public ApiResponse createCouponsAsynchronouslyWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob) throws ApiException { + okhttp3.Call localVarCall = createCouponsAsynchronouslyValidateBeforeCall(applicationId, campaignId, newCouponCreationJob, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -2220,9 +2222,9 @@ public ApiResponse createCouponsAsyncWithHttpInfo(@ 200 OK - */ - public okhttp3.Call createCouponsAsyncAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCouponsAsynchronouslyAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull NewCouponCreationJob newCouponCreationJob, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createCouponsAsyncValidateBeforeCall(applicationId, campaignId, newCouponCreationJob, _callback); + okhttp3.Call localVarCall = createCouponsAsynchronouslyValidateBeforeCall(applicationId, campaignId, newCouponCreationJob, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -6380,6 +6382,166 @@ public okhttp3.Call exportCampaignStoresAsync(@javax.annotation.Nonnull Long app localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for exportCampaignValueMap + * @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 valueMapId The ID of the value map. (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 exportCampaignValueMapCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long valueMapId, 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/applications/{applicationId}/campaigns/{campaignId}/value_maps/{valueMapId}/export" + .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) + .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())) + .replace("{" + "valueMapId" + "}", localVarApiClient.escapeString(valueMapId.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/csv", + "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 exportCampaignValueMapValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long valueMapId, 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 exportCampaignValueMap(Async)"); + } + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling exportCampaignValueMap(Async)"); + } + + // verify the required parameter 'valueMapId' is set + if (valueMapId == null) { + throw new ApiException("Missing the required parameter 'valueMapId' when calling exportCampaignValueMap(Async)"); + } + + return exportCampaignValueMapCall(applicationId, campaignId, valueMapId, _callback); + + } + + /** + * Export campaign value map + * Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + * @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 valueMapId The ID of the value map. (required) + * @return String + * @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 String exportCampaignValueMap(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long valueMapId) throws ApiException { + ApiResponse localVarResp = exportCampaignValueMapWithHttpInfo(applicationId, campaignId, valueMapId); + return localVarResp.getData(); + } + + /** + * Export campaign value map + * Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + * @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 valueMapId The ID of the value map. (required) + * @return ApiResponse<String> + * @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 exportCampaignValueMapWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long valueMapId) throws ApiException { + okhttp3.Call localVarCall = exportCampaignValueMapValidateBeforeCall(applicationId, campaignId, valueMapId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Export campaign value map (asynchronously) + * Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + * @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 valueMapId The ID of the value map. (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 exportCampaignValueMapAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long campaignId, @javax.annotation.Nonnull Long valueMapId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportCampaignValueMapValidateBeforeCall(applicationId, campaignId, valueMapId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for exportCollectionItems * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) @@ -9897,7 +10059,7 @@ private okhttp3.Call getApplicationValidateBeforeCall(@javax.annotation.Nonnull /** * Get Application - * Get the application specified by the ID. + * Get the Application specified by the ID. * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @return Application * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -9915,7 +10077,7 @@ public Application getApplication(@javax.annotation.Nonnull Long applicationId) /** * Get Application - * Get the application specified by the ID. + * Get the Application specified by the ID. * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @return ApiResponse<Application> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -9934,7 +10096,7 @@ public ApiResponse getApplicationWithHttpInfo(@javax.annotation.Non /** * Get Application (asynchronously) - * Get the application specified by the ID. + * Get the Application specified by the ID. * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -10080,6 +10242,153 @@ public okhttp3.Call getApplicationApiHealthAsync(@javax.annotation.Nonnull Long localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getApplicationCartItemFilterExpression + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param cartItemFilterId The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + * @param expressionId The ID of the Application cart item filter expression. (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 getApplicationCartItemFilterExpressionCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long cartItemFilterId, @javax.annotation.Nonnull Long expressionId, 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/applications/{applicationId}/cart_item_filters/{cartItemFilterId}/expressions/{expressionId}" + .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) + .replace("{" + "cartItemFilterId" + "}", localVarApiClient.escapeString(cartItemFilterId.toString())) + .replace("{" + "expressionId" + "}", localVarApiClient.escapeString(expressionId.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 getApplicationCartItemFilterExpressionValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long cartItemFilterId, @javax.annotation.Nonnull Long expressionId, 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 getApplicationCartItemFilterExpression(Async)"); + } + + // verify the required parameter 'cartItemFilterId' is set + if (cartItemFilterId == null) { + throw new ApiException("Missing the required parameter 'cartItemFilterId' when calling getApplicationCartItemFilterExpression(Async)"); + } + + // verify the required parameter 'expressionId' is set + if (expressionId == null) { + throw new ApiException("Missing the required parameter 'expressionId' when calling getApplicationCartItemFilterExpression(Async)"); + } + + return getApplicationCartItemFilterExpressionCall(applicationId, cartItemFilterId, expressionId, _callback); + + } + + /** + * Get Application cart item filter expression + * Get an Application cart item filter expression for a specific Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param cartItemFilterId The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + * @param expressionId The ID of the Application cart item filter expression. (required) + * @return ApplicationCIFExpression + * @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 ApplicationCIFExpression getApplicationCartItemFilterExpression(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long cartItemFilterId, @javax.annotation.Nonnull Long expressionId) throws ApiException { + ApiResponse localVarResp = getApplicationCartItemFilterExpressionWithHttpInfo(applicationId, cartItemFilterId, expressionId); + return localVarResp.getData(); + } + + /** + * Get Application cart item filter expression + * Get an Application cart item filter expression for a specific Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param cartItemFilterId The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + * @param expressionId The ID of the Application cart item filter expression. (required) + * @return ApiResponse<ApplicationCIFExpression> + * @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 getApplicationCartItemFilterExpressionWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long cartItemFilterId, @javax.annotation.Nonnull Long expressionId) throws ApiException { + okhttp3.Call localVarCall = getApplicationCartItemFilterExpressionValidateBeforeCall(applicationId, cartItemFilterId, expressionId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Application cart item filter expression (asynchronously) + * Get an Application cart item filter expression for a specific Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param cartItemFilterId The ID of the Application cart item filter. You can get this ID with the [List Application cart item filters](https://docs.talon.one/management-api#tag/Applications/operation/listApplicationCartItemFilters) endpoint. (required) + * @param expressionId The ID of the Application cart item filter expression. (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 getApplicationCartItemFilterExpressionAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long cartItemFilterId, @javax.annotation.Nonnull Long expressionId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApplicationCartItemFilterExpressionValidateBeforeCall(applicationId, cartItemFilterId, expressionId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getApplicationCustomer * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) @@ -10224,7 +10533,7 @@ public okhttp3.Call getApplicationCustomerAsync(@javax.annotation.Nonnull Long a * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10321,7 +10630,7 @@ private okhttp3.Call getApplicationCustomerFriendsValidateBeforeCall(@javax.anno * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return GetApplicationCustomerFriends200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10344,7 +10653,7 @@ public GetApplicationCustomerFriends200Response getApplicationCustomerFriends(@j * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return ApiResponse<GetApplicationCustomerFriends200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10368,7 +10677,7 @@ public ApiResponse getApplicationCusto * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (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 @@ -10392,7 +10701,7 @@ public okhttp3.Call getApplicationCustomerFriendsAsync(@javax.annotation.Nonnull * @param integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10482,7 +10791,7 @@ private okhttp3.Call getApplicationCustomersValidateBeforeCall(@javax.annotation * @param integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return GetApplicationCustomers200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10504,7 +10813,7 @@ public GetApplicationCustomers200Response getApplicationCustomers(@javax.annotat * @param integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return ApiResponse<GetApplicationCustomers200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10527,7 +10836,7 @@ public ApiResponse getApplicationCustomersWi * @param integrationId Filter results performing an exact matching against the profile integration identifier. (optional) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (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 @@ -10551,7 +10860,7 @@ public okhttp3.Call getApplicationCustomersAsync(@javax.annotation.Nonnull Long * @param customerProfileSearchQuery body (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -10643,7 +10952,7 @@ private okhttp3.Call getApplicationCustomersByAttributesValidateBeforeCall(@java * @param customerProfileSearchQuery body (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return GetApplicationCustomersByAttributes200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10665,7 +10974,7 @@ public GetApplicationCustomersByAttributes200Response getApplicationCustomersByA * @param customerProfileSearchQuery body (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return ApiResponse<GetApplicationCustomersByAttributes200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -10688,7 +10997,7 @@ public ApiResponse getApplicatio * @param customerProfileSearchQuery body (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (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 @@ -11543,7 +11852,7 @@ private okhttp3.Call getApplicationsValidateBeforeCall(@javax.annotation.Nullabl /** * List Applications - * List all applications in the current account. + * List all the Applications in the current account. * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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) @@ -11563,7 +11872,7 @@ public GetApplications200Response getApplications(@javax.annotation.Nullable Lon /** * List Applications - * List all applications in the current account. + * List all the Applications in the current account. * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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) @@ -11584,7 +11893,7 @@ public ApiResponse getApplicationsWithHttpInfo(@java /** * List Applications (asynchronously) - * List all applications in the current account. + * List all the Applications in the current account. * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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) @@ -12081,7 +12390,7 @@ public okhttp3.Call getAudienceMembershipsAsync(@javax.annotation.Nonnull Long a * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -12164,7 +12473,7 @@ private okhttp3.Call getAudiencesValidateBeforeCall(@javax.annotation.Nullable L * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return GetAudiences200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -12185,7 +12494,7 @@ public GetAudiences200Response getAudiences(@javax.annotation.Nullable Long page * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @return ApiResponse<GetAudiences200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -12207,7 +12516,7 @@ public ApiResponse getAudiencesWithHttpInfo(@javax.anno * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (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 @@ -13542,7 +13851,7 @@ public okhttp3.Call getCampaignsAsync(@javax.annotation.Nonnull Long application * @param userId Filter results by user ID. (optional) * @param createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) * @param createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param managementKeyId Filter results that match the given management key ID. (optional) * @param includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * @param _callback Callback for upload/download progress @@ -13660,7 +13969,7 @@ private okhttp3.Call getChangesValidateBeforeCall(@javax.annotation.Nullable Lon * @param userId Filter results by user ID. (optional) * @param createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) * @param createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param managementKeyId Filter results that match the given management key ID. (optional) * @param includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * @return GetChanges200Response @@ -13688,7 +13997,7 @@ public GetChanges200Response getChanges(@javax.annotation.Nullable Long pageSize * @param userId Filter results by user ID. (optional) * @param createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) * @param createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param managementKeyId Filter results that match the given management key ID. (optional) * @param includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * @return ApiResponse<GetChanges200Response> @@ -13717,7 +14026,7 @@ public ApiResponse getChangesWithHttpInfo(@javax.annotati * @param userId Filter results by user ID. (optional) * @param createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) * @param createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param managementKeyId Filter results that match the given management key ID. (optional) * @param includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * @param _callback The callback to be executed when the API call finishes @@ -21263,7 +21572,7 @@ public okhttp3.Call inviteUserExternalAsync(@javax.annotation.Nonnull NewExterna * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @param _callback Callback for upload/download progress * @return Call to execute @@ -21354,7 +21663,7 @@ private okhttp3.Call listAccountCollectionsValidateBeforeCall(@javax.annotation. * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @return ListAccountCollections200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -21379,7 +21688,7 @@ public ListAccountCollections200Response listAccountCollections(@javax.annotatio * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @return ApiResponse<ListAccountCollections200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -21405,7 +21714,7 @@ public ApiResponse listAccountCollectionsWith * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -21705,6 +22014,157 @@ public okhttp3.Call listAllRolesV2Async(final ApiCallback + Response Details + Status Code Description Response Headers + 200 OK - + + */ + public okhttp3.Call listApplicationCartItemFiltersCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String title, 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/applications/{applicationId}/cart_item_filters" + .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + if (skip != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("skip", skip)); + } + + if (title != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("title", title)); + } + + 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 listApplicationCartItemFiltersValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String title, 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 listApplicationCartItemFilters(Async)"); + } + + return listApplicationCartItemFiltersCall(applicationId, pageSize, skip, title, _callback); + + } + + /** + * List Application cart item filters + * Return all the Application cart item filters for a specific Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param title Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. (optional) + * @return ListApplicationCartItemFilters200Response + * @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 ListApplicationCartItemFilters200Response listApplicationCartItemFilters(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String title) throws ApiException { + ApiResponse localVarResp = listApplicationCartItemFiltersWithHttpInfo(applicationId, pageSize, skip, title); + return localVarResp.getData(); + } + + /** + * List Application cart item filters + * Return all the Application cart item filters for a specific Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param title Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. (optional) + * @return ApiResponse<ListApplicationCartItemFilters200Response> + * @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 listApplicationCartItemFiltersWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String title) throws ApiException { + okhttp3.Call localVarCall = listApplicationCartItemFiltersValidateBeforeCall(applicationId, pageSize, skip, title, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Application cart item filters (asynchronously) + * Return all the Application cart item filters for a specific Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param pageSize The number of items in the response. (optional, default to 50) + * @param skip The number of items to skip when paging through large result sets. (optional) + * @param title Filter by the display name of the Application cart item filter in the Application. **Note**: If no `title` is provided, all the Application cart item filters in the Application are returned. (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 + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
200 OK -
+ */ + public okhttp3.Call listApplicationCartItemFiltersAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String title, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listApplicationCartItemFiltersValidateBeforeCall(applicationId, pageSize, skip, title, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for listCampaignStoreBudgetLimits * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) @@ -21875,7 +22335,7 @@ public okhttp3.Call listCampaignStoreBudgetLimitsAsync(@javax.annotation.Nonnull * @param catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param sku Filter results by one or more SKUs. Must be exact match. (optional) * @param productNames Filter results by one or more product names. Must be exact match. (optional) * @param _callback Callback for upload/download progress @@ -21970,7 +22430,7 @@ private okhttp3.Call listCatalogItemsValidateBeforeCall(@javax.annotation.Nonnul * @param catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param sku Filter results by one or more SKUs. Must be exact match. (optional) * @param productNames Filter results by one or more product names. Must be exact match. (optional) * @return ListCatalogItems200Response @@ -21993,7 +22453,7 @@ public ListCatalogItems200Response listCatalogItems(@javax.annotation.Nonnull Lo * @param catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param sku Filter results by one or more SKUs. Must be exact match. (optional) * @param productNames Filter results by one or more product names. Must be exact match. (optional) * @return ApiResponse<ListCatalogItems200Response> @@ -22017,7 +22477,7 @@ public ApiResponse listCatalogItemsWithHttpInfo(@ja * @param catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) - * @param withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param sku Filter results by one or more SKUs. Must be exact match. (optional) * @param productNames Filter results by one or more product names. Must be exact match. (optional) * @param _callback The callback to be executed when the API call finishes @@ -22044,7 +22504,7 @@ public okhttp3.Call listCatalogItemsAsync(@javax.annotation.Nonnull Long catalog * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @param _callback Callback for upload/download progress * @return Call to execute @@ -22147,7 +22607,7 @@ private okhttp3.Call listCollectionsValidateBeforeCall(@javax.annotation.Nonnull * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @return ListAccountCollections200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -22172,7 +22632,7 @@ public ListAccountCollections200Response listCollections(@javax.annotation.Nonnu * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @return ApiResponse<ListAccountCollections200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -22198,7 +22658,7 @@ public ApiResponse listCollectionsWithHttpInf * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -22224,7 +22684,7 @@ public okhttp3.Call listCollectionsAsync(@javax.annotation.Nonnull Long applicat * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @param _callback Callback for upload/download progress * @return Call to execute @@ -22320,7 +22780,7 @@ private okhttp3.Call listCollectionsInApplicationValidateBeforeCall(@javax.annot * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @return ListAccountCollections200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -22344,7 +22804,7 @@ public ListAccountCollections200Response listCollectionsInApplication(@javax.ann * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @return ApiResponse<ListAccountCollections200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -22369,7 +22829,7 @@ public ApiResponse listCollectionsInApplicati * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param name Filter by collection name. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -22546,7 +23006,7 @@ public okhttp3.Call listExperimentsAsync(@javax.annotation.Nonnull Long applicat * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param campaignId Filter results by campaign ID. (optional) * @param name The name of the store. (optional) * @param integrationId The integration ID of the store. (optional) @@ -22656,7 +23116,7 @@ private okhttp3.Call listStoresValidateBeforeCall(@javax.annotation.Nonnull Long * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param campaignId Filter results by campaign ID. (optional) * @param name The name of the store. (optional) * @param integrationId The integration ID of the store. (optional) @@ -22682,7 +23142,7 @@ public ListStores200Response listStores(@javax.annotation.Nonnull Long applicati * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param campaignId Filter results by campaign ID. (optional) * @param name The name of the store. (optional) * @param integrationId The integration ID of the store. (optional) @@ -22709,7 +23169,7 @@ public ApiResponse listStoresWithHttpInfo(@javax.annotati * @param pageSize The number of items in the response. (optional, default to 1000) * @param skip The number of items to skip when paging through large result sets. (optional) * @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 withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param withTotalResultSize When this flag is set, the result includes the total number of results for this query. This might decrease performance on large data sets. - When `true`: `totalResultSize` contains the total number of results for this query. - When `false`: Only `hasMore` is returned, and it is set to `true` when there are more results than shown on the page. (optional) * @param campaignId Filter results by campaign ID. (optional) * @param name The name of the store. (optional) * @param integrationId The integration ID of the store. (optional) diff --git a/src/main/java/one/talon/model/AchievementV2.java b/src/main/java/one/talon/model/AchievementV2.java index 2e007487..fcd130a0 100644 --- a/src/main/java/one/talon/model/AchievementV2.java +++ b/src/main/java/one/talon/model/AchievementV2.java @@ -67,22 +67,22 @@ public class AchievementV2 { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String title; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String description; public static final String SERIALIZED_NAME_TARGET = "target"; @SerializedName(SERIALIZED_NAME_TARGET) - @javax.annotation.Nullable + @javax.annotation.Nonnull private BigDecimal target; public static final String SERIALIZED_NAME_PERIOD = "period"; @@ -146,7 +146,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_RECURRENCE_POLICY = "recurrencePolicy"; @SerializedName(SERIALIZED_NAME_RECURRENCE_POLICY) - @javax.annotation.Nullable + @javax.annotation.Nonnull private RecurrencePolicyEnum recurrencePolicy; /** @@ -203,7 +203,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_ACTIVATION_POLICY = "activationPolicy"; @SerializedName(SERIALIZED_NAME_ACTIVATION_POLICY) - @javax.annotation.Nullable + @javax.annotation.Nonnull private ActivationPolicyEnum activationPolicy; public static final String SERIALIZED_NAME_FIXED_START_DATE = "fixedStartDate"; @@ -223,17 +223,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_SANDBOX = "sandbox"; @SerializedName(SERIALIZED_NAME_SANDBOX) - @javax.annotation.Nullable + @javax.annotation.Nonnull private Boolean sandbox; public static final String SERIALIZED_NAME_SUBSCRIBED_APPLICATIONS = "subscribedApplications"; @SerializedName(SERIALIZED_NAME_SUBSCRIBED_APPLICATIONS) - @javax.annotation.Nullable - private List subscribedApplications; + @javax.annotation.Nonnull + private List subscribedApplications = new ArrayList<>(); public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @SerializedName(SERIALIZED_NAME_TIMEZONE) - @javax.annotation.Nullable + @javax.annotation.Nonnull private String timezone; public static final String SERIALIZED_NAME_USER_ID = "userId"; @@ -353,7 +353,7 @@ public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { } - public AchievementV2 name(@javax.annotation.Nullable String name) { + public AchievementV2 name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -362,17 +362,17 @@ public AchievementV2 name(@javax.annotation.Nullable String name) { * The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. * @return name */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; } - public void setName(@javax.annotation.Nullable String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public AchievementV2 title(@javax.annotation.Nullable String title) { + public AchievementV2 title(@javax.annotation.Nonnull String title) { this.title = title; return this; } @@ -381,17 +381,17 @@ public AchievementV2 title(@javax.annotation.Nullable String title) { * The display name for the achievement in the Campaign Manager. * @return title */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getTitle() { return title; } - public void setTitle(@javax.annotation.Nullable String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public AchievementV2 description(@javax.annotation.Nullable String description) { + public AchievementV2 description(@javax.annotation.Nonnull String description) { this.description = description; return this; } @@ -400,17 +400,17 @@ public AchievementV2 description(@javax.annotation.Nullable String description) * A description of the achievement. * @return description */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getDescription() { return description; } - public void setDescription(@javax.annotation.Nullable String description) { + public void setDescription(@javax.annotation.Nonnull String description) { this.description = description; } - public AchievementV2 target(@javax.annotation.Nullable BigDecimal target) { + public AchievementV2 target(@javax.annotation.Nonnull BigDecimal target) { this.target = target; return this; } @@ -419,12 +419,12 @@ public AchievementV2 target(@javax.annotation.Nullable BigDecimal target) { * The required number of actions or the transactional milestone to complete the achievement. * @return target */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public BigDecimal getTarget() { return target; } - public void setTarget(@javax.annotation.Nullable BigDecimal target) { + public void setTarget(@javax.annotation.Nonnull BigDecimal target) { this.target = target; } @@ -448,7 +448,7 @@ public void setPeriod(@javax.annotation.Nullable String period) { } - public AchievementV2 recurrencePolicy(@javax.annotation.Nullable RecurrencePolicyEnum recurrencePolicy) { + public AchievementV2 recurrencePolicy(@javax.annotation.Nonnull RecurrencePolicyEnum recurrencePolicy) { this.recurrencePolicy = recurrencePolicy; return this; } @@ -457,17 +457,17 @@ public AchievementV2 recurrencePolicy(@javax.annotation.Nullable RecurrencePolic * 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.Nullable + @javax.annotation.Nonnull public RecurrencePolicyEnum getRecurrencePolicy() { return recurrencePolicy; } - public void setRecurrencePolicy(@javax.annotation.Nullable RecurrencePolicyEnum recurrencePolicy) { + public void setRecurrencePolicy(@javax.annotation.Nonnull RecurrencePolicyEnum recurrencePolicy) { this.recurrencePolicy = recurrencePolicy; } - public AchievementV2 activationPolicy(@javax.annotation.Nullable ActivationPolicyEnum activationPolicy) { + public AchievementV2 activationPolicy(@javax.annotation.Nonnull ActivationPolicyEnum activationPolicy) { this.activationPolicy = activationPolicy; return this; } @@ -476,12 +476,12 @@ public AchievementV2 activationPolicy(@javax.annotation.Nullable ActivationPolic * 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.Nullable + @javax.annotation.Nonnull public ActivationPolicyEnum getActivationPolicy() { return activationPolicy; } - public void setActivationPolicy(@javax.annotation.Nullable ActivationPolicyEnum activationPolicy) { + public void setActivationPolicy(@javax.annotation.Nonnull ActivationPolicyEnum activationPolicy) { this.activationPolicy = activationPolicy; } @@ -543,7 +543,7 @@ public void setAllowRollbackAfterCompletion(@javax.annotation.Nullable Boolean a } - public AchievementV2 sandbox(@javax.annotation.Nullable Boolean sandbox) { + public AchievementV2 sandbox(@javax.annotation.Nonnull Boolean sandbox) { this.sandbox = sandbox; return this; } @@ -552,17 +552,17 @@ public AchievementV2 sandbox(@javax.annotation.Nullable Boolean sandbox) { * Indicates if this achievement is a live or sandbox achievement. Achievements of a given type can only be connected to Applications of the same type. * @return sandbox */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Boolean getSandbox() { return sandbox; } - public void setSandbox(@javax.annotation.Nullable Boolean sandbox) { + public void setSandbox(@javax.annotation.Nonnull Boolean sandbox) { this.sandbox = sandbox; } - public AchievementV2 subscribedApplications(@javax.annotation.Nullable List subscribedApplications) { + public AchievementV2 subscribedApplications(@javax.annotation.Nonnull List subscribedApplications) { this.subscribedApplications = subscribedApplications; return this; } @@ -579,17 +579,17 @@ public AchievementV2 addSubscribedApplicationsItem(Long subscribedApplicationsIt * A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. * @return subscribedApplications */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public List getSubscribedApplications() { return subscribedApplications; } - public void setSubscribedApplications(@javax.annotation.Nullable List subscribedApplications) { + public void setSubscribedApplications(@javax.annotation.Nonnull List subscribedApplications) { this.subscribedApplications = subscribedApplications; } - public AchievementV2 timezone(@javax.annotation.Nullable String timezone) { + public AchievementV2 timezone(@javax.annotation.Nonnull String timezone) { this.timezone = timezone; return this; } @@ -598,12 +598,12 @@ public AchievementV2 timezone(@javax.annotation.Nullable String timezone) { * A string containing an IANA timezone descriptor. * @return timezone */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getTimezone() { return timezone; } - public void setTimezone(@javax.annotation.Nullable String timezone) { + public void setTimezone(@javax.annotation.Nonnull String timezone) { this.timezone = timezone; } @@ -767,7 +767,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("id", "created", "name", "title", "description", "target", "period", "recurrencePolicy", "activationPolicy", "fixedStartDate", "endDate", "allowRollbackAfterCompletion", "sandbox", "subscribedApplications", "timezone", "userId", "createdBy", "hasProgress", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("id", "created", "userId")); + openapiRequiredFields = new HashSet(Arrays.asList("id", "created", "name", "title", "description", "target", "recurrencePolicy", "activationPolicy", "sandbox", "subscribedApplications", "timezone", "userId")); } /** @@ -798,37 +798,35 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + 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") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { + 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") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + 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("period") != null && !jsonObj.get("period").isJsonNull()) && !jsonObj.get("period").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `period` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period").toString())); } - if ((jsonObj.get("recurrencePolicy") != null && !jsonObj.get("recurrencePolicy").isJsonNull()) && !jsonObj.get("recurrencePolicy").isJsonPrimitive()) { + 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 optional field `recurrencePolicy` - if (jsonObj.get("recurrencePolicy") != null && !jsonObj.get("recurrencePolicy").isJsonNull()) { - RecurrencePolicyEnum.validateJsonElement(jsonObj.get("recurrencePolicy")); - } - if ((jsonObj.get("activationPolicy") != null && !jsonObj.get("activationPolicy").isJsonNull()) && !jsonObj.get("activationPolicy").isJsonPrimitive()) { + // 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 optional field `activationPolicy` - if (jsonObj.get("activationPolicy") != null && !jsonObj.get("activationPolicy").isJsonNull()) { - ActivationPolicyEnum.validateJsonElement(jsonObj.get("activationPolicy")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("subscribedApplications") != null && !jsonObj.get("subscribedApplications").isJsonNull() && !jsonObj.get("subscribedApplications").isJsonArray()) { + // validate the required field `activationPolicy` + ActivationPolicyEnum.validateJsonElement(jsonObj.get("activationPolicy")); + // ensure the required json array is present + if (jsonObj.get("subscribedApplications") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("subscribedApplications").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subscribedApplications` to be an array in the JSON string but got `%s`", jsonObj.get("subscribedApplications").toString())); } - if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { + if (!jsonObj.get("timezone").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); } if ((jsonObj.get("createdBy") != null && !jsonObj.get("createdBy").isJsonNull()) && !jsonObj.get("createdBy").isJsonPrimitive()) { diff --git a/src/main/java/one/talon/model/BestPriorPriceRequest.java b/src/main/java/one/talon/model/BestPriorPriceRequest.java index f94f9522..c31df29f 100644 --- a/src/main/java/one/talon/model/BestPriorPriceRequest.java +++ b/src/main/java/one/talon/model/BestPriorPriceRequest.java @@ -70,14 +70,8 @@ public class BestPriorPriceRequest { @javax.annotation.Nonnull private String timeframe; - public static final String SERIALIZED_NAME_STRICT_END_DATE = "strictEndDate"; - @Deprecated - @SerializedName(SERIALIZED_NAME_STRICT_END_DATE) - @javax.annotation.Nonnull - private Boolean strictEndDate; - /** - * Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of the current `contextId` with the current price value. Identical price records are merged. If there is no `contextId` for the most recent price, the most recent timestamp for the price is used. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. + * Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of current price value and takes the prices prior to the start of the current price value into account. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. */ @JsonAdapter(TimeframeEndDateTypeEnum.Adapter.class) public enum TimeframeEndDateTypeEnum { @@ -132,7 +126,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_TIMEFRAME_END_DATE_TYPE = "timeframeEndDateType"; @SerializedName(SERIALIZED_NAME_TIMEFRAME_END_DATE_TYPE) - @javax.annotation.Nullable + @javax.annotation.Nonnull private TimeframeEndDateTypeEnum timeframeEndDateType; public static final String SERIALIZED_NAME_TARGET = "target"; @@ -208,44 +202,21 @@ public void setTimeframe(@javax.annotation.Nonnull String timeframe) { } - @Deprecated - public BestPriorPriceRequest strictEndDate(@javax.annotation.Nonnull Boolean strictEndDate) { - this.strictEndDate = strictEndDate; - return this; - } - - /** - * This property is **deprecated**. Use `timeframeEndDateType` instead. Indicates whether the timeframe includes the start of the current sale. - When `false`, the timeframe includes the start date of the current sale. - When `true`, the timeframe strictly uses the number of days specified in `timeframe`. - * @return strictEndDate - * @deprecated - */ - @Deprecated - @javax.annotation.Nonnull - public Boolean getStrictEndDate() { - return strictEndDate; - } - - @Deprecated - public void setStrictEndDate(@javax.annotation.Nonnull Boolean strictEndDate) { - this.strictEndDate = strictEndDate; - } - - - public BestPriorPriceRequest timeframeEndDateType(@javax.annotation.Nullable TimeframeEndDateTypeEnum timeframeEndDateType) { + public BestPriorPriceRequest timeframeEndDateType(@javax.annotation.Nonnull TimeframeEndDateTypeEnum timeframeEndDateType) { this.timeframeEndDateType = timeframeEndDateType; return this; } /** - * Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of the current `contextId` with the current price value. Identical price records are merged. If there is no `contextId` for the most recent price, the most recent timestamp for the price is used. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. + * Sets the timeframe for retrieving historical pricing data. Can be one of the following values: - `strict`: The timeframe ends at the `timeframeEndDate` value. - `price`: The timeframe ends at the start of current price value and takes the prices prior to the start of the current price value into account. - `sale`: The timeframe ends at the start of current `contextId` and takes the prices prior to the start of the `contextId` into account. * @return timeframeEndDateType */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public TimeframeEndDateTypeEnum getTimeframeEndDateType() { return timeframeEndDateType; } - public void setTimeframeEndDateType(@javax.annotation.Nullable TimeframeEndDateTypeEnum timeframeEndDateType) { + public void setTimeframeEndDateType(@javax.annotation.Nonnull TimeframeEndDateTypeEnum timeframeEndDateType) { this.timeframeEndDateType = timeframeEndDateType; } @@ -282,14 +253,13 @@ public boolean equals(Object o) { return Objects.equals(this.skus, bestPriorPriceRequest.skus) && Objects.equals(this.timeframeEndDate, bestPriorPriceRequest.timeframeEndDate) && Objects.equals(this.timeframe, bestPriorPriceRequest.timeframe) && - Objects.equals(this.strictEndDate, bestPriorPriceRequest.strictEndDate) && Objects.equals(this.timeframeEndDateType, bestPriorPriceRequest.timeframeEndDateType) && Objects.equals(this.target, bestPriorPriceRequest.target); } @Override public int hashCode() { - return Objects.hash(skus, timeframeEndDate, timeframe, strictEndDate, timeframeEndDateType, target); + return Objects.hash(skus, timeframeEndDate, timeframe, timeframeEndDateType, target); } @Override @@ -299,7 +269,6 @@ public String toString() { sb.append(" skus: ").append(toIndentedString(skus)).append("\n"); sb.append(" timeframeEndDate: ").append(toIndentedString(timeframeEndDate)).append("\n"); sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); - sb.append(" strictEndDate: ").append(toIndentedString(strictEndDate)).append("\n"); sb.append(" timeframeEndDateType: ").append(toIndentedString(timeframeEndDateType)).append("\n"); sb.append(" target: ").append(toIndentedString(target)).append("\n"); sb.append("}"); @@ -323,10 +292,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "strictEndDate", "timeframeEndDateType", "target")); + openapiFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "timeframeEndDateType", "target")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "strictEndDate")); + openapiRequiredFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "timeframeEndDateType")); } /** @@ -366,13 +335,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("timeframe").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `timeframe` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeframe").toString())); } - if ((jsonObj.get("timeframeEndDateType") != null && !jsonObj.get("timeframeEndDateType").isJsonNull()) && !jsonObj.get("timeframeEndDateType").isJsonPrimitive()) { + if (!jsonObj.get("timeframeEndDateType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `timeframeEndDateType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeframeEndDateType").toString())); } - // validate the optional field `timeframeEndDateType` - if (jsonObj.get("timeframeEndDateType") != null && !jsonObj.get("timeframeEndDateType").isJsonNull()) { - TimeframeEndDateTypeEnum.validateJsonElement(jsonObj.get("timeframeEndDateType")); - } + // validate the required field `timeframeEndDateType` + TimeframeEndDateTypeEnum.validateJsonElement(jsonObj.get("timeframeEndDateType")); // validate the optional field `target` if (jsonObj.get("target") != null && !jsonObj.get("target").isJsonNull()) { BestPriorTarget.validateJsonElement(jsonObj.get("target")); diff --git a/src/main/java/one/talon/model/CreateAchievementV2.java b/src/main/java/one/talon/model/CreateAchievementV2.java index f1e291e9..370e7fbb 100644 --- a/src/main/java/one/talon/model/CreateAchievementV2.java +++ b/src/main/java/one/talon/model/CreateAchievementV2.java @@ -218,8 +218,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_SUBSCRIBED_APPLICATIONS = "subscribedApplications"; @SerializedName(SERIALIZED_NAME_SUBSCRIBED_APPLICATIONS) - @javax.annotation.Nonnull - private List subscribedApplications = new ArrayList<>(); + @javax.annotation.Nullable + private List subscribedApplications; public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; @SerializedName(SERIALIZED_NAME_TIMEZONE) @@ -438,7 +438,7 @@ public void setSandbox(@javax.annotation.Nonnull Boolean sandbox) { } - public CreateAchievementV2 subscribedApplications(@javax.annotation.Nonnull List subscribedApplications) { + public CreateAchievementV2 subscribedApplications(@javax.annotation.Nullable List subscribedApplications) { this.subscribedApplications = subscribedApplications; return this; } @@ -455,12 +455,12 @@ public CreateAchievementV2 addSubscribedApplicationsItem(Long subscribedApplicat * A list containing the IDs of all applications that are subscribed to A list containing the IDs of all Applications that are connected to this achievement. * @return subscribedApplications */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getSubscribedApplications() { return subscribedApplications; } - public void setSubscribedApplications(@javax.annotation.Nonnull List subscribedApplications) { + public void setSubscribedApplications(@javax.annotation.Nullable List subscribedApplications) { this.subscribedApplications = subscribedApplications; } @@ -555,7 +555,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("name", "title", "description", "target", "period", "recurrencePolicy", "activationPolicy", "fixedStartDate", "endDate", "allowRollbackAfterCompletion", "sandbox", "subscribedApplications", "timezone")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("name", "title", "description", "target", "sandbox", "subscribedApplications", "timezone")); + openapiRequiredFields = new HashSet(Arrays.asList("name", "title", "description", "target", "sandbox", "timezone")); } /** @@ -612,10 +612,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("activationPolicy") != null && !jsonObj.get("activationPolicy").isJsonNull()) { ActivationPolicyEnum.validateJsonElement(jsonObj.get("activationPolicy")); } - // ensure the required json array is present - if (jsonObj.get("subscribedApplications") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("subscribedApplications").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("subscribedApplications") != null && !jsonObj.get("subscribedApplications").isJsonNull() && !jsonObj.get("subscribedApplications").isJsonArray()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `subscribedApplications` to be an array in the JSON string but got `%s`", jsonObj.get("subscribedApplications").toString())); } if (!jsonObj.get("timezone").isJsonPrimitive()) { diff --git a/src/main/java/one/talon/model/CreateMCPKey.java b/src/main/java/one/talon/model/CreateMCPKey.java new file mode 100644 index 00000000..8cf5fd56 --- /dev/null +++ b/src/main/java/one/talon/model/CreateMCPKey.java @@ -0,0 +1,240 @@ +/* + * 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.time.OffsetDateTime; +import java.util.Arrays; +import com.google.gson.JsonElement; + +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; + +/** + * CreateMCPKey + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class CreateMCPKey { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; + @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) + @javax.annotation.Nonnull + private OffsetDateTime expiryDate; + + public CreateMCPKey() { + } + + public CreateMCPKey name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name for the MCP key. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateMCPKey expiryDate(@javax.annotation.Nonnull OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * The date the MCP key expires. + * @return expiryDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(@javax.annotation.Nonnull OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMCPKey createMCPKey = (CreateMCPKey) o; + return Objects.equals(this.name, createMCPKey.name) && + Objects.equals(this.expiryDate, createMCPKey.expiryDate); + } + + @Override + public int hashCode() { + return Objects.hash(name, expiryDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateMCPKey {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).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) { + if (o == null) { + return "null"; + } + return 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("name", "expiryDate")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name", "expiryDate")); + } + + /** + * 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 CreateMCPKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateMCPKey.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 CreateMCPKey is not found in the empty JSON string", CreateMCPKey.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateMCPKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `CreateMCPKey` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateMCPKey.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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateMCPKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateMCPKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateMCPKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateMCPKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateMCPKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateMCPKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateMCPKey + * @throws IOException if the JSON string is invalid with respect to CreateMCPKey + */ + public static CreateMCPKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateMCPKey.class); + } + + /** + * Convert an instance of CreateMCPKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentSegmentInsight.java b/src/main/java/one/talon/model/ExperimentSegmentInsight.java new file mode 100644 index 00000000..22cbaa59 --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentSegmentInsight.java @@ -0,0 +1,461 @@ +/* + * 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 one.talon.model.ExperimentSegmentInsightVariant; +import com.google.gson.JsonElement; + +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; + +/** + * ExperimentSegmentInsight + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ExperimentSegmentInsight { + /** + * The segmentation dimension used to group customers or purchases for analysis. + */ + @JsonAdapter(DimensionEnum.Adapter.class) + public enum DimensionEnum { + CART_VALUE("cart_value"), + + ITEM_COUNT("item_count"), + + CUSTOMER_TYPE("customer_type"); + + private String value; + + DimensionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DimensionEnum fromValue(String value) { + for (DimensionEnum b : DimensionEnum.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 DimensionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DimensionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DimensionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DimensionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DIMENSION = "dimension"; + @SerializedName(SERIALIZED_NAME_DIMENSION) + @javax.annotation.Nonnull + private DimensionEnum dimension; + + /** + * The specific group within the segmentation dimension. + */ + @JsonAdapter(BucketEnum.Adapter.class) + public enum BucketEnum { + LOW("low"), + + MEDIUM("medium"), + + HIGH("high"), + + NEW("new"), + + RETURNING("returning"), + + LOYAL("loyal"); + + private String value; + + BucketEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BucketEnum fromValue(String value) { + for (BucketEnum b : BucketEnum.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 BucketEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BucketEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BucketEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BucketEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_BUCKET = "bucket"; + @SerializedName(SERIALIZED_NAME_BUCKET) + @javax.annotation.Nonnull + private BucketEnum bucket; + + public static final String SERIALIZED_NAME_CONFIDENCE = "confidence"; + @SerializedName(SERIALIZED_NAME_CONFIDENCE) + @javax.annotation.Nonnull + private Double confidence; + + public static final String SERIALIZED_NAME_WINNER_VARIANT_ID = "winnerVariantId"; + @SerializedName(SERIALIZED_NAME_WINNER_VARIANT_ID) + @javax.annotation.Nonnull + private Long winnerVariantId; + + public static final String SERIALIZED_NAME_VARIANTS = "variants"; + @SerializedName(SERIALIZED_NAME_VARIANTS) + @javax.annotation.Nonnull + private List variants = new ArrayList<>(); + + public ExperimentSegmentInsight() { + } + + public ExperimentSegmentInsight dimension(@javax.annotation.Nonnull DimensionEnum dimension) { + this.dimension = dimension; + return this; + } + + /** + * The segmentation dimension used to group customers or purchases for analysis. + * @return dimension + */ + @javax.annotation.Nonnull + public DimensionEnum getDimension() { + return dimension; + } + + public void setDimension(@javax.annotation.Nonnull DimensionEnum dimension) { + this.dimension = dimension; + } + + + public ExperimentSegmentInsight bucket(@javax.annotation.Nonnull BucketEnum bucket) { + this.bucket = bucket; + return this; + } + + /** + * The specific group within the segmentation dimension. + * @return bucket + */ + @javax.annotation.Nonnull + public BucketEnum getBucket() { + return bucket; + } + + public void setBucket(@javax.annotation.Nonnull BucketEnum bucket) { + this.bucket = bucket; + } + + + public ExperimentSegmentInsight confidence(@javax.annotation.Nonnull Double confidence) { + this.confidence = confidence; + return this; + } + + /** + * The raw (unadjusted) confidence score expressed as a percentage. Only segments with a confidence score greater than or equal to 95% are returned. + * minimum: 95 + * maximum: 100 + * @return confidence + */ + @javax.annotation.Nonnull + public Double getConfidence() { + return confidence; + } + + public void setConfidence(@javax.annotation.Nonnull Double confidence) { + this.confidence = confidence; + } + + + public ExperimentSegmentInsight winnerVariantId(@javax.annotation.Nonnull Long winnerVariantId) { + this.winnerVariantId = winnerVariantId; + return this; + } + + /** + * The ID of the variant that performed better in this segment. + * @return winnerVariantId + */ + @javax.annotation.Nonnull + public Long getWinnerVariantId() { + return winnerVariantId; + } + + public void setWinnerVariantId(@javax.annotation.Nonnull Long winnerVariantId) { + this.winnerVariantId = winnerVariantId; + } + + + public ExperimentSegmentInsight variants(@javax.annotation.Nonnull List variants) { + this.variants = variants; + return this; + } + + public ExperimentSegmentInsight addVariantsItem(ExperimentSegmentInsightVariant variantsItem) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add(variantsItem); + return this; + } + + /** + * Per-variant metric values for this segment. + * @return variants + */ + @javax.annotation.Nonnull + public List getVariants() { + return variants; + } + + public void setVariants(@javax.annotation.Nonnull List variants) { + this.variants = variants; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentSegmentInsight experimentSegmentInsight = (ExperimentSegmentInsight) o; + return Objects.equals(this.dimension, experimentSegmentInsight.dimension) && + Objects.equals(this.bucket, experimentSegmentInsight.bucket) && + Objects.equals(this.confidence, experimentSegmentInsight.confidence) && + Objects.equals(this.winnerVariantId, experimentSegmentInsight.winnerVariantId) && + Objects.equals(this.variants, experimentSegmentInsight.variants); + } + + @Override + public int hashCode() { + return Objects.hash(dimension, bucket, confidence, winnerVariantId, variants); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentSegmentInsight {\n"); + sb.append(" dimension: ").append(toIndentedString(dimension)).append("\n"); + sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" winnerVariantId: ").append(toIndentedString(winnerVariantId)).append("\n"); + sb.append(" variants: ").append(toIndentedString(variants)).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) { + if (o == null) { + return "null"; + } + return 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("dimension", "bucket", "confidence", "winnerVariantId", "variants")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("dimension", "bucket", "confidence", "winnerVariantId", "variants")); + } + + /** + * 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 ExperimentSegmentInsight + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentSegmentInsight.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 ExperimentSegmentInsight is not found in the empty JSON string", ExperimentSegmentInsight.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentSegmentInsight.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ExperimentSegmentInsight` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentSegmentInsight.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("dimension").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `dimension` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dimension").toString())); + } + // validate the required field `dimension` + DimensionEnum.validateJsonElement(jsonObj.get("dimension")); + if (!jsonObj.get("bucket").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `bucket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bucket").toString())); + } + // validate the required field `bucket` + BucketEnum.validateJsonElement(jsonObj.get("bucket")); + if (jsonObj.get("variants") != null) { + if (!jsonObj.get("variants").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `variants` to be an array in the JSON string but got `%s`", jsonObj.get("variants").toString())); + } + JsonArray jsonArrayvariants = jsonObj.getAsJsonArray("variants"); + // validate the required field `variants` (array) + for (int i = 0; i < jsonArrayvariants.size(); i++) { + ExperimentSegmentInsightVariant.validateJsonElement(jsonArrayvariants.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentSegmentInsight.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentSegmentInsight' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentSegmentInsight.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentSegmentInsight value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentSegmentInsight read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentSegmentInsight given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentSegmentInsight + * @throws IOException if the JSON string is invalid with respect to ExperimentSegmentInsight + */ + public static ExperimentSegmentInsight fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentSegmentInsight.class); + } + + /** + * Convert an instance of ExperimentSegmentInsight to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentSegmentInsightMetric.java b/src/main/java/one/talon/model/ExperimentSegmentInsightMetric.java new file mode 100644 index 00000000..46658565 --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentSegmentInsightMetric.java @@ -0,0 +1,316 @@ +/* + * 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 one.talon.model.ExperimentSegmentInsight; +import com.google.gson.JsonElement; + +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; + +/** + * ExperimentSegmentInsightMetric + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ExperimentSegmentInsightMetric { + /** + * The metric being measured. + */ + @JsonAdapter(MetricEnum.Adapter.class) + public enum MetricEnum { + AVG_SESSION_VALUE("avg_session_value"), + + AVG_DISCOUNTED_SESSION_VALUE("avg_discounted_session_value"), + + AVG_ITEMS_PER_SESSION("avg_items_per_session"); + + private String value; + + MetricEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricEnum fromValue(String value) { + for (MetricEnum b : MetricEnum.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 MetricEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetricEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METRIC = "metric"; + @SerializedName(SERIALIZED_NAME_METRIC) + @javax.annotation.Nonnull + private MetricEnum metric; + + public static final String SERIALIZED_NAME_SEGMENTS = "segments"; + @SerializedName(SERIALIZED_NAME_SEGMENTS) + @javax.annotation.Nonnull + private List segments = new ArrayList<>(); + + public ExperimentSegmentInsightMetric() { + } + + public ExperimentSegmentInsightMetric metric(@javax.annotation.Nonnull MetricEnum metric) { + this.metric = metric; + return this; + } + + /** + * The metric being measured. + * @return metric + */ + @javax.annotation.Nonnull + public MetricEnum getMetric() { + return metric; + } + + public void setMetric(@javax.annotation.Nonnull MetricEnum metric) { + this.metric = metric; + } + + + public ExperimentSegmentInsightMetric segments(@javax.annotation.Nonnull List segments) { + this.segments = segments; + return this; + } + + public ExperimentSegmentInsightMetric addSegmentsItem(ExperimentSegmentInsight segmentsItem) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.add(segmentsItem); + return this; + } + + /** + * Segments with statistically significant results for this metric. An empty array means no significant segments were found. Segments are sorted by confidence score from highest to lowest. + * @return segments + */ + @javax.annotation.Nonnull + public List getSegments() { + return segments; + } + + public void setSegments(@javax.annotation.Nonnull List segments) { + this.segments = segments; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentSegmentInsightMetric experimentSegmentInsightMetric = (ExperimentSegmentInsightMetric) o; + return Objects.equals(this.metric, experimentSegmentInsightMetric.metric) && + Objects.equals(this.segments, experimentSegmentInsightMetric.segments); + } + + @Override + public int hashCode() { + return Objects.hash(metric, segments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentSegmentInsightMetric {\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append(" segments: ").append(toIndentedString(segments)).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) { + if (o == null) { + return "null"; + } + return 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("metric", "segments")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("metric", "segments")); + } + + /** + * 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 ExperimentSegmentInsightMetric + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentSegmentInsightMetric.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 ExperimentSegmentInsightMetric is not found in the empty JSON string", ExperimentSegmentInsightMetric.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentSegmentInsightMetric.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ExperimentSegmentInsightMetric` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentSegmentInsightMetric.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("metric").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `metric` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metric").toString())); + } + // validate the required field `metric` + MetricEnum.validateJsonElement(jsonObj.get("metric")); + if (jsonObj.get("segments") != null) { + if (!jsonObj.get("segments").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `segments` to be an array in the JSON string but got `%s`", jsonObj.get("segments").toString())); + } + JsonArray jsonArraysegments = jsonObj.getAsJsonArray("segments"); + // validate the required field `segments` (array) + for (int i = 0; i < jsonArraysegments.size(); i++) { + ExperimentSegmentInsight.validateJsonElement(jsonArraysegments.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentSegmentInsightMetric.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentSegmentInsightMetric' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentSegmentInsightMetric.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentSegmentInsightMetric value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentSegmentInsightMetric read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentSegmentInsightMetric given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentSegmentInsightMetric + * @throws IOException if the JSON string is invalid with respect to ExperimentSegmentInsightMetric + */ + public static ExperimentSegmentInsightMetric fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentSegmentInsightMetric.class); + } + + /** + * Convert an instance of ExperimentSegmentInsightMetric to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentSegmentInsightVariant.java b/src/main/java/one/talon/model/ExperimentSegmentInsightVariant.java new file mode 100644 index 00000000..ae77cfd4 --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentSegmentInsightVariant.java @@ -0,0 +1,291 @@ +/* + * 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.Arrays; +import com.google.gson.JsonElement; + +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; + +/** + * ExperimentSegmentInsightVariant + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ExperimentSegmentInsightVariant { + public static final String SERIALIZED_NAME_VARIANT_ID = "variantId"; + @SerializedName(SERIALIZED_NAME_VARIANT_ID) + @javax.annotation.Nonnull + private Long variantId; + + public static final String SERIALIZED_NAME_VARIANT_NAME = "variantName"; + @SerializedName(SERIALIZED_NAME_VARIANT_NAME) + @javax.annotation.Nonnull + private String variantName; + + public static final String SERIALIZED_NAME_SESSIONS_COUNT = "sessionsCount"; + @SerializedName(SERIALIZED_NAME_SESSIONS_COUNT) + @javax.annotation.Nonnull + private Long sessionsCount; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private Double value; + + public ExperimentSegmentInsightVariant() { + } + + public ExperimentSegmentInsightVariant variantId(@javax.annotation.Nonnull Long variantId) { + this.variantId = variantId; + return this; + } + + /** + * The ID of the experiment variant. + * @return variantId + */ + @javax.annotation.Nonnull + public Long getVariantId() { + return variantId; + } + + public void setVariantId(@javax.annotation.Nonnull Long variantId) { + this.variantId = variantId; + } + + + public ExperimentSegmentInsightVariant variantName(@javax.annotation.Nonnull String variantName) { + this.variantName = variantName; + return this; + } + + /** + * The name of the experiment variant. + * @return variantName + */ + @javax.annotation.Nonnull + public String getVariantName() { + return variantName; + } + + public void setVariantName(@javax.annotation.Nonnull String variantName) { + this.variantName = variantName; + } + + + public ExperimentSegmentInsightVariant sessionsCount(@javax.annotation.Nonnull Long sessionsCount) { + this.sessionsCount = sessionsCount; + return this; + } + + /** + * The number of sessions in this segment for this variant. + * @return sessionsCount + */ + @javax.annotation.Nonnull + public Long getSessionsCount() { + return sessionsCount; + } + + public void setSessionsCount(@javax.annotation.Nonnull Long sessionsCount) { + this.sessionsCount = sessionsCount; + } + + + public ExperimentSegmentInsightVariant value(@javax.annotation.Nonnull Double value) { + this.value = value; + return this; + } + + /** + * The metric value for this variant in the segment. + * @return value + */ + @javax.annotation.Nonnull + public Double getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull Double value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentSegmentInsightVariant experimentSegmentInsightVariant = (ExperimentSegmentInsightVariant) o; + return Objects.equals(this.variantId, experimentSegmentInsightVariant.variantId) && + Objects.equals(this.variantName, experimentSegmentInsightVariant.variantName) && + Objects.equals(this.sessionsCount, experimentSegmentInsightVariant.sessionsCount) && + Objects.equals(this.value, experimentSegmentInsightVariant.value); + } + + @Override + public int hashCode() { + return Objects.hash(variantId, variantName, sessionsCount, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentSegmentInsightVariant {\n"); + sb.append(" variantId: ").append(toIndentedString(variantId)).append("\n"); + sb.append(" variantName: ").append(toIndentedString(variantName)).append("\n"); + sb.append(" sessionsCount: ").append(toIndentedString(sessionsCount)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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) { + if (o == null) { + return "null"; + } + return 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("variantId", "variantName", "sessionsCount", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("variantId", "variantName", "sessionsCount", "value")); + } + + /** + * 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 ExperimentSegmentInsightVariant + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentSegmentInsightVariant.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 ExperimentSegmentInsightVariant is not found in the empty JSON string", ExperimentSegmentInsightVariant.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentSegmentInsightVariant.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ExperimentSegmentInsightVariant` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentSegmentInsightVariant.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("variantName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `variantName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variantName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentSegmentInsightVariant.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentSegmentInsightVariant' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentSegmentInsightVariant.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentSegmentInsightVariant value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentSegmentInsightVariant read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentSegmentInsightVariant given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentSegmentInsightVariant + * @throws IOException if the JSON string is invalid with respect to ExperimentSegmentInsightVariant + */ + public static ExperimentSegmentInsightVariant fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentSegmentInsightVariant.class); + } + + /** + * Convert an instance of ExperimentSegmentInsightVariant to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentSegmentInsights.java b/src/main/java/one/talon/model/ExperimentSegmentInsights.java new file mode 100644 index 00000000..af87196b --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentSegmentInsights.java @@ -0,0 +1,312 @@ +/* + * 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 one.talon.model.ExperimentSegmentInsightMetric; +import com.google.gson.JsonElement; + +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; + +/** + * ExperimentSegmentInsights + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ExperimentSegmentInsights { + public static final String SERIALIZED_NAME_METRICS = "metrics"; + @SerializedName(SERIALIZED_NAME_METRICS) + @javax.annotation.Nonnull + private List metrics = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOTAL_SEGMENTS_TESTED = "totalSegmentsTested"; + @SerializedName(SERIALIZED_NAME_TOTAL_SEGMENTS_TESTED) + @javax.annotation.Nonnull + private Long totalSegmentsTested; + + public static final String SERIALIZED_NAME_DIMENSIONS_TESTED = "dimensionsTested"; + @SerializedName(SERIALIZED_NAME_DIMENSIONS_TESTED) + @javax.annotation.Nonnull + private Long dimensionsTested; + + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + @javax.annotation.Nonnull + private String reason; + + public ExperimentSegmentInsights() { + } + + public ExperimentSegmentInsights metrics(@javax.annotation.Nonnull List metrics) { + this.metrics = metrics; + return this; + } + + public ExperimentSegmentInsights addMetricsItem(ExperimentSegmentInsightMetric metricsItem) { + if (this.metrics == null) { + this.metrics = new ArrayList<>(); + } + this.metrics.add(metricsItem); + return this; + } + + /** + * Segment insights grouped by metric. This array always contains exactly three metric objects. Each metric includes a segments array, which is empty if no significant results were found. The metrics array itself is empty if the `reason` property is populated. + * @return metrics + */ + @javax.annotation.Nonnull + public List getMetrics() { + return metrics; + } + + public void setMetrics(@javax.annotation.Nonnull List metrics) { + this.metrics = metrics; + } + + + public ExperimentSegmentInsights totalSegmentsTested(@javax.annotation.Nonnull Long totalSegmentsTested) { + this.totalSegmentsTested = totalSegmentsTested; + return this; + } + + /** + * Total number of segment-metric combinations that were tested for statistical significance. + * @return totalSegmentsTested + */ + @javax.annotation.Nonnull + public Long getTotalSegmentsTested() { + return totalSegmentsTested; + } + + public void setTotalSegmentsTested(@javax.annotation.Nonnull Long totalSegmentsTested) { + this.totalSegmentsTested = totalSegmentsTested; + } + + + public ExperimentSegmentInsights dimensionsTested(@javax.annotation.Nonnull Long dimensionsTested) { + this.dimensionsTested = dimensionsTested; + return this; + } + + /** + * Number of segmentation dimensions that had sufficient data variance to test. Dimensions where all sessions fall into a single bucket are excluded. + * @return dimensionsTested + */ + @javax.annotation.Nonnull + public Long getDimensionsTested() { + return dimensionsTested; + } + + public void setDimensionsTested(@javax.annotation.Nonnull Long dimensionsTested) { + this.dimensionsTested = dimensionsTested; + } + + + public ExperimentSegmentInsights reason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + return this; + } + + /** + * Empty string when segment insights are available. Contains a reason code when insights could not be computed (e.g., \"insufficient_data\" when the experiment has fewer than 100 sessions per variant). + * @return reason + */ + @javax.annotation.Nonnull + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentSegmentInsights experimentSegmentInsights = (ExperimentSegmentInsights) o; + return Objects.equals(this.metrics, experimentSegmentInsights.metrics) && + Objects.equals(this.totalSegmentsTested, experimentSegmentInsights.totalSegmentsTested) && + Objects.equals(this.dimensionsTested, experimentSegmentInsights.dimensionsTested) && + Objects.equals(this.reason, experimentSegmentInsights.reason); + } + + @Override + public int hashCode() { + return Objects.hash(metrics, totalSegmentsTested, dimensionsTested, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentSegmentInsights {\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" totalSegmentsTested: ").append(toIndentedString(totalSegmentsTested)).append("\n"); + sb.append(" dimensionsTested: ").append(toIndentedString(dimensionsTested)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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) { + if (o == null) { + return "null"; + } + return 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("metrics", "totalSegmentsTested", "dimensionsTested", "reason")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("metrics", "totalSegmentsTested", "dimensionsTested", "reason")); + } + + /** + * 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 ExperimentSegmentInsights + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentSegmentInsights.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 ExperimentSegmentInsights is not found in the empty JSON string", ExperimentSegmentInsights.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentSegmentInsights.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ExperimentSegmentInsights` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentSegmentInsights.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("metrics") != null) { + if (!jsonObj.get("metrics").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `metrics` to be an array in the JSON string but got `%s`", jsonObj.get("metrics").toString())); + } + JsonArray jsonArraymetrics = jsonObj.getAsJsonArray("metrics"); + // validate the required field `metrics` (array) + for (int i = 0; i < jsonArraymetrics.size(); i++) { + ExperimentSegmentInsightMetric.validateJsonElement(jsonArraymetrics.get(i)); + } + } + if (!jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentSegmentInsights.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentSegmentInsights' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentSegmentInsights.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentSegmentInsights value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentSegmentInsights read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentSegmentInsights given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentSegmentInsights + * @throws IOException if the JSON string is invalid with respect to ExperimentSegmentInsights + */ + public static ExperimentSegmentInsights fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentSegmentInsights.class); + } + + /** + * Convert an instance of ExperimentSegmentInsights to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentVerdict.java b/src/main/java/one/talon/model/ExperimentVerdict.java new file mode 100644 index 00000000..d7cc6495 --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentVerdict.java @@ -0,0 +1,342 @@ +/* + * 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.JsonElement; + +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; + +/** + * ExperimentVerdict + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ExperimentVerdict { + public static final String SERIALIZED_NAME_WINNER_VARIANT_NAME = "winnerVariantName"; + @SerializedName(SERIALIZED_NAME_WINNER_VARIANT_NAME) + @javax.annotation.Nonnull + private String winnerVariantName; + + public static final String SERIALIZED_NAME_VERDICT_SUMMARY = "verdictSummary"; + @SerializedName(SERIALIZED_NAME_VERDICT_SUMMARY) + @javax.annotation.Nonnull + private String verdictSummary; + + public static final String SERIALIZED_NAME_KEY_FINDINGS = "keyFindings"; + @SerializedName(SERIALIZED_NAME_KEY_FINDINGS) + @javax.annotation.Nonnull + private List keyFindings = new ArrayList<>(); + + public static final String SERIALIZED_NAME_AI_CONFIDENCE_LEVEL = "aiConfidenceLevel"; + @SerializedName(SERIALIZED_NAME_AI_CONFIDENCE_LEVEL) + @javax.annotation.Nonnull + private String aiConfidenceLevel; + + public static final String SERIALIZED_NAME_RECOMMENDATION = "recommendation"; + @SerializedName(SERIALIZED_NAME_RECOMMENDATION) + @javax.annotation.Nonnull + private String recommendation; + + public ExperimentVerdict() { + } + + public ExperimentVerdict winnerVariantName(@javax.annotation.Nonnull String winnerVariantName) { + this.winnerVariantName = winnerVariantName; + return this; + } + + /** + * The name of the winning variant. If no variant shows a statistically significant advantage on key business metrics, return 'Inconclusive'. + * @return winnerVariantName + */ + @javax.annotation.Nonnull + public String getWinnerVariantName() { + return winnerVariantName; + } + + public void setWinnerVariantName(@javax.annotation.Nonnull String winnerVariantName) { + this.winnerVariantName = winnerVariantName; + } + + + public ExperimentVerdict verdictSummary(@javax.annotation.Nonnull String verdictSummary) { + this.verdictSummary = verdictSummary; + return this; + } + + /** + * A one-sentence summary of the outcome, including the key metric and confidence level that led to the decision. + * @return verdictSummary + */ + @javax.annotation.Nonnull + public String getVerdictSummary() { + return verdictSummary; + } + + public void setVerdictSummary(@javax.annotation.Nonnull String verdictSummary) { + this.verdictSummary = verdictSummary; + } + + + public ExperimentVerdict keyFindings(@javax.annotation.Nonnull List keyFindings) { + this.keyFindings = keyFindings; + return this; + } + + public ExperimentVerdict addKeyFindingsItem(String keyFindingsItem) { + if (this.keyFindings == null) { + this.keyFindings = new ArrayList<>(); + } + this.keyFindings.add(keyFindingsItem); + return this; + } + + /** + * A bullet point stating the most important finding, including the metric, the percentage change, and the confidence. + * @return keyFindings + */ + @javax.annotation.Nonnull + public List getKeyFindings() { + return keyFindings; + } + + public void setKeyFindings(@javax.annotation.Nonnull List keyFindings) { + this.keyFindings = keyFindings; + } + + + public ExperimentVerdict aiConfidenceLevel(@javax.annotation.Nonnull String aiConfidenceLevel) { + this.aiConfidenceLevel = aiConfidenceLevel; + return this; + } + + /** + * Your confidence in this overall verdict, from 0 to 100. + * @return aiConfidenceLevel + */ + @javax.annotation.Nonnull + public String getAiConfidenceLevel() { + return aiConfidenceLevel; + } + + public void setAiConfidenceLevel(@javax.annotation.Nonnull String aiConfidenceLevel) { + this.aiConfidenceLevel = aiConfidenceLevel; + } + + + public ExperimentVerdict recommendation(@javax.annotation.Nonnull String recommendation) { + this.recommendation = recommendation; + return this; + } + + /** + * A short, actionable recommendation based on the findings. If inconclusive, suggest running the test longer. If there is a clear winner, recommend promoting it. + * @return recommendation + */ + @javax.annotation.Nonnull + public String getRecommendation() { + return recommendation; + } + + public void setRecommendation(@javax.annotation.Nonnull String recommendation) { + this.recommendation = recommendation; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentVerdict experimentVerdict = (ExperimentVerdict) o; + return Objects.equals(this.winnerVariantName, experimentVerdict.winnerVariantName) && + Objects.equals(this.verdictSummary, experimentVerdict.verdictSummary) && + Objects.equals(this.keyFindings, experimentVerdict.keyFindings) && + Objects.equals(this.aiConfidenceLevel, experimentVerdict.aiConfidenceLevel) && + Objects.equals(this.recommendation, experimentVerdict.recommendation); + } + + @Override + public int hashCode() { + return Objects.hash(winnerVariantName, verdictSummary, keyFindings, aiConfidenceLevel, recommendation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentVerdict {\n"); + sb.append(" winnerVariantName: ").append(toIndentedString(winnerVariantName)).append("\n"); + sb.append(" verdictSummary: ").append(toIndentedString(verdictSummary)).append("\n"); + sb.append(" keyFindings: ").append(toIndentedString(keyFindings)).append("\n"); + sb.append(" aiConfidenceLevel: ").append(toIndentedString(aiConfidenceLevel)).append("\n"); + sb.append(" recommendation: ").append(toIndentedString(recommendation)).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) { + if (o == null) { + return "null"; + } + return 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("winnerVariantName", "verdictSummary", "keyFindings", "aiConfidenceLevel", "recommendation")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("winnerVariantName", "verdictSummary", "keyFindings", "aiConfidenceLevel", "recommendation")); + } + + /** + * 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 ExperimentVerdict + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentVerdict.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 ExperimentVerdict is not found in the empty JSON string", ExperimentVerdict.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentVerdict.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ExperimentVerdict` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentVerdict.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("winnerVariantName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `winnerVariantName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("winnerVariantName").toString())); + } + if (!jsonObj.get("verdictSummary").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `verdictSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verdictSummary").toString())); + } + // ensure the required json array is present + if (jsonObj.get("keyFindings") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("keyFindings").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `keyFindings` to be an array in the JSON string but got `%s`", jsonObj.get("keyFindings").toString())); + } + if (!jsonObj.get("aiConfidenceLevel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `aiConfidenceLevel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("aiConfidenceLevel").toString())); + } + if (!jsonObj.get("recommendation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `recommendation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recommendation").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentVerdict.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentVerdict' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentVerdict.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentVerdict value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentVerdict read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentVerdict given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentVerdict + * @throws IOException if the JSON string is invalid with respect to ExperimentVerdict + */ + public static ExperimentVerdict fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentVerdict.class); + } + + /** + * Convert an instance of ExperimentVerdict to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentVerdictResponse.java b/src/main/java/one/talon/model/ExperimentVerdictResponse.java new file mode 100644 index 00000000..1f014e1a --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentVerdictResponse.java @@ -0,0 +1,240 @@ +/* + * 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.time.OffsetDateTime; +import java.util.Arrays; +import one.talon.model.ExperimentVerdict; +import com.google.gson.JsonElement; + +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; + +/** + * ExperimentVerdictResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ExperimentVerdictResponse { + public static final String SERIALIZED_NAME_VERDICT = "verdict"; + @SerializedName(SERIALIZED_NAME_VERDICT) + @javax.annotation.Nonnull + private ExperimentVerdict verdict; + + public static final String SERIALIZED_NAME_GENERATED = "generated"; + @SerializedName(SERIALIZED_NAME_GENERATED) + @javax.annotation.Nonnull + private OffsetDateTime generated; + + public ExperimentVerdictResponse() { + } + + public ExperimentVerdictResponse verdict(@javax.annotation.Nonnull ExperimentVerdict verdict) { + this.verdict = verdict; + return this; + } + + /** + * Get verdict + * @return verdict + */ + @javax.annotation.Nonnull + public ExperimentVerdict getVerdict() { + return verdict; + } + + public void setVerdict(@javax.annotation.Nonnull ExperimentVerdict verdict) { + this.verdict = verdict; + } + + + public ExperimentVerdictResponse generated(@javax.annotation.Nonnull OffsetDateTime generated) { + this.generated = generated; + return this; + } + + /** + * Timestamp of the moment when the verdict was generated. + * @return generated + */ + @javax.annotation.Nonnull + public OffsetDateTime getGenerated() { + return generated; + } + + public void setGenerated(@javax.annotation.Nonnull OffsetDateTime generated) { + this.generated = generated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentVerdictResponse experimentVerdictResponse = (ExperimentVerdictResponse) o; + return Objects.equals(this.verdict, experimentVerdictResponse.verdict) && + Objects.equals(this.generated, experimentVerdictResponse.generated); + } + + @Override + public int hashCode() { + return Objects.hash(verdict, generated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentVerdictResponse {\n"); + sb.append(" verdict: ").append(toIndentedString(verdict)).append("\n"); + sb.append(" generated: ").append(toIndentedString(generated)).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) { + if (o == null) { + return "null"; + } + return 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("verdict", "generated")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("verdict", "generated")); + } + + /** + * 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 ExperimentVerdictResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentVerdictResponse.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 ExperimentVerdictResponse is not found in the empty JSON string", ExperimentVerdictResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentVerdictResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ExperimentVerdictResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentVerdictResponse.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(); + // validate the required field `verdict` + ExperimentVerdict.validateJsonElement(jsonObj.get("verdict")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentVerdictResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentVerdictResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentVerdictResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentVerdictResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentVerdictResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentVerdictResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentVerdictResponse + * @throws IOException if the JSON string is invalid with respect to ExperimentVerdictResponse + */ + public static ExperimentVerdictResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentVerdictResponse.class); + } + + /** + * Convert an instance of ExperimentVerdictResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/IntegrationGetAllCampaigns200Response.java b/src/main/java/one/talon/model/IntegrationGetAllCampaigns200Response.java new file mode 100644 index 00000000..987da6dc --- /dev/null +++ b/src/main/java/one/talon/model/IntegrationGetAllCampaigns200Response.java @@ -0,0 +1,257 @@ +/* + * 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 one.talon.model.IntegrationCampaign; +import com.google.gson.JsonElement; + +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; + +/** + * IntegrationGetAllCampaigns200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class IntegrationGetAllCampaigns200Response { + public static final String SERIALIZED_NAME_HAS_MORE = "hasMore"; + @SerializedName(SERIALIZED_NAME_HAS_MORE) + @javax.annotation.Nonnull + private Boolean hasMore; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data = new ArrayList<>(); + + public IntegrationGetAllCampaigns200Response() { + } + + public IntegrationGetAllCampaigns200Response hasMore(@javax.annotation.Nonnull Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Get hasMore + * @return hasMore + */ + @javax.annotation.Nonnull + public Boolean getHasMore() { + return hasMore; + } + + public void setHasMore(@javax.annotation.Nonnull Boolean hasMore) { + this.hasMore = hasMore; + } + + + public IntegrationGetAllCampaigns200Response data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public IntegrationGetAllCampaigns200Response addDataItem(IntegrationCampaign dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationGetAllCampaigns200Response integrationGetAllCampaigns200Response = (IntegrationGetAllCampaigns200Response) o; + return Objects.equals(this.hasMore, integrationGetAllCampaigns200Response.hasMore) && + Objects.equals(this.data, integrationGetAllCampaigns200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(hasMore, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationGetAllCampaigns200Response {\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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) { + if (o == null) { + return "null"; + } + return 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("hasMore", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("hasMore", "data")); + } + + /** + * 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 IntegrationGetAllCampaigns200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IntegrationGetAllCampaigns200Response.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 IntegrationGetAllCampaigns200Response is not found in the empty JSON string", IntegrationGetAllCampaigns200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!IntegrationGetAllCampaigns200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `IntegrationGetAllCampaigns200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IntegrationGetAllCampaigns200Response.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("data") != null) { + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + IntegrationCampaign.validateJsonElement(jsonArraydata.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IntegrationGetAllCampaigns200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationGetAllCampaigns200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationGetAllCampaigns200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IntegrationGetAllCampaigns200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IntegrationGetAllCampaigns200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IntegrationGetAllCampaigns200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of IntegrationGetAllCampaigns200Response + * @throws IOException if the JSON string is invalid with respect to IntegrationGetAllCampaigns200Response + */ + public static IntegrationGetAllCampaigns200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationGetAllCampaigns200Response.class); + } + + /** + * Convert an instance of IntegrationGetAllCampaigns200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/LedgerInfo.java b/src/main/java/one/talon/model/LedgerInfo.java index 7e5e2ada..e02f11d3 100644 --- a/src/main/java/one/talon/model/LedgerInfo.java +++ b/src/main/java/one/talon/model/LedgerInfo.java @@ -103,6 +103,11 @@ public class LedgerInfo { @javax.annotation.Nullable private BigDecimal pointsToNextTier; + public static final String SERIALIZED_NAME_NEXT_TIER_NAME = "nextTierName"; + @SerializedName(SERIALIZED_NAME_NEXT_TIER_NAME) + @javax.annotation.Nullable + private String nextTierName; + public LedgerInfo() { } @@ -296,6 +301,25 @@ public void setPointsToNextTier(@javax.annotation.Nullable BigDecimal pointsToNe } + public LedgerInfo nextTierName(@javax.annotation.Nullable String nextTierName) { + this.nextTierName = nextTierName; + return this; + } + + /** + * The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. + * @return nextTierName + */ + @javax.annotation.Nullable + public String getNextTierName() { + return nextTierName; + } + + public void setNextTierName(@javax.annotation.Nullable String nextTierName) { + this.nextTierName = nextTierName; + } + + @Override public boolean equals(Object o) { @@ -315,12 +339,13 @@ public boolean equals(Object o) { Objects.equals(this.tentativePendingBalance, ledgerInfo.tentativePendingBalance) && Objects.equals(this.tentativeNegativeBalance, ledgerInfo.tentativeNegativeBalance) && Objects.equals(this.currentTier, ledgerInfo.currentTier) && - Objects.equals(this.pointsToNextTier, ledgerInfo.pointsToNextTier); + Objects.equals(this.pointsToNextTier, ledgerInfo.pointsToNextTier) && + Objects.equals(this.nextTierName, ledgerInfo.nextTierName); } @Override public int hashCode() { - return Objects.hash(currentBalance, pendingBalance, negativeBalance, expiredBalance, spentBalance, tentativeCurrentBalance, tentativePendingBalance, tentativeNegativeBalance, currentTier, pointsToNextTier); + return Objects.hash(currentBalance, pendingBalance, negativeBalance, expiredBalance, spentBalance, tentativeCurrentBalance, tentativePendingBalance, tentativeNegativeBalance, currentTier, pointsToNextTier, nextTierName); } @Override @@ -337,6 +362,7 @@ public String toString() { sb.append(" tentativeNegativeBalance: ").append(toIndentedString(tentativeNegativeBalance)).append("\n"); sb.append(" currentTier: ").append(toIndentedString(currentTier)).append("\n"); sb.append(" pointsToNextTier: ").append(toIndentedString(pointsToNextTier)).append("\n"); + sb.append(" nextTierName: ").append(toIndentedString(nextTierName)).append("\n"); sb.append("}"); return sb.toString(); } @@ -358,7 +384,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("currentBalance", "pendingBalance", "negativeBalance", "expiredBalance", "spentBalance", "tentativeCurrentBalance", "tentativePendingBalance", "tentativeNegativeBalance", "currentTier", "pointsToNextTier")); + openapiFields = new HashSet(Arrays.asList("currentBalance", "pendingBalance", "negativeBalance", "expiredBalance", "spentBalance", "tentativeCurrentBalance", "tentativePendingBalance", "tentativeNegativeBalance", "currentTier", "pointsToNextTier", "nextTierName")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("currentBalance", "pendingBalance", "expiredBalance", "spentBalance", "tentativeCurrentBalance")); @@ -396,6 +422,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("currentTier") != null && !jsonObj.get("currentTier").isJsonNull()) { Tier.validateJsonElement(jsonObj.get("currentTier")); } + if ((jsonObj.get("nextTierName") != null && !jsonObj.get("nextTierName").isJsonNull()) && !jsonObj.get("nextTierName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `nextTierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextTierName").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/one/talon/model/ListApplicationCartItemFilters200Response.java b/src/main/java/one/talon/model/ListApplicationCartItemFilters200Response.java new file mode 100644 index 00000000..2f96a50e --- /dev/null +++ b/src/main/java/one/talon/model/ListApplicationCartItemFilters200Response.java @@ -0,0 +1,257 @@ +/* + * 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 one.talon.model.ApplicationCIF; +import com.google.gson.JsonElement; + +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; + +/** + * ListApplicationCartItemFilters200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class ListApplicationCartItemFilters200Response { + public static final String SERIALIZED_NAME_HAS_MORE = "hasMore"; + @SerializedName(SERIALIZED_NAME_HAS_MORE) + @javax.annotation.Nullable + private Boolean hasMore; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data = new ArrayList<>(); + + public ListApplicationCartItemFilters200Response() { + } + + public ListApplicationCartItemFilters200Response hasMore(@javax.annotation.Nullable Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Get hasMore + * @return hasMore + */ + @javax.annotation.Nullable + public Boolean getHasMore() { + return hasMore; + } + + public void setHasMore(@javax.annotation.Nullable Boolean hasMore) { + this.hasMore = hasMore; + } + + + public ListApplicationCartItemFilters200Response data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ListApplicationCartItemFilters200Response addDataItem(ApplicationCIF dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListApplicationCartItemFilters200Response listApplicationCartItemFilters200Response = (ListApplicationCartItemFilters200Response) o; + return Objects.equals(this.hasMore, listApplicationCartItemFilters200Response.hasMore) && + Objects.equals(this.data, listApplicationCartItemFilters200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(hasMore, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListApplicationCartItemFilters200Response {\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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) { + if (o == null) { + return "null"; + } + return 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("hasMore", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("data")); + } + + /** + * 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 ListApplicationCartItemFilters200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListApplicationCartItemFilters200Response.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 ListApplicationCartItemFilters200Response is not found in the empty JSON string", ListApplicationCartItemFilters200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListApplicationCartItemFilters200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ListApplicationCartItemFilters200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ListApplicationCartItemFilters200Response.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("data") != null) { + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ApplicationCIF.validateJsonElement(jsonArraydata.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListApplicationCartItemFilters200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListApplicationCartItemFilters200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ListApplicationCartItemFilters200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ListApplicationCartItemFilters200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListApplicationCartItemFilters200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ListApplicationCartItemFilters200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListApplicationCartItemFilters200Response + * @throws IOException if the JSON string is invalid with respect to ListApplicationCartItemFilters200Response + */ + public static ListApplicationCartItemFilters200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListApplicationCartItemFilters200Response.class); + } + + /** + * Convert an instance of ListApplicationCartItemFilters200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/LoyaltyBalanceWithTier.java b/src/main/java/one/talon/model/LoyaltyBalanceWithTier.java index 2580ec32..872a71a0 100644 --- a/src/main/java/one/talon/model/LoyaltyBalanceWithTier.java +++ b/src/main/java/one/talon/model/LoyaltyBalanceWithTier.java @@ -260,7 +260,7 @@ public LoyaltyBalanceWithTier nextTierName(@javax.annotation.Nullable String nex } /** - * The name of the tier consecutive to the current tier. + * The name of the next higher tier level in the loyalty program. **Note**: - Returns `null` if the customer has reached the highest available tier. - Returns the lowest level tier name if the customer is not currently assigned to any tier. * @return nextTierName */ @javax.annotation.Nullable diff --git a/src/main/java/one/talon/model/MCPKey.java b/src/main/java/one/talon/model/MCPKey.java new file mode 100644 index 00000000..4ec30798 --- /dev/null +++ b/src/main/java/one/talon/model/MCPKey.java @@ -0,0 +1,396 @@ +/* + * 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.time.OffsetDateTime; +import java.util.Arrays; +import com.google.gson.JsonElement; + +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; + +/** + * MCPKey + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class MCPKey { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; + @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) + @javax.annotation.Nonnull + private OffsetDateTime expiryDate; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Long id; + + public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nonnull + private Long createdBy; + + public static final String SERIALIZED_NAME_ACCOUNT_I_D = "accountID"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_I_D) + @javax.annotation.Nonnull + private Long accountID; + + public static final String SERIALIZED_NAME_CREATED = "created"; + @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull + private OffsetDateTime created; + + public static final String SERIALIZED_NAME_DISABLED = "disabled"; + @SerializedName(SERIALIZED_NAME_DISABLED) + @javax.annotation.Nullable + private Boolean disabled; + + public static final String SERIALIZED_NAME_LAST_USED = "lastUsed"; + @SerializedName(SERIALIZED_NAME_LAST_USED) + @javax.annotation.Nullable + private OffsetDateTime lastUsed; + + public MCPKey() { + } + + public MCPKey name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name for the MCP key. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public MCPKey expiryDate(@javax.annotation.Nonnull OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * The date the MCP key expires. + * @return expiryDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(@javax.annotation.Nonnull OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + } + + + public MCPKey id(@javax.annotation.Nonnull Long id) { + this.id = id; + return this; + } + + /** + * ID of the MCP key. + * @return id + */ + @javax.annotation.Nonnull + public Long getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Long id) { + this.id = id; + } + + + public MCPKey createdBy(@javax.annotation.Nonnull Long createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * ID of the user who created it. + * @return createdBy + */ + @javax.annotation.Nonnull + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nonnull Long createdBy) { + this.createdBy = createdBy; + } + + + public MCPKey accountID(@javax.annotation.Nonnull Long accountID) { + this.accountID = accountID; + return this; + } + + /** + * ID of account the key is used for. + * @return accountID + */ + @javax.annotation.Nonnull + public Long getAccountID() { + return accountID; + } + + public void setAccountID(@javax.annotation.Nonnull Long accountID) { + this.accountID = accountID; + } + + + public MCPKey created(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * The date the MCP key was created. + * @return created + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + } + + + public MCPKey disabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted. + * @return disabled + */ + @javax.annotation.Nullable + public Boolean getDisabled() { + return disabled; + } + + public void setDisabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + } + + + public MCPKey lastUsed(@javax.annotation.Nullable OffsetDateTime lastUsed) { + this.lastUsed = lastUsed; + return this; + } + + /** + * The last time the MCP key was used. + * @return lastUsed + */ + @javax.annotation.Nullable + public OffsetDateTime getLastUsed() { + return lastUsed; + } + + public void setLastUsed(@javax.annotation.Nullable OffsetDateTime lastUsed) { + this.lastUsed = lastUsed; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MCPKey mcPKey = (MCPKey) o; + return Objects.equals(this.name, mcPKey.name) && + Objects.equals(this.expiryDate, mcPKey.expiryDate) && + Objects.equals(this.id, mcPKey.id) && + Objects.equals(this.createdBy, mcPKey.createdBy) && + Objects.equals(this.accountID, mcPKey.accountID) && + Objects.equals(this.created, mcPKey.created) && + Objects.equals(this.disabled, mcPKey.disabled) && + Objects.equals(this.lastUsed, mcPKey.lastUsed); + } + + @Override + public int hashCode() { + return Objects.hash(name, expiryDate, id, createdBy, accountID, created, disabled, lastUsed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MCPKey {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" accountID: ").append(toIndentedString(accountID)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append(" lastUsed: ").append(toIndentedString(lastUsed)).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) { + if (o == null) { + return "null"; + } + return 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("name", "expiryDate", "id", "createdBy", "accountID", "created", "disabled", "lastUsed")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name", "expiryDate", "id", "createdBy", "accountID", "created")); + } + + /** + * 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 MCPKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!MCPKey.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 MCPKey is not found in the empty JSON string", MCPKey.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MCPKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `MCPKey` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MCPKey.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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MCPKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MCPKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MCPKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MCPKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MCPKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MCPKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of MCPKey + * @throws IOException if the JSON string is invalid with respect to MCPKey + */ + public static MCPKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MCPKey.class); + } + + /** + * Convert an instance of MCPKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/NewMCPKey.java b/src/main/java/one/talon/model/NewMCPKey.java new file mode 100644 index 00000000..e8f9852d --- /dev/null +++ b/src/main/java/one/talon/model/NewMCPKey.java @@ -0,0 +1,425 @@ +/* + * 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.time.OffsetDateTime; +import java.util.Arrays; +import com.google.gson.JsonElement; + +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; + +/** + * NewMCPKey + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class NewMCPKey { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_EXPIRY_DATE = "expiryDate"; + @SerializedName(SERIALIZED_NAME_EXPIRY_DATE) + @javax.annotation.Nonnull + private OffsetDateTime expiryDate; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Long id; + + public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + @javax.annotation.Nonnull + private Long createdBy; + + public static final String SERIALIZED_NAME_ACCOUNT_I_D = "accountID"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_I_D) + @javax.annotation.Nonnull + private Long accountID; + + public static final String SERIALIZED_NAME_CREATED = "created"; + @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull + private OffsetDateTime created; + + public static final String SERIALIZED_NAME_DISABLED = "disabled"; + @SerializedName(SERIALIZED_NAME_DISABLED) + @javax.annotation.Nullable + private Boolean disabled; + + public static final String SERIALIZED_NAME_LAST_USED = "lastUsed"; + @SerializedName(SERIALIZED_NAME_LAST_USED) + @javax.annotation.Nullable + private OffsetDateTime lastUsed; + + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public NewMCPKey() { + } + + public NewMCPKey name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name for the MCP key. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public NewMCPKey expiryDate(@javax.annotation.Nonnull OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * The date the MCP key expires. + * @return expiryDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(@javax.annotation.Nonnull OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + } + + + public NewMCPKey id(@javax.annotation.Nonnull Long id) { + this.id = id; + return this; + } + + /** + * ID of the MCP key. + * @return id + */ + @javax.annotation.Nonnull + public Long getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Long id) { + this.id = id; + } + + + public NewMCPKey createdBy(@javax.annotation.Nonnull Long createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * ID of the user who created it. + * @return createdBy + */ + @javax.annotation.Nonnull + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nonnull Long createdBy) { + this.createdBy = createdBy; + } + + + public NewMCPKey accountID(@javax.annotation.Nonnull Long accountID) { + this.accountID = accountID; + return this; + } + + /** + * ID of account the key is used for. + * @return accountID + */ + @javax.annotation.Nonnull + public Long getAccountID() { + return accountID; + } + + public void setAccountID(@javax.annotation.Nonnull Long accountID) { + this.accountID = accountID; + } + + + public NewMCPKey created(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * The date the MCP key was created. + * @return created + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + } + + + public NewMCPKey disabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * The MCP key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted. + * @return disabled + */ + @javax.annotation.Nullable + public Boolean getDisabled() { + return disabled; + } + + public void setDisabled(@javax.annotation.Nullable Boolean disabled) { + this.disabled = disabled; + } + + + public NewMCPKey lastUsed(@javax.annotation.Nullable OffsetDateTime lastUsed) { + this.lastUsed = lastUsed; + return this; + } + + /** + * The last time the MCP key was used. + * @return lastUsed + */ + @javax.annotation.Nullable + public OffsetDateTime getLastUsed() { + return lastUsed; + } + + public void setLastUsed(@javax.annotation.Nullable OffsetDateTime lastUsed) { + this.lastUsed = lastUsed; + } + + + public NewMCPKey key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * The generated MCP key. Only returned once on creation. + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewMCPKey newMCPKey = (NewMCPKey) o; + return Objects.equals(this.name, newMCPKey.name) && + Objects.equals(this.expiryDate, newMCPKey.expiryDate) && + Objects.equals(this.id, newMCPKey.id) && + Objects.equals(this.createdBy, newMCPKey.createdBy) && + Objects.equals(this.accountID, newMCPKey.accountID) && + Objects.equals(this.created, newMCPKey.created) && + Objects.equals(this.disabled, newMCPKey.disabled) && + Objects.equals(this.lastUsed, newMCPKey.lastUsed) && + Objects.equals(this.key, newMCPKey.key); + } + + @Override + public int hashCode() { + return Objects.hash(name, expiryDate, id, createdBy, accountID, created, disabled, lastUsed, key); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewMCPKey {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" accountID: ").append(toIndentedString(accountID)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); + sb.append(" lastUsed: ").append(toIndentedString(lastUsed)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).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) { + if (o == null) { + return "null"; + } + return 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("name", "expiryDate", "id", "createdBy", "accountID", "created", "disabled", "lastUsed", "key")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name", "expiryDate", "id", "createdBy", "accountID", "created", "key")); + } + + /** + * 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 NewMCPKey + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NewMCPKey.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 NewMCPKey is not found in the empty JSON string", NewMCPKey.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NewMCPKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NewMCPKey` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NewMCPKey.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("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NewMCPKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NewMCPKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NewMCPKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NewMCPKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NewMCPKey read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NewMCPKey given an JSON string + * + * @param jsonString JSON string + * @return An instance of NewMCPKey + * @throws IOException if the JSON string is invalid with respect to NewMCPKey + */ + public static NewMCPKey fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NewMCPKey.class); + } + + /** + * Convert an instance of NewMCPKey to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/NewReward.java b/src/main/java/one/talon/model/NewReward.java new file mode 100644 index 00000000..8aa2d038 --- /dev/null +++ b/src/main/java/one/talon/model/NewReward.java @@ -0,0 +1,339 @@ +/* + * 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.JsonElement; + +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; + +/** + * NewReward + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class NewReward { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_API_NAME = "apiName"; + @SerializedName(SERIALIZED_NAME_API_NAME) + @javax.annotation.Nonnull + private String apiName; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_APPLICATION_IDS = "applicationIds"; + @SerializedName(SERIALIZED_NAME_APPLICATION_IDS) + @javax.annotation.Nonnull + private List applicationIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SANDBOX = "sandbox"; + @SerializedName(SERIALIZED_NAME_SANDBOX) + @javax.annotation.Nonnull + private Boolean sandbox; + + public NewReward() { + } + + public NewReward name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the reward. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public NewReward apiName(@javax.annotation.Nonnull String apiName) { + this.apiName = apiName; + return this; + } + + /** + * A unique identifier used to reference the reward in API integrations. + * @return apiName + */ + @javax.annotation.Nonnull + public String getApiName() { + return apiName; + } + + public void setApiName(@javax.annotation.Nonnull String apiName) { + this.apiName = apiName; + } + + + public NewReward description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * A description of the reward. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public NewReward applicationIds(@javax.annotation.Nonnull List applicationIds) { + this.applicationIds = applicationIds; + return this; + } + + public NewReward addApplicationIdsItem(Long applicationIdsItem) { + if (this.applicationIds == null) { + this.applicationIds = new ArrayList<>(); + } + this.applicationIds.add(applicationIdsItem); + return this; + } + + /** + * The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. + * @return applicationIds + */ + @javax.annotation.Nonnull + public List getApplicationIds() { + return applicationIds; + } + + public void setApplicationIds(@javax.annotation.Nonnull List applicationIds) { + this.applicationIds = applicationIds; + } + + + public NewReward sandbox(@javax.annotation.Nonnull Boolean sandbox) { + this.sandbox = sandbox; + return this; + } + + /** + * Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type. + * @return sandbox + */ + @javax.annotation.Nonnull + public Boolean getSandbox() { + return sandbox; + } + + public void setSandbox(@javax.annotation.Nonnull Boolean sandbox) { + this.sandbox = sandbox; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewReward newReward = (NewReward) o; + return Objects.equals(this.name, newReward.name) && + Objects.equals(this.apiName, newReward.apiName) && + Objects.equals(this.description, newReward.description) && + Objects.equals(this.applicationIds, newReward.applicationIds) && + Objects.equals(this.sandbox, newReward.sandbox); + } + + @Override + public int hashCode() { + return Objects.hash(name, apiName, description, applicationIds, sandbox); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewReward {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" apiName: ").append(toIndentedString(apiName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" applicationIds: ").append(toIndentedString(applicationIds)).append("\n"); + sb.append(" sandbox: ").append(toIndentedString(sandbox)).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) { + if (o == null) { + return "null"; + } + return 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("name", "apiName", "description", "applicationIds", "sandbox")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name", "apiName", "applicationIds", "sandbox")); + } + + /** + * 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 NewReward + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NewReward.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 NewReward is not found in the empty JSON string", NewReward.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NewReward.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `NewReward` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NewReward.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("apiName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `apiName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiName").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); + } + // ensure the required json array is present + if (jsonObj.get("applicationIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("applicationIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationIds` to be an array in the JSON string but got `%s`", jsonObj.get("applicationIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NewReward.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NewReward' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NewReward.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NewReward value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NewReward read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NewReward given an JSON string + * + * @param jsonString JSON string + * @return An instance of NewReward + * @throws IOException if the JSON string is invalid with respect to NewReward + */ + public static NewReward fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NewReward.class); + } + + /** + * Convert an instance of NewReward to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/Reward.java b/src/main/java/one/talon/model/Reward.java new file mode 100644 index 00000000..dbed541e --- /dev/null +++ b/src/main/java/one/talon/model/Reward.java @@ -0,0 +1,501 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.google.gson.JsonElement; + +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; + +/** + * Reward + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0") +public class Reward { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Long id; + + public static final String SERIALIZED_NAME_CREATED = "created"; + @SerializedName(SERIALIZED_NAME_CREATED) + @javax.annotation.Nonnull + private OffsetDateTime created; + + public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nonnull + private Long accountId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_API_NAME = "apiName"; + @SerializedName(SERIALIZED_NAME_API_NAME) + @javax.annotation.Nonnull + private String apiName; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_APPLICATION_IDS = "applicationIds"; + @SerializedName(SERIALIZED_NAME_APPLICATION_IDS) + @javax.annotation.Nonnull + private List applicationIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SANDBOX = "sandbox"; + @SerializedName(SERIALIZED_NAME_SANDBOX) + @javax.annotation.Nonnull + private Boolean sandbox; + + /** + * The status of the reward. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("active"), + + INACTIVE("inactive"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.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 StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private StatusEnum status; + + public Reward() { + } + + public Reward id(@javax.annotation.Nonnull Long id) { + this.id = id; + return this; + } + + /** + * The internal ID of this entity. + * @return id + */ + @javax.annotation.Nonnull + public Long getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Long id) { + this.id = id; + } + + + public Reward created(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * The time this entity was created. + * @return created + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + } + + + public Reward accountId(@javax.annotation.Nonnull Long accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the account that owns this entity. + * @return accountId + */ + @javax.annotation.Nonnull + public Long getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nonnull Long accountId) { + this.accountId = accountId; + } + + + public Reward name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the reward. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Reward apiName(@javax.annotation.Nonnull String apiName) { + this.apiName = apiName; + return this; + } + + /** + * A unique identifier used to reference the reward in API integrations. + * @return apiName + */ + @javax.annotation.Nonnull + public String getApiName() { + return apiName; + } + + public void setApiName(@javax.annotation.Nonnull String apiName) { + this.apiName = apiName; + } + + + public Reward description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * A description of the reward. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public Reward applicationIds(@javax.annotation.Nonnull List applicationIds) { + this.applicationIds = applicationIds; + return this; + } + + public Reward addApplicationIdsItem(Long applicationIdsItem) { + if (this.applicationIds == null) { + this.applicationIds = new ArrayList<>(); + } + this.applicationIds.add(applicationIdsItem); + return this; + } + + /** + * The IDs of the Applications this reward is connected to. **Note**: Currently, a reward can only be connected to one Application. + * @return applicationIds + */ + @javax.annotation.Nonnull + public List getApplicationIds() { + return applicationIds; + } + + public void setApplicationIds(@javax.annotation.Nonnull List applicationIds) { + this.applicationIds = applicationIds; + } + + + public Reward sandbox(@javax.annotation.Nonnull Boolean sandbox) { + this.sandbox = sandbox; + return this; + } + + /** + * Indicates if this is a live or sandbox reward. Rewards of a given type can only be connected to Applications of the same type. + * @return sandbox + */ + @javax.annotation.Nonnull + public Boolean getSandbox() { + return sandbox; + } + + public void setSandbox(@javax.annotation.Nonnull Boolean sandbox) { + this.sandbox = sandbox; + } + + + public Reward status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the reward. + * @return status + */ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Reward reward = (Reward) o; + return Objects.equals(this.id, reward.id) && + Objects.equals(this.created, reward.created) && + Objects.equals(this.accountId, reward.accountId) && + Objects.equals(this.name, reward.name) && + Objects.equals(this.apiName, reward.apiName) && + Objects.equals(this.description, reward.description) && + Objects.equals(this.applicationIds, reward.applicationIds) && + Objects.equals(this.sandbox, reward.sandbox) && + Objects.equals(this.status, reward.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, created, accountId, name, apiName, description, applicationIds, sandbox, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Reward {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" apiName: ").append(toIndentedString(apiName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" applicationIds: ").append(toIndentedString(applicationIds)).append("\n"); + sb.append(" sandbox: ").append(toIndentedString(sandbox)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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) { + if (o == null) { + return "null"; + } + return 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", "created", "accountId", "name", "apiName", "description", "applicationIds", "sandbox", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "created", "accountId", "name", "apiName", "applicationIds", "sandbox", "status")); + } + + /** + * 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 Reward + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Reward.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 Reward is not found in the empty JSON string", Reward.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Reward.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Reward` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Reward.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("apiName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `apiName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("apiName").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !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())); + } + // ensure the required json array is present + if (jsonObj.get("applicationIds") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("applicationIds").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `applicationIds` to be an array in the JSON string but got `%s`", jsonObj.get("applicationIds").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Reward.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Reward' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Reward.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Reward value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Reward read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Reward given an JSON string + * + * @param jsonString JSON string + * @return An instance of Reward + * @throws IOException if the JSON string is invalid with respect to Reward + */ + public static Reward fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Reward.class); + } + + /** + * Convert an instance of Reward to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/RuleMetadata.java b/src/main/java/one/talon/model/RuleMetadata.java index 4da6d9a1..69cb29c2 100644 --- a/src/main/java/one/talon/model/RuleMetadata.java +++ b/src/main/java/one/talon/model/RuleMetadata.java @@ -99,7 +99,7 @@ public RuleMetadata displayName(@javax.annotation.Nullable String displayName) { } /** - * A customer-facing name used to identify the reward defined within the rule. + * A customer-facing name for the rule. * @return displayName */ @javax.annotation.Nullable @@ -118,7 +118,7 @@ public RuleMetadata displayDescription(@javax.annotation.Nullable String display } /** - * A customer-facing description of the reward defined in the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. + * A customer-facing description that explains the details of the rule. For example, this property can contain details about eligibility requirements, reward timelines, or terms and conditions. * @return displayDescription */ @javax.annotation.Nullable @@ -137,7 +137,7 @@ public RuleMetadata relatedData(@javax.annotation.Nullable String relatedData) { } /** - * Data related to the reward, such as a vendor name, an image URL, or a content management system (CMS) ID. + * Any additional data associated with the rule, such as an image URL, vendor name, or a content management system (CMS) ID. * @return relatedData */ @javax.annotation.Nullable diff --git a/src/main/java/one/talon/model/SetDiscountPerItemEffectProps.java b/src/main/java/one/talon/model/SetDiscountPerItemEffectProps.java index 3063433f..be05eb39 100644 --- a/src/main/java/one/talon/model/SetDiscountPerItemEffectProps.java +++ b/src/main/java/one/talon/model/SetDiscountPerItemEffectProps.java @@ -112,6 +112,11 @@ public class SetDiscountPerItemEffectProps { @javax.annotation.Nullable private BigDecimal targetedItemSubPosition; + public static final String SERIALIZED_NAME_EXCLUDED_FROM_PRICE_HISTORY = "excludedFromPriceHistory"; + @SerializedName(SERIALIZED_NAME_EXCLUDED_FROM_PRICE_HISTORY) + @javax.annotation.Nullable + private Boolean excludedFromPriceHistory; + public SetDiscountPerItemEffectProps() { } @@ -343,6 +348,25 @@ public void setTargetedItemSubPosition(@javax.annotation.Nullable BigDecimal tar } + public SetDiscountPerItemEffectProps excludedFromPriceHistory(@javax.annotation.Nullable Boolean excludedFromPriceHistory) { + this.excludedFromPriceHistory = excludedFromPriceHistory; + return this; + } + + /** + * When set to `true`, the applied discount is excluded from the item's price history. + * @return excludedFromPriceHistory + */ + @javax.annotation.Nullable + public Boolean getExcludedFromPriceHistory() { + return excludedFromPriceHistory; + } + + public void setExcludedFromPriceHistory(@javax.annotation.Nullable Boolean excludedFromPriceHistory) { + this.excludedFromPriceHistory = excludedFromPriceHistory; + } + + @Override public boolean equals(Object o) { @@ -364,12 +388,13 @@ public boolean equals(Object o) { Objects.equals(this.bundleIndex, setDiscountPerItemEffectProps.bundleIndex) && Objects.equals(this.bundleName, setDiscountPerItemEffectProps.bundleName) && Objects.equals(this.targetedItemPosition, setDiscountPerItemEffectProps.targetedItemPosition) && - Objects.equals(this.targetedItemSubPosition, setDiscountPerItemEffectProps.targetedItemSubPosition); + Objects.equals(this.targetedItemSubPosition, setDiscountPerItemEffectProps.targetedItemSubPosition) && + Objects.equals(this.excludedFromPriceHistory, setDiscountPerItemEffectProps.excludedFromPriceHistory); } @Override public int hashCode() { - return Objects.hash(name, value, position, subPosition, desiredValue, scope, totalDiscount, desiredTotalDiscount, bundleIndex, bundleName, targetedItemPosition, targetedItemSubPosition); + return Objects.hash(name, value, position, subPosition, desiredValue, scope, totalDiscount, desiredTotalDiscount, bundleIndex, bundleName, targetedItemPosition, targetedItemSubPosition, excludedFromPriceHistory); } @Override @@ -388,6 +413,7 @@ public String toString() { sb.append(" bundleName: ").append(toIndentedString(bundleName)).append("\n"); sb.append(" targetedItemPosition: ").append(toIndentedString(targetedItemPosition)).append("\n"); sb.append(" targetedItemSubPosition: ").append(toIndentedString(targetedItemSubPosition)).append("\n"); + sb.append(" excludedFromPriceHistory: ").append(toIndentedString(excludedFromPriceHistory)).append("\n"); sb.append("}"); return sb.toString(); } @@ -409,7 +435,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "value", "position", "subPosition", "desiredValue", "scope", "totalDiscount", "desiredTotalDiscount", "bundleIndex", "bundleName", "targetedItemPosition", "targetedItemSubPosition")); + openapiFields = new HashSet(Arrays.asList("name", "value", "position", "subPosition", "desiredValue", "scope", "totalDiscount", "desiredTotalDiscount", "bundleIndex", "bundleName", "targetedItemPosition", "targetedItemSubPosition", "excludedFromPriceHistory")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name", "value", "position")); diff --git a/src/main/java/one/talon/model/StrikethroughSetDiscountPerItemEffectProps.java b/src/main/java/one/talon/model/StrikethroughSetDiscountPerItemEffectProps.java index 49741c37..30792fb7 100644 --- a/src/main/java/one/talon/model/StrikethroughSetDiscountPerItemEffectProps.java +++ b/src/main/java/one/talon/model/StrikethroughSetDiscountPerItemEffectProps.java @@ -61,10 +61,10 @@ public class StrikethroughSetDiscountPerItemEffectProps { @javax.annotation.Nullable private Object value = null; - public static final String SERIALIZED_NAME_EXCLUDE_FROM_BEST_PRIOR_PRICE_HISTORY = "excludeFromBestPriorPriceHistory"; - @SerializedName(SERIALIZED_NAME_EXCLUDE_FROM_BEST_PRIOR_PRICE_HISTORY) + public static final String SERIALIZED_NAME_EXCLUDED_FROM_PRICE_HISTORY = "excludedFromPriceHistory"; + @SerializedName(SERIALIZED_NAME_EXCLUDED_FROM_PRICE_HISTORY) @javax.annotation.Nullable - private Boolean excludeFromBestPriorPriceHistory; + private Boolean excludedFromPriceHistory; public StrikethroughSetDiscountPerItemEffectProps() { } @@ -107,22 +107,22 @@ public void setValue(@javax.annotation.Nullable Object value) { } - public StrikethroughSetDiscountPerItemEffectProps excludeFromBestPriorPriceHistory(@javax.annotation.Nullable Boolean excludeFromBestPriorPriceHistory) { - this.excludeFromBestPriorPriceHistory = excludeFromBestPriorPriceHistory; + public StrikethroughSetDiscountPerItemEffectProps excludedFromPriceHistory(@javax.annotation.Nullable Boolean excludedFromPriceHistory) { + this.excludedFromPriceHistory = excludedFromPriceHistory; return this; } /** - * Get excludeFromBestPriorPriceHistory - * @return excludeFromBestPriorPriceHistory + * Get excludedFromPriceHistory + * @return excludedFromPriceHistory */ @javax.annotation.Nullable - public Boolean getExcludeFromBestPriorPriceHistory() { - return excludeFromBestPriorPriceHistory; + public Boolean getExcludedFromPriceHistory() { + return excludedFromPriceHistory; } - public void setExcludeFromBestPriorPriceHistory(@javax.annotation.Nullable Boolean excludeFromBestPriorPriceHistory) { - this.excludeFromBestPriorPriceHistory = excludeFromBestPriorPriceHistory; + public void setExcludedFromPriceHistory(@javax.annotation.Nullable Boolean excludedFromPriceHistory) { + this.excludedFromPriceHistory = excludedFromPriceHistory; } @@ -138,12 +138,12 @@ public boolean equals(Object o) { StrikethroughSetDiscountPerItemEffectProps strikethroughSetDiscountPerItemEffectProps = (StrikethroughSetDiscountPerItemEffectProps) o; return Objects.equals(this.name, strikethroughSetDiscountPerItemEffectProps.name) && Objects.equals(this.value, strikethroughSetDiscountPerItemEffectProps.value) && - Objects.equals(this.excludeFromBestPriorPriceHistory, strikethroughSetDiscountPerItemEffectProps.excludeFromBestPriorPriceHistory); + Objects.equals(this.excludedFromPriceHistory, strikethroughSetDiscountPerItemEffectProps.excludedFromPriceHistory); } @Override public int hashCode() { - return Objects.hash(name, value, excludeFromBestPriorPriceHistory); + return Objects.hash(name, value, excludedFromPriceHistory); } @Override @@ -152,7 +152,7 @@ public String toString() { sb.append("class StrikethroughSetDiscountPerItemEffectProps {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" excludeFromBestPriorPriceHistory: ").append(toIndentedString(excludeFromBestPriorPriceHistory)).append("\n"); + sb.append(" excludedFromPriceHistory: ").append(toIndentedString(excludedFromPriceHistory)).append("\n"); sb.append("}"); return sb.toString(); } @@ -174,7 +174,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "value", "excludeFromBestPriorPriceHistory")); + openapiFields = new HashSet(Arrays.asList("name", "value", "excludedFromPriceHistory")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name", "value")); diff --git a/src/test/java/one/talon/api/IntegrationApiTest.java b/src/test/java/one/talon/api/IntegrationApiTest.java index 228bfbb0..e4a84f68 100644 --- a/src/test/java/one/talon/api/IntegrationApiTest.java +++ b/src/test/java/one/talon/api/IntegrationApiTest.java @@ -42,6 +42,7 @@ import one.talon.model.IntegrationCustomerSessionResponse; import one.talon.model.IntegrationEventV2Request; import one.talon.model.IntegrationEventV2Response; +import one.talon.model.IntegrationGetAllCampaigns200Response; import one.talon.model.IntegrationRequest; import one.talon.model.IntegrationStateV2; import one.talon.model.LoyaltyBalancesWithTiers; @@ -467,6 +468,26 @@ public void getReservedCustomersTest() throws ApiException { // TODO: test validations } + /** + * List all running campaigns + * + * Retrieve all running campaigns for the specified Application. You can filter the results by providing specific campaign IDs or a range of start and end dates. + * + * @throws ApiException if the Api call fails + */ + @Test + public void integrationGetAllCampaignsTest() throws ApiException { + Long pageSize = null; + Long skip = null; + List campaignIds = null; + OffsetDateTime startAfter = null; + OffsetDateTime startBefore = null; + OffsetDateTime endAfter = null; + OffsetDateTime endBefore = null; + IntegrationGetAllCampaigns200Response response = api.integrationGetAllCampaigns(pageSize, skip, campaignIds, startAfter, startBefore, endAfter, endBefore); + // TODO: test validations + } + /** * Link customer profile to card * @@ -509,7 +530,8 @@ public void returnCartItemsTest() throws ApiException { String customerSessionId = null; ReturnIntegrationRequest returnIntegrationRequest = null; Boolean dry = null; - IntegrationStateV2 response = api.returnCartItems(customerSessionId, returnIntegrationRequest, dry); + Boolean runRuleEngine = null; + IntegrationStateV2 response = api.returnCartItems(customerSessionId, returnIntegrationRequest, dry, runRuleEngine); // TODO: test validations } diff --git a/src/test/java/one/talon/api/ManagementApiTest.java b/src/test/java/one/talon/api/ManagementApiTest.java index df1529b2..c646df05 100644 --- a/src/test/java/one/talon/api/ManagementApiTest.java +++ b/src/test/java/one/talon/api/ManagementApiTest.java @@ -22,6 +22,7 @@ import one.talon.model.AddLoyaltyPoints; import one.talon.model.Application; import one.talon.model.ApplicationApiHealth; +import one.talon.model.ApplicationCIFExpression; import one.talon.model.ApplicationCustomer; import one.talon.model.ApplicationSession; import one.talon.model.AsyncCouponCreationResponse; @@ -88,6 +89,7 @@ import one.talon.model.ListAccountCollections200Response; import one.talon.model.ListAchievements200Response; import one.talon.model.ListAllRolesV2200Response; +import one.talon.model.ListApplicationCartItemFilters200Response; import one.talon.model.ListCampaignStoreBudgetLimits200Response; import one.talon.model.ListCatalogItems200Response; import one.talon.model.ListExperiments200Response; @@ -372,11 +374,11 @@ public void createCouponsTest() throws ApiException { * @throws ApiException if the Api call fails */ @Test - public void createCouponsAsyncTest() throws ApiException { + public void createCouponsAsynchronouslyTest() throws ApiException { Long applicationId = null; Long campaignId = null; NewCouponCreationJob newCouponCreationJob = null; - AsyncCouponCreationResponse response = api.createCouponsAsync(applicationId, campaignId, newCouponCreationJob); + AsyncCouponCreationResponse response = api.createCouponsAsynchronously(applicationId, campaignId, newCouponCreationJob); // TODO: test validations } @@ -831,6 +833,22 @@ public void exportCampaignStoresTest() throws ApiException { // TODO: test validations } + /** + * Export campaign value map + * + * Download a CSV file containing all the value map items in a campaign. If there are multiple versions of the value map, only the items of the current version are exported. > [!tip] If the exported CSV file is too large to view, you can > [split it into multiple files](https://www.google.com/search?q=split+CSV+into+multiple+files). The generated file can contain the following columns: - `identifier`: The value of the attribute in the targeted item, for example, an item's SKU. - `value`: The value that is associated with the identifier, for example, the item's price. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportCampaignValueMapTest() throws ApiException { + Long applicationId = null; + Long campaignId = null; + Long valueMapId = null; + String response = api.exportCampaignValueMap(applicationId, campaignId, valueMapId); + // TODO: test validations + } + /** * Export campaign-level collection's items * @@ -1208,7 +1226,7 @@ public void getAdditionalCostsTest() throws ApiException { /** * Get Application * - * Get the application specified by the ID. + * Get the Application specified by the ID. * * @throws ApiException if the Api call fails */ @@ -1233,6 +1251,22 @@ public void getApplicationApiHealthTest() throws ApiException { // TODO: test validations } + /** + * Get Application cart item filter expression + * + * Get an Application cart item filter expression for a specific Application. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getApplicationCartItemFilterExpressionTest() throws ApiException { + Long applicationId = null; + Long cartItemFilterId = null; + Long expressionId = null; + ApplicationCIFExpression response = api.getApplicationCartItemFilterExpression(applicationId, cartItemFilterId, expressionId); + // TODO: test validations + } + /** * Get application's customer * @@ -1393,7 +1427,7 @@ public void getApplicationSessionsTest() throws ApiException { /** * List Applications * - * List all applications in the current account. + * List all the Applications in the current account. * * @throws ApiException if the Api call fails */ @@ -2516,6 +2550,23 @@ public void listAllRolesV2Test() throws ApiException { // TODO: test validations } + /** + * List Application cart item filters + * + * Return all the Application cart item filters for a specific Application. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listApplicationCartItemFiltersTest() throws ApiException { + Long applicationId = null; + Long pageSize = null; + Long skip = null; + String title = null; + ListApplicationCartItemFilters200Response response = api.listApplicationCartItemFilters(applicationId, pageSize, skip, title); + // TODO: test validations + } + /** * List campaign store budget limits * diff --git a/src/test/java/one/talon/model/BestPriorPriceRequestTest.java b/src/test/java/one/talon/model/BestPriorPriceRequestTest.java index 1a10f69e..047c3116 100644 --- a/src/test/java/one/talon/model/BestPriorPriceRequestTest.java +++ b/src/test/java/one/talon/model/BestPriorPriceRequestTest.java @@ -65,14 +65,6 @@ public void timeframeTest() { // TODO: test timeframe } - /** - * Test the property 'strictEndDate' - */ - @Test - public void strictEndDateTest() { - // TODO: test strictEndDate - } - /** * Test the property 'timeframeEndDateType' */ diff --git a/src/test/java/one/talon/model/CreateMCPKeyTest.java b/src/test/java/one/talon/model/CreateMCPKeyTest.java new file mode 100644 index 00000000..17b08e58 --- /dev/null +++ b/src/test/java/one/talon/model/CreateMCPKeyTest.java @@ -0,0 +1,57 @@ +/* + * 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 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.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for CreateMCPKey + */ +public class CreateMCPKeyTest { + private final CreateMCPKey model = new CreateMCPKey(); + + /** + * Model tests for CreateMCPKey + */ + @Test + public void testCreateMCPKey() { + // TODO: test CreateMCPKey + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + +} diff --git a/src/test/java/one/talon/model/ExperimentSegmentInsightMetricTest.java b/src/test/java/one/talon/model/ExperimentSegmentInsightMetricTest.java new file mode 100644 index 00000000..67c10b62 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentSegmentInsightMetricTest.java @@ -0,0 +1,59 @@ +/* + * 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 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 one.talon.model.ExperimentSegmentInsight; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentSegmentInsightMetric + */ +public class ExperimentSegmentInsightMetricTest { + private final ExperimentSegmentInsightMetric model = new ExperimentSegmentInsightMetric(); + + /** + * Model tests for ExperimentSegmentInsightMetric + */ + @Test + public void testExperimentSegmentInsightMetric() { + // TODO: test ExperimentSegmentInsightMetric + } + + /** + * Test the property 'metric' + */ + @Test + public void metricTest() { + // TODO: test metric + } + + /** + * Test the property 'segments' + */ + @Test + public void segmentsTest() { + // TODO: test segments + } + +} diff --git a/src/test/java/one/talon/model/ExperimentSegmentInsightTest.java b/src/test/java/one/talon/model/ExperimentSegmentInsightTest.java new file mode 100644 index 00000000..44a7d660 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentSegmentInsightTest.java @@ -0,0 +1,83 @@ +/* + * 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 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 one.talon.model.ExperimentSegmentInsightVariant; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentSegmentInsight + */ +public class ExperimentSegmentInsightTest { + private final ExperimentSegmentInsight model = new ExperimentSegmentInsight(); + + /** + * Model tests for ExperimentSegmentInsight + */ + @Test + public void testExperimentSegmentInsight() { + // TODO: test ExperimentSegmentInsight + } + + /** + * Test the property 'dimension' + */ + @Test + public void dimensionTest() { + // TODO: test dimension + } + + /** + * Test the property 'bucket' + */ + @Test + public void bucketTest() { + // TODO: test bucket + } + + /** + * Test the property 'confidence' + */ + @Test + public void confidenceTest() { + // TODO: test confidence + } + + /** + * Test the property 'winnerVariantId' + */ + @Test + public void winnerVariantIdTest() { + // TODO: test winnerVariantId + } + + /** + * Test the property 'variants' + */ + @Test + public void variantsTest() { + // TODO: test variants + } + +} diff --git a/src/test/java/one/talon/model/ExperimentSegmentInsightVariantTest.java b/src/test/java/one/talon/model/ExperimentSegmentInsightVariantTest.java new file mode 100644 index 00000000..0f54b689 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentSegmentInsightVariantTest.java @@ -0,0 +1,72 @@ +/* + * 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 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.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentSegmentInsightVariant + */ +public class ExperimentSegmentInsightVariantTest { + private final ExperimentSegmentInsightVariant model = new ExperimentSegmentInsightVariant(); + + /** + * Model tests for ExperimentSegmentInsightVariant + */ + @Test + public void testExperimentSegmentInsightVariant() { + // TODO: test ExperimentSegmentInsightVariant + } + + /** + * Test the property 'variantId' + */ + @Test + public void variantIdTest() { + // TODO: test variantId + } + + /** + * Test the property 'variantName' + */ + @Test + public void variantNameTest() { + // TODO: test variantName + } + + /** + * Test the property 'sessionsCount' + */ + @Test + public void sessionsCountTest() { + // TODO: test sessionsCount + } + + /** + * Test the property 'value' + */ + @Test + public void valueTest() { + // TODO: test value + } + +} diff --git a/src/test/java/one/talon/model/ExperimentSegmentInsightsTest.java b/src/test/java/one/talon/model/ExperimentSegmentInsightsTest.java new file mode 100644 index 00000000..13e172e2 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentSegmentInsightsTest.java @@ -0,0 +1,75 @@ +/* + * 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 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 one.talon.model.ExperimentSegmentInsightMetric; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentSegmentInsights + */ +public class ExperimentSegmentInsightsTest { + private final ExperimentSegmentInsights model = new ExperimentSegmentInsights(); + + /** + * Model tests for ExperimentSegmentInsights + */ + @Test + public void testExperimentSegmentInsights() { + // TODO: test ExperimentSegmentInsights + } + + /** + * Test the property 'metrics' + */ + @Test + public void metricsTest() { + // TODO: test metrics + } + + /** + * Test the property 'totalSegmentsTested' + */ + @Test + public void totalSegmentsTestedTest() { + // TODO: test totalSegmentsTested + } + + /** + * Test the property 'dimensionsTested' + */ + @Test + public void dimensionsTestedTest() { + // TODO: test dimensionsTested + } + + /** + * Test the property 'reason' + */ + @Test + public void reasonTest() { + // TODO: test reason + } + +} diff --git a/src/test/java/one/talon/model/ExperimentVerdictResponseTest.java b/src/test/java/one/talon/model/ExperimentVerdictResponseTest.java new file mode 100644 index 00000000..d26f8cf2 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentVerdictResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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 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.time.OffsetDateTime; +import java.util.Arrays; +import one.talon.model.ExperimentVerdict; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentVerdictResponse + */ +public class ExperimentVerdictResponseTest { + private final ExperimentVerdictResponse model = new ExperimentVerdictResponse(); + + /** + * Model tests for ExperimentVerdictResponse + */ + @Test + public void testExperimentVerdictResponse() { + // TODO: test ExperimentVerdictResponse + } + + /** + * Test the property 'verdict' + */ + @Test + public void verdictTest() { + // TODO: test verdict + } + + /** + * Test the property 'generated' + */ + @Test + public void generatedTest() { + // TODO: test generated + } + +} diff --git a/src/test/java/one/talon/model/ExperimentVerdictTest.java b/src/test/java/one/talon/model/ExperimentVerdictTest.java new file mode 100644 index 00000000..0b66df69 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentVerdictTest.java @@ -0,0 +1,82 @@ +/* + * 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 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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentVerdict + */ +public class ExperimentVerdictTest { + private final ExperimentVerdict model = new ExperimentVerdict(); + + /** + * Model tests for ExperimentVerdict + */ + @Test + public void testExperimentVerdict() { + // TODO: test ExperimentVerdict + } + + /** + * Test the property 'winnerVariantName' + */ + @Test + public void winnerVariantNameTest() { + // TODO: test winnerVariantName + } + + /** + * Test the property 'verdictSummary' + */ + @Test + public void verdictSummaryTest() { + // TODO: test verdictSummary + } + + /** + * Test the property 'keyFindings' + */ + @Test + public void keyFindingsTest() { + // TODO: test keyFindings + } + + /** + * Test the property 'aiConfidenceLevel' + */ + @Test + public void aiConfidenceLevelTest() { + // TODO: test aiConfidenceLevel + } + + /** + * Test the property 'recommendation' + */ + @Test + public void recommendationTest() { + // TODO: test recommendation + } + +} diff --git a/src/test/java/one/talon/model/IntegrationGetAllCampaigns200ResponseTest.java b/src/test/java/one/talon/model/IntegrationGetAllCampaigns200ResponseTest.java new file mode 100644 index 00000000..4e81e868 --- /dev/null +++ b/src/test/java/one/talon/model/IntegrationGetAllCampaigns200ResponseTest.java @@ -0,0 +1,59 @@ +/* + * 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 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 one.talon.model.IntegrationCampaign; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for IntegrationGetAllCampaigns200Response + */ +public class IntegrationGetAllCampaigns200ResponseTest { + private final IntegrationGetAllCampaigns200Response model = new IntegrationGetAllCampaigns200Response(); + + /** + * Model tests for IntegrationGetAllCampaigns200Response + */ + @Test + public void testIntegrationGetAllCampaigns200Response() { + // TODO: test IntegrationGetAllCampaigns200Response + } + + /** + * Test the property 'hasMore' + */ + @Test + public void hasMoreTest() { + // TODO: test hasMore + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/one/talon/model/LedgerInfoTest.java b/src/test/java/one/talon/model/LedgerInfoTest.java index c8245cb9..5601e09e 100644 --- a/src/test/java/one/talon/model/LedgerInfoTest.java +++ b/src/test/java/one/talon/model/LedgerInfoTest.java @@ -119,4 +119,12 @@ public void pointsToNextTierTest() { // TODO: test pointsToNextTier } + /** + * Test the property 'nextTierName' + */ + @Test + public void nextTierNameTest() { + // TODO: test nextTierName + } + } diff --git a/src/test/java/one/talon/model/ListApplicationCartItemFilters200ResponseTest.java b/src/test/java/one/talon/model/ListApplicationCartItemFilters200ResponseTest.java new file mode 100644 index 00000000..c0b3518f --- /dev/null +++ b/src/test/java/one/talon/model/ListApplicationCartItemFilters200ResponseTest.java @@ -0,0 +1,59 @@ +/* + * 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 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 one.talon.model.ApplicationCIF; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ListApplicationCartItemFilters200Response + */ +public class ListApplicationCartItemFilters200ResponseTest { + private final ListApplicationCartItemFilters200Response model = new ListApplicationCartItemFilters200Response(); + + /** + * Model tests for ListApplicationCartItemFilters200Response + */ + @Test + public void testListApplicationCartItemFilters200Response() { + // TODO: test ListApplicationCartItemFilters200Response + } + + /** + * Test the property 'hasMore' + */ + @Test + public void hasMoreTest() { + // TODO: test hasMore + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/one/talon/model/MCPKeyTest.java b/src/test/java/one/talon/model/MCPKeyTest.java new file mode 100644 index 00000000..a44f9e82 --- /dev/null +++ b/src/test/java/one/talon/model/MCPKeyTest.java @@ -0,0 +1,105 @@ +/* + * 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 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.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for MCPKey + */ +public class MCPKeyTest { + private final MCPKey model = new MCPKey(); + + /** + * Model tests for MCPKey + */ + @Test + public void testMCPKey() { + // TODO: test MCPKey + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'createdBy' + */ + @Test + public void createdByTest() { + // TODO: test createdBy + } + + /** + * Test the property 'accountID' + */ + @Test + public void accountIDTest() { + // TODO: test accountID + } + + /** + * Test the property 'created' + */ + @Test + public void createdTest() { + // TODO: test created + } + + /** + * Test the property 'disabled' + */ + @Test + public void disabledTest() { + // TODO: test disabled + } + + /** + * Test the property 'lastUsed' + */ + @Test + public void lastUsedTest() { + // TODO: test lastUsed + } + +} diff --git a/src/test/java/one/talon/model/NewMCPKeyTest.java b/src/test/java/one/talon/model/NewMCPKeyTest.java new file mode 100644 index 00000000..0f00bb47 --- /dev/null +++ b/src/test/java/one/talon/model/NewMCPKeyTest.java @@ -0,0 +1,113 @@ +/* + * 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 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.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NewMCPKey + */ +public class NewMCPKeyTest { + private final NewMCPKey model = new NewMCPKey(); + + /** + * Model tests for NewMCPKey + */ + @Test + public void testNewMCPKey() { + // TODO: test NewMCPKey + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'expiryDate' + */ + @Test + public void expiryDateTest() { + // TODO: test expiryDate + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'createdBy' + */ + @Test + public void createdByTest() { + // TODO: test createdBy + } + + /** + * Test the property 'accountID' + */ + @Test + public void accountIDTest() { + // TODO: test accountID + } + + /** + * Test the property 'created' + */ + @Test + public void createdTest() { + // TODO: test created + } + + /** + * Test the property 'disabled' + */ + @Test + public void disabledTest() { + // TODO: test disabled + } + + /** + * Test the property 'lastUsed' + */ + @Test + public void lastUsedTest() { + // TODO: test lastUsed + } + + /** + * Test the property 'key' + */ + @Test + public void keyTest() { + // TODO: test key + } + +} diff --git a/src/test/java/one/talon/model/NewRewardTest.java b/src/test/java/one/talon/model/NewRewardTest.java new file mode 100644 index 00000000..34dcfaab --- /dev/null +++ b/src/test/java/one/talon/model/NewRewardTest.java @@ -0,0 +1,82 @@ +/* + * 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 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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NewReward + */ +public class NewRewardTest { + private final NewReward model = new NewReward(); + + /** + * Model tests for NewReward + */ + @Test + public void testNewReward() { + // TODO: test NewReward + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'apiName' + */ + @Test + public void apiNameTest() { + // TODO: test apiName + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'applicationIds' + */ + @Test + public void applicationIdsTest() { + // TODO: test applicationIds + } + + /** + * Test the property 'sandbox' + */ + @Test + public void sandboxTest() { + // TODO: test sandbox + } + +} diff --git a/src/test/java/one/talon/model/RewardTest.java b/src/test/java/one/talon/model/RewardTest.java new file mode 100644 index 00000000..f96031f9 --- /dev/null +++ b/src/test/java/one/talon/model/RewardTest.java @@ -0,0 +1,115 @@ +/* + * 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 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for Reward + */ +public class RewardTest { + private final Reward model = new Reward(); + + /** + * Model tests for Reward + */ + @Test + public void testReward() { + // TODO: test Reward + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'created' + */ + @Test + public void createdTest() { + // TODO: test created + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + // TODO: test accountId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'apiName' + */ + @Test + public void apiNameTest() { + // TODO: test apiName + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'applicationIds' + */ + @Test + public void applicationIdsTest() { + // TODO: test applicationIds + } + + /** + * Test the property 'sandbox' + */ + @Test + public void sandboxTest() { + // TODO: test sandbox + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/one/talon/model/SetDiscountPerItemEffectPropsTest.java b/src/test/java/one/talon/model/SetDiscountPerItemEffectPropsTest.java index 40ba9ab9..c4462147 100644 --- a/src/test/java/one/talon/model/SetDiscountPerItemEffectPropsTest.java +++ b/src/test/java/one/talon/model/SetDiscountPerItemEffectPropsTest.java @@ -134,4 +134,12 @@ public void targetedItemSubPositionTest() { // TODO: test targetedItemSubPosition } + /** + * Test the property 'excludedFromPriceHistory' + */ + @Test + public void excludedFromPriceHistoryTest() { + // TODO: test excludedFromPriceHistory + } + } diff --git a/src/test/java/one/talon/model/StrikethroughSetDiscountPerItemEffectPropsTest.java b/src/test/java/one/talon/model/StrikethroughSetDiscountPerItemEffectPropsTest.java index b57555bf..fd1f64be 100644 --- a/src/test/java/one/talon/model/StrikethroughSetDiscountPerItemEffectPropsTest.java +++ b/src/test/java/one/talon/model/StrikethroughSetDiscountPerItemEffectPropsTest.java @@ -54,11 +54,11 @@ public void valueTest() { } /** - * Test the property 'excludeFromBestPriorPriceHistory' + * Test the property 'excludedFromPriceHistory' */ @Test - public void excludeFromBestPriorPriceHistoryTest() { - // TODO: test excludeFromBestPriorPriceHistory + public void excludedFromPriceHistoryTest() { + // TODO: test excludedFromPriceHistory } }