diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ac04056..6048baf7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,9 @@ on: [push] jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + java-version: [8, 11, 17, 21] permissions: contents: "read" id-token: "write" @@ -29,7 +32,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: "21" + java-version: ${{ matrix.java-version }} cache: "gradle" - name: Install dependencies run: | diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index eacff8ec..df0ab18c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -232,6 +232,9 @@ docs/EventType.md docs/EventV2.md docs/EventV3.md docs/Experiment.md +docs/ExperimentCampaignCopy.md +docs/ExperimentCopy.md +docs/ExperimentCopyExperiment.md docs/ExperimentResults.md docs/ExperimentVariant.md docs/ExperimentVariantAllocation.md @@ -312,6 +315,7 @@ docs/GetWebhooks200Response.md docs/Giveaway.md docs/GiveawaysPool.md docs/HiddenConditionsEffects.md +docs/History.md docs/IdentifiableEntity.md docs/ImportEntity.md docs/IncreaseAchievementProgressEffectProps.md @@ -327,6 +331,21 @@ docs/IntegrationEventV2Request.md docs/IntegrationEventV2Response.md docs/IntegrationEventV3Request.md docs/IntegrationEventV3Response.md +docs/IntegrationHubConfig.md +docs/IntegrationHubEventPayloadCouponBasedNotifications.md +docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md +docs/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.md +docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md +docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md +docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md +docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md +docs/IntegrationHubEventRecord.md +docs/IntegrationHubFlow.md +docs/IntegrationHubFlowConfig.md +docs/IntegrationHubFlowConfigResponse.md +docs/IntegrationHubFlowResponse.md +docs/IntegrationHubFlowWithConfig.md +docs/IntegrationHubPaginatedEventPayload.md docs/IntegrationProfileEntity.md docs/IntegrationProfileEntityV3.md docs/IntegrationRequest.md @@ -353,6 +372,7 @@ docs/ListCampaignStoreBudgetLimits200Response.md docs/ListCampaignStoreBudgets.md docs/ListCampaignStoreBudgetsStore.md docs/ListCatalogItems200Response.md +docs/ListExperiments200Response.md docs/ListStores200Response.md docs/LoginParams.md docs/Loyalty.md @@ -493,24 +513,11 @@ docs/PendingPointsNotificationPolicy.md docs/Picklist.md docs/PlaceholderDetails.md docs/PriceDetail.md +docs/PriceHistoryRequest.md +docs/PriceHistoryResponse.md docs/PriceType.md docs/PriceTypeReferenceDetail.md docs/PriceTypeReferences.md -docs/PrismaticConfig.md -docs/PrismaticEventPayloadCouponBasedNotifications.md -docs/PrismaticEventPayloadCouponBasedNotificationsLimits.md -docs/PrismaticEventPayloadLoyaltyProfileBasedNotification.md -docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.md -docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md -docs/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md -docs/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md -docs/PrismaticEventRecord.md -docs/PrismaticFlow.md -docs/PrismaticFlowConfig.md -docs/PrismaticFlowConfigResponse.md -docs/PrismaticFlowResponse.md -docs/PrismaticFlowWithConfig.md -docs/PrismaticPaginatedEventPayload.md docs/Product.md docs/ProductSearchMatch.md docs/ProductUnitAnalytics.md @@ -518,6 +525,7 @@ docs/ProductUnitAnalyticsDataPoint.md docs/ProductUnitAnalyticsTotals.md docs/ProfileAudiencesChanges.md docs/ProjectedTier.md +docs/PromoteExperiment.md docs/RedeemReferralEffectProps.md docs/Referral.md docs/ReferralConstraints.md @@ -922,6 +930,9 @@ src/main/java/one/talon/model/EventType.java src/main/java/one/talon/model/EventV2.java src/main/java/one/talon/model/EventV3.java src/main/java/one/talon/model/Experiment.java +src/main/java/one/talon/model/ExperimentCampaignCopy.java +src/main/java/one/talon/model/ExperimentCopy.java +src/main/java/one/talon/model/ExperimentCopyExperiment.java src/main/java/one/talon/model/ExperimentResults.java src/main/java/one/talon/model/ExperimentVariant.java src/main/java/one/talon/model/ExperimentVariantAllocation.java @@ -1002,6 +1013,7 @@ src/main/java/one/talon/model/GetWebhooks200Response.java src/main/java/one/talon/model/Giveaway.java src/main/java/one/talon/model/GiveawaysPool.java src/main/java/one/talon/model/HiddenConditionsEffects.java +src/main/java/one/talon/model/History.java src/main/java/one/talon/model/IdentifiableEntity.java src/main/java/one/talon/model/ImportEntity.java src/main/java/one/talon/model/IncreaseAchievementProgressEffectProps.java @@ -1016,6 +1028,21 @@ 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/IntegrationHubConfig.java +src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotifications.java +src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimits.java +src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.java +src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java +src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java +src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java +src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java +src/main/java/one/talon/model/IntegrationHubEventRecord.java +src/main/java/one/talon/model/IntegrationHubFlow.java +src/main/java/one/talon/model/IntegrationHubFlowConfig.java +src/main/java/one/talon/model/IntegrationHubFlowConfigResponse.java +src/main/java/one/talon/model/IntegrationHubFlowResponse.java +src/main/java/one/talon/model/IntegrationHubFlowWithConfig.java +src/main/java/one/talon/model/IntegrationHubPaginatedEventPayload.java src/main/java/one/talon/model/IntegrationProfileEntity.java src/main/java/one/talon/model/IntegrationProfileEntityV3.java src/main/java/one/talon/model/IntegrationRequest.java @@ -1042,6 +1069,7 @@ src/main/java/one/talon/model/ListCampaignStoreBudgetLimits200Response.java src/main/java/one/talon/model/ListCampaignStoreBudgets.java src/main/java/one/talon/model/ListCampaignStoreBudgetsStore.java src/main/java/one/talon/model/ListCatalogItems200Response.java +src/main/java/one/talon/model/ListExperiments200Response.java src/main/java/one/talon/model/ListStores200Response.java src/main/java/one/talon/model/LoginParams.java src/main/java/one/talon/model/Loyalty.java @@ -1181,24 +1209,11 @@ src/main/java/one/talon/model/PendingPointsNotificationPolicy.java src/main/java/one/talon/model/Picklist.java src/main/java/one/talon/model/PlaceholderDetails.java src/main/java/one/talon/model/PriceDetail.java +src/main/java/one/talon/model/PriceHistoryRequest.java +src/main/java/one/talon/model/PriceHistoryResponse.java src/main/java/one/talon/model/PriceType.java src/main/java/one/talon/model/PriceTypeReferenceDetail.java src/main/java/one/talon/model/PriceTypeReferences.java -src/main/java/one/talon/model/PrismaticConfig.java -src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotifications.java -src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimits.java -src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotification.java -src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.java -src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java -src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java -src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java -src/main/java/one/talon/model/PrismaticEventRecord.java -src/main/java/one/talon/model/PrismaticFlow.java -src/main/java/one/talon/model/PrismaticFlowConfig.java -src/main/java/one/talon/model/PrismaticFlowConfigResponse.java -src/main/java/one/talon/model/PrismaticFlowResponse.java -src/main/java/one/talon/model/PrismaticFlowWithConfig.java -src/main/java/one/talon/model/PrismaticPaginatedEventPayload.java src/main/java/one/talon/model/Product.java src/main/java/one/talon/model/ProductSearchMatch.java src/main/java/one/talon/model/ProductUnitAnalytics.java @@ -1206,6 +1221,7 @@ src/main/java/one/talon/model/ProductUnitAnalyticsDataPoint.java src/main/java/one/talon/model/ProductUnitAnalyticsTotals.java src/main/java/one/talon/model/ProfileAudiencesChanges.java src/main/java/one/talon/model/ProjectedTier.java +src/main/java/one/talon/model/PromoteExperiment.java src/main/java/one/talon/model/RedeemReferralEffectProps.java src/main/java/one/talon/model/Referral.java src/main/java/one/talon/model/ReferralConstraints.java @@ -1582,6 +1598,9 @@ src/test/java/one/talon/model/EventTest.java src/test/java/one/talon/model/EventTypeTest.java src/test/java/one/talon/model/EventV2Test.java src/test/java/one/talon/model/EventV3Test.java +src/test/java/one/talon/model/ExperimentCampaignCopyTest.java +src/test/java/one/talon/model/ExperimentCopyExperimentTest.java +src/test/java/one/talon/model/ExperimentCopyTest.java src/test/java/one/talon/model/ExperimentResultsTest.java src/test/java/one/talon/model/ExperimentTest.java src/test/java/one/talon/model/ExperimentVariantAllocationTest.java @@ -1663,6 +1682,7 @@ src/test/java/one/talon/model/GetWebhooks200ResponseTest.java src/test/java/one/talon/model/GiveawayTest.java src/test/java/one/talon/model/GiveawaysPoolTest.java src/test/java/one/talon/model/HiddenConditionsEffectsTest.java +src/test/java/one/talon/model/HistoryTest.java src/test/java/one/talon/model/IdentifiableEntityTest.java src/test/java/one/talon/model/ImportEntityTest.java src/test/java/one/talon/model/IncreaseAchievementProgressEffectPropsTest.java @@ -1677,6 +1697,21 @@ 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/IntegrationHubConfigTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimitsTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotificationTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java +src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java +src/test/java/one/talon/model/IntegrationHubEventRecordTest.java +src/test/java/one/talon/model/IntegrationHubFlowConfigResponseTest.java +src/test/java/one/talon/model/IntegrationHubFlowConfigTest.java +src/test/java/one/talon/model/IntegrationHubFlowResponseTest.java +src/test/java/one/talon/model/IntegrationHubFlowTest.java +src/test/java/one/talon/model/IntegrationHubFlowWithConfigTest.java +src/test/java/one/talon/model/IntegrationHubPaginatedEventPayloadTest.java src/test/java/one/talon/model/IntegrationProfileEntityTest.java src/test/java/one/talon/model/IntegrationProfileEntityV3Test.java src/test/java/one/talon/model/IntegrationRequestTest.java @@ -1703,6 +1738,7 @@ src/test/java/one/talon/model/ListCampaignStoreBudgetLimits200ResponseTest.java src/test/java/one/talon/model/ListCampaignStoreBudgetsStoreTest.java src/test/java/one/talon/model/ListCampaignStoreBudgetsTest.java src/test/java/one/talon/model/ListCatalogItems200ResponseTest.java +src/test/java/one/talon/model/ListExperiments200ResponseTest.java src/test/java/one/talon/model/ListStores200ResponseTest.java src/test/java/one/talon/model/LoginParamsTest.java src/test/java/one/talon/model/LoyaltyBalanceTest.java @@ -1842,24 +1878,11 @@ src/test/java/one/talon/model/PendingPointsNotificationPolicyTest.java src/test/java/one/talon/model/PicklistTest.java src/test/java/one/talon/model/PlaceholderDetailsTest.java src/test/java/one/talon/model/PriceDetailTest.java +src/test/java/one/talon/model/PriceHistoryRequestTest.java +src/test/java/one/talon/model/PriceHistoryResponseTest.java src/test/java/one/talon/model/PriceTypeReferenceDetailTest.java src/test/java/one/talon/model/PriceTypeReferencesTest.java src/test/java/one/talon/model/PriceTypeTest.java -src/test/java/one/talon/model/PrismaticConfigTest.java -src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimitsTest.java -src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsTest.java -src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotificationTest.java -src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java -src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java -src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java -src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java -src/test/java/one/talon/model/PrismaticEventRecordTest.java -src/test/java/one/talon/model/PrismaticFlowConfigResponseTest.java -src/test/java/one/talon/model/PrismaticFlowConfigTest.java -src/test/java/one/talon/model/PrismaticFlowResponseTest.java -src/test/java/one/talon/model/PrismaticFlowTest.java -src/test/java/one/talon/model/PrismaticFlowWithConfigTest.java -src/test/java/one/talon/model/PrismaticPaginatedEventPayloadTest.java src/test/java/one/talon/model/ProductSearchMatchTest.java src/test/java/one/talon/model/ProductTest.java src/test/java/one/talon/model/ProductUnitAnalyticsDataPointTest.java @@ -1867,6 +1890,7 @@ src/test/java/one/talon/model/ProductUnitAnalyticsTest.java src/test/java/one/talon/model/ProductUnitAnalyticsTotalsTest.java src/test/java/one/talon/model/ProfileAudiencesChangesTest.java src/test/java/one/talon/model/ProjectedTierTest.java +src/test/java/one/talon/model/PromoteExperimentTest.java src/test/java/one/talon/model/RedeemReferralEffectPropsTest.java src/test/java/one/talon/model/ReferralConstraintsTest.java src/test/java/one/talon/model/ReferralCreatedEffectPropsTest.java diff --git a/README.md b/README.md index a087316f..a63bb49c 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.04 + 26.05 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.04" +compile "one.talon:talon-one-client:26.05" ``` ### Others @@ -231,6 +231,7 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**getLoyaltyProgramProfileTransactions**](docs/IntegrationApi.md#getLoyaltyProgramProfileTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions *IntegrationApi* | [**getReservedCustomers**](docs/IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved *IntegrationApi* | [**linkLoyaltyCardToProfile**](docs/IntegrationApi.md#linkLoyaltyCardToProfile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card +*IntegrationApi* | [**priceHistory**](docs/IntegrationApi.md#priceHistory) | **POST** /v1/best_prior_price_history | Get summary of price history *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 *IntegrationApi* | [**syncCatalog**](docs/IntegrationApi.md#syncCatalog) | **PUT** /v1/catalogs/{catalogId}/sync | Sync cart item catalog @@ -281,6 +282,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**disconnectCampaignStores**](docs/ManagementApi.md#disconnectCampaignStores) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/stores | Disconnect stores *ManagementApi* | [**exportAccountCollectionItems**](docs/ManagementApi.md#exportAccountCollectionItems) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items *ManagementApi* | [**exportAchievements**](docs/ManagementApi.md#exportAchievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export | Export achievement customer data +*ManagementApi* | [**exportApplicationCampaignAnalytics**](docs/ManagementApi.md#exportApplicationCampaignAnalytics) | **GET** /v1/applications/{applicationId}/campaign_analytics/export | Export Application analytics aggregated by campaign *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 @@ -294,6 +296,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**exportLoyaltyCardBalances**](docs/ManagementApi.md#exportLoyaltyCardBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs *ManagementApi* | [**exportLoyaltyCardLedger**](docs/ManagementApi.md#exportLoyaltyCardLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log *ManagementApi* | [**exportLoyaltyCards**](docs/ManagementApi.md#exportLoyaltyCards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/export | Export loyalty cards +*ManagementApi* | [**exportLoyaltyJoinDates**](docs/ManagementApi.md#exportLoyaltyJoinDates) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_join_dates | Export customers' loyalty program join dates *ManagementApi* | [**exportLoyaltyLedger**](docs/ManagementApi.md#exportLoyaltyLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs *ManagementApi* | [**exportPoolGiveaways**](docs/ManagementApi.md#exportPoolGiveaways) | **GET** /v1/giveaways/pools/{poolId}/export | Export giveaway codes of a giveaway pool *ManagementApi* | [**exportReferrals**](docs/ManagementApi.md#exportReferrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals @@ -341,6 +344,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getCustomersByAttributes**](docs/ManagementApi.md#getCustomersByAttributes) | **POST** /v1/customer_search/no_total | List customer profiles matching the given attributes *ManagementApi* | [**getDashboardStatistics**](docs/ManagementApi.md#getDashboardStatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/dashboard | Get statistics for loyalty dashboard *ManagementApi* | [**getEventTypes**](docs/ManagementApi.md#getEventTypes) | **GET** /v1/event_types | List event types +*ManagementApi* | [**getExperiment**](docs/ManagementApi.md#getExperiment) | **GET** /v1/applications/{applicationId}/experiments/{experimentId} | Get experiment in Application *ManagementApi* | [**getExports**](docs/ManagementApi.md#getExports) | **GET** /v1/exports | Get exports *ManagementApi* | [**getLoyaltyCard**](docs/ManagementApi.md#getLoyaltyCard) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Get loyalty card *ManagementApi* | [**getLoyaltyCardTransactionLogs**](docs/ManagementApi.md#getLoyaltyCardTransactionLogs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions @@ -382,6 +386,7 @@ Class | Method | HTTP request | Description *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 *ManagementApi* | [**listCollectionsInApplication**](docs/ManagementApi.md#listCollectionsInApplication) | **GET** /v1/applications/{applicationId}/collections | List collections in Application +*ManagementApi* | [**listExperiments**](docs/ManagementApi.md#listExperiments) | **GET** /v1/applications/{applicationId}/experiments | List experiments *ManagementApi* | [**listStores**](docs/ManagementApi.md#listStores) | **GET** /v1/applications/{applicationId}/stores | List stores *ManagementApi* | [**oktaEventHandlerChallenge**](docs/ManagementApi.md#oktaEventHandlerChallenge) | **GET** /v1/provisioning/okta | Validate Okta API ownership *ManagementApi* | [**removeLoyaltyPoints**](docs/ManagementApi.md#removeLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile @@ -643,6 +648,9 @@ Class | Method | HTTP request | Description - [EventV2](docs/EventV2.md) - [EventV3](docs/EventV3.md) - [Experiment](docs/Experiment.md) +- [ExperimentCampaignCopy](docs/ExperimentCampaignCopy.md) +- [ExperimentCopy](docs/ExperimentCopy.md) +- [ExperimentCopyExperiment](docs/ExperimentCopyExperiment.md) - [ExperimentResults](docs/ExperimentResults.md) - [ExperimentVariant](docs/ExperimentVariant.md) - [ExperimentVariantAllocation](docs/ExperimentVariantAllocation.md) @@ -723,6 +731,7 @@ Class | Method | HTTP request | Description - [Giveaway](docs/Giveaway.md) - [GiveawaysPool](docs/GiveawaysPool.md) - [HiddenConditionsEffects](docs/HiddenConditionsEffects.md) +- [History](docs/History.md) - [IdentifiableEntity](docs/IdentifiableEntity.md) - [ImportEntity](docs/ImportEntity.md) - [IncreaseAchievementProgressEffectProps](docs/IncreaseAchievementProgressEffectProps.md) @@ -737,6 +746,21 @@ Class | Method | HTTP request | Description - [IntegrationEventV2Response](docs/IntegrationEventV2Response.md) - [IntegrationEventV3Request](docs/IntegrationEventV3Request.md) - [IntegrationEventV3Response](docs/IntegrationEventV3Response.md) +- [IntegrationHubConfig](docs/IntegrationHubConfig.md) +- [IntegrationHubEventPayloadCouponBasedNotifications](docs/IntegrationHubEventPayloadCouponBasedNotifications.md) +- [IntegrationHubEventPayloadCouponBasedNotificationsLimits](docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md) +- [IntegrationHubEventPayloadLoyaltyProfileBasedNotification](docs/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.md) +- [IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification](docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md) +- [IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction](docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md) +- [IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification](docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md) +- [IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification](docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md) +- [IntegrationHubEventRecord](docs/IntegrationHubEventRecord.md) +- [IntegrationHubFlow](docs/IntegrationHubFlow.md) +- [IntegrationHubFlowConfig](docs/IntegrationHubFlowConfig.md) +- [IntegrationHubFlowConfigResponse](docs/IntegrationHubFlowConfigResponse.md) +- [IntegrationHubFlowResponse](docs/IntegrationHubFlowResponse.md) +- [IntegrationHubFlowWithConfig](docs/IntegrationHubFlowWithConfig.md) +- [IntegrationHubPaginatedEventPayload](docs/IntegrationHubPaginatedEventPayload.md) - [IntegrationProfileEntity](docs/IntegrationProfileEntity.md) - [IntegrationProfileEntityV3](docs/IntegrationProfileEntityV3.md) - [IntegrationRequest](docs/IntegrationRequest.md) @@ -763,6 +787,7 @@ Class | Method | HTTP request | Description - [ListCampaignStoreBudgets](docs/ListCampaignStoreBudgets.md) - [ListCampaignStoreBudgetsStore](docs/ListCampaignStoreBudgetsStore.md) - [ListCatalogItems200Response](docs/ListCatalogItems200Response.md) +- [ListExperiments200Response](docs/ListExperiments200Response.md) - [ListStores200Response](docs/ListStores200Response.md) - [LoginParams](docs/LoginParams.md) - [Loyalty](docs/Loyalty.md) @@ -902,24 +927,11 @@ Class | Method | HTTP request | Description - [Picklist](docs/Picklist.md) - [PlaceholderDetails](docs/PlaceholderDetails.md) - [PriceDetail](docs/PriceDetail.md) +- [PriceHistoryRequest](docs/PriceHistoryRequest.md) +- [PriceHistoryResponse](docs/PriceHistoryResponse.md) - [PriceType](docs/PriceType.md) - [PriceTypeReferenceDetail](docs/PriceTypeReferenceDetail.md) - [PriceTypeReferences](docs/PriceTypeReferences.md) -- [PrismaticConfig](docs/PrismaticConfig.md) -- [PrismaticEventPayloadCouponBasedNotifications](docs/PrismaticEventPayloadCouponBasedNotifications.md) -- [PrismaticEventPayloadCouponBasedNotificationsLimits](docs/PrismaticEventPayloadCouponBasedNotificationsLimits.md) -- [PrismaticEventPayloadLoyaltyProfileBasedNotification](docs/PrismaticEventPayloadLoyaltyProfileBasedNotification.md) -- [PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification](docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.md) -- [PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction](docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md) -- [PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification](docs/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md) -- [PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification](docs/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md) -- [PrismaticEventRecord](docs/PrismaticEventRecord.md) -- [PrismaticFlow](docs/PrismaticFlow.md) -- [PrismaticFlowConfig](docs/PrismaticFlowConfig.md) -- [PrismaticFlowConfigResponse](docs/PrismaticFlowConfigResponse.md) -- [PrismaticFlowResponse](docs/PrismaticFlowResponse.md) -- [PrismaticFlowWithConfig](docs/PrismaticFlowWithConfig.md) -- [PrismaticPaginatedEventPayload](docs/PrismaticPaginatedEventPayload.md) - [Product](docs/Product.md) - [ProductSearchMatch](docs/ProductSearchMatch.md) - [ProductUnitAnalytics](docs/ProductUnitAnalytics.md) @@ -927,6 +939,7 @@ Class | Method | HTTP request | Description - [ProductUnitAnalyticsTotals](docs/ProductUnitAnalyticsTotals.md) - [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md) - [ProjectedTier](docs/ProjectedTier.md) +- [PromoteExperiment](docs/PromoteExperiment.md) - [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md) - [Referral](docs/Referral.md) - [ReferralConstraints](docs/ReferralConstraints.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index dde98ba2..17e50727 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -114,6 +114,9 @@ tags: - **Built-in events:** They are triggered by various endpoints, such as the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint. [Learn more](https://docs.talon.one/docs/dev/concepts/entities/events). - **Custom events:** They are triggered by the [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. name: Events +- description: | + Represents an A/B testing configuration within a campaign that splits customer sessions across multiple variants to compare rule effects against each other. + name: Experiments - description: | Represents a program that rewards customers with giveaways, such as free gift cards. @@ -4472,6 +4475,103 @@ paths: - management x-accepts: - application/json + /v1/applications/{applicationId}/experiments: + get: + description: List all experiments of the specified Application that match your + filter criteria. + operationId: listExperiments + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + explode: false + in: path + name: applicationId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The number of items in the response. + explode: true + in: query + name: pageSize + required: false + schema: + default: 1000 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + style: form + - description: The number of items to skip when paging through large result + sets. + explode: true + in: query + name: skip + required: false + schema: + format: int64 + type: integer + style: form + - description: | + 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. + explode: true + in: query + name: sort + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/listExperiments_200_response" + description: OK + summary: List experiments + tags: + - management + x-accepts: + - application/json + /v1/applications/{applicationId}/experiments/{experimentId}: + get: + description: Retrieve the given experiment associated with the Application. + operationId: getExperiment + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + explode: false + in: path + name: applicationId + required: true + schema: + format: int64 + type: integer + style: simple + - description: The ID of the experiment. + explode: false + in: path + name: experimentId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Experiment" + description: OK + summary: Get experiment in Application + tags: + - management + x-accepts: + - application/json /v1/applications/{applicationId}/create_campaign_from_template: post: description: | @@ -5121,6 +5221,59 @@ paths: - management x-accepts: - application/csv + /v1/loyalty_programs/{loyaltyProgramId}/export_join_dates: + get: + description: | + Download a CSV file containing the join dates of all customers in the loyalty program. + + **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + + The generated file can contain the following columns: + + - `loyaltyProgramID`: The ID of the loyalty program. + - `profileIntegrationID`: The integration ID of the customer profile. + - `joinDate`: The customer's loyalty program join date in RFC3339 format. + operationId: exportLoyaltyJoinDates + parameters: + - description: The identifier of the loyalty program. + explode: false + in: path + name: loyaltyProgramId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/csv: + examples: + response: + value: | + loyaltyProgramID,profileIntegrationID,joinDate + 40,8786NTHSAO8,2024-05-29T15:04:05Z + 40,2735HATHOH8,2023-11-13T07:12:34Z + 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 + summary: Export customers' loyalty program join dates + tags: + - management + x-accepts: + - application/csv /v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers: get: description: | @@ -5524,14 +5677,15 @@ paths: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). + - `attributes` (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv - identifier,state,customerprofileids - 123-456-789AT,active,Alexa001;UserA + identifier,state,customerprofileids,attributes + 123-456-789AT,active,Alexa001;UserA,"{""my_attribute"": ""10_off""}" ``` operationId: importLoyaltyCards parameters: @@ -8496,6 +8650,26 @@ paths: x-content-type: application/json x-accepts: - application/json + /v1/best_prior_price_history: + post: + description: | + Fetch the historical price data for a given SKU within a defined timeframe. + operationId: priceHistory + requestBody: + $ref: "#/components/requestBodies/PriceHistory" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PriceHistoryResponse" + description: Ok + summary: Get summary of price history + tags: + - integration + x-content-type: application/json + x-accepts: + - application/json /v1/attributes: get: description: | @@ -9515,7 +9689,11 @@ paths: The CSV file contains the following columns: - - `value` (required): The coupon code. + - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. + There is no maximum length but limiting the code to 30 characters + ensures it is fully readable in the Campaign Manager. + The code should be unique unless you set `skipDuplicates` to `true`. + - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. @@ -12099,6 +12277,90 @@ paths: - management x-accepts: - application/csv + /v1/applications/{applicationId}/campaign_analytics/export: + get: + description: | + Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. + + **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + + The CSV file contains the following columns: + - `campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](https://docs.talon.one/docs/product/campaigns/analytics/application-dashboard#understanding-the-analytics-data). + - `start_date`: The start of the aggregation time frame in UTC. + - `end_date`: The end of the aggregation time frame in UTC. + - `revenue`: The total, pre-discount value of all items purchased in a customer session. + - `sessions`: The number of all closed sessions. + - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. + - `average_items_per_session`: The number of items from sessions divided by the number of sessions. + - `coupons`: The number of times a coupon was successfully redeemed in sessions. + - `discounts`: The total value of discounts given for cart items in sessions. + operationId: exportApplicationCampaignAnalytics + parameters: + - $ref: "#/components/parameters/applicationId" + - 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: | + Only return results from after this timestamp. + + **Note:** + - This 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. + explode: true + in: query + name: rangeStart + required: true + schema: + format: date-time + type: string + style: form + - description: | + Only return results from before this timestamp. + + **Note:** + - This 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. + explode: true + in: query + name: rangeEnd + required: true + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/csv: + examples: + response: + value: | + campaign_id,start_date,end_date,revenue,sessions,average_session_value,average_items_per_session,coupons,discounts + Total,2025-02-01T00:00:00+00:00,2025-02-07T00:00:00+00:00,751916.88,5919,127.03,3.96,N/A,N/A + Influenced,2025-02-01T00:00:00+00:00,2025-02-07T00:00:00+00:00,525816.00,5246,100.23,4.46,374,47675.73 + 41,2025-02-01T00:00:00+00:00,2025-02-07T00:00:00+00:00,284089.80,3105,91.49,4.62,247,8435.65 + 75,2025-02-01T00:00:00+00:00,2025-02-07T00:00:00+00:00,416001.81,4771,87.19,4.52,0,16768.71 + 178,2025-02-01T00:00:00+00:00,2025-02-07T00:00:00+00:00,313390.53,1098,285.42,4.81,65,16097.05 + 195,2025-02-01T00:00:00+00:00,2025-02-07T00:00:00+00:00,34345.86,595,57.72,4.58,62,6374.32 + schema: + format: csv + type: string + description: OK + summary: Export Application analytics aggregated by campaign + tags: + - management + x-accepts: + - application/csv /v1/applications/{applicationId}/achievement_progress/{integrationId}: get: description: | @@ -12469,6 +12731,13 @@ components: $ref: "#/components/schemas/BestPriorPriceRequest" description: body required: true + PriceHistory: + content: + application/json: + schema: + $ref: "#/components/schemas/PriceHistoryRequest" + description: body + required: true NewAttribute: content: application/json: @@ -13003,7 +13272,7 @@ components: type: array UpdateRoleV2: $ref: "#/components/schemas/RoleV2Base" - PrismaticPaginatedEventPayload: + IntegrationHubPaginatedEventPayload: properties: TotalResultSize: format: int64 @@ -13021,17 +13290,17 @@ components: - CouponUpdated - CouponDeleted type: string - x-generate-enum-go: PrismaticEventType + x-generate-enum-go: IntegrationHubEventType Data: items: discriminator: mapping: - LoyaltyPointsChanged: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification" - LoyaltyTierDowngrade: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification" - LoyaltyTierUpgrade: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification" - CouponCreated: "#/components/schemas/PrismaticEventPayloadCouponBasedNotifications" - CouponUpdated: "#/components/schemas/PrismaticEventPayloadCouponBasedNotifications" - CouponDeleted: "#/components/schemas/PrismaticEventPayloadCouponBasedNotifications" + LoyaltyPointsChanged: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification" + LoyaltyTierDowngrade: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification" + LoyaltyTierUpgrade: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification" + CouponCreated: "#/components/schemas/IntegrationHubEventPayloadCouponBasedNotifications" + CouponUpdated: "#/components/schemas/IntegrationHubEventPayloadCouponBasedNotifications" + CouponDeleted: "#/components/schemas/IntegrationHubEventPayloadCouponBasedNotifications" propertyName: EventType type: array required: @@ -25809,6 +26078,185 @@ components: required: - isPrimary - name + example: + created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 Experiment: allOf: - $ref: "#/components/schemas/Entity" @@ -25816,7 +26264,7 @@ components: - properties: isVariantAssignmentExternal: description: | - The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. + The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. type: boolean campaign: $ref: "#/components/schemas/Campaign" @@ -25832,6 +26280,7 @@ components: enum: - enabled - disabled + - archived example: enabled type: string variants: @@ -25843,26 +26292,534 @@ components: The date and time the experiment was deleted. format: date-time type: string + required: + - state + example: + deletedat: 2000-01-23T04:56:07.000+00:00 + created: 2020-06-10T09:05:27.993483Z + campaign: + type: advanced + templateId: 3 + customEffectCount: 0 + activeRevisionId: 6 + features: + - coupons + - referrals + createdLoyaltyPointsCount: 9 + storesImported: true + couponSettings: + couponPattern: SUMMER-####-#### + validCharacters: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - "N" + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - "Y" + - Z + - "0" + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + experimentId: 1 + id: 4 + state: enabled + reservecouponEffectCount: 9 + updatedBy: Jane Doe + frontendState: running + created: 2020-06-10T09:05:27.993483Z + referralCreationCount: 8 + stageRevision: false + couponRedemptionCount: 163 + couponCreationCount: 16 + version: 6 + campaignGroups: + - 1 + - 3 + tags: + - summer + discountEffectCount: 343 + budgets: + - limit: 1000 + action: createCoupon + counter: 42 + - limit: 1000 + action: createCoupon + counter: 42 + redeemedLoyaltyPointsCount: 8 + name: Summer promotions + valueMapsIds: + - 100 + - 215 + applicationId: 322 + updated: 2022-10-97T35:00:00Z + callApiEffectCount: 0 + createdLoyaltyPointsEffectCount: 2 + discountCount: 288 + revisionFrontendState: revised + description: Campaign for all summer 2021 promotions + activeRevisionVersionId: 6 + currentRevisionVersionId: 6 + startTime: 2021-07-20T22:00:00Z + currentRevisionId: 6 + limits: + - period: yearly + entities: + - Coupon + limit: 1000 + action: createCoupon + - period: yearly + entities: + - Coupon + limit: 1000 + action: createCoupon + activeRulesetId: 6 + reevaluateOnReturn: true + userId: 388 + awardedGiveawaysCount: 9 + redeemedLoyaltyPointsEffectCount: 9 + linkedStoreIds: + - 1 + - 2 + - 3 + createdBy: John Doe + addFreeItemEffectCount: 0 + referralSettings: + couponPattern: SUMMER-####-#### + validCharacters: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - "N" + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - "Y" + - Z + - "0" + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + attributes: "{}" + lastActivity: 2022-11-10T23:00:00Z + endTime: 2021-09-22T22:00:00Z + referralRedemptionCount: 3 + id: 6 + state: enabled + variants: + - created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 + - created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 + applicationId: 322 + isVariantAssignmentExternal: true + activated: 2000-01-23T04:56:07.000+00:00 NewExperiment: properties: isVariantAssignmentExternal: description: | - The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. + The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. type: boolean - activated: - description: | - The date and time the experiment was activated. - format: date-time - type: string - state: - default: disabled - description: | - A disabled experiment is not evaluated for rules or coupons. - enum: - - enabled - - disabled - example: enabled - type: string campaign: $ref: "#/components/schemas/NewCampaign" required: @@ -25872,10 +26829,8 @@ components: allOf: - properties: isVariantAssignmentExternal: - description: "The source of the assignment. - false - The assignment to\ - \ the variant is handled internally by the Talon.Oneandled internally\ - \ by the Talon.One. - true - The assignment to the variant handled externally.\ - \ \n" + description: | + The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. type: boolean campaign: $ref: "#/components/schemas/UpdateCampaign" @@ -25890,7 +26845,10 @@ components: format: int64 type: integer name: + description: The name of this variant. example: Variant A + maxLength: 255 + minLength: 1 type: string ruleset: $ref: "#/components/schemas/NewRuleset" @@ -25920,8 +26878,9 @@ components: properties: name: description: The name of this variant. + example: Variant A + maxLength: 255 minLength: 1 - pattern: "^[A-Za-z](\\w|\\s)*$" type: string weight: description: The percentage split of this variant. The sum of all variant @@ -26041,6 +27000,79 @@ components: required: - confidence - properties + ExperimentCampaignCopy: + properties: + name: + description: Name of the copied campaign (Defaults to "Copy of original + campaign name"). + example: Copy of Summer promotions + type: string + description: + description: A detailed description of the campaign. + example: Campaign for all summer 2021 promotions + title: Campaign Description + type: string + startTime: + description: Timestamp when the campaign will become active. + example: 2021-06-01T09:00:27.993483Z + format: date-time + type: string + endTime: + description: Timestamp when the campaign will become inactive. + example: 2021-09-10T01:00:00.993483Z + format: date-time + type: string + tags: + description: A list of tags for the campaign. + example: + - Summer + - Shoes + items: + maxLength: 50 + minLength: 1 + type: string + maxItems: 50 + type: array + evaluationGroupId: + description: The ID of the campaign evaluation group the campaign belongs + to. + example: 2 + format: int64 + type: integer + ExperimentCopy: + properties: + targetApplicationId: + description: | + The ID of the Application to copy the experiment. It is displayed in your Talon.One deployment URL. + format: int64 + type: integer + experiment: + $ref: "#/components/schemas/ExperimentCopy_experiment" + required: + - experiment + - targetApplicationId + PromoteExperiment: + properties: + targetApplicationId: + description: | + The ID of the Application to copy the experiment. It is displayed in your Talon.One deployment URL. + format: int64 + type: integer + variantId: + description: | + The ID of the Experiment Variant to build the new campaign. + format: int64 + type: integer + disableExperiment: + description: | + Force disable the experiment. + type: boolean + campaign: + $ref: "#/components/schemas/ExperimentCampaignCopy" + required: + - campaign + - targetApplicationId + - variantId CreateTemplateCampaign: example: campaignAttributesOverrides: "{}" @@ -29388,6 +30420,7 @@ components: - comma - period strictEndDate: true + timeframeEndDateType: sale target: targetType: AUDIENCE audienceID: 4 @@ -29414,12 +30447,27 @@ components: 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 striclty uses the number of days specified in `timeframe`. + - 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. + enum: + - strict + - price + - sale + example: sale + type: string target: $ref: "#/components/schemas/BestPriorTarget" required: @@ -29494,23 +30542,29 @@ components: discountValue: 6.027456183070403 observedAt: 2020-11-10T23:00:00Z price: 99.99 - contextId: Summer Sale 2007 + contextId: Summer Sale 2025 + id: 1 sku: NVR-GN-GV-UUP target: "{}" properties: + id: + description: The ID of the historical price. + example: 1 + format: int64 + type: integer sku: description: sku example: NVR-GN-GV-UUP type: string observedAt: - description: The date and time when the best price was observed. + description: The date and time when the price was observed. example: 2020-11-10T23:00:00Z format: date-time type: string contextId: description: | The context ID of the context active at the time of observation. - example: Summer Sale 2007 + example: Summer Sale 2025 type: string price: description: Price of the item. @@ -29522,6 +30576,7 @@ components: type: object required: - contextId + - id - metadata - observedAt - price @@ -29531,6 +30586,122 @@ components: items: $ref: "#/components/schemas/BestPriorPrice" type: array + PriceHistoryRequest: + example: + endDate: 2020-12-10T23:00:00Z + sku: + - sku-124 + startDate: 2020-11-10T23:00:00Z + properties: + sku: + description: The SKU of the item for which the historical prices are being + retrieved. + example: + - sku-124 + type: string + startDate: + description: The start date of the period for which historical prices should + be retrieved. + example: 2020-11-10T23:00:00Z + format: date-time + type: string + endDate: + description: The end date of the period for which historical prices should + be retrieved. + example: 2020-12-10T23:00:00Z + format: date-time + type: string + required: + - endDate + - sku + - startDate + History: + example: + metadata: + adjustmentDetails: "" + influencingCampaignDetails: + - campaignId: 0 + discountValue: 6.027456183070403 + - campaignId: 0 + discountValue: 6.027456183070403 + observedAt: 2020-11-10T23:00:00Z + price: 99.99 + contextId: Summer Sale 2025 + id: 1 + target: "{}" + properties: + id: + description: The ID of the historical price. + example: 1 + format: int64 + type: integer + observedAt: + description: The date and time when the price was observed. + example: 2020-11-10T23:00:00Z + format: date-time + type: string + contextId: + description: | + Identifier of the relevant context at the time the price was observed (e.g. summer sale). + example: Summer Sale 2025 + type: string + price: + description: Price of the item. + example: 99.99 + type: number + metadata: + $ref: "#/components/schemas/BestPriorPriceMetadata" + target: + type: object + required: + - contextId + - id + - metadata + - observedAt + - price + - target + PriceHistoryResponse: + example: + history: + - metadata: + adjustmentDetails: "" + influencingCampaignDetails: + - campaignId: 0 + discountValue: 6.027456183070403 + - campaignId: 0 + discountValue: 6.027456183070403 + observedAt: 2020-11-10T23:00:00Z + price: 99.99 + contextId: Summer Sale 2025 + id: 1 + target: "{}" + - metadata: + adjustmentDetails: "" + influencingCampaignDetails: + - campaignId: 0 + discountValue: 6.027456183070403 + - campaignId: 0 + discountValue: 6.027456183070403 + observedAt: 2020-11-10T23:00:00Z + price: 99.99 + contextId: Summer Sale 2025 + id: 1 + target: "{}" + sku: + - SKU1241028 + properties: + sku: + description: The SKU of the item for which historical prices should be retrieved. + example: + - SKU1241028 + type: string + history: + items: + $ref: "#/components/schemas/History" + type: array + required: + - history + - sku TalangAttribute: allOf: - properties: @@ -33166,30 +34337,30 @@ components: - email - name - summary - PrismaticFlowConfigResponse: + IntegrationHubFlowConfigResponse: properties: WorkerCount: - description: Number of Prismatic workers to run in parallel for this flow - (maximum 500). + description: Number of IntegrationHub workers to run in parallel for this + flow (maximum 500). format: int64 maximum: 500 minimum: 1 type: integer MaxEventsPerMessage: - description: Maximum number of events to send in a single message to Prismatic. + description: Maximum number of events to send in a single message to IntegrationHub. format: int64 minimum: 1 type: integer MaxRetries: - description: Maximum number of retries for a Prismatic event before it is - ignored. + description: Maximum number of retries for a IntegrationHub event before + it is ignored. format: int64 minimum: 0 type: integer - PrismaticFlowResponse: + IntegrationHubFlowResponse: properties: Id: - description: ID of the prismatic flow. + description: ID of the integration hub flow. format: int64 type: integer ApplicationID: @@ -33200,46 +34371,46 @@ components: EventType: description: The event type we want to register a flow for. type: string - x-fieldType: PrismaticEventType - PrismaticFlowUrl: - description: The URL of the prismatic flow that we want to trigger for the - event. + x-fieldType: IntegrationHubEventType + IntegrationHubFlowUrl: + description: The URL of the integration hub flow that we want to trigger + for the event. type: string Config: - $ref: "#/components/schemas/PrismaticFlowConfigResponse" + $ref: "#/components/schemas/IntegrationHubFlowConfigResponse" required: - Config - EventType - Id - - PrismaticFlowUrl - PrismaticFlowConfig: + - IntegrationHubFlowUrl + IntegrationHubFlowConfig: properties: ApiKey: type: string WorkerCount: default: 10 - description: Number of Prismatic workers to run in parallel for this flow - (maximum 500). + description: Number of IntegrationHub workers to run in parallel for this + flow (maximum 500). format: int64 maximum: 500 minimum: 1 type: integer MaxEventsPerMessage: default: 1000 - description: Maximum number of events to send in a single message to Prismatic. + description: Maximum number of events to send in a single message to IntegrationHub. format: int64 minimum: 1 type: integer MaxRetries: default: 10 - description: Maximum number of retries for a Prismatic event before it is - ignored. + description: Maximum number of retries for a IntegrationHub event before + it is ignored. format: int64 minimum: 0 type: integer required: - ApiKey - PrismaticFlowWithConfig: + IntegrationHubFlowWithConfig: properties: ApplicationID: description: ID of application the flow is registered for. @@ -33249,18 +34420,18 @@ components: EventType: description: The event type we want to register a flow for. type: string - x-fieldType: PrismaticEventType - PrismaticFlowUrl: - description: The URL of the prismatic flow that we want to trigger for the - event. + x-fieldType: IntegrationHubEventType + IntegrationHubFlowUrl: + description: The URL of the integration hub flow that we want to trigger + for the event. type: string Config: - $ref: "#/components/schemas/PrismaticFlowConfig" + $ref: "#/components/schemas/IntegrationHubFlowConfig" required: - Config - EventType - - PrismaticFlowUrl - PrismaticFlow: + - IntegrationHubFlowUrl + IntegrationHubFlow: properties: ApplicationID: description: ID of application the flow is registered for. @@ -33270,15 +34441,15 @@ components: EventType: description: The event type we want to register a flow for. type: string - x-fieldType: PrismaticEventType - PrismaticFlowUrl: - description: The URL of the prismatic flow that we want to trigger for the - event. + x-fieldType: IntegrationHubEventType + IntegrationHubFlowUrl: + description: The URL of the integration hub flow that we want to trigger + for the event. type: string required: - EventType - - PrismaticFlowUrl - PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction: + - IntegrationHubFlowUrl + IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction: allOf: - properties: Amount: @@ -33300,7 +34471,7 @@ components: required: - Amount - Operation - PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification: + IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification: allOf: - properties: ProfileIntegrationID: @@ -33322,7 +34493,7 @@ components: type: number Actions: items: - $ref: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction" + $ref: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction" type: array PublishedAt: description: Timestamp when the event was published. @@ -33335,7 +34506,7 @@ components: - PublishedAt - SourceOfEvent - SubledgerID - PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification: + IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification: allOf: - properties: ProfileIntegrationID: @@ -33371,7 +34542,7 @@ components: - PublishedAt - SourceOfEvent - SubledgerID - PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification: + IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification: allOf: - properties: ProfileIntegrationID: @@ -33412,12 +34583,12 @@ components: - PublishedAt - SourceOfEvent - SubledgerID - PrismaticEventPayloadLoyaltyProfileBasedNotification: + IntegrationHubEventPayloadLoyaltyProfileBasedNotification: allOf: - - $ref: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification" - - $ref: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification" - - $ref: "#/components/schemas/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification" - PrismaticEventPayloadCouponBasedNotificationsLimits: + - $ref: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification" + - $ref: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification" + - $ref: "#/components/schemas/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification" + IntegrationHubEventPayloadCouponBasedNotificationsLimits: properties: Action: type: string @@ -33434,7 +34605,7 @@ components: - Action - Entities - Limit - PrismaticEventPayloadCouponBasedNotifications: + IntegrationHubEventPayloadCouponBasedNotifications: allOf: - properties: Id: @@ -33483,10 +34654,10 @@ components: BatchId: type: string Attributes: - $ref: "#/components/schemas/PrismaticEventPayloadCouponBasedNotifications_allOf_Attributes" + $ref: "#/components/schemas/IntegrationHubEventPayloadCouponBasedNotifications_allOf_Attributes" Limits: items: - $ref: "#/components/schemas/PrismaticEventPayloadCouponBasedNotificationsLimits" + $ref: "#/components/schemas/IntegrationHubEventPayloadCouponBasedNotificationsLimits" type: array PublishedAt: description: Timestamp when the event was published. @@ -33506,7 +34677,7 @@ components: - UsageCounter - UsageLimit - Value - PrismaticEventRecord: + IntegrationHubEventRecord: properties: Id: format: int64 @@ -33516,7 +34687,7 @@ components: type: integer EventType: type: string - x-fieldType: PrismaticEventType + x-fieldType: IntegrationHubEventType EventData: {} PublishedAt: format: date-time @@ -33538,12 +34709,12 @@ components: - ProcessAfter - PublishedAt - Retry - PrismaticConfig: - description: Config used for accessing integrations in Prismatic + IntegrationHubConfig: + description: Config used for accessing integrations in IntegrationHub properties: - prismaticUrl: - description: The url used to integrate the Prismatic Marketplace. - example: https://app.eu-west-1.prismatic.io/ + integrationHubUrl: + description: The url used to integrate the IntegrationHub Marketplace. + example: https://hub.talon.farm/ type: string accessToken: description: Access token used to authenticate a user in Talon.One. @@ -33551,7 +34722,7 @@ components: type: string required: - accessToken - - prismaticUrl + - integrationHubUrl CouponWithApplication: allOf: - $ref: "#/components/schemas/Coupon" @@ -37137,6 +38308,1060 @@ components: required: - data - hasMore + listExperiments_200_response: + example: + data: + - deletedat: 2000-01-23T04:56:07.000+00:00 + created: 2020-06-10T09:05:27.993483Z + campaign: + type: advanced + templateId: 3 + customEffectCount: 0 + activeRevisionId: 6 + features: + - coupons + - referrals + createdLoyaltyPointsCount: 9 + storesImported: true + couponSettings: + couponPattern: SUMMER-####-#### + validCharacters: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - "N" + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - "Y" + - Z + - "0" + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + experimentId: 1 + id: 4 + state: enabled + reservecouponEffectCount: 9 + updatedBy: Jane Doe + frontendState: running + created: 2020-06-10T09:05:27.993483Z + referralCreationCount: 8 + stageRevision: false + couponRedemptionCount: 163 + couponCreationCount: 16 + version: 6 + campaignGroups: + - 1 + - 3 + tags: + - summer + discountEffectCount: 343 + budgets: + - limit: 1000 + action: createCoupon + counter: 42 + - limit: 1000 + action: createCoupon + counter: 42 + redeemedLoyaltyPointsCount: 8 + name: Summer promotions + valueMapsIds: + - 100 + - 215 + applicationId: 322 + updated: 2022-10-97T35:00:00Z + callApiEffectCount: 0 + createdLoyaltyPointsEffectCount: 2 + discountCount: 288 + revisionFrontendState: revised + description: Campaign for all summer 2021 promotions + activeRevisionVersionId: 6 + currentRevisionVersionId: 6 + startTime: 2021-07-20T22:00:00Z + currentRevisionId: 6 + limits: + - period: yearly + entities: + - Coupon + limit: 1000 + action: createCoupon + - period: yearly + entities: + - Coupon + limit: 1000 + action: createCoupon + activeRulesetId: 6 + reevaluateOnReturn: true + userId: 388 + awardedGiveawaysCount: 9 + redeemedLoyaltyPointsEffectCount: 9 + linkedStoreIds: + - 1 + - 2 + - 3 + createdBy: John Doe + addFreeItemEffectCount: 0 + referralSettings: + couponPattern: SUMMER-####-#### + validCharacters: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - "N" + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - "Y" + - Z + - "0" + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + attributes: "{}" + lastActivity: 2022-11-10T23:00:00Z + endTime: 2021-09-22T22:00:00Z + referralRedemptionCount: 3 + id: 6 + state: enabled + variants: + - created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 + - created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 + applicationId: 322 + isVariantAssignmentExternal: true + activated: 2000-01-23T04:56:07.000+00:00 + - deletedat: 2000-01-23T04:56:07.000+00:00 + created: 2020-06-10T09:05:27.993483Z + campaign: + type: advanced + templateId: 3 + customEffectCount: 0 + activeRevisionId: 6 + features: + - coupons + - referrals + createdLoyaltyPointsCount: 9 + storesImported: true + couponSettings: + couponPattern: SUMMER-####-#### + validCharacters: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - "N" + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - "Y" + - Z + - "0" + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + experimentId: 1 + id: 4 + state: enabled + reservecouponEffectCount: 9 + updatedBy: Jane Doe + frontendState: running + created: 2020-06-10T09:05:27.993483Z + referralCreationCount: 8 + stageRevision: false + couponRedemptionCount: 163 + couponCreationCount: 16 + version: 6 + campaignGroups: + - 1 + - 3 + tags: + - summer + discountEffectCount: 343 + budgets: + - limit: 1000 + action: createCoupon + counter: 42 + - limit: 1000 + action: createCoupon + counter: 42 + redeemedLoyaltyPointsCount: 8 + name: Summer promotions + valueMapsIds: + - 100 + - 215 + applicationId: 322 + updated: 2022-10-97T35:00:00Z + callApiEffectCount: 0 + createdLoyaltyPointsEffectCount: 2 + discountCount: 288 + revisionFrontendState: revised + description: Campaign for all summer 2021 promotions + activeRevisionVersionId: 6 + currentRevisionVersionId: 6 + startTime: 2021-07-20T22:00:00Z + currentRevisionId: 6 + limits: + - period: yearly + entities: + - Coupon + limit: 1000 + action: createCoupon + - period: yearly + entities: + - Coupon + limit: 1000 + action: createCoupon + activeRulesetId: 6 + reevaluateOnReturn: true + userId: 388 + awardedGiveawaysCount: 9 + redeemedLoyaltyPointsEffectCount: 9 + linkedStoreIds: + - 1 + - 2 + - 3 + createdBy: John Doe + addFreeItemEffectCount: 0 + referralSettings: + couponPattern: SUMMER-####-#### + validCharacters: + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - "N" + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - "Y" + - Z + - "0" + - "1" + - "2" + - "3" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + attributes: "{}" + lastActivity: 2022-11-10T23:00:00Z + endTime: 2021-09-22T22:00:00Z + referralRedemptionCount: 3 + id: 6 + state: enabled + variants: + - created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 + - created: 2020-06-10T09:05:27.993483Z + isPrimary: true + name: Variant A + ruleset: + rbVersion: v2 + created: 2020-06-10T09:05:27.993483Z + campaignId: 320 + bindings: [] + activatedAt: 2000-01-23T04:56:07.000+00:00 + activate: true + rules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + id: 6 + strikethroughRules: + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + - condition: + - and + - - couponValid + effects: + - catch + - - noop + - - setDiscount + - 10% off + - - '*' + - - "." + - Session + - Total + - - / + - 10 + - 100 + bindings: + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + - attributeId: 100 + minValue: 0 + expression: + - string1 + - string2 + maxValue: 19.9 + valueType: string + name: my property + description: This is a template parameter of type `number`. + type: templateParameter + description: Creates a discount when a coupon is valid + id: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + title: Give discount via coupon + parentId: 7fa800a8-ac8d-4792-85dc-c4650dcc8f23 + templateId: 3 + userId: 388 + weight: 12 + experimentId: 10 + id: 6 + applicationId: 322 + isVariantAssignmentExternal: true + activated: 2000-01-23T04:56:07.000+00:00 + totalResultSize: 1 + properties: + totalResultSize: + example: 1 + format: int64 + type: integer + data: + items: + $ref: "#/components/schemas/Experiment" + type: array + required: + - data + - totalResultSize getLoyaltyPrograms_200_response: example: data: @@ -39177,6 +41402,17 @@ components: example: "{\"Role\":127,\"Applications\":null}" format: aclRole type: object + ExperimentCopy_experiment: + properties: + isVariantAssignmentExternal: + description: | + The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. + type: boolean + campaign: + $ref: "#/components/schemas/ExperimentCampaignCopy" + required: + - campaign + - isVariantAssignmentExternal ApplicationEvent_allOf_attributes: description: Additional JSON serialized data associated with the event. type: object @@ -39279,7 +41515,7 @@ components: allOf: - $ref: "#/components/schemas/AnalyticsDataPointWithTrend" description: The number of times the product or SKU was purchased. - PrismaticEventPayloadCouponBasedNotifications_allOf_Attributes: + IntegrationHubEventPayloadCouponBasedNotifications_allOf_Attributes: type: object securitySchemes: api_key_v1: diff --git a/build.gradle b/build.gradle index c8745d7f..2e88b092 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'one.talon' -version = '26.04' +version = '26.05' buildscript { repositories { diff --git a/build.sbt b/build.sbt index a0ca73ec..76e393a8 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.04", + version := "26.05", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/BestPriorPrice.md b/docs/BestPriorPrice.md index d66c8e13..5b9b48a5 100644 --- a/docs/BestPriorPrice.md +++ b/docs/BestPriorPrice.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **Long** | The ID of the historical price. | | |**sku** | **String** | sku | | -|**observedAt** | **OffsetDateTime** | The date and time when the best price was observed. | | +|**observedAt** | **OffsetDateTime** | The date and time when the price was observed. | | |**contextId** | **String** | The context ID of the context active at the time of observation. | | |**price** | **BigDecimal** | Price of the item. | | |**metadata** | [**BestPriorPriceMetadata**](BestPriorPriceMetadata.md) | | | diff --git a/docs/BestPriorPriceRequest.md b/docs/BestPriorPriceRequest.md index 19e6befe..67519fc2 100644 --- a/docs/BestPriorPriceRequest.md +++ b/docs/BestPriorPriceRequest.md @@ -10,8 +10,19 @@ |**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** | 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 striclty uses the number of days specified in `timeframe`. | | +|**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] | |**target** | [**BestPriorTarget**](BestPriorTarget.md) | | [optional] | +## Enum: TimeframeEndDateTypeEnum + +| Name | Value | +|---- | -----| +| STRICT | "strict" | +| PRICE | "price" | +| SALE | "sale" | + + + diff --git a/docs/Experiment.md b/docs/Experiment.md index 39d8563d..ab3394f0 100644 --- a/docs/Experiment.md +++ b/docs/Experiment.md @@ -10,10 +10,10 @@ |**id** | **Long** | The internal ID of this entity. | | |**created** | **OffsetDateTime** | The time this entity was created. | | |**applicationId** | **Long** | The ID of the Application that owns this entity. | | -|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. | [optional] | +|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. | [optional] | |**campaign** | [**Campaign**](Campaign.md) | | [optional] | |**activated** | **OffsetDateTime** | The date and time the experiment was activated. | [optional] | -|**state** | [**StateEnum**](#StateEnum) | A disabled experiment is not evaluated for rules or coupons. | [optional] | +|**state** | [**StateEnum**](#StateEnum) | A disabled experiment is not evaluated for rules or coupons. | | |**variants** | [**List<ExperimentVariant>**](ExperimentVariant.md) | | [optional] | |**deletedat** | **OffsetDateTime** | The date and time the experiment was deleted. | [optional] | @@ -25,6 +25,7 @@ |---- | -----| | ENABLED | "enabled" | | DISABLED | "disabled" | +| ARCHIVED | "archived" | diff --git a/docs/ExperimentCampaignCopy.md b/docs/ExperimentCampaignCopy.md new file mode 100644 index 00000000..c853a203 --- /dev/null +++ b/docs/ExperimentCampaignCopy.md @@ -0,0 +1,18 @@ + + +# ExperimentCampaignCopy + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the copied campaign (Defaults to \"Copy of original campaign name\"). | [optional] | +|**description** | **String** | A detailed description of the campaign. | [optional] | +|**startTime** | **OffsetDateTime** | Timestamp when the campaign will become active. | [optional] | +|**endTime** | **OffsetDateTime** | Timestamp when the campaign will become inactive. | [optional] | +|**tags** | **List<String>** | A list of tags for the campaign. | [optional] | +|**evaluationGroupId** | **Long** | The ID of the campaign evaluation group the campaign belongs to. | [optional] | + + + diff --git a/docs/ExperimentCopy.md b/docs/ExperimentCopy.md new file mode 100644 index 00000000..150fd5ac --- /dev/null +++ b/docs/ExperimentCopy.md @@ -0,0 +1,14 @@ + + +# ExperimentCopy + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**targetApplicationId** | **Long** | The ID of the Application to copy the experiment. It is displayed in your Talon.One deployment URL. | | +|**experiment** | [**ExperimentCopyExperiment**](ExperimentCopyExperiment.md) | | | + + + diff --git a/docs/ExperimentCopyExperiment.md b/docs/ExperimentCopyExperiment.md new file mode 100644 index 00000000..ac7e67e2 --- /dev/null +++ b/docs/ExperimentCopyExperiment.md @@ -0,0 +1,14 @@ + + +# ExperimentCopyExperiment + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. | | +|**campaign** | [**ExperimentCampaignCopy**](ExperimentCampaignCopy.md) | | | + + + diff --git a/docs/History.md b/docs/History.md new file mode 100644 index 00000000..36019f7c --- /dev/null +++ b/docs/History.md @@ -0,0 +1,18 @@ + + +# History + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | The ID of the historical price. | | +|**observedAt** | **OffsetDateTime** | The date and time when the price was observed. | | +|**contextId** | **String** | Identifier of the relevant context at the time the price was observed (e.g. summer sale). | | +|**price** | **BigDecimal** | Price of the item. | | +|**metadata** | [**BestPriorPriceMetadata**](BestPriorPriceMetadata.md) | | | +|**target** | **Object** | | | + + + diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md index 16bcc24c..0be132b3 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -28,6 +28,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**getLoyaltyProgramProfileTransactions**](IntegrationApi.md#getLoyaltyProgramProfileTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions | | [**getReservedCustomers**](IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved | | [**linkLoyaltyCardToProfile**](IntegrationApi.md#linkLoyaltyCardToProfile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card | +| [**priceHistory**](IntegrationApi.md#priceHistory) | **POST** /v1/best_prior_price_history | Get summary of price history | | [**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 | | [**syncCatalog**](IntegrationApi.md#syncCatalog) | **PUT** /v1/catalogs/{catalogId}/sync | Sync cart item catalog | @@ -1909,6 +1910,87 @@ public class Example { | **401** | Unauthorized | - | | **404** | Not found | - | + +# **priceHistory** +> PriceHistoryResponse priceHistory(priceHistoryRequest) + +Get summary of price history + +Fetch the historical price data for a given SKU within a defined timeframe. + +### 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: management_key + ApiKeyAuth management_key = (ApiKeyAuth) defaultClient.getAuthentication("management_key"); + management_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //management_key.setApiKeyPrefix("Token"); + + // Configure API key authorization: manager_auth + ApiKeyAuth manager_auth = (ApiKeyAuth) defaultClient.getAuthentication("manager_auth"); + manager_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //manager_auth.setApiKeyPrefix("Token"); + + // 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); + PriceHistoryRequest priceHistoryRequest = new PriceHistoryRequest(); // PriceHistoryRequest | body + try { + PriceHistoryResponse result = apiInstance.priceHistory(priceHistoryRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling IntegrationApi#priceHistory"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **priceHistoryRequest** | [**PriceHistoryRequest**](PriceHistoryRequest.md)| body | | + +### Return type + +[**PriceHistoryResponse**](PriceHistoryResponse.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth), [api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + # **reopenCustomerSession** > ReopenSessionResponse reopenCustomerSession(customerSessionId) diff --git a/docs/PrismaticConfig.md b/docs/IntegrationHubConfig.md similarity index 54% rename from docs/PrismaticConfig.md rename to docs/IntegrationHubConfig.md index aa2a6cdd..0775b3d7 100644 --- a/docs/PrismaticConfig.md +++ b/docs/IntegrationHubConfig.md @@ -1,14 +1,14 @@ -# PrismaticConfig +# IntegrationHubConfig -Config used for accessing integrations in Prismatic +Config used for accessing integrations in IntegrationHub ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**prismaticUrl** | **String** | The url used to integrate the Prismatic Marketplace. | | +|**integrationHubUrl** | **String** | The url used to integrate the IntegrationHub Marketplace. | | |**accessToken** | **String** | Access token used to authenticate a user in Talon.One. | | diff --git a/docs/PrismaticEventPayloadCouponBasedNotifications.md b/docs/IntegrationHubEventPayloadCouponBasedNotifications.md similarity index 82% rename from docs/PrismaticEventPayloadCouponBasedNotifications.md rename to docs/IntegrationHubEventPayloadCouponBasedNotifications.md index 9eb13deb..d593dce8 100644 --- a/docs/PrismaticEventPayloadCouponBasedNotifications.md +++ b/docs/IntegrationHubEventPayloadCouponBasedNotifications.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadCouponBasedNotifications +# IntegrationHubEventPayloadCouponBasedNotifications ## Properties @@ -24,7 +24,7 @@ |**importId** | **Long** | | [optional] | |**batchId** | **String** | | [optional] | |**attributes** | **Object** | | [optional] | -|**limits** | [**List<PrismaticEventPayloadCouponBasedNotificationsLimits>**](PrismaticEventPayloadCouponBasedNotificationsLimits.md) | | [optional] | +|**limits** | [**List<IntegrationHubEventPayloadCouponBasedNotificationsLimits>**](IntegrationHubEventPayloadCouponBasedNotificationsLimits.md) | | [optional] | |**publishedAt** | **OffsetDateTime** | Timestamp when the event was published. | | |**sourceOfEvent** | **String** | | | |**employeeName** | **String** | | | diff --git a/docs/PrismaticEventPayloadCouponBasedNotificationsLimits.md b/docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md similarity index 82% rename from docs/PrismaticEventPayloadCouponBasedNotificationsLimits.md rename to docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md index e257a1e6..e0c5cd81 100644 --- a/docs/PrismaticEventPayloadCouponBasedNotificationsLimits.md +++ b/docs/IntegrationHubEventPayloadCouponBasedNotificationsLimits.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadCouponBasedNotificationsLimits +# IntegrationHubEventPayloadCouponBasedNotificationsLimits ## Properties diff --git a/docs/PrismaticEventPayloadLoyaltyProfileBasedNotification.md b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.md similarity index 75% rename from docs/PrismaticEventPayloadLoyaltyProfileBasedNotification.md rename to docs/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.md index 55106081..fd50a139 100644 --- a/docs/PrismaticEventPayloadLoyaltyProfileBasedNotification.md +++ b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadLoyaltyProfileBasedNotification +# IntegrationHubEventPayloadLoyaltyProfileBasedNotification ## Properties @@ -14,7 +14,7 @@ |**employeeName** | **String** | | [optional] | |**userID** | **Long** | | [optional] | |**currentPoints** | **Float** | | | -|**actions** | [**List<PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction>**](PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md) | | [optional] | +|**actions** | [**List<IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction>**](IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md) | | [optional] | |**publishedAt** | **OffsetDateTime** | Timestamp when the event was published. | | |**currentTier** | **String** | | [optional] | |**oldTier** | **String** | | [optional] | diff --git a/docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.md b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md similarity index 64% rename from docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.md rename to docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md index c277d6ac..4142131e 100644 --- a/docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.md +++ b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification +# IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification ## Properties @@ -14,7 +14,7 @@ |**employeeName** | **String** | | [optional] | |**userID** | **Long** | | [optional] | |**currentPoints** | **Float** | | | -|**actions** | [**List<PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction>**](PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md) | | [optional] | +|**actions** | [**List<IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction>**](IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md) | | [optional] | |**publishedAt** | **OffsetDateTime** | Timestamp when the event was published. | | diff --git a/docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md similarity index 86% rename from docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md rename to docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md index a3e1b107..f1d49552 100644 --- a/docs/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md +++ b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction +# IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction ## Properties diff --git a/docs/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md similarity index 89% rename from docs/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md rename to docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md index 126783b4..6f4230d3 100644 --- a/docs/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md +++ b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification +# IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification ## Properties diff --git a/docs/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md similarity index 91% rename from docs/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md rename to docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md index f65cf925..4db4d0b7 100644 --- a/docs/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md +++ b/docs/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.md @@ -1,6 +1,6 @@ -# PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification +# IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification ## Properties diff --git a/docs/PrismaticEventRecord.md b/docs/IntegrationHubEventRecord.md similarity index 93% rename from docs/PrismaticEventRecord.md rename to docs/IntegrationHubEventRecord.md index 59ce74a9..e5c3984b 100644 --- a/docs/PrismaticEventRecord.md +++ b/docs/IntegrationHubEventRecord.md @@ -1,6 +1,6 @@ -# PrismaticEventRecord +# IntegrationHubEventRecord ## Properties diff --git a/docs/PrismaticFlow.md b/docs/IntegrationHubFlow.md similarity index 67% rename from docs/PrismaticFlow.md rename to docs/IntegrationHubFlow.md index 656cff67..3b3a890c 100644 --- a/docs/PrismaticFlow.md +++ b/docs/IntegrationHubFlow.md @@ -1,6 +1,6 @@ -# PrismaticFlow +# IntegrationHubFlow ## Properties @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**applicationID** | **Long** | ID of application the flow is registered for. | [optional] | |**eventType** | **String** | The event type we want to register a flow for. | | -|**prismaticFlowUrl** | **String** | The URL of the prismatic flow that we want to trigger for the event. | | +|**integrationHubFlowUrl** | **String** | The URL of the integration hub flow that we want to trigger for the event. | | diff --git a/docs/IntegrationHubFlowConfig.md b/docs/IntegrationHubFlowConfig.md new file mode 100644 index 00000000..00ef3771 --- /dev/null +++ b/docs/IntegrationHubFlowConfig.md @@ -0,0 +1,16 @@ + + +# IntegrationHubFlowConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiKey** | **String** | | | +|**workerCount** | **Long** | Number of IntegrationHub workers to run in parallel for this flow (maximum 500). | [optional] | +|**maxEventsPerMessage** | **Long** | Maximum number of events to send in a single message to IntegrationHub. | [optional] | +|**maxRetries** | **Long** | Maximum number of retries for a IntegrationHub event before it is ignored. | [optional] | + + + diff --git a/docs/IntegrationHubFlowConfigResponse.md b/docs/IntegrationHubFlowConfigResponse.md new file mode 100644 index 00000000..c49be68a --- /dev/null +++ b/docs/IntegrationHubFlowConfigResponse.md @@ -0,0 +1,15 @@ + + +# IntegrationHubFlowConfigResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**workerCount** | **Long** | Number of IntegrationHub workers to run in parallel for this flow (maximum 500). | [optional] | +|**maxEventsPerMessage** | **Long** | Maximum number of events to send in a single message to IntegrationHub. | [optional] | +|**maxRetries** | **Long** | Maximum number of retries for a IntegrationHub event before it is ignored. | [optional] | + + + diff --git a/docs/IntegrationHubFlowResponse.md b/docs/IntegrationHubFlowResponse.md new file mode 100644 index 00000000..71f2c648 --- /dev/null +++ b/docs/IntegrationHubFlowResponse.md @@ -0,0 +1,17 @@ + + +# IntegrationHubFlowResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | ID of the integration hub flow. | | +|**applicationID** | **Long** | ID of application the flow is registered for. | [optional] | +|**eventType** | **String** | The event type we want to register a flow for. | | +|**integrationHubFlowUrl** | **String** | The URL of the integration hub flow that we want to trigger for the event. | | +|**config** | [**IntegrationHubFlowConfigResponse**](IntegrationHubFlowConfigResponse.md) | | | + + + diff --git a/docs/PrismaticFlowWithConfig.md b/docs/IntegrationHubFlowWithConfig.md similarity index 55% rename from docs/PrismaticFlowWithConfig.md rename to docs/IntegrationHubFlowWithConfig.md index 40e34354..99c9b4ce 100644 --- a/docs/PrismaticFlowWithConfig.md +++ b/docs/IntegrationHubFlowWithConfig.md @@ -1,6 +1,6 @@ -# PrismaticFlowWithConfig +# IntegrationHubFlowWithConfig ## Properties @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**applicationID** | **Long** | ID of application the flow is registered for. | [optional] | |**eventType** | **String** | The event type we want to register a flow for. | | -|**prismaticFlowUrl** | **String** | The URL of the prismatic flow that we want to trigger for the event. | | -|**config** | [**PrismaticFlowConfig**](PrismaticFlowConfig.md) | | | +|**integrationHubFlowUrl** | **String** | The URL of the integration hub flow that we want to trigger for the event. | | +|**config** | [**IntegrationHubFlowConfig**](IntegrationHubFlowConfig.md) | | | diff --git a/docs/PrismaticPaginatedEventPayload.md b/docs/IntegrationHubPaginatedEventPayload.md similarity index 95% rename from docs/PrismaticPaginatedEventPayload.md rename to docs/IntegrationHubPaginatedEventPayload.md index 382797ca..0d209ba3 100644 --- a/docs/PrismaticPaginatedEventPayload.md +++ b/docs/IntegrationHubPaginatedEventPayload.md @@ -1,6 +1,6 @@ -# PrismaticPaginatedEventPayload +# IntegrationHubPaginatedEventPayload ## Properties diff --git a/docs/ListExperiments200Response.md b/docs/ListExperiments200Response.md new file mode 100644 index 00000000..db99927c --- /dev/null +++ b/docs/ListExperiments200Response.md @@ -0,0 +1,14 @@ + + +# ListExperiments200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalResultSize** | **Long** | | | +|**data** | [**List<Experiment>**](Experiment.md) | | | + + + diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index ada95936..c854ef89 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -43,6 +43,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**disconnectCampaignStores**](ManagementApi.md#disconnectCampaignStores) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/stores | Disconnect stores | | [**exportAccountCollectionItems**](ManagementApi.md#exportAccountCollectionItems) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items | | [**exportAchievements**](ManagementApi.md#exportAchievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export | Export achievement customer data | +| [**exportApplicationCampaignAnalytics**](ManagementApi.md#exportApplicationCampaignAnalytics) | **GET** /v1/applications/{applicationId}/campaign_analytics/export | Export Application analytics aggregated by campaign | | [**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 | @@ -56,6 +57,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**exportLoyaltyCardBalances**](ManagementApi.md#exportLoyaltyCardBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs | | [**exportLoyaltyCardLedger**](ManagementApi.md#exportLoyaltyCardLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log | | [**exportLoyaltyCards**](ManagementApi.md#exportLoyaltyCards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/export | Export loyalty cards | +| [**exportLoyaltyJoinDates**](ManagementApi.md#exportLoyaltyJoinDates) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_join_dates | Export customers' loyalty program join dates | | [**exportLoyaltyLedger**](ManagementApi.md#exportLoyaltyLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs | | [**exportPoolGiveaways**](ManagementApi.md#exportPoolGiveaways) | **GET** /v1/giveaways/pools/{poolId}/export | Export giveaway codes of a giveaway pool | | [**exportReferrals**](ManagementApi.md#exportReferrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals | @@ -103,6 +105,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**getCustomersByAttributes**](ManagementApi.md#getCustomersByAttributes) | **POST** /v1/customer_search/no_total | List customer profiles matching the given attributes | | [**getDashboardStatistics**](ManagementApi.md#getDashboardStatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/dashboard | Get statistics for loyalty dashboard | | [**getEventTypes**](ManagementApi.md#getEventTypes) | **GET** /v1/event_types | List event types | +| [**getExperiment**](ManagementApi.md#getExperiment) | **GET** /v1/applications/{applicationId}/experiments/{experimentId} | Get experiment in Application | | [**getExports**](ManagementApi.md#getExports) | **GET** /v1/exports | Get exports | | [**getLoyaltyCard**](ManagementApi.md#getLoyaltyCard) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Get loyalty card | | [**getLoyaltyCardTransactionLogs**](ManagementApi.md#getLoyaltyCardTransactionLogs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions | @@ -144,6 +147,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* | [**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 | | [**listCollectionsInApplication**](ManagementApi.md#listCollectionsInApplication) | **GET** /v1/applications/{applicationId}/collections | List collections in Application | +| [**listExperiments**](ManagementApi.md#listExperiments) | **GET** /v1/applications/{applicationId}/experiments | List experiments | | [**listStores**](ManagementApi.md#listStores) | **GET** /v1/applications/{applicationId}/stores | List stores | | [**oktaEventHandlerChallenge**](ManagementApi.md#oktaEventHandlerChallenge) | **GET** /v1/provisioning/okta | Validate Okta API ownership | | [**removeLoyaltyPoints**](ManagementApi.md#removeLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile | @@ -3473,6 +3477,93 @@ public class Example { | **401** | Unauthorized | - | | **404** | Not found | - | + +# **exportApplicationCampaignAnalytics** +> String exportApplicationCampaignAnalytics(applicationId, rangeStart, rangeEnd, campaignIds) + +Export Application analytics aggregated by campaign + +Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](https://docs.talon.one/docs/product/campaigns/analytics/application-dashboard#understanding-the-analytics-data). - `start_date`: The start of the aggregation time frame in UTC. - `end_date`: The end of the aggregation time frame in UTC. - `revenue`: The total, pre-discount value of all items purchased in a customer session. - `sessions`: The number of all closed sessions. - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. - `average_items_per_session`: The number of items from sessions divided by the number of sessions. - `coupons`: The number of times a coupon was successfully redeemed in sessions. - `discounts`: The total value of discounts given for cart items in sessions. + +### 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: management_key + ApiKeyAuth management_key = (ApiKeyAuth) defaultClient.getAuthentication("management_key"); + management_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //management_key.setApiKeyPrefix("Token"); + + // Configure API key authorization: manager_auth + ApiKeyAuth manager_auth = (ApiKeyAuth) defaultClient.getAuthentication("manager_auth"); + manager_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //manager_auth.setApiKeyPrefix("Token"); + + // 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. + OffsetDateTime rangeStart = OffsetDateTime.now(); // OffsetDateTime | Only return results from after this timestamp. **Note:** - This 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 rangeEnd = OffsetDateTime.now(); // OffsetDateTime | Only return results from before this timestamp. **Note:** - This 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. + 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. + try { + String result = apiInstance.exportApplicationCampaignAnalytics(applicationId, rangeStart, rangeEnd, campaignIds); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#exportApplicationCampaignAnalytics"); + 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. | | +| **rangeStart** | **OffsetDateTime**| Only return results from after this timestamp. **Note:** - This 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. | | +| **rangeEnd** | **OffsetDateTime**| Only return results from before this timestamp. **Note:** - This 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. | | +| **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] | + +### Return type + +**String** + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth), [api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/csv + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + # **exportAudiencesMemberships** > String exportAudiencesMemberships(audienceId) @@ -4631,6 +4722,89 @@ public class Example { | **400** | Bad request | - | | **401** | Unauthorized | - | + +# **exportLoyaltyJoinDates** +> String exportLoyaltyJoinDates(loyaltyProgramId) + +Export customers' loyalty program join dates + +Download a CSV file containing the join dates of all customers in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `profileIntegrationID`: The integration ID of the customer profile. - `joinDate`: The customer's loyalty program join date in RFC3339 format. + +### 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: management_key + ApiKeyAuth management_key = (ApiKeyAuth) defaultClient.getAuthentication("management_key"); + management_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //management_key.setApiKeyPrefix("Token"); + + // Configure API key authorization: manager_auth + ApiKeyAuth manager_auth = (ApiKeyAuth) defaultClient.getAuthentication("manager_auth"); + manager_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //manager_auth.setApiKeyPrefix("Token"); + + // 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); + String loyaltyProgramId = "loyaltyProgramId_example"; // String | The identifier of the loyalty program. + try { + String result = apiInstance.exportLoyaltyJoinDates(loyaltyProgramId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#exportLoyaltyJoinDates"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loyaltyProgramId** | **String**| The identifier of the loyalty program. | | + +### Return type + +**String** + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth), [api_key_v1](../README.md#api_key_v1) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/csv + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | + # **exportLoyaltyLedger** > String exportLoyaltyLedger(rangeStart, rangeEnd, loyaltyProgramId, integrationId, dateFormat) @@ -8828,6 +9002,89 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | + +# **getExperiment** +> Experiment getExperiment(applicationId, experimentId) + +Get experiment in Application + +Retrieve the given experiment associated with the 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: management_key + ApiKeyAuth management_key = (ApiKeyAuth) defaultClient.getAuthentication("management_key"); + management_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //management_key.setApiKeyPrefix("Token"); + + // Configure API key authorization: manager_auth + ApiKeyAuth manager_auth = (ApiKeyAuth) defaultClient.getAuthentication("manager_auth"); + manager_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //manager_auth.setApiKeyPrefix("Token"); + + // 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 experimentId = 56L; // Long | The ID of the experiment. + try { + Experiment result = apiInstance.getExperiment(applicationId, experimentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#getExperiment"); + 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. | | +| **experimentId** | **Long**| The ID of the experiment. | | + +### Return type + +[**Experiment**](Experiment.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth), [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 | - | + # **getExports** > GetExports200Response getExports(pageSize, skip, applicationId, campaignId, entity) @@ -11237,7 +11494,7 @@ public class Example { Import coupons -Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). +Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). ### Example ```java @@ -11324,7 +11581,7 @@ public class Example { Import loyalty cards -Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` +Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - `attributes` (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" ``` ### Example ```java @@ -12447,6 +12704,93 @@ public class Example { | **200** | OK | - | | **404** | Not found | - | + +# **listExperiments** +> ListExperiments200Response listExperiments(applicationId, pageSize, skip, sort) + +List experiments + +List all experiments of the specified Application that match your filter criteria. + +### 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: management_key + ApiKeyAuth management_key = (ApiKeyAuth) defaultClient.getAuthentication("management_key"); + management_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //management_key.setApiKeyPrefix("Token"); + + // Configure API key authorization: manager_auth + ApiKeyAuth manager_auth = (ApiKeyAuth) defaultClient.getAuthentication("manager_auth"); + manager_auth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //manager_auth.setApiKeyPrefix("Token"); + + // 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 = 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. + try { + ListExperiments200Response result = apiInstance.listExperiments(applicationId, pageSize, skip, sort); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ManagementApi#listExperiments"); + 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 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] | + +### Return type + +[**ListExperiments200Response**](ListExperiments200Response.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth), [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 | - | + # **listStores** > ListStores200Response listStores(applicationId, pageSize, skip, sort, withTotalResultSize, campaignId, name, integrationId, query) diff --git a/docs/NewExperiment.md b/docs/NewExperiment.md index aaed3812..fbd12b7b 100644 --- a/docs/NewExperiment.md +++ b/docs/NewExperiment.md @@ -7,19 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. | | -|**activated** | **OffsetDateTime** | The date and time the experiment was activated. | [optional] | -|**state** | [**StateEnum**](#StateEnum) | A disabled experiment is not evaluated for rules or coupons. | [optional] | +|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. | | |**campaign** | [**NewCampaign**](NewCampaign.md) | | | -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| ENABLED | "enabled" | -| DISABLED | "disabled" | - - - diff --git a/docs/PriceHistoryRequest.md b/docs/PriceHistoryRequest.md new file mode 100644 index 00000000..a64dcae0 --- /dev/null +++ b/docs/PriceHistoryRequest.md @@ -0,0 +1,15 @@ + + +# PriceHistoryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sku** | **String** | The SKU of the item for which the historical prices are being retrieved. | | +|**startDate** | **OffsetDateTime** | The start date of the period for which historical prices should be retrieved. | | +|**endDate** | **OffsetDateTime** | The end date of the period for which historical prices should be retrieved. | | + + + diff --git a/docs/PriceHistoryResponse.md b/docs/PriceHistoryResponse.md new file mode 100644 index 00000000..ab262b82 --- /dev/null +++ b/docs/PriceHistoryResponse.md @@ -0,0 +1,14 @@ + + +# PriceHistoryResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sku** | **String** | The SKU of the item for which historical prices should be retrieved. | | +|**history** | [**List<History>**](History.md) | | | + + + diff --git a/docs/PrismaticFlowConfig.md b/docs/PrismaticFlowConfig.md deleted file mode 100644 index 886c7cb3..00000000 --- a/docs/PrismaticFlowConfig.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# PrismaticFlowConfig - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiKey** | **String** | | | -|**workerCount** | **Long** | Number of Prismatic workers to run in parallel for this flow (maximum 500). | [optional] | -|**maxEventsPerMessage** | **Long** | Maximum number of events to send in a single message to Prismatic. | [optional] | -|**maxRetries** | **Long** | Maximum number of retries for a Prismatic event before it is ignored. | [optional] | - - - diff --git a/docs/PrismaticFlowConfigResponse.md b/docs/PrismaticFlowConfigResponse.md deleted file mode 100644 index 014c467c..00000000 --- a/docs/PrismaticFlowConfigResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PrismaticFlowConfigResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**workerCount** | **Long** | Number of Prismatic workers to run in parallel for this flow (maximum 500). | [optional] | -|**maxEventsPerMessage** | **Long** | Maximum number of events to send in a single message to Prismatic. | [optional] | -|**maxRetries** | **Long** | Maximum number of retries for a Prismatic event before it is ignored. | [optional] | - - - diff --git a/docs/PrismaticFlowResponse.md b/docs/PrismaticFlowResponse.md deleted file mode 100644 index 8b19236f..00000000 --- a/docs/PrismaticFlowResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PrismaticFlowResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Long** | ID of the prismatic flow. | | -|**applicationID** | **Long** | ID of application the flow is registered for. | [optional] | -|**eventType** | **String** | The event type we want to register a flow for. | | -|**prismaticFlowUrl** | **String** | The URL of the prismatic flow that we want to trigger for the event. | | -|**config** | [**PrismaticFlowConfigResponse**](PrismaticFlowConfigResponse.md) | | | - - - diff --git a/docs/PromoteExperiment.md b/docs/PromoteExperiment.md new file mode 100644 index 00000000..f24ec5f3 --- /dev/null +++ b/docs/PromoteExperiment.md @@ -0,0 +1,16 @@ + + +# PromoteExperiment + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**targetApplicationId** | **Long** | The ID of the Application to copy the experiment. It is displayed in your Talon.One deployment URL. | | +|**variantId** | **Long** | The ID of the Experiment Variant to build the new campaign. | | +|**disableExperiment** | **Boolean** | Force disable the experiment. | [optional] | +|**campaign** | [**ExperimentCampaignCopy**](ExperimentCampaignCopy.md) | | | + + + diff --git a/docs/UpdateExperiment.md b/docs/UpdateExperiment.md index 33413a56..2bf215f8 100644 --- a/docs/UpdateExperiment.md +++ b/docs/UpdateExperiment.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. | | +|**isVariantAssignmentExternal** | **Boolean** | The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. | | |**campaign** | [**UpdateCampaign**](UpdateCampaign.md) | | | diff --git a/docs/UpdateExperimentVariant.md b/docs/UpdateExperimentVariant.md index 73ce8171..7c36c713 100644 --- a/docs/UpdateExperimentVariant.md +++ b/docs/UpdateExperimentVariant.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **Long** | | | -|**name** | **String** | | | +|**name** | **String** | The name of this variant. | | |**ruleset** | [**NewRuleset**](NewRuleset.md) | | | |**weight** | **Long** | The percentage split of this variant. The sum of all variant percentages must be 100. | | diff --git a/pom.xml b/pom.xml index 459b0e64..af3d01a8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ talon-one-client jar talon-one-client - 26.04 + 26.05 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 c42d47b8..2347795f 100644 --- a/src/main/java/one/talon/ApiClient.java +++ b/src/main/java/one/talon/ApiClient.java @@ -146,7 +146,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/26.04/java"); + setUserAgent("OpenAPI-Generator/26.05/java"); authentications = new HashMap(); } diff --git a/src/main/java/one/talon/Configuration.java b/src/main/java/one/talon/Configuration.java index 815cdb37..11834a33 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.20.0") public class Configuration { - public static final String VERSION = "26.04"; + public static final String VERSION = "26.05"; 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 72c16adb..b63eee94 100644 --- a/src/main/java/one/talon/JSON.java +++ b/src/main/java/one/talon/JSON.java @@ -318,6 +318,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.EventV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.EventV3.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Experiment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentCampaignCopy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentCopy.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentCopyExperiment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentResults.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVariant.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ExperimentVariantAllocation.CustomTypeAdapterFactory()); @@ -398,6 +401,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Giveaway.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.GiveawaysPool.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.HiddenConditionsEffects.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.History.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IdentifiableEntity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ImportEntity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IncreaseAchievementProgressEffectProps.CustomTypeAdapterFactory()); @@ -412,6 +416,21 @@ 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.IntegrationHubConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadCouponBasedNotifications.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadCouponBasedNotificationsLimits.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubEventRecord.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubFlow.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubFlowConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubFlowConfigResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubFlowResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubFlowWithConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationHubPaginatedEventPayload.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationProfileEntity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationProfileEntityV3.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.IntegrationRequest.CustomTypeAdapterFactory()); @@ -438,6 +457,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListCampaignStoreBudgets.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListCampaignStoreBudgetsStore.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListCatalogItems200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListExperiments200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ListStores200Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.LoginParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Loyalty.CustomTypeAdapterFactory()); @@ -577,24 +597,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Picklist.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PlaceholderDetails.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PriceDetail.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PriceHistoryRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PriceHistoryResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PriceType.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PriceTypeReferenceDetail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PriceTypeReferences.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadCouponBasedNotifications.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadCouponBasedNotificationsLimits.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedNotification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticEventRecord.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticFlow.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticFlowConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticFlowConfigResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticFlowResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticFlowWithConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PrismaticPaginatedEventPayload.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Product.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProductSearchMatch.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProductUnitAnalytics.CustomTypeAdapterFactory()); @@ -602,6 +609,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProductUnitAnalyticsTotals.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProfileAudiencesChanges.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ProjectedTier.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new one.talon.model.PromoteExperiment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.RedeemReferralEffectProps.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.Referral.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new one.talon.model.ReferralConstraints.CustomTypeAdapterFactory()); diff --git a/src/main/java/one/talon/api/IntegrationApi.java b/src/main/java/one/talon/api/IntegrationApi.java index 2e8a841b..d58fbf75 100644 --- a/src/main/java/one/talon/api/IntegrationApi.java +++ b/src/main/java/one/talon/api/IntegrationApi.java @@ -67,6 +67,8 @@ import one.talon.model.NewReferral; import one.talon.model.NewReferralsForMultipleAdvocates; import java.time.OffsetDateTime; +import one.talon.model.PriceHistoryRequest; +import one.talon.model.PriceHistoryResponse; import one.talon.model.Referral; import one.talon.model.ReopenSessionResponse; import one.talon.model.ReturnIntegrationRequest; @@ -3995,6 +3997,133 @@ public okhttp3.Call linkLoyaltyCardToProfileAsync(@javax.annotation.Nonnull Long localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for priceHistory + * @param priceHistoryRequest body (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 priceHistoryCall(@javax.annotation.Nonnull PriceHistoryRequest priceHistoryRequest, 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 = priceHistoryRequest; + + // create path and map variables + String localVarPath = "/v1/best_prior_price_history"; + + 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 = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "management_key", "manager_auth", "api_key_v1" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call priceHistoryValidateBeforeCall(@javax.annotation.Nonnull PriceHistoryRequest priceHistoryRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'priceHistoryRequest' is set + if (priceHistoryRequest == null) { + throw new ApiException("Missing the required parameter 'priceHistoryRequest' when calling priceHistory(Async)"); + } + + return priceHistoryCall(priceHistoryRequest, _callback); + + } + + /** + * Get summary of price history + * Fetch the historical price data for a given SKU within a defined timeframe. + * @param priceHistoryRequest body (required) + * @return PriceHistoryResponse + * @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 PriceHistoryResponse priceHistory(@javax.annotation.Nonnull PriceHistoryRequest priceHistoryRequest) throws ApiException { + ApiResponse localVarResp = priceHistoryWithHttpInfo(priceHistoryRequest); + return localVarResp.getData(); + } + + /** + * Get summary of price history + * Fetch the historical price data for a given SKU within a defined timeframe. + * @param priceHistoryRequest body (required) + * @return ApiResponse<PriceHistoryResponse> + * @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 priceHistoryWithHttpInfo(@javax.annotation.Nonnull PriceHistoryRequest priceHistoryRequest) throws ApiException { + okhttp3.Call localVarCall = priceHistoryValidateBeforeCall(priceHistoryRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get summary of price history (asynchronously) + * Fetch the historical price data for a given SKU within a defined timeframe. + * @param priceHistoryRequest body (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 priceHistoryAsync(@javax.annotation.Nonnull PriceHistoryRequest priceHistoryRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = priceHistoryValidateBeforeCall(priceHistoryRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for reopenCustomerSession * @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#operation/getApplicationSessions) endpoint. (required) diff --git a/src/main/java/one/talon/api/ManagementApi.java b/src/main/java/one/talon/api/ManagementApi.java index 491d513e..ec68de53 100644 --- a/src/main/java/one/talon/api/ManagementApi.java +++ b/src/main/java/one/talon/api/ManagementApi.java @@ -60,6 +60,7 @@ import one.talon.model.DeleteUserRequest; import one.talon.model.ErrorResponse; import one.talon.model.ErrorResponseWithStatus; +import one.talon.model.Experiment; import one.talon.model.GenerateCouponRejections200Response; import one.talon.model.GetAccessLogsWithoutTotalCount200Response; import one.talon.model.GetAdditionalCosts200Response; @@ -102,6 +103,7 @@ import one.talon.model.ListAllRolesV2200Response; import one.talon.model.ListCampaignStoreBudgetLimits200Response; import one.talon.model.ListCatalogItems200Response; +import one.talon.model.ListExperiments200Response; import one.talon.model.ListStores200Response; import one.talon.model.LoginParams; import one.talon.model.LoyaltyBalancesWithTiers; @@ -5762,6 +5764,167 @@ public okhttp3.Call exportAchievementsAsync(@javax.annotation.Nonnull Long appli localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for exportApplicationCampaignAnalytics + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param rangeStart Only return results from after this timestamp. **Note:** - This 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. (required) + * @param rangeEnd Only return results from before this timestamp. **Note:** - This 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. (required) + * @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 _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 exportApplicationCampaignAnalyticsCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull OffsetDateTime rangeStart, @javax.annotation.Nonnull OffsetDateTime rangeEnd, @javax.annotation.Nullable List campaignIds, 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}/campaign_analytics/export" + .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 (campaignIds != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "campaignIds", campaignIds)); + } + + if (rangeStart != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("rangeStart", rangeStart)); + } + + if (rangeEnd != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("rangeEnd", rangeEnd)); + } + + final String[] localVarAccepts = { + "application/csv" + }; + 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[] { "management_key", "manager_auth", "api_key_v1" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportApplicationCampaignAnalyticsValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull OffsetDateTime rangeStart, @javax.annotation.Nonnull OffsetDateTime rangeEnd, @javax.annotation.Nullable List campaignIds, 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 exportApplicationCampaignAnalytics(Async)"); + } + + // verify the required parameter 'rangeStart' is set + if (rangeStart == null) { + throw new ApiException("Missing the required parameter 'rangeStart' when calling exportApplicationCampaignAnalytics(Async)"); + } + + // verify the required parameter 'rangeEnd' is set + if (rangeEnd == null) { + throw new ApiException("Missing the required parameter 'rangeEnd' when calling exportApplicationCampaignAnalytics(Async)"); + } + + return exportApplicationCampaignAnalyticsCall(applicationId, rangeStart, rangeEnd, campaignIds, _callback); + + } + + /** + * Export Application analytics aggregated by campaign + * Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](https://docs.talon.one/docs/product/campaigns/analytics/application-dashboard#understanding-the-analytics-data). - `start_date`: The start of the aggregation time frame in UTC. - `end_date`: The end of the aggregation time frame in UTC. - `revenue`: The total, pre-discount value of all items purchased in a customer session. - `sessions`: The number of all closed sessions. - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. - `average_items_per_session`: The number of items from sessions divided by the number of sessions. - `coupons`: The number of times a coupon was successfully redeemed in sessions. - `discounts`: The total value of discounts given for cart items in sessions. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param rangeStart Only return results from after this timestamp. **Note:** - This 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. (required) + * @param rangeEnd Only return results from before this timestamp. **Note:** - This 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. (required) + * @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) + * @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 -
+ */ + public String exportApplicationCampaignAnalytics(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull OffsetDateTime rangeStart, @javax.annotation.Nonnull OffsetDateTime rangeEnd, @javax.annotation.Nullable List campaignIds) throws ApiException { + ApiResponse localVarResp = exportApplicationCampaignAnalyticsWithHttpInfo(applicationId, rangeStart, rangeEnd, campaignIds); + return localVarResp.getData(); + } + + /** + * Export Application analytics aggregated by campaign + * Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](https://docs.talon.one/docs/product/campaigns/analytics/application-dashboard#understanding-the-analytics-data). - `start_date`: The start of the aggregation time frame in UTC. - `end_date`: The end of the aggregation time frame in UTC. - `revenue`: The total, pre-discount value of all items purchased in a customer session. - `sessions`: The number of all closed sessions. - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. - `average_items_per_session`: The number of items from sessions divided by the number of sessions. - `coupons`: The number of times a coupon was successfully redeemed in sessions. - `discounts`: The total value of discounts given for cart items in sessions. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param rangeStart Only return results from after this timestamp. **Note:** - This 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. (required) + * @param rangeEnd Only return results from before this timestamp. **Note:** - This 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. (required) + * @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) + * @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 -
+ */ + public ApiResponse exportApplicationCampaignAnalyticsWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull OffsetDateTime rangeStart, @javax.annotation.Nonnull OffsetDateTime rangeEnd, @javax.annotation.Nullable List campaignIds) throws ApiException { + okhttp3.Call localVarCall = exportApplicationCampaignAnalyticsValidateBeforeCall(applicationId, rangeStart, rangeEnd, campaignIds, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Export Application analytics aggregated by campaign (asynchronously) + * Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](https://docs.talon.one/docs/product/campaigns/analytics/application-dashboard#understanding-the-analytics-data). - `start_date`: The start of the aggregation time frame in UTC. - `end_date`: The end of the aggregation time frame in UTC. - `revenue`: The total, pre-discount value of all items purchased in a customer session. - `sessions`: The number of all closed sessions. - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. - `average_items_per_session`: The number of items from sessions divided by the number of sessions. - `coupons`: The number of times a coupon was successfully redeemed in sessions. - `discounts`: The total value of discounts given for cart items in sessions. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param rangeStart Only return results from after this timestamp. **Note:** - This 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. (required) + * @param rangeEnd Only return results from before this timestamp. **Note:** - This 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. (required) + * @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 _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 exportApplicationCampaignAnalyticsAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull OffsetDateTime rangeStart, @javax.annotation.Nonnull OffsetDateTime rangeEnd, @javax.annotation.Nullable List campaignIds, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportApplicationCampaignAnalyticsValidateBeforeCall(applicationId, rangeStart, rangeEnd, campaignIds, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for exportAudiencesMemberships * @param audienceId The ID of the audience. (required) @@ -7862,6 +8025,141 @@ public okhttp3.Call exportLoyaltyCardsAsync(@javax.annotation.Nonnull Long loyal localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for exportLoyaltyJoinDates + * @param loyaltyProgramId The identifier of the loyalty program. (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 -
+ */ + public okhttp3.Call exportLoyaltyJoinDatesCall(@javax.annotation.Nonnull String loyaltyProgramId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v1/loyalty_programs/{loyaltyProgramId}/export_join_dates" + .replace("{" + "loyaltyProgramId" + "}", localVarApiClient.escapeString(loyaltyProgramId.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" + }; + 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[] { "management_key", "manager_auth", "api_key_v1" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call exportLoyaltyJoinDatesValidateBeforeCall(@javax.annotation.Nonnull String loyaltyProgramId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'loyaltyProgramId' is set + if (loyaltyProgramId == null) { + throw new ApiException("Missing the required parameter 'loyaltyProgramId' when calling exportLoyaltyJoinDates(Async)"); + } + + return exportLoyaltyJoinDatesCall(loyaltyProgramId, _callback); + + } + + /** + * Export customers' loyalty program join dates + * Download a CSV file containing the join dates of all customers in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `profileIntegrationID`: The integration ID of the customer profile. - `joinDate`: The customer's loyalty program join date in RFC3339 format. + * @param loyaltyProgramId The identifier of the loyalty program. (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 -
+ */ + public String exportLoyaltyJoinDates(@javax.annotation.Nonnull String loyaltyProgramId) throws ApiException { + ApiResponse localVarResp = exportLoyaltyJoinDatesWithHttpInfo(loyaltyProgramId); + return localVarResp.getData(); + } + + /** + * Export customers' loyalty program join dates + * Download a CSV file containing the join dates of all customers in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `profileIntegrationID`: The integration ID of the customer profile. - `joinDate`: The customer's loyalty program join date in RFC3339 format. + * @param loyaltyProgramId The identifier of the loyalty program. (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 -
+ */ + public ApiResponse exportLoyaltyJoinDatesWithHttpInfo(@javax.annotation.Nonnull String loyaltyProgramId) throws ApiException { + okhttp3.Call localVarCall = exportLoyaltyJoinDatesValidateBeforeCall(loyaltyProgramId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Export customers' loyalty program join dates (asynchronously) + * Download a CSV file containing the join dates of all customers in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `profileIntegrationID`: The integration ID of the customer profile. - `joinDate`: The customer's loyalty program join date in RFC3339 format. + * @param loyaltyProgramId The identifier of the loyalty program. (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 -
+ */ + public okhttp3.Call exportLoyaltyJoinDatesAsync(@javax.annotation.Nonnull String loyaltyProgramId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportLoyaltyJoinDatesValidateBeforeCall(loyaltyProgramId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for exportLoyaltyLedger * @param rangeStart Only return results from after this timestamp. **Note:** - This 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. (required) @@ -15471,6 +15769,143 @@ public okhttp3.Call getEventTypesAsync(@javax.annotation.Nullable String name, @ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getExperiment + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param experimentId The ID of the experiment. (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 getExperimentCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long experimentId, 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}/experiments/{experimentId}" + .replace("{" + "applicationId" + "}", localVarApiClient.escapeString(applicationId.toString())) + .replace("{" + "experimentId" + "}", localVarApiClient.escapeString(experimentId.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[] { "management_key", "manager_auth", "api_key_v1" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getExperimentValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long experimentId, 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 getExperiment(Async)"); + } + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException("Missing the required parameter 'experimentId' when calling getExperiment(Async)"); + } + + return getExperimentCall(applicationId, experimentId, _callback); + + } + + /** + * Get experiment in Application + * Retrieve the given experiment associated with the Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param experimentId The ID of the experiment. (required) + * @return Experiment + * @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 Experiment getExperiment(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long experimentId) throws ApiException { + ApiResponse localVarResp = getExperimentWithHttpInfo(applicationId, experimentId); + return localVarResp.getData(); + } + + /** + * Get experiment in Application + * Retrieve the given experiment associated with the Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param experimentId The ID of the experiment. (required) + * @return ApiResponse<Experiment> + * @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 getExperimentWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long experimentId) throws ApiException { + okhttp3.Call localVarCall = getExperimentValidateBeforeCall(applicationId, experimentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get experiment in Application (asynchronously) + * Retrieve the given experiment associated with the Application. + * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param experimentId The ID of the experiment. (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 getExperimentAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nonnull Long experimentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getExperimentValidateBeforeCall(applicationId, experimentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getExports * @param pageSize The number of items in the response. (optional, default to 1000) @@ -19908,7 +20343,7 @@ private okhttp3.Call importCouponsValidateBeforeCall(@javax.annotation.Nonnull L /** * Import coupons - * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). * @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 skipDuplicates An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. (optional) @@ -19929,7 +20364,7 @@ public ModelImport importCoupons(@javax.annotation.Nonnull Long applicationId, @ /** * Import coupons - * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). * @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 skipDuplicates An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. (optional) @@ -19951,7 +20386,7 @@ public ApiResponse importCouponsWithHttpInfo(@javax.annotation.Nonn /** * Import coupons (asynchronously) - * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). * @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 skipDuplicates An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. (optional) @@ -20052,7 +20487,7 @@ private okhttp3.Call importLoyaltyCardsValidateBeforeCall(@javax.annotation.Nonn /** * Import loyalty cards - * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - `attributes` (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" ``` * @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) * @param upFile The file containing the data that is being imported. (optional) * @return ModelImport @@ -20073,7 +20508,7 @@ public ModelImport importLoyaltyCards(@javax.annotation.Nonnull Long loyaltyProg /** * Import loyalty cards - * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - `attributes` (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" ``` * @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) * @param upFile The file containing the data that is being imported. (optional) * @return ApiResponse<ModelImport> @@ -20095,7 +20530,7 @@ public ApiResponse importLoyaltyCardsWithHttpInfo(@javax.annotation /** * Import loyalty cards (asynchronously) - * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - `attributes` (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" ``` * @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) * @param upFile The file containing the data that is being imported. (optional) * @param _callback The callback to be executed when the API call finishes @@ -21944,6 +22379,157 @@ public okhttp3.Call listCollectionsInApplicationAsync(@javax.annotation.Nonnull localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for listExperiments + * @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 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 _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 listExperimentsCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, 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}/experiments" + .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 (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + 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[] { "management_key", "manager_auth", "api_key_v1" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listExperimentsValidateBeforeCall(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, 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 listExperiments(Async)"); + } + + return listExperimentsCall(applicationId, pageSize, skip, sort, _callback); + + } + + /** + * List experiments + * List all experiments of the specified Application that match your filter criteria. + * @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 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) + * @return ListExperiments200Response + * @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 ListExperiments200Response listExperiments(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort) throws ApiException { + ApiResponse localVarResp = listExperimentsWithHttpInfo(applicationId, pageSize, skip, sort); + return localVarResp.getData(); + } + + /** + * List experiments + * List all experiments of the specified Application that match your filter criteria. + * @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 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) + * @return ApiResponse<ListExperiments200Response> + * @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 listExperimentsWithHttpInfo(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort) throws ApiException { + okhttp3.Call localVarCall = listExperimentsValidateBeforeCall(applicationId, pageSize, skip, sort, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List experiments (asynchronously) + * List all experiments of the specified Application that match your filter criteria. + * @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 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 _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 listExperimentsAsync(@javax.annotation.Nonnull Long applicationId, @javax.annotation.Nullable Long pageSize, @javax.annotation.Nullable Long skip, @javax.annotation.Nullable String sort, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listExperimentsValidateBeforeCall(applicationId, pageSize, skip, sort, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for listStores * @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) diff --git a/src/main/java/one/talon/model/BestPriorPrice.java b/src/main/java/one/talon/model/BestPriorPrice.java index 04342b40..143ca294 100644 --- a/src/main/java/one/talon/model/BestPriorPrice.java +++ b/src/main/java/one/talon/model/BestPriorPrice.java @@ -53,6 +53,11 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class BestPriorPrice { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Long id; + public static final String SERIALIZED_NAME_SKU = "sku"; @SerializedName(SERIALIZED_NAME_SKU) @javax.annotation.Nonnull @@ -86,6 +91,25 @@ public class BestPriorPrice { public BestPriorPrice() { } + public BestPriorPrice id(@javax.annotation.Nonnull Long id) { + this.id = id; + return this; + } + + /** + * The ID of the historical price. + * @return id + */ + @javax.annotation.Nonnull + public Long getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Long id) { + this.id = id; + } + + public BestPriorPrice sku(@javax.annotation.Nonnull String sku) { this.sku = sku; return this; @@ -111,7 +135,7 @@ public BestPriorPrice observedAt(@javax.annotation.Nonnull OffsetDateTime observ } /** - * The date and time when the best price was observed. + * The date and time when the price was observed. * @return observedAt */ @javax.annotation.Nonnull @@ -210,7 +234,8 @@ public boolean equals(Object o) { return false; } BestPriorPrice bestPriorPrice = (BestPriorPrice) o; - return Objects.equals(this.sku, bestPriorPrice.sku) && + return Objects.equals(this.id, bestPriorPrice.id) && + Objects.equals(this.sku, bestPriorPrice.sku) && Objects.equals(this.observedAt, bestPriorPrice.observedAt) && Objects.equals(this.contextId, bestPriorPrice.contextId) && Objects.equals(this.price, bestPriorPrice.price) && @@ -220,13 +245,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(sku, observedAt, contextId, price, metadata, target); + return Objects.hash(id, sku, observedAt, contextId, price, metadata, target); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BestPriorPrice {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" sku: ").append(toIndentedString(sku)).append("\n"); sb.append(" observedAt: ").append(toIndentedString(observedAt)).append("\n"); sb.append(" contextId: ").append(toIndentedString(contextId)).append("\n"); @@ -254,10 +280,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("sku", "observedAt", "contextId", "price", "metadata", "target")); + openapiFields = new HashSet(Arrays.asList("id", "sku", "observedAt", "contextId", "price", "metadata", "target")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("sku", "observedAt", "contextId", "price", "metadata", "target")); + openapiRequiredFields = new HashSet(Arrays.asList("id", "sku", "observedAt", "contextId", "price", "metadata", "target")); } /** diff --git a/src/main/java/one/talon/model/BestPriorPriceRequest.java b/src/main/java/one/talon/model/BestPriorPriceRequest.java index 9c557724..60b24a3d 100644 --- a/src/main/java/one/talon/model/BestPriorPriceRequest.java +++ b/src/main/java/one/talon/model/BestPriorPriceRequest.java @@ -70,10 +70,70 @@ public class BestPriorPriceRequest { 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. + */ + @JsonAdapter(TimeframeEndDateTypeEnum.Adapter.class) + public enum TimeframeEndDateTypeEnum { + STRICT("strict"), + + PRICE("price"), + + SALE("sale"); + + private String value; + + TimeframeEndDateTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TimeframeEndDateTypeEnum fromValue(String value) { + for (TimeframeEndDateTypeEnum b : TimeframeEndDateTypeEnum.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 TimeframeEndDateTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TimeframeEndDateTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TimeframeEndDateTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TimeframeEndDateTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIMEFRAME_END_DATE_TYPE = "timeframeEndDateType"; + @SerializedName(SERIALIZED_NAME_TIMEFRAME_END_DATE_TYPE) + @javax.annotation.Nullable + private TimeframeEndDateTypeEnum timeframeEndDateType; + public static final String SERIALIZED_NAME_TARGET = "target"; @SerializedName(SERIALIZED_NAME_TARGET) @javax.annotation.Nullable @@ -147,25 +207,48 @@ public void setTimeframe(@javax.annotation.Nonnull String timeframe) { } + @Deprecated public BestPriorPriceRequest strictEndDate(@javax.annotation.Nonnull Boolean strictEndDate) { this.strictEndDate = strictEndDate; return this; } /** - * 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 striclty uses the number of days specified in `timeframe`. + * 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) { + 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. + * @return timeframeEndDateType + */ + @javax.annotation.Nullable + public TimeframeEndDateTypeEnum getTimeframeEndDateType() { + return timeframeEndDateType; + } + + public void setTimeframeEndDateType(@javax.annotation.Nullable TimeframeEndDateTypeEnum timeframeEndDateType) { + this.timeframeEndDateType = timeframeEndDateType; + } + + public BestPriorPriceRequest target(@javax.annotation.Nullable BestPriorTarget target) { this.target = target; return this; @@ -199,12 +282,13 @@ public boolean equals(Object o) { 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, target); + return Objects.hash(skus, timeframeEndDate, timeframe, strictEndDate, timeframeEndDateType, target); } @Override @@ -215,6 +299,7 @@ public String toString() { 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("}"); return sb.toString(); @@ -237,7 +322,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "strictEndDate", "target")); + openapiFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "strictEndDate", "timeframeEndDateType", "target")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("skus", "timeframeEndDate", "timeframe", "strictEndDate")); @@ -280,6 +365,13 @@ 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()) { + 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 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/Experiment.java b/src/main/java/one/talon/model/Experiment.java index 4fb077be..4d153dcb 100644 --- a/src/main/java/one/talon/model/Experiment.java +++ b/src/main/java/one/talon/model/Experiment.java @@ -92,7 +92,9 @@ public class Experiment { public enum StateEnum { ENABLED("enabled"), - DISABLED("disabled"); + DISABLED("disabled"), + + ARCHIVED("archived"); private String value; @@ -139,7 +141,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) - @javax.annotation.Nullable + @javax.annotation.Nonnull private StateEnum state = StateEnum.DISABLED; public static final String SERIALIZED_NAME_VARIANTS = "variants"; @@ -218,7 +220,7 @@ public Experiment isVariantAssignmentExternal(@javax.annotation.Nullable Boolean } /** - * The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. + * The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. * @return isVariantAssignmentExternal */ @javax.annotation.Nullable @@ -269,7 +271,7 @@ public void setActivated(@javax.annotation.Nullable OffsetDateTime activated) { } - public Experiment state(@javax.annotation.Nullable StateEnum state) { + public Experiment state(@javax.annotation.Nonnull StateEnum state) { this.state = state; return this; } @@ -278,12 +280,12 @@ public Experiment state(@javax.annotation.Nullable StateEnum state) { * A disabled experiment is not evaluated for rules or coupons. * @return state */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public StateEnum getState() { return state; } - public void setState(@javax.annotation.Nullable StateEnum state) { + public void setState(@javax.annotation.Nonnull StateEnum state) { this.state = state; } @@ -397,7 +399,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(Arrays.asList("id", "created", "applicationId", "isVariantAssignmentExternal", "campaign", "activated", "state", "variants", "deletedat")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("id", "created", "applicationId")); + openapiRequiredFields = new HashSet(Arrays.asList("id", "created", "applicationId", "state")); } /** @@ -432,13 +434,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("campaign") != null && !jsonObj.get("campaign").isJsonNull()) { Campaign.validateJsonElement(jsonObj.get("campaign")); } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + if (!jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } + // validate the required field `state` + StateEnum.validateJsonElement(jsonObj.get("state")); if (jsonObj.get("variants") != null && !jsonObj.get("variants").isJsonNull()) { JsonArray jsonArrayvariants = jsonObj.getAsJsonArray("variants"); if (jsonArrayvariants != null) { diff --git a/src/main/java/one/talon/model/ExperimentCampaignCopy.java b/src/main/java/one/talon/model/ExperimentCampaignCopy.java new file mode 100644 index 00000000..ebb54fae --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentCampaignCopy.java @@ -0,0 +1,353 @@ +/* + * 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) are used 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#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.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; + +/** + * ExperimentCampaignCopy + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class ExperimentCampaignCopy { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_START_TIME = "startTime"; + @SerializedName(SERIALIZED_NAME_START_TIME) + @javax.annotation.Nullable + private OffsetDateTime startTime; + + public static final String SERIALIZED_NAME_END_TIME = "endTime"; + @SerializedName(SERIALIZED_NAME_END_TIME) + @javax.annotation.Nullable + private OffsetDateTime endTime; + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public static final String SERIALIZED_NAME_EVALUATION_GROUP_ID = "evaluationGroupId"; + @SerializedName(SERIALIZED_NAME_EVALUATION_GROUP_ID) + @javax.annotation.Nullable + private Long evaluationGroupId; + + public ExperimentCampaignCopy() { + } + + public ExperimentCampaignCopy name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the copied campaign (Defaults to \"Copy of original campaign name\"). + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public ExperimentCampaignCopy description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * A detailed description of the campaign. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ExperimentCampaignCopy startTime(@javax.annotation.Nullable OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Timestamp when the campaign will become active. + * @return startTime + */ + @javax.annotation.Nullable + public OffsetDateTime getStartTime() { + return startTime; + } + + public void setStartTime(@javax.annotation.Nullable OffsetDateTime startTime) { + this.startTime = startTime; + } + + + public ExperimentCampaignCopy endTime(@javax.annotation.Nullable OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Timestamp when the campaign will become inactive. + * @return endTime + */ + @javax.annotation.Nullable + public OffsetDateTime getEndTime() { + return endTime; + } + + public void setEndTime(@javax.annotation.Nullable OffsetDateTime endTime) { + this.endTime = endTime; + } + + + public ExperimentCampaignCopy tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public ExperimentCampaignCopy addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags for the campaign. + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public ExperimentCampaignCopy evaluationGroupId(@javax.annotation.Nullable Long evaluationGroupId) { + this.evaluationGroupId = evaluationGroupId; + return this; + } + + /** + * The ID of the campaign evaluation group the campaign belongs to. + * @return evaluationGroupId + */ + @javax.annotation.Nullable + public Long getEvaluationGroupId() { + return evaluationGroupId; + } + + public void setEvaluationGroupId(@javax.annotation.Nullable Long evaluationGroupId) { + this.evaluationGroupId = evaluationGroupId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentCampaignCopy experimentCampaignCopy = (ExperimentCampaignCopy) o; + return Objects.equals(this.name, experimentCampaignCopy.name) && + Objects.equals(this.description, experimentCampaignCopy.description) && + Objects.equals(this.startTime, experimentCampaignCopy.startTime) && + Objects.equals(this.endTime, experimentCampaignCopy.endTime) && + Objects.equals(this.tags, experimentCampaignCopy.tags) && + Objects.equals(this.evaluationGroupId, experimentCampaignCopy.evaluationGroupId); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, startTime, endTime, tags, evaluationGroupId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentCampaignCopy {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" evaluationGroupId: ").append(toIndentedString(evaluationGroupId)).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", "description", "startTime", "endTime", "tags", "evaluationGroupId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 ExperimentCampaignCopy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentCampaignCopy.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 ExperimentCampaignCopy is not found in the empty JSON string", ExperimentCampaignCopy.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentCampaignCopy.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 `ExperimentCampaignCopy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !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("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 optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentCampaignCopy.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentCampaignCopy' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentCampaignCopy.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentCampaignCopy value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentCampaignCopy read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentCampaignCopy given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentCampaignCopy + * @throws IOException if the JSON string is invalid with respect to ExperimentCampaignCopy + */ + public static ExperimentCampaignCopy fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentCampaignCopy.class); + } + + /** + * Convert an instance of ExperimentCampaignCopy to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentCopy.java b/src/main/java/one/talon/model/ExperimentCopy.java new file mode 100644 index 00000000..05e2ba14 --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentCopy.java @@ -0,0 +1,238 @@ +/* + * 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) are used 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#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 one.talon.model.ExperimentCopyExperiment; + +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; + +/** + * ExperimentCopy + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class ExperimentCopy { + public static final String SERIALIZED_NAME_TARGET_APPLICATION_ID = "targetApplicationId"; + @SerializedName(SERIALIZED_NAME_TARGET_APPLICATION_ID) + @javax.annotation.Nonnull + private Long targetApplicationId; + + public static final String SERIALIZED_NAME_EXPERIMENT = "experiment"; + @SerializedName(SERIALIZED_NAME_EXPERIMENT) + @javax.annotation.Nonnull + private ExperimentCopyExperiment experiment; + + public ExperimentCopy() { + } + + public ExperimentCopy targetApplicationId(@javax.annotation.Nonnull Long targetApplicationId) { + this.targetApplicationId = targetApplicationId; + return this; + } + + /** + * The ID of the Application to copy the experiment. It is displayed in your Talon.One deployment URL. + * @return targetApplicationId + */ + @javax.annotation.Nonnull + public Long getTargetApplicationId() { + return targetApplicationId; + } + + public void setTargetApplicationId(@javax.annotation.Nonnull Long targetApplicationId) { + this.targetApplicationId = targetApplicationId; + } + + + public ExperimentCopy experiment(@javax.annotation.Nonnull ExperimentCopyExperiment experiment) { + this.experiment = experiment; + return this; + } + + /** + * Get experiment + * @return experiment + */ + @javax.annotation.Nonnull + public ExperimentCopyExperiment getExperiment() { + return experiment; + } + + public void setExperiment(@javax.annotation.Nonnull ExperimentCopyExperiment experiment) { + this.experiment = experiment; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentCopy experimentCopy = (ExperimentCopy) o; + return Objects.equals(this.targetApplicationId, experimentCopy.targetApplicationId) && + Objects.equals(this.experiment, experimentCopy.experiment); + } + + @Override + public int hashCode() { + return Objects.hash(targetApplicationId, experiment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentCopy {\n"); + sb.append(" targetApplicationId: ").append(toIndentedString(targetApplicationId)).append("\n"); + sb.append(" experiment: ").append(toIndentedString(experiment)).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("targetApplicationId", "experiment")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("targetApplicationId", "experiment")); + } + + /** + * 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 ExperimentCopy + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentCopy.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 ExperimentCopy is not found in the empty JSON string", ExperimentCopy.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentCopy.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 `ExperimentCopy` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentCopy.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 `experiment` + ExperimentCopyExperiment.validateJsonElement(jsonObj.get("experiment")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentCopy.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentCopy' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentCopy.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentCopy value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentCopy read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentCopy given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentCopy + * @throws IOException if the JSON string is invalid with respect to ExperimentCopy + */ + public static ExperimentCopy fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentCopy.class); + } + + /** + * Convert an instance of ExperimentCopy to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/ExperimentCopyExperiment.java b/src/main/java/one/talon/model/ExperimentCopyExperiment.java new file mode 100644 index 00000000..6415313b --- /dev/null +++ b/src/main/java/one/talon/model/ExperimentCopyExperiment.java @@ -0,0 +1,238 @@ +/* + * 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) are used 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#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 one.talon.model.ExperimentCampaignCopy; + +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; + +/** + * ExperimentCopyExperiment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class ExperimentCopyExperiment { + public static final String SERIALIZED_NAME_IS_VARIANT_ASSIGNMENT_EXTERNAL = "isVariantAssignmentExternal"; + @SerializedName(SERIALIZED_NAME_IS_VARIANT_ASSIGNMENT_EXTERNAL) + @javax.annotation.Nonnull + private Boolean isVariantAssignmentExternal; + + public static final String SERIALIZED_NAME_CAMPAIGN = "campaign"; + @SerializedName(SERIALIZED_NAME_CAMPAIGN) + @javax.annotation.Nonnull + private ExperimentCampaignCopy campaign; + + public ExperimentCopyExperiment() { + } + + public ExperimentCopyExperiment isVariantAssignmentExternal(@javax.annotation.Nonnull Boolean isVariantAssignmentExternal) { + this.isVariantAssignmentExternal = isVariantAssignmentExternal; + return this; + } + + /** + * The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. + * @return isVariantAssignmentExternal + */ + @javax.annotation.Nonnull + public Boolean getIsVariantAssignmentExternal() { + return isVariantAssignmentExternal; + } + + public void setIsVariantAssignmentExternal(@javax.annotation.Nonnull Boolean isVariantAssignmentExternal) { + this.isVariantAssignmentExternal = isVariantAssignmentExternal; + } + + + public ExperimentCopyExperiment campaign(@javax.annotation.Nonnull ExperimentCampaignCopy campaign) { + this.campaign = campaign; + return this; + } + + /** + * Get campaign + * @return campaign + */ + @javax.annotation.Nonnull + public ExperimentCampaignCopy getCampaign() { + return campaign; + } + + public void setCampaign(@javax.annotation.Nonnull ExperimentCampaignCopy campaign) { + this.campaign = campaign; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentCopyExperiment experimentCopyExperiment = (ExperimentCopyExperiment) o; + return Objects.equals(this.isVariantAssignmentExternal, experimentCopyExperiment.isVariantAssignmentExternal) && + Objects.equals(this.campaign, experimentCopyExperiment.campaign); + } + + @Override + public int hashCode() { + return Objects.hash(isVariantAssignmentExternal, campaign); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentCopyExperiment {\n"); + sb.append(" isVariantAssignmentExternal: ").append(toIndentedString(isVariantAssignmentExternal)).append("\n"); + sb.append(" campaign: ").append(toIndentedString(campaign)).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("isVariantAssignmentExternal", "campaign")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("isVariantAssignmentExternal", "campaign")); + } + + /** + * 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 ExperimentCopyExperiment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ExperimentCopyExperiment.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 ExperimentCopyExperiment is not found in the empty JSON string", ExperimentCopyExperiment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ExperimentCopyExperiment.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 `ExperimentCopyExperiment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExperimentCopyExperiment.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 `campaign` + ExperimentCampaignCopy.validateJsonElement(jsonObj.get("campaign")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExperimentCopyExperiment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExperimentCopyExperiment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExperimentCopyExperiment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExperimentCopyExperiment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExperimentCopyExperiment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExperimentCopyExperiment given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExperimentCopyExperiment + * @throws IOException if the JSON string is invalid with respect to ExperimentCopyExperiment + */ + public static ExperimentCopyExperiment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExperimentCopyExperiment.class); + } + + /** + * Convert an instance of ExperimentCopyExperiment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/History.java b/src/main/java/one/talon/model/History.java new file mode 100644 index 00000000..b75675e9 --- /dev/null +++ b/src/main/java/one/talon/model/History.java @@ -0,0 +1,347 @@ +/* + * 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) are used 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#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package one.talon.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import one.talon.model.BestPriorPriceMetadata; + +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; + +/** + * History + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class History { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private Long id; + + public static final String SERIALIZED_NAME_OBSERVED_AT = "observedAt"; + @SerializedName(SERIALIZED_NAME_OBSERVED_AT) + @javax.annotation.Nonnull + private OffsetDateTime observedAt; + + public static final String SERIALIZED_NAME_CONTEXT_ID = "contextId"; + @SerializedName(SERIALIZED_NAME_CONTEXT_ID) + @javax.annotation.Nonnull + private String contextId; + + public static final String SERIALIZED_NAME_PRICE = "price"; + @SerializedName(SERIALIZED_NAME_PRICE) + @javax.annotation.Nonnull + private BigDecimal price; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nonnull + private BestPriorPriceMetadata metadata; + + public static final String SERIALIZED_NAME_TARGET = "target"; + @SerializedName(SERIALIZED_NAME_TARGET) + @javax.annotation.Nonnull + private Object target; + + public History() { + } + + public History id(@javax.annotation.Nonnull Long id) { + this.id = id; + return this; + } + + /** + * The ID of the historical price. + * @return id + */ + @javax.annotation.Nonnull + public Long getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull Long id) { + this.id = id; + } + + + public History observedAt(@javax.annotation.Nonnull OffsetDateTime observedAt) { + this.observedAt = observedAt; + return this; + } + + /** + * The date and time when the price was observed. + * @return observedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getObservedAt() { + return observedAt; + } + + public void setObservedAt(@javax.annotation.Nonnull OffsetDateTime observedAt) { + this.observedAt = observedAt; + } + + + public History contextId(@javax.annotation.Nonnull String contextId) { + this.contextId = contextId; + return this; + } + + /** + * Identifier of the relevant context at the time the price was observed (e.g. summer sale). + * @return contextId + */ + @javax.annotation.Nonnull + public String getContextId() { + return contextId; + } + + public void setContextId(@javax.annotation.Nonnull String contextId) { + this.contextId = contextId; + } + + + public History price(@javax.annotation.Nonnull BigDecimal price) { + this.price = price; + return this; + } + + /** + * Price of the item. + * @return price + */ + @javax.annotation.Nonnull + public BigDecimal getPrice() { + return price; + } + + public void setPrice(@javax.annotation.Nonnull BigDecimal price) { + this.price = price; + } + + + public History metadata(@javax.annotation.Nonnull BestPriorPriceMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nonnull + public BestPriorPriceMetadata getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull BestPriorPriceMetadata metadata) { + this.metadata = metadata; + } + + + public History target(@javax.annotation.Nonnull Object target) { + this.target = target; + return this; + } + + /** + * Get target + * @return target + */ + @javax.annotation.Nonnull + public Object getTarget() { + return target; + } + + public void setTarget(@javax.annotation.Nonnull Object target) { + this.target = target; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + History history = (History) o; + return Objects.equals(this.id, history.id) && + Objects.equals(this.observedAt, history.observedAt) && + Objects.equals(this.contextId, history.contextId) && + Objects.equals(this.price, history.price) && + Objects.equals(this.metadata, history.metadata) && + Objects.equals(this.target, history.target); + } + + @Override + public int hashCode() { + return Objects.hash(id, observedAt, contextId, price, metadata, target); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class History {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" observedAt: ").append(toIndentedString(observedAt)).append("\n"); + sb.append(" contextId: ").append(toIndentedString(contextId)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).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", "observedAt", "contextId", "price", "metadata", "target")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "observedAt", "contextId", "price", "metadata", "target")); + } + + /** + * 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 History + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!History.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 History is not found in the empty JSON string", History.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!History.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 `History` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : History.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("contextId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `contextId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contextId").toString())); + } + // validate the required field `metadata` + BestPriorPriceMetadata.validateJsonElement(jsonObj.get("metadata")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!History.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'History' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(History.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, History value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public History read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of History given an JSON string + * + * @param jsonString JSON string + * @return An instance of History + * @throws IOException if the JSON string is invalid with respect to History + */ + public static History fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, History.class); + } + + /** + * Convert an instance of History to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/PrismaticConfig.java b/src/main/java/one/talon/model/IntegrationHubConfig.java similarity index 66% rename from src/main/java/one/talon/model/PrismaticConfig.java rename to src/main/java/one/talon/model/IntegrationHubConfig.java index 59c777e1..63d5bc89 100644 --- a/src/main/java/one/talon/model/PrismaticConfig.java +++ b/src/main/java/one/talon/model/IntegrationHubConfig.java @@ -46,43 +46,43 @@ import one.talon.JSON; /** - * Config used for accessing integrations in Prismatic + * Config used for accessing integrations in IntegrationHub */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticConfig { - public static final String SERIALIZED_NAME_PRISMATIC_URL = "prismaticUrl"; - @SerializedName(SERIALIZED_NAME_PRISMATIC_URL) +public class IntegrationHubConfig { + public static final String SERIALIZED_NAME_INTEGRATION_HUB_URL = "integrationHubUrl"; + @SerializedName(SERIALIZED_NAME_INTEGRATION_HUB_URL) @javax.annotation.Nonnull - private String prismaticUrl; + private String integrationHubUrl; public static final String SERIALIZED_NAME_ACCESS_TOKEN = "accessToken"; @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) @javax.annotation.Nonnull private String accessToken; - public PrismaticConfig() { + public IntegrationHubConfig() { } - public PrismaticConfig prismaticUrl(@javax.annotation.Nonnull String prismaticUrl) { - this.prismaticUrl = prismaticUrl; + public IntegrationHubConfig integrationHubUrl(@javax.annotation.Nonnull String integrationHubUrl) { + this.integrationHubUrl = integrationHubUrl; return this; } /** - * The url used to integrate the Prismatic Marketplace. - * @return prismaticUrl + * The url used to integrate the IntegrationHub Marketplace. + * @return integrationHubUrl */ @javax.annotation.Nonnull - public String getPrismaticUrl() { - return prismaticUrl; + public String getIntegrationHubUrl() { + return integrationHubUrl; } - public void setPrismaticUrl(@javax.annotation.Nonnull String prismaticUrl) { - this.prismaticUrl = prismaticUrl; + public void setIntegrationHubUrl(@javax.annotation.Nonnull String integrationHubUrl) { + this.integrationHubUrl = integrationHubUrl; } - public PrismaticConfig accessToken(@javax.annotation.Nonnull String accessToken) { + public IntegrationHubConfig accessToken(@javax.annotation.Nonnull String accessToken) { this.accessToken = accessToken; return this; } @@ -110,21 +110,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticConfig prismaticConfig = (PrismaticConfig) o; - return Objects.equals(this.prismaticUrl, prismaticConfig.prismaticUrl) && - Objects.equals(this.accessToken, prismaticConfig.accessToken); + IntegrationHubConfig integrationHubConfig = (IntegrationHubConfig) o; + return Objects.equals(this.integrationHubUrl, integrationHubConfig.integrationHubUrl) && + Objects.equals(this.accessToken, integrationHubConfig.accessToken); } @Override public int hashCode() { - return Objects.hash(prismaticUrl, accessToken); + return Objects.hash(integrationHubUrl, accessToken); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticConfig {\n"); - sb.append(" prismaticUrl: ").append(toIndentedString(prismaticUrl)).append("\n"); + sb.append("class IntegrationHubConfig {\n"); + sb.append(" integrationHubUrl: ").append(toIndentedString(integrationHubUrl)).append("\n"); sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); sb.append("}"); return sb.toString(); @@ -147,42 +147,42 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("prismaticUrl", "accessToken")); + openapiFields = new HashSet(Arrays.asList("integrationHubUrl", "accessToken")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("prismaticUrl", "accessToken")); + openapiRequiredFields = new HashSet(Arrays.asList("integrationHubUrl", "accessToken")); } /** * 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 PrismaticConfig + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubConfig */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticConfig.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 PrismaticConfig is not found in the empty JSON string", PrismaticConfig.openapiRequiredFields.toString())); + if (!IntegrationHubConfig.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 IntegrationHubConfig is not found in the empty JSON string", IntegrationHubConfig.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticConfig.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 `PrismaticConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubConfig.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 `IntegrationHubConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticConfig.openapiRequiredFields) { + for (String requiredField : IntegrationHubConfig.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("prismaticUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `prismaticUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prismaticUrl").toString())); + if (!jsonObj.get("integrationHubUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `integrationHubUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("integrationHubUrl").toString())); } if (!jsonObj.get("accessToken").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `accessToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accessToken").toString())); @@ -193,22 +193,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticConfig' and its subtypes + if (!IntegrationHubConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubConfig' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticConfig.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubConfig.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticConfig value) throws IOException { + public void write(JsonWriter out, IntegrationHubConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticConfig read(JsonReader in) throws IOException { + public IntegrationHubConfig read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -219,18 +219,18 @@ public PrismaticConfig read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticConfig given an JSON string + * Create an instance of IntegrationHubConfig given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticConfig - * @throws IOException if the JSON string is invalid with respect to PrismaticConfig + * @return An instance of IntegrationHubConfig + * @throws IOException if the JSON string is invalid with respect to IntegrationHubConfig */ - public static PrismaticConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticConfig.class); + public static IntegrationHubConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubConfig.class); } /** - * Convert an instance of PrismaticConfig to an JSON string + * Convert an instance of IntegrationHubConfig to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotifications.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotifications.java similarity index 72% rename from src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotifications.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotifications.java index e1940774..f3076c32 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotifications.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotifications.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import one.talon.model.PrismaticEventPayloadCouponBasedNotificationsLimits; +import one.talon.model.IntegrationHubEventPayloadCouponBasedNotificationsLimits; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -50,10 +50,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadCouponBasedNotifications + * IntegrationHubEventPayloadCouponBasedNotifications */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadCouponBasedNotifications { +public class IntegrationHubEventPayloadCouponBasedNotifications { public static final String SERIALIZED_NAME_ID = "Id"; @SerializedName(SERIALIZED_NAME_ID) @javax.annotation.Nonnull @@ -142,7 +142,7 @@ public class PrismaticEventPayloadCouponBasedNotifications { public static final String SERIALIZED_NAME_LIMITS = "Limits"; @SerializedName(SERIALIZED_NAME_LIMITS) @javax.annotation.Nullable - private List limits = new ArrayList<>(); + private List limits = new ArrayList<>(); public static final String SERIALIZED_NAME_PUBLISHED_AT = "PublishedAt"; @SerializedName(SERIALIZED_NAME_PUBLISHED_AT) @@ -159,10 +159,10 @@ public class PrismaticEventPayloadCouponBasedNotifications { @javax.annotation.Nonnull private String employeeName; - public PrismaticEventPayloadCouponBasedNotifications() { + public IntegrationHubEventPayloadCouponBasedNotifications() { } - public PrismaticEventPayloadCouponBasedNotifications id(@javax.annotation.Nonnull Long id) { + public IntegrationHubEventPayloadCouponBasedNotifications id(@javax.annotation.Nonnull Long id) { this.id = id; return this; } @@ -181,7 +181,7 @@ public void setId(@javax.annotation.Nonnull Long id) { } - public PrismaticEventPayloadCouponBasedNotifications created(@javax.annotation.Nonnull OffsetDateTime created) { + public IntegrationHubEventPayloadCouponBasedNotifications created(@javax.annotation.Nonnull OffsetDateTime created) { this.created = created; return this; } @@ -200,7 +200,7 @@ public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { } - public PrismaticEventPayloadCouponBasedNotifications campaignId(@javax.annotation.Nonnull Long campaignId) { + public IntegrationHubEventPayloadCouponBasedNotifications campaignId(@javax.annotation.Nonnull Long campaignId) { this.campaignId = campaignId; return this; } @@ -219,7 +219,7 @@ public void setCampaignId(@javax.annotation.Nonnull Long campaignId) { } - public PrismaticEventPayloadCouponBasedNotifications value(@javax.annotation.Nonnull String value) { + public IntegrationHubEventPayloadCouponBasedNotifications value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -238,7 +238,7 @@ public void setValue(@javax.annotation.Nonnull String value) { } - public PrismaticEventPayloadCouponBasedNotifications usageLimit(@javax.annotation.Nonnull Long usageLimit) { + public IntegrationHubEventPayloadCouponBasedNotifications usageLimit(@javax.annotation.Nonnull Long usageLimit) { this.usageLimit = usageLimit; return this; } @@ -257,7 +257,7 @@ public void setUsageLimit(@javax.annotation.Nonnull Long usageLimit) { } - public PrismaticEventPayloadCouponBasedNotifications discountLimit(@javax.annotation.Nullable Float discountLimit) { + public IntegrationHubEventPayloadCouponBasedNotifications discountLimit(@javax.annotation.Nullable Float discountLimit) { this.discountLimit = discountLimit; return this; } @@ -276,7 +276,7 @@ public void setDiscountLimit(@javax.annotation.Nullable Float discountLimit) { } - public PrismaticEventPayloadCouponBasedNotifications reservationLimit(@javax.annotation.Nullable Long reservationLimit) { + public IntegrationHubEventPayloadCouponBasedNotifications reservationLimit(@javax.annotation.Nullable Long reservationLimit) { this.reservationLimit = reservationLimit; return this; } @@ -295,7 +295,7 @@ public void setReservationLimit(@javax.annotation.Nullable Long reservationLimit } - public PrismaticEventPayloadCouponBasedNotifications startDate(@javax.annotation.Nullable OffsetDateTime startDate) { + public IntegrationHubEventPayloadCouponBasedNotifications startDate(@javax.annotation.Nullable OffsetDateTime startDate) { this.startDate = startDate; return this; } @@ -314,7 +314,7 @@ public void setStartDate(@javax.annotation.Nullable OffsetDateTime startDate) { } - public PrismaticEventPayloadCouponBasedNotifications expiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { + public IntegrationHubEventPayloadCouponBasedNotifications expiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { this.expiryDate = expiryDate; return this; } @@ -333,7 +333,7 @@ public void setExpiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) } - public PrismaticEventPayloadCouponBasedNotifications usageCounter(@javax.annotation.Nonnull Long usageCounter) { + public IntegrationHubEventPayloadCouponBasedNotifications usageCounter(@javax.annotation.Nonnull Long usageCounter) { this.usageCounter = usageCounter; return this; } @@ -352,7 +352,7 @@ public void setUsageCounter(@javax.annotation.Nonnull Long usageCounter) { } - public PrismaticEventPayloadCouponBasedNotifications discountCounter(@javax.annotation.Nullable Float discountCounter) { + public IntegrationHubEventPayloadCouponBasedNotifications discountCounter(@javax.annotation.Nullable Float discountCounter) { this.discountCounter = discountCounter; return this; } @@ -371,7 +371,7 @@ public void setDiscountCounter(@javax.annotation.Nullable Float discountCounter) } - public PrismaticEventPayloadCouponBasedNotifications discountRemainder(@javax.annotation.Nullable Float discountRemainder) { + public IntegrationHubEventPayloadCouponBasedNotifications discountRemainder(@javax.annotation.Nullable Float discountRemainder) { this.discountRemainder = discountRemainder; return this; } @@ -390,7 +390,7 @@ public void setDiscountRemainder(@javax.annotation.Nullable Float discountRemain } - public PrismaticEventPayloadCouponBasedNotifications referralId(@javax.annotation.Nullable Long referralId) { + public IntegrationHubEventPayloadCouponBasedNotifications referralId(@javax.annotation.Nullable Long referralId) { this.referralId = referralId; return this; } @@ -409,7 +409,7 @@ public void setReferralId(@javax.annotation.Nullable Long referralId) { } - public PrismaticEventPayloadCouponBasedNotifications recipientIntegrationId(@javax.annotation.Nullable String recipientIntegrationId) { + public IntegrationHubEventPayloadCouponBasedNotifications recipientIntegrationId(@javax.annotation.Nullable String recipientIntegrationId) { this.recipientIntegrationId = recipientIntegrationId; return this; } @@ -428,7 +428,7 @@ public void setRecipientIntegrationId(@javax.annotation.Nullable String recipien } - public PrismaticEventPayloadCouponBasedNotifications importId(@javax.annotation.Nullable Long importId) { + public IntegrationHubEventPayloadCouponBasedNotifications importId(@javax.annotation.Nullable Long importId) { this.importId = importId; return this; } @@ -447,7 +447,7 @@ public void setImportId(@javax.annotation.Nullable Long importId) { } - public PrismaticEventPayloadCouponBasedNotifications batchId(@javax.annotation.Nullable String batchId) { + public IntegrationHubEventPayloadCouponBasedNotifications batchId(@javax.annotation.Nullable String batchId) { this.batchId = batchId; return this; } @@ -466,7 +466,7 @@ public void setBatchId(@javax.annotation.Nullable String batchId) { } - public PrismaticEventPayloadCouponBasedNotifications attributes(@javax.annotation.Nullable Object attributes) { + public IntegrationHubEventPayloadCouponBasedNotifications attributes(@javax.annotation.Nullable Object attributes) { this.attributes = attributes; return this; } @@ -485,12 +485,12 @@ public void setAttributes(@javax.annotation.Nullable Object attributes) { } - public PrismaticEventPayloadCouponBasedNotifications limits(@javax.annotation.Nullable List limits) { + public IntegrationHubEventPayloadCouponBasedNotifications limits(@javax.annotation.Nullable List limits) { this.limits = limits; return this; } - public PrismaticEventPayloadCouponBasedNotifications addLimitsItem(PrismaticEventPayloadCouponBasedNotificationsLimits limitsItem) { + public IntegrationHubEventPayloadCouponBasedNotifications addLimitsItem(IntegrationHubEventPayloadCouponBasedNotificationsLimits limitsItem) { if (this.limits == null) { this.limits = new ArrayList<>(); } @@ -503,16 +503,16 @@ public PrismaticEventPayloadCouponBasedNotifications addLimitsItem(PrismaticEven * @return limits */ @javax.annotation.Nullable - public List getLimits() { + public List getLimits() { return limits; } - public void setLimits(@javax.annotation.Nullable List limits) { + public void setLimits(@javax.annotation.Nullable List limits) { this.limits = limits; } - public PrismaticEventPayloadCouponBasedNotifications publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { + public IntegrationHubEventPayloadCouponBasedNotifications publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { this.publishedAt = publishedAt; return this; } @@ -531,7 +531,7 @@ public void setPublishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) } - public PrismaticEventPayloadCouponBasedNotifications sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { + public IntegrationHubEventPayloadCouponBasedNotifications sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { this.sourceOfEvent = sourceOfEvent; return this; } @@ -550,7 +550,7 @@ public void setSourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { } - public PrismaticEventPayloadCouponBasedNotifications employeeName(@javax.annotation.Nonnull String employeeName) { + public IntegrationHubEventPayloadCouponBasedNotifications employeeName(@javax.annotation.Nonnull String employeeName) { this.employeeName = employeeName; return this; } @@ -578,28 +578,28 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadCouponBasedNotifications prismaticEventPayloadCouponBasedNotifications = (PrismaticEventPayloadCouponBasedNotifications) o; - return Objects.equals(this.id, prismaticEventPayloadCouponBasedNotifications.id) && - Objects.equals(this.created, prismaticEventPayloadCouponBasedNotifications.created) && - Objects.equals(this.campaignId, prismaticEventPayloadCouponBasedNotifications.campaignId) && - Objects.equals(this.value, prismaticEventPayloadCouponBasedNotifications.value) && - Objects.equals(this.usageLimit, prismaticEventPayloadCouponBasedNotifications.usageLimit) && - Objects.equals(this.discountLimit, prismaticEventPayloadCouponBasedNotifications.discountLimit) && - Objects.equals(this.reservationLimit, prismaticEventPayloadCouponBasedNotifications.reservationLimit) && - Objects.equals(this.startDate, prismaticEventPayloadCouponBasedNotifications.startDate) && - Objects.equals(this.expiryDate, prismaticEventPayloadCouponBasedNotifications.expiryDate) && - Objects.equals(this.usageCounter, prismaticEventPayloadCouponBasedNotifications.usageCounter) && - Objects.equals(this.discountCounter, prismaticEventPayloadCouponBasedNotifications.discountCounter) && - Objects.equals(this.discountRemainder, prismaticEventPayloadCouponBasedNotifications.discountRemainder) && - Objects.equals(this.referralId, prismaticEventPayloadCouponBasedNotifications.referralId) && - Objects.equals(this.recipientIntegrationId, prismaticEventPayloadCouponBasedNotifications.recipientIntegrationId) && - Objects.equals(this.importId, prismaticEventPayloadCouponBasedNotifications.importId) && - Objects.equals(this.batchId, prismaticEventPayloadCouponBasedNotifications.batchId) && - Objects.equals(this.attributes, prismaticEventPayloadCouponBasedNotifications.attributes) && - Objects.equals(this.limits, prismaticEventPayloadCouponBasedNotifications.limits) && - Objects.equals(this.publishedAt, prismaticEventPayloadCouponBasedNotifications.publishedAt) && - Objects.equals(this.sourceOfEvent, prismaticEventPayloadCouponBasedNotifications.sourceOfEvent) && - Objects.equals(this.employeeName, prismaticEventPayloadCouponBasedNotifications.employeeName); + IntegrationHubEventPayloadCouponBasedNotifications integrationHubEventPayloadCouponBasedNotifications = (IntegrationHubEventPayloadCouponBasedNotifications) o; + return Objects.equals(this.id, integrationHubEventPayloadCouponBasedNotifications.id) && + Objects.equals(this.created, integrationHubEventPayloadCouponBasedNotifications.created) && + Objects.equals(this.campaignId, integrationHubEventPayloadCouponBasedNotifications.campaignId) && + Objects.equals(this.value, integrationHubEventPayloadCouponBasedNotifications.value) && + Objects.equals(this.usageLimit, integrationHubEventPayloadCouponBasedNotifications.usageLimit) && + Objects.equals(this.discountLimit, integrationHubEventPayloadCouponBasedNotifications.discountLimit) && + Objects.equals(this.reservationLimit, integrationHubEventPayloadCouponBasedNotifications.reservationLimit) && + Objects.equals(this.startDate, integrationHubEventPayloadCouponBasedNotifications.startDate) && + Objects.equals(this.expiryDate, integrationHubEventPayloadCouponBasedNotifications.expiryDate) && + Objects.equals(this.usageCounter, integrationHubEventPayloadCouponBasedNotifications.usageCounter) && + Objects.equals(this.discountCounter, integrationHubEventPayloadCouponBasedNotifications.discountCounter) && + Objects.equals(this.discountRemainder, integrationHubEventPayloadCouponBasedNotifications.discountRemainder) && + Objects.equals(this.referralId, integrationHubEventPayloadCouponBasedNotifications.referralId) && + Objects.equals(this.recipientIntegrationId, integrationHubEventPayloadCouponBasedNotifications.recipientIntegrationId) && + Objects.equals(this.importId, integrationHubEventPayloadCouponBasedNotifications.importId) && + Objects.equals(this.batchId, integrationHubEventPayloadCouponBasedNotifications.batchId) && + Objects.equals(this.attributes, integrationHubEventPayloadCouponBasedNotifications.attributes) && + Objects.equals(this.limits, integrationHubEventPayloadCouponBasedNotifications.limits) && + Objects.equals(this.publishedAt, integrationHubEventPayloadCouponBasedNotifications.publishedAt) && + Objects.equals(this.sourceOfEvent, integrationHubEventPayloadCouponBasedNotifications.sourceOfEvent) && + Objects.equals(this.employeeName, integrationHubEventPayloadCouponBasedNotifications.employeeName); } @Override @@ -610,7 +610,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadCouponBasedNotifications {\n"); + sb.append("class IntegrationHubEventPayloadCouponBasedNotifications {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" created: ").append(toIndentedString(created)).append("\n"); sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); @@ -663,25 +663,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadCouponBasedNotifications + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadCouponBasedNotifications */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadCouponBasedNotifications.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 PrismaticEventPayloadCouponBasedNotifications is not found in the empty JSON string", PrismaticEventPayloadCouponBasedNotifications.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadCouponBasedNotifications.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 IntegrationHubEventPayloadCouponBasedNotifications is not found in the empty JSON string", IntegrationHubEventPayloadCouponBasedNotifications.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadCouponBasedNotifications.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 `PrismaticEventPayloadCouponBasedNotifications` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadCouponBasedNotifications.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 `IntegrationHubEventPayloadCouponBasedNotifications` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadCouponBasedNotifications.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadCouponBasedNotifications.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())); } @@ -706,7 +706,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `Limits` (array) for (int i = 0; i < jsonArraylimits.size(); i++) { - PrismaticEventPayloadCouponBasedNotificationsLimits.validateJsonElement(jsonArraylimits.get(i)); + IntegrationHubEventPayloadCouponBasedNotificationsLimits.validateJsonElement(jsonArraylimits.get(i)); }; } } @@ -722,22 +722,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadCouponBasedNotifications.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadCouponBasedNotifications' and its subtypes + if (!IntegrationHubEventPayloadCouponBasedNotifications.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadCouponBasedNotifications' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadCouponBasedNotifications.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadCouponBasedNotifications.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadCouponBasedNotifications value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadCouponBasedNotifications value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadCouponBasedNotifications read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadCouponBasedNotifications read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -748,18 +748,18 @@ public PrismaticEventPayloadCouponBasedNotifications read(JsonReader in) throws } /** - * Create an instance of PrismaticEventPayloadCouponBasedNotifications given an JSON string + * Create an instance of IntegrationHubEventPayloadCouponBasedNotifications given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadCouponBasedNotifications - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadCouponBasedNotifications + * @return An instance of IntegrationHubEventPayloadCouponBasedNotifications + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadCouponBasedNotifications */ - public static PrismaticEventPayloadCouponBasedNotifications fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadCouponBasedNotifications.class); + public static IntegrationHubEventPayloadCouponBasedNotifications fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadCouponBasedNotifications.class); } /** - * Convert an instance of PrismaticEventPayloadCouponBasedNotifications to an JSON string + * Convert an instance of IntegrationHubEventPayloadCouponBasedNotifications to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimits.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimits.java similarity index 70% rename from src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimits.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimits.java index b3bba783..52681bfe 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimits.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimits.java @@ -48,10 +48,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadCouponBasedNotificationsLimits + * IntegrationHubEventPayloadCouponBasedNotificationsLimits */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadCouponBasedNotificationsLimits { +public class IntegrationHubEventPayloadCouponBasedNotificationsLimits { public static final String SERIALIZED_NAME_ACTION = "Action"; @SerializedName(SERIALIZED_NAME_ACTION) @javax.annotation.Nonnull @@ -72,10 +72,10 @@ public class PrismaticEventPayloadCouponBasedNotificationsLimits { @javax.annotation.Nonnull private List entities = new ArrayList<>(); - public PrismaticEventPayloadCouponBasedNotificationsLimits() { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits() { } - public PrismaticEventPayloadCouponBasedNotificationsLimits action(@javax.annotation.Nonnull String action) { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits action(@javax.annotation.Nonnull String action) { this.action = action; return this; } @@ -94,7 +94,7 @@ public void setAction(@javax.annotation.Nonnull String action) { } - public PrismaticEventPayloadCouponBasedNotificationsLimits limit(@javax.annotation.Nonnull Float limit) { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits limit(@javax.annotation.Nonnull Float limit) { this.limit = limit; return this; } @@ -113,7 +113,7 @@ public void setLimit(@javax.annotation.Nonnull Float limit) { } - public PrismaticEventPayloadCouponBasedNotificationsLimits period(@javax.annotation.Nullable String period) { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits period(@javax.annotation.Nullable String period) { this.period = period; return this; } @@ -132,12 +132,12 @@ public void setPeriod(@javax.annotation.Nullable String period) { } - public PrismaticEventPayloadCouponBasedNotificationsLimits entities(@javax.annotation.Nonnull List entities) { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits entities(@javax.annotation.Nonnull List entities) { this.entities = entities; return this; } - public PrismaticEventPayloadCouponBasedNotificationsLimits addEntitiesItem(String entitiesItem) { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits addEntitiesItem(String entitiesItem) { if (this.entities == null) { this.entities = new ArrayList<>(); } @@ -168,11 +168,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadCouponBasedNotificationsLimits prismaticEventPayloadCouponBasedNotificationsLimits = (PrismaticEventPayloadCouponBasedNotificationsLimits) o; - return Objects.equals(this.action, prismaticEventPayloadCouponBasedNotificationsLimits.action) && - Objects.equals(this.limit, prismaticEventPayloadCouponBasedNotificationsLimits.limit) && - Objects.equals(this.period, prismaticEventPayloadCouponBasedNotificationsLimits.period) && - Objects.equals(this.entities, prismaticEventPayloadCouponBasedNotificationsLimits.entities); + IntegrationHubEventPayloadCouponBasedNotificationsLimits integrationHubEventPayloadCouponBasedNotificationsLimits = (IntegrationHubEventPayloadCouponBasedNotificationsLimits) o; + return Objects.equals(this.action, integrationHubEventPayloadCouponBasedNotificationsLimits.action) && + Objects.equals(this.limit, integrationHubEventPayloadCouponBasedNotificationsLimits.limit) && + Objects.equals(this.period, integrationHubEventPayloadCouponBasedNotificationsLimits.period) && + Objects.equals(this.entities, integrationHubEventPayloadCouponBasedNotificationsLimits.entities); } @Override @@ -183,7 +183,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadCouponBasedNotificationsLimits {\n"); + sb.append("class IntegrationHubEventPayloadCouponBasedNotificationsLimits {\n"); sb.append(" action: ").append(toIndentedString(action)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" period: ").append(toIndentedString(period)).append("\n"); @@ -219,25 +219,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadCouponBasedNotificationsLimits + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadCouponBasedNotificationsLimits */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadCouponBasedNotificationsLimits.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 PrismaticEventPayloadCouponBasedNotificationsLimits is not found in the empty JSON string", PrismaticEventPayloadCouponBasedNotificationsLimits.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadCouponBasedNotificationsLimits.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 IntegrationHubEventPayloadCouponBasedNotificationsLimits is not found in the empty JSON string", IntegrationHubEventPayloadCouponBasedNotificationsLimits.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadCouponBasedNotificationsLimits.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 `PrismaticEventPayloadCouponBasedNotificationsLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadCouponBasedNotificationsLimits.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 `IntegrationHubEventPayloadCouponBasedNotificationsLimits` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadCouponBasedNotificationsLimits.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadCouponBasedNotificationsLimits.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())); } @@ -261,22 +261,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadCouponBasedNotificationsLimits.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadCouponBasedNotificationsLimits' and its subtypes + if (!IntegrationHubEventPayloadCouponBasedNotificationsLimits.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadCouponBasedNotificationsLimits' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadCouponBasedNotificationsLimits.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadCouponBasedNotificationsLimits.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadCouponBasedNotificationsLimits value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadCouponBasedNotificationsLimits value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadCouponBasedNotificationsLimits read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadCouponBasedNotificationsLimits read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -287,18 +287,18 @@ public PrismaticEventPayloadCouponBasedNotificationsLimits read(JsonReader in) t } /** - * Create an instance of PrismaticEventPayloadCouponBasedNotificationsLimits given an JSON string + * Create an instance of IntegrationHubEventPayloadCouponBasedNotificationsLimits given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadCouponBasedNotificationsLimits - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadCouponBasedNotificationsLimits + * @return An instance of IntegrationHubEventPayloadCouponBasedNotificationsLimits + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadCouponBasedNotificationsLimits */ - public static PrismaticEventPayloadCouponBasedNotificationsLimits fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadCouponBasedNotificationsLimits.class); + public static IntegrationHubEventPayloadCouponBasedNotificationsLimits fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadCouponBasedNotificationsLimits.class); } /** - * Convert an instance of PrismaticEventPayloadCouponBasedNotificationsLimits to an JSON string + * Convert an instance of IntegrationHubEventPayloadCouponBasedNotificationsLimits to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotification.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.java similarity index 71% rename from src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotification.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.java index 1e64a24f..0e0a6aaa 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotification.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotification.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; +import one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -50,10 +50,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadLoyaltyProfileBasedNotification + * IntegrationHubEventPayloadLoyaltyProfileBasedNotification */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadLoyaltyProfileBasedNotification { +public class IntegrationHubEventPayloadLoyaltyProfileBasedNotification { public static final String SERIALIZED_NAME_PROFILE_INTEGRATION_I_D = "ProfileIntegrationID"; @SerializedName(SERIALIZED_NAME_PROFILE_INTEGRATION_I_D) @javax.annotation.Nonnull @@ -92,7 +92,7 @@ public class PrismaticEventPayloadLoyaltyProfileBasedNotification { public static final String SERIALIZED_NAME_ACTIONS = "Actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) @javax.annotation.Nullable - private List actions = new ArrayList<>(); + private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_PUBLISHED_AT = "PublishedAt"; @SerializedName(SERIALIZED_NAME_PUBLISHED_AT) @@ -129,10 +129,10 @@ public class PrismaticEventPayloadLoyaltyProfileBasedNotification { @javax.annotation.Nullable private String nextTier; - public PrismaticEventPayloadLoyaltyProfileBasedNotification() { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification() { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { this.profileIntegrationID = profileIntegrationID; return this; } @@ -151,7 +151,7 @@ public void setProfileIntegrationID(@javax.annotation.Nonnull String profileInte } - public PrismaticEventPayloadLoyaltyProfileBasedNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { this.loyaltyProgramID = loyaltyProgramID; return this; } @@ -170,7 +170,7 @@ public void setLoyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) } - public PrismaticEventPayloadLoyaltyProfileBasedNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { this.subledgerID = subledgerID; return this; } @@ -189,7 +189,7 @@ public void setSubledgerID(@javax.annotation.Nonnull String subledgerID) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { this.sourceOfEvent = sourceOfEvent; return this; } @@ -208,7 +208,7 @@ public void setSourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification employeeName(@javax.annotation.Nullable String employeeName) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification employeeName(@javax.annotation.Nullable String employeeName) { this.employeeName = employeeName; return this; } @@ -227,7 +227,7 @@ public void setEmployeeName(@javax.annotation.Nullable String employeeName) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification userID(@javax.annotation.Nullable Long userID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification userID(@javax.annotation.Nullable Long userID) { this.userID = userID; return this; } @@ -246,7 +246,7 @@ public void setUserID(@javax.annotation.Nullable Long userID) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { this.currentPoints = currentPoints; return this; } @@ -265,12 +265,12 @@ public void setCurrentPoints(@javax.annotation.Nonnull Float currentPoints) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification actions(@javax.annotation.Nullable List actions) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification actions(@javax.annotation.Nullable List actions) { this.actions = actions; return this; } - public PrismaticEventPayloadLoyaltyProfileBasedNotification addActionsItem(PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction actionsItem) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification addActionsItem(IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction actionsItem) { if (this.actions == null) { this.actions = new ArrayList<>(); } @@ -283,16 +283,16 @@ public PrismaticEventPayloadLoyaltyProfileBasedNotification addActionsItem(Prism * @return actions */ @javax.annotation.Nullable - public List getActions() { + public List getActions() { return actions; } - public void setActions(@javax.annotation.Nullable List actions) { + public void setActions(@javax.annotation.Nullable List actions) { this.actions = actions; } - public PrismaticEventPayloadLoyaltyProfileBasedNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { this.publishedAt = publishedAt; return this; } @@ -311,7 +311,7 @@ public void setPublishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) } - public PrismaticEventPayloadLoyaltyProfileBasedNotification currentTier(@javax.annotation.Nullable String currentTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification currentTier(@javax.annotation.Nullable String currentTier) { this.currentTier = currentTier; return this; } @@ -330,7 +330,7 @@ public void setCurrentTier(@javax.annotation.Nullable String currentTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification oldTier(@javax.annotation.Nullable String oldTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification oldTier(@javax.annotation.Nullable String oldTier) { this.oldTier = oldTier; return this; } @@ -349,7 +349,7 @@ public void setOldTier(@javax.annotation.Nullable String oldTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedNotification tierExpirationDate(@javax.annotation.Nullable OffsetDateTime tierExpirationDate) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification tierExpirationDate(@javax.annotation.Nullable OffsetDateTime tierExpirationDate) { this.tierExpirationDate = tierExpirationDate; return this; } @@ -368,7 +368,7 @@ public void setTierExpirationDate(@javax.annotation.Nullable OffsetDateTime tier } - public PrismaticEventPayloadLoyaltyProfileBasedNotification timestampOfTierChange(@javax.annotation.Nullable OffsetDateTime timestampOfTierChange) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification timestampOfTierChange(@javax.annotation.Nullable OffsetDateTime timestampOfTierChange) { this.timestampOfTierChange = timestampOfTierChange; return this; } @@ -387,7 +387,7 @@ public void setTimestampOfTierChange(@javax.annotation.Nullable OffsetDateTime t } - public PrismaticEventPayloadLoyaltyProfileBasedNotification pointsRequiredToTheNextTier(@javax.annotation.Nullable Float pointsRequiredToTheNextTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification pointsRequiredToTheNextTier(@javax.annotation.Nullable Float pointsRequiredToTheNextTier) { this.pointsRequiredToTheNextTier = pointsRequiredToTheNextTier; return this; } @@ -406,7 +406,7 @@ public void setPointsRequiredToTheNextTier(@javax.annotation.Nullable Float poin } - public PrismaticEventPayloadLoyaltyProfileBasedNotification nextTier(@javax.annotation.Nullable String nextTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification nextTier(@javax.annotation.Nullable String nextTier) { this.nextTier = nextTier; return this; } @@ -434,22 +434,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadLoyaltyProfileBasedNotification prismaticEventPayloadLoyaltyProfileBasedNotification = (PrismaticEventPayloadLoyaltyProfileBasedNotification) o; - return Objects.equals(this.profileIntegrationID, prismaticEventPayloadLoyaltyProfileBasedNotification.profileIntegrationID) && - Objects.equals(this.loyaltyProgramID, prismaticEventPayloadLoyaltyProfileBasedNotification.loyaltyProgramID) && - Objects.equals(this.subledgerID, prismaticEventPayloadLoyaltyProfileBasedNotification.subledgerID) && - Objects.equals(this.sourceOfEvent, prismaticEventPayloadLoyaltyProfileBasedNotification.sourceOfEvent) && - Objects.equals(this.employeeName, prismaticEventPayloadLoyaltyProfileBasedNotification.employeeName) && - Objects.equals(this.userID, prismaticEventPayloadLoyaltyProfileBasedNotification.userID) && - Objects.equals(this.currentPoints, prismaticEventPayloadLoyaltyProfileBasedNotification.currentPoints) && - Objects.equals(this.actions, prismaticEventPayloadLoyaltyProfileBasedNotification.actions) && - Objects.equals(this.publishedAt, prismaticEventPayloadLoyaltyProfileBasedNotification.publishedAt) && - Objects.equals(this.currentTier, prismaticEventPayloadLoyaltyProfileBasedNotification.currentTier) && - Objects.equals(this.oldTier, prismaticEventPayloadLoyaltyProfileBasedNotification.oldTier) && - Objects.equals(this.tierExpirationDate, prismaticEventPayloadLoyaltyProfileBasedNotification.tierExpirationDate) && - Objects.equals(this.timestampOfTierChange, prismaticEventPayloadLoyaltyProfileBasedNotification.timestampOfTierChange) && - Objects.equals(this.pointsRequiredToTheNextTier, prismaticEventPayloadLoyaltyProfileBasedNotification.pointsRequiredToTheNextTier) && - Objects.equals(this.nextTier, prismaticEventPayloadLoyaltyProfileBasedNotification.nextTier); + IntegrationHubEventPayloadLoyaltyProfileBasedNotification integrationHubEventPayloadLoyaltyProfileBasedNotification = (IntegrationHubEventPayloadLoyaltyProfileBasedNotification) o; + return Objects.equals(this.profileIntegrationID, integrationHubEventPayloadLoyaltyProfileBasedNotification.profileIntegrationID) && + Objects.equals(this.loyaltyProgramID, integrationHubEventPayloadLoyaltyProfileBasedNotification.loyaltyProgramID) && + Objects.equals(this.subledgerID, integrationHubEventPayloadLoyaltyProfileBasedNotification.subledgerID) && + Objects.equals(this.sourceOfEvent, integrationHubEventPayloadLoyaltyProfileBasedNotification.sourceOfEvent) && + Objects.equals(this.employeeName, integrationHubEventPayloadLoyaltyProfileBasedNotification.employeeName) && + Objects.equals(this.userID, integrationHubEventPayloadLoyaltyProfileBasedNotification.userID) && + Objects.equals(this.currentPoints, integrationHubEventPayloadLoyaltyProfileBasedNotification.currentPoints) && + Objects.equals(this.actions, integrationHubEventPayloadLoyaltyProfileBasedNotification.actions) && + Objects.equals(this.publishedAt, integrationHubEventPayloadLoyaltyProfileBasedNotification.publishedAt) && + Objects.equals(this.currentTier, integrationHubEventPayloadLoyaltyProfileBasedNotification.currentTier) && + Objects.equals(this.oldTier, integrationHubEventPayloadLoyaltyProfileBasedNotification.oldTier) && + Objects.equals(this.tierExpirationDate, integrationHubEventPayloadLoyaltyProfileBasedNotification.tierExpirationDate) && + Objects.equals(this.timestampOfTierChange, integrationHubEventPayloadLoyaltyProfileBasedNotification.timestampOfTierChange) && + Objects.equals(this.pointsRequiredToTheNextTier, integrationHubEventPayloadLoyaltyProfileBasedNotification.pointsRequiredToTheNextTier) && + Objects.equals(this.nextTier, integrationHubEventPayloadLoyaltyProfileBasedNotification.nextTier); } @Override @@ -460,7 +460,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadLoyaltyProfileBasedNotification {\n"); + sb.append("class IntegrationHubEventPayloadLoyaltyProfileBasedNotification {\n"); sb.append(" profileIntegrationID: ").append(toIndentedString(profileIntegrationID)).append("\n"); sb.append(" loyaltyProgramID: ").append(toIndentedString(loyaltyProgramID)).append("\n"); sb.append(" subledgerID: ").append(toIndentedString(subledgerID)).append("\n"); @@ -507,25 +507,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadLoyaltyProfileBasedNotification + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedNotification */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadLoyaltyProfileBasedNotification.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 PrismaticEventPayloadLoyaltyProfileBasedNotification is not found in the empty JSON string", PrismaticEventPayloadLoyaltyProfileBasedNotification.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedNotification.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 IntegrationHubEventPayloadLoyaltyProfileBasedNotification is not found in the empty JSON string", IntegrationHubEventPayloadLoyaltyProfileBasedNotification.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadLoyaltyProfileBasedNotification.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 `PrismaticEventPayloadLoyaltyProfileBasedNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedNotification.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 `IntegrationHubEventPayloadLoyaltyProfileBasedNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadLoyaltyProfileBasedNotification.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadLoyaltyProfileBasedNotification.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())); } @@ -553,7 +553,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `Actions` (array) for (int i = 0; i < jsonArrayactions.size(); i++) { - PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.validateJsonElement(jsonArrayactions.get(i)); + IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.validateJsonElement(jsonArrayactions.get(i)); }; } } @@ -572,22 +572,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadLoyaltyProfileBasedNotification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadLoyaltyProfileBasedNotification' and its subtypes + if (!IntegrationHubEventPayloadLoyaltyProfileBasedNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadLoyaltyProfileBasedNotification' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadLoyaltyProfileBasedNotification.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadLoyaltyProfileBasedNotification.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadLoyaltyProfileBasedNotification value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadLoyaltyProfileBasedNotification value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadLoyaltyProfileBasedNotification read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadLoyaltyProfileBasedNotification read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -598,18 +598,18 @@ public PrismaticEventPayloadLoyaltyProfileBasedNotification read(JsonReader in) } /** - * Create an instance of PrismaticEventPayloadLoyaltyProfileBasedNotification given an JSON string + * Create an instance of IntegrationHubEventPayloadLoyaltyProfileBasedNotification given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadLoyaltyProfileBasedNotification - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadLoyaltyProfileBasedNotification + * @return An instance of IntegrationHubEventPayloadLoyaltyProfileBasedNotification + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedNotification */ - public static PrismaticEventPayloadLoyaltyProfileBasedNotification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadLoyaltyProfileBasedNotification.class); + public static IntegrationHubEventPayloadLoyaltyProfileBasedNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadLoyaltyProfileBasedNotification.class); } /** - * Convert an instance of PrismaticEventPayloadLoyaltyProfileBasedNotification to an JSON string + * Convert an instance of IntegrationHubEventPayloadLoyaltyProfileBasedNotification to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java similarity index 67% rename from src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java index 04f22892..f2ad88c4 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; +import one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -50,10 +50,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification + * IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification { +public class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification { public static final String SERIALIZED_NAME_PROFILE_INTEGRATION_I_D = "ProfileIntegrationID"; @SerializedName(SERIALIZED_NAME_PROFILE_INTEGRATION_I_D) @javax.annotation.Nonnull @@ -92,17 +92,17 @@ public class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification { public static final String SERIALIZED_NAME_ACTIONS = "Actions"; @SerializedName(SERIALIZED_NAME_ACTIONS) @javax.annotation.Nullable - private List actions = new ArrayList<>(); + private List actions = new ArrayList<>(); public static final String SERIALIZED_NAME_PUBLISHED_AT = "PublishedAt"; @SerializedName(SERIALIZED_NAME_PUBLISHED_AT) @javax.annotation.Nonnull private OffsetDateTime publishedAt; - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification() { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification() { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { this.profileIntegrationID = profileIntegrationID; return this; } @@ -121,7 +121,7 @@ public void setProfileIntegrationID(@javax.annotation.Nonnull String profileInte } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { this.loyaltyProgramID = loyaltyProgramID; return this; } @@ -140,7 +140,7 @@ public void setLoyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { this.subledgerID = subledgerID; return this; } @@ -159,7 +159,7 @@ public void setSubledgerID(@javax.annotation.Nonnull String subledgerID) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { this.sourceOfEvent = sourceOfEvent; return this; } @@ -178,7 +178,7 @@ public void setSourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification employeeName(@javax.annotation.Nullable String employeeName) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification employeeName(@javax.annotation.Nullable String employeeName) { this.employeeName = employeeName; return this; } @@ -197,7 +197,7 @@ public void setEmployeeName(@javax.annotation.Nullable String employeeName) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification userID(@javax.annotation.Nullable Long userID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification userID(@javax.annotation.Nullable Long userID) { this.userID = userID; return this; } @@ -216,7 +216,7 @@ public void setUserID(@javax.annotation.Nullable Long userID) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { this.currentPoints = currentPoints; return this; } @@ -235,12 +235,12 @@ public void setCurrentPoints(@javax.annotation.Nonnull Float currentPoints) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification actions(@javax.annotation.Nullable List actions) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification actions(@javax.annotation.Nullable List actions) { this.actions = actions; return this; } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification addActionsItem(PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction actionsItem) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification addActionsItem(IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction actionsItem) { if (this.actions == null) { this.actions = new ArrayList<>(); } @@ -253,16 +253,16 @@ public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification addActi * @return actions */ @javax.annotation.Nullable - public List getActions() { + public List getActions() { return actions; } - public void setActions(@javax.annotation.Nullable List actions) { + public void setActions(@javax.annotation.Nullable List actions) { this.actions = actions; } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { this.publishedAt = publishedAt; return this; } @@ -290,16 +290,16 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification = (PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification) o; - return Objects.equals(this.profileIntegrationID, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.profileIntegrationID) && - Objects.equals(this.loyaltyProgramID, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.loyaltyProgramID) && - Objects.equals(this.subledgerID, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.subledgerID) && - Objects.equals(this.sourceOfEvent, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.sourceOfEvent) && - Objects.equals(this.employeeName, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.employeeName) && - Objects.equals(this.userID, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.userID) && - Objects.equals(this.currentPoints, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.currentPoints) && - Objects.equals(this.actions, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.actions) && - Objects.equals(this.publishedAt, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.publishedAt); + IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification = (IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification) o; + return Objects.equals(this.profileIntegrationID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.profileIntegrationID) && + Objects.equals(this.loyaltyProgramID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.loyaltyProgramID) && + Objects.equals(this.subledgerID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.subledgerID) && + Objects.equals(this.sourceOfEvent, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.sourceOfEvent) && + Objects.equals(this.employeeName, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.employeeName) && + Objects.equals(this.userID, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.userID) && + Objects.equals(this.currentPoints, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.currentPoints) && + Objects.equals(this.actions, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.actions) && + Objects.equals(this.publishedAt, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.publishedAt); } @Override @@ -310,7 +310,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification {\n"); + sb.append("class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification {\n"); sb.append(" profileIntegrationID: ").append(toIndentedString(profileIntegrationID)).append("\n"); sb.append(" loyaltyProgramID: ").append(toIndentedString(loyaltyProgramID)).append("\n"); sb.append(" subledgerID: ").append(toIndentedString(subledgerID)).append("\n"); @@ -351,25 +351,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.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 PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification is not found in the empty JSON string", PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.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 IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification is not found in the empty JSON string", IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.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 `PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.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 `IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.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())); } @@ -397,7 +397,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `Actions` (array) for (int i = 0; i < jsonArrayactions.size(); i++) { - PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.validateJsonElement(jsonArrayactions.get(i)); + IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.validateJsonElement(jsonArrayactions.get(i)); }; } } @@ -407,22 +407,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification' and its subtypes + if (!IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -433,18 +433,18 @@ public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification read(Js } /** - * Create an instance of PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification given an JSON string + * Create an instance of IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification + * @return An instance of IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification */ - public static PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification.class); + public static IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification.class); } /** - * Convert an instance of PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification to an JSON string + * Convert an instance of IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java similarity index 69% rename from src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java index 58098d82..6bafd9fe 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.java @@ -47,10 +47,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + * IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction { +public class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction { public static final String SERIALIZED_NAME_AMOUNT = "Amount"; @SerializedName(SERIALIZED_NAME_AMOUNT) @javax.annotation.Nonnull @@ -128,10 +128,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private OffsetDateTime expiryDate; - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction() { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction() { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction amount(@javax.annotation.Nonnull Float amount) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction amount(@javax.annotation.Nonnull Float amount) { this.amount = amount; return this; } @@ -150,7 +150,7 @@ public void setAmount(@javax.annotation.Nonnull Float amount) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction reason(@javax.annotation.Nullable String reason) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction reason(@javax.annotation.Nullable String reason) { this.reason = reason; return this; } @@ -169,7 +169,7 @@ public void setReason(@javax.annotation.Nullable String reason) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction operation(@javax.annotation.Nonnull OperationEnum operation) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction operation(@javax.annotation.Nonnull OperationEnum operation) { this.operation = operation; return this; } @@ -188,7 +188,7 @@ public void setOperation(@javax.annotation.Nonnull OperationEnum operation) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction startDate(@javax.annotation.Nullable OffsetDateTime startDate) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction startDate(@javax.annotation.Nullable OffsetDateTime startDate) { this.startDate = startDate; return this; } @@ -207,7 +207,7 @@ public void setStartDate(@javax.annotation.Nullable OffsetDateTime startDate) { } - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction expiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction expiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { this.expiryDate = expiryDate; return this; } @@ -235,12 +235,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction = (PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction) o; - return Objects.equals(this.amount, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.amount) && - Objects.equals(this.reason, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.reason) && - Objects.equals(this.operation, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.operation) && - Objects.equals(this.startDate, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.startDate) && - Objects.equals(this.expiryDate, prismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.expiryDate); + IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction = (IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction) o; + return Objects.equals(this.amount, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.amount) && + Objects.equals(this.reason, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.reason) && + Objects.equals(this.operation, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.operation) && + Objects.equals(this.startDate, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.startDate) && + Objects.equals(this.expiryDate, integrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.expiryDate); } @Override @@ -251,7 +251,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction {\n"); + sb.append("class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); @@ -288,25 +288,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.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 PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction is not found in the empty JSON string", PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.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 IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction is not found in the empty JSON string", IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.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 `PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.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 `IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.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())); } @@ -326,22 +326,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction' and its subtypes + if (!IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -352,18 +352,18 @@ public PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction r } /** - * Create an instance of PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction given an JSON string + * Create an instance of IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + * @return An instance of IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction */ - public static PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.class); + public static IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction.class); } /** - * Convert an instance of PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction to an JSON string + * Convert an instance of IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java similarity index 70% rename from src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java index 0c98da4d..c58bd500 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.java @@ -47,10 +47,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification + * IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification { +public class IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification { public static final String SERIALIZED_NAME_PROFILE_INTEGRATION_I_D = "ProfileIntegrationID"; @SerializedName(SERIALIZED_NAME_PROFILE_INTEGRATION_I_D) @javax.annotation.Nonnull @@ -101,10 +101,10 @@ public class PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification { @javax.annotation.Nonnull private OffsetDateTime publishedAt; - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification() { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification() { } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { this.profileIntegrationID = profileIntegrationID; return this; } @@ -123,7 +123,7 @@ public void setProfileIntegrationID(@javax.annotation.Nonnull String profileInte } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { this.loyaltyProgramID = loyaltyProgramID; return this; } @@ -142,7 +142,7 @@ public void setLoyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { this.subledgerID = subledgerID; return this; } @@ -161,7 +161,7 @@ public void setSubledgerID(@javax.annotation.Nonnull String subledgerID) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { this.sourceOfEvent = sourceOfEvent; return this; } @@ -180,7 +180,7 @@ public void setSourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification currentTier(@javax.annotation.Nullable String currentTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification currentTier(@javax.annotation.Nullable String currentTier) { this.currentTier = currentTier; return this; } @@ -199,7 +199,7 @@ public void setCurrentTier(@javax.annotation.Nullable String currentTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { this.currentPoints = currentPoints; return this; } @@ -218,7 +218,7 @@ public void setCurrentPoints(@javax.annotation.Nonnull Float currentPoints) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification oldTier(@javax.annotation.Nullable String oldTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification oldTier(@javax.annotation.Nullable String oldTier) { this.oldTier = oldTier; return this; } @@ -237,7 +237,7 @@ public void setOldTier(@javax.annotation.Nullable String oldTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification tierExpirationDate(@javax.annotation.Nullable OffsetDateTime tierExpirationDate) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification tierExpirationDate(@javax.annotation.Nullable OffsetDateTime tierExpirationDate) { this.tierExpirationDate = tierExpirationDate; return this; } @@ -256,7 +256,7 @@ public void setTierExpirationDate(@javax.annotation.Nullable OffsetDateTime tier } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification timestampOfTierChange(@javax.annotation.Nullable OffsetDateTime timestampOfTierChange) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification timestampOfTierChange(@javax.annotation.Nullable OffsetDateTime timestampOfTierChange) { this.timestampOfTierChange = timestampOfTierChange; return this; } @@ -275,7 +275,7 @@ public void setTimestampOfTierChange(@javax.annotation.Nullable OffsetDateTime t } - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { this.publishedAt = publishedAt; return this; } @@ -303,17 +303,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification = (PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification) o; - return Objects.equals(this.profileIntegrationID, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.profileIntegrationID) && - Objects.equals(this.loyaltyProgramID, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.loyaltyProgramID) && - Objects.equals(this.subledgerID, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.subledgerID) && - Objects.equals(this.sourceOfEvent, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.sourceOfEvent) && - Objects.equals(this.currentTier, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.currentTier) && - Objects.equals(this.currentPoints, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.currentPoints) && - Objects.equals(this.oldTier, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.oldTier) && - Objects.equals(this.tierExpirationDate, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.tierExpirationDate) && - Objects.equals(this.timestampOfTierChange, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.timestampOfTierChange) && - Objects.equals(this.publishedAt, prismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.publishedAt); + IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification = (IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification) o; + return Objects.equals(this.profileIntegrationID, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.profileIntegrationID) && + Objects.equals(this.loyaltyProgramID, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.loyaltyProgramID) && + Objects.equals(this.subledgerID, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.subledgerID) && + Objects.equals(this.sourceOfEvent, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.sourceOfEvent) && + Objects.equals(this.currentTier, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.currentTier) && + Objects.equals(this.currentPoints, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.currentPoints) && + Objects.equals(this.oldTier, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.oldTier) && + Objects.equals(this.tierExpirationDate, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.tierExpirationDate) && + Objects.equals(this.timestampOfTierChange, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.timestampOfTierChange) && + Objects.equals(this.publishedAt, integrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.publishedAt); } @Override @@ -324,7 +324,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification {\n"); + sb.append("class IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification {\n"); sb.append(" profileIntegrationID: ").append(toIndentedString(profileIntegrationID)).append("\n"); sb.append(" loyaltyProgramID: ").append(toIndentedString(loyaltyProgramID)).append("\n"); sb.append(" subledgerID: ").append(toIndentedString(subledgerID)).append("\n"); @@ -366,25 +366,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.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 PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification is not found in the empty JSON string", PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.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 IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification is not found in the empty JSON string", IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.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 `PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.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 `IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.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())); } @@ -411,22 +411,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification' and its subtypes + if (!IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -437,18 +437,18 @@ public PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification read(Js } /** - * Create an instance of PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification given an JSON string + * Create an instance of IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification + * @return An instance of IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification */ - public static PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification.class); + public static IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification.class); } /** - * Convert an instance of PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification to an JSON string + * Convert an instance of IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java similarity index 71% rename from src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java rename to src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java index aebe35eb..83ee7e14 100644 --- a/src/main/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java +++ b/src/main/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.java @@ -47,10 +47,10 @@ import one.talon.JSON; /** - * PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification + * IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification { +public class IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification { public static final String SERIALIZED_NAME_PROFILE_INTEGRATION_I_D = "ProfileIntegrationID"; @SerializedName(SERIALIZED_NAME_PROFILE_INTEGRATION_I_D) @javax.annotation.Nonnull @@ -111,10 +111,10 @@ public class PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification { @javax.annotation.Nonnull private OffsetDateTime publishedAt; - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification() { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification() { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification profileIntegrationID(@javax.annotation.Nonnull String profileIntegrationID) { this.profileIntegrationID = profileIntegrationID; return this; } @@ -133,7 +133,7 @@ public void setProfileIntegrationID(@javax.annotation.Nonnull String profileInte } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification loyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) { this.loyaltyProgramID = loyaltyProgramID; return this; } @@ -152,7 +152,7 @@ public void setLoyaltyProgramID(@javax.annotation.Nonnull Long loyaltyProgramID) } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification subledgerID(@javax.annotation.Nonnull String subledgerID) { this.subledgerID = subledgerID; return this; } @@ -171,7 +171,7 @@ public void setSubledgerID(@javax.annotation.Nonnull String subledgerID) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification sourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { this.sourceOfEvent = sourceOfEvent; return this; } @@ -190,7 +190,7 @@ public void setSourceOfEvent(@javax.annotation.Nonnull String sourceOfEvent) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification currentTier(@javax.annotation.Nullable String currentTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification currentTier(@javax.annotation.Nullable String currentTier) { this.currentTier = currentTier; return this; } @@ -209,7 +209,7 @@ public void setCurrentTier(@javax.annotation.Nullable String currentTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification currentPoints(@javax.annotation.Nonnull Float currentPoints) { this.currentPoints = currentPoints; return this; } @@ -228,7 +228,7 @@ public void setCurrentPoints(@javax.annotation.Nonnull Float currentPoints) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification oldTier(@javax.annotation.Nullable String oldTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification oldTier(@javax.annotation.Nullable String oldTier) { this.oldTier = oldTier; return this; } @@ -247,7 +247,7 @@ public void setOldTier(@javax.annotation.Nullable String oldTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification pointsRequiredToTheNextTier(@javax.annotation.Nullable Float pointsRequiredToTheNextTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification pointsRequiredToTheNextTier(@javax.annotation.Nullable Float pointsRequiredToTheNextTier) { this.pointsRequiredToTheNextTier = pointsRequiredToTheNextTier; return this; } @@ -266,7 +266,7 @@ public void setPointsRequiredToTheNextTier(@javax.annotation.Nullable Float poin } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification nextTier(@javax.annotation.Nullable String nextTier) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification nextTier(@javax.annotation.Nullable String nextTier) { this.nextTier = nextTier; return this; } @@ -285,7 +285,7 @@ public void setNextTier(@javax.annotation.Nullable String nextTier) { } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification tierExpirationDate(@javax.annotation.Nullable OffsetDateTime tierExpirationDate) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification tierExpirationDate(@javax.annotation.Nullable OffsetDateTime tierExpirationDate) { this.tierExpirationDate = tierExpirationDate; return this; } @@ -304,7 +304,7 @@ public void setTierExpirationDate(@javax.annotation.Nullable OffsetDateTime tier } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification timestampOfTierChange(@javax.annotation.Nullable OffsetDateTime timestampOfTierChange) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification timestampOfTierChange(@javax.annotation.Nullable OffsetDateTime timestampOfTierChange) { this.timestampOfTierChange = timestampOfTierChange; return this; } @@ -323,7 +323,7 @@ public void setTimestampOfTierChange(@javax.annotation.Nullable OffsetDateTime t } - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { this.publishedAt = publishedAt; return this; } @@ -351,19 +351,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification = (PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification) o; - return Objects.equals(this.profileIntegrationID, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.profileIntegrationID) && - Objects.equals(this.loyaltyProgramID, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.loyaltyProgramID) && - Objects.equals(this.subledgerID, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.subledgerID) && - Objects.equals(this.sourceOfEvent, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.sourceOfEvent) && - Objects.equals(this.currentTier, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.currentTier) && - Objects.equals(this.currentPoints, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.currentPoints) && - Objects.equals(this.oldTier, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.oldTier) && - Objects.equals(this.pointsRequiredToTheNextTier, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.pointsRequiredToTheNextTier) && - Objects.equals(this.nextTier, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.nextTier) && - Objects.equals(this.tierExpirationDate, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.tierExpirationDate) && - Objects.equals(this.timestampOfTierChange, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.timestampOfTierChange) && - Objects.equals(this.publishedAt, prismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.publishedAt); + IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification = (IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification) o; + return Objects.equals(this.profileIntegrationID, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.profileIntegrationID) && + Objects.equals(this.loyaltyProgramID, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.loyaltyProgramID) && + Objects.equals(this.subledgerID, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.subledgerID) && + Objects.equals(this.sourceOfEvent, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.sourceOfEvent) && + Objects.equals(this.currentTier, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.currentTier) && + Objects.equals(this.currentPoints, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.currentPoints) && + Objects.equals(this.oldTier, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.oldTier) && + Objects.equals(this.pointsRequiredToTheNextTier, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.pointsRequiredToTheNextTier) && + Objects.equals(this.nextTier, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.nextTier) && + Objects.equals(this.tierExpirationDate, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.tierExpirationDate) && + Objects.equals(this.timestampOfTierChange, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.timestampOfTierChange) && + Objects.equals(this.publishedAt, integrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.publishedAt); } @Override @@ -374,7 +374,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification {\n"); + sb.append("class IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification {\n"); sb.append(" profileIntegrationID: ").append(toIndentedString(profileIntegrationID)).append("\n"); sb.append(" loyaltyProgramID: ").append(toIndentedString(loyaltyProgramID)).append("\n"); sb.append(" subledgerID: ").append(toIndentedString(subledgerID)).append("\n"); @@ -418,25 +418,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.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 PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification is not found in the empty JSON string", PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.openapiRequiredFields.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.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 IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification is not found in the empty JSON string", IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.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 `PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.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 `IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.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())); } @@ -466,22 +466,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification' and its subtypes + if (!IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification read(JsonReader in) throws IOException { + public IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -492,18 +492,18 @@ public PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification read(Json } /** - * Create an instance of PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification given an JSON string + * Create an instance of IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification - * @throws IOException if the JSON string is invalid with respect to PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification + * @return An instance of IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification */ - public static PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification.class); + public static IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification.class); } /** - * Convert an instance of PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification to an JSON string + * Convert an instance of IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticEventRecord.java b/src/main/java/one/talon/model/IntegrationHubEventRecord.java similarity index 76% rename from src/main/java/one/talon/model/PrismaticEventRecord.java rename to src/main/java/one/talon/model/IntegrationHubEventRecord.java index 74b89546..c1bf2a48 100644 --- a/src/main/java/one/talon/model/PrismaticEventRecord.java +++ b/src/main/java/one/talon/model/IntegrationHubEventRecord.java @@ -47,10 +47,10 @@ import one.talon.JSON; /** - * PrismaticEventRecord + * IntegrationHubEventRecord */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticEventRecord { +public class IntegrationHubEventRecord { public static final String SERIALIZED_NAME_ID = "Id"; @SerializedName(SERIALIZED_NAME_ID) @javax.annotation.Nonnull @@ -91,10 +91,10 @@ public class PrismaticEventRecord { @javax.annotation.Nonnull private Long retry; - public PrismaticEventRecord() { + public IntegrationHubEventRecord() { } - public PrismaticEventRecord id(@javax.annotation.Nonnull Long id) { + public IntegrationHubEventRecord id(@javax.annotation.Nonnull Long id) { this.id = id; return this; } @@ -113,7 +113,7 @@ public void setId(@javax.annotation.Nonnull Long id) { } - public PrismaticEventRecord flowId(@javax.annotation.Nonnull Long flowId) { + public IntegrationHubEventRecord flowId(@javax.annotation.Nonnull Long flowId) { this.flowId = flowId; return this; } @@ -132,7 +132,7 @@ public void setFlowId(@javax.annotation.Nonnull Long flowId) { } - public PrismaticEventRecord eventType(@javax.annotation.Nonnull String eventType) { + public IntegrationHubEventRecord eventType(@javax.annotation.Nonnull String eventType) { this.eventType = eventType; return this; } @@ -151,7 +151,7 @@ public void setEventType(@javax.annotation.Nonnull String eventType) { } - public PrismaticEventRecord eventData(@javax.annotation.Nullable Object eventData) { + public IntegrationHubEventRecord eventData(@javax.annotation.Nullable Object eventData) { this.eventData = eventData; return this; } @@ -170,7 +170,7 @@ public void setEventData(@javax.annotation.Nullable Object eventData) { } - public PrismaticEventRecord publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { + public IntegrationHubEventRecord publishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) { this.publishedAt = publishedAt; return this; } @@ -189,7 +189,7 @@ public void setPublishedAt(@javax.annotation.Nonnull OffsetDateTime publishedAt) } - public PrismaticEventRecord processedAt(@javax.annotation.Nullable OffsetDateTime processedAt) { + public IntegrationHubEventRecord processedAt(@javax.annotation.Nullable OffsetDateTime processedAt) { this.processedAt = processedAt; return this; } @@ -208,7 +208,7 @@ public void setProcessedAt(@javax.annotation.Nullable OffsetDateTime processedAt } - public PrismaticEventRecord processAfter(@javax.annotation.Nonnull OffsetDateTime processAfter) { + public IntegrationHubEventRecord processAfter(@javax.annotation.Nonnull OffsetDateTime processAfter) { this.processAfter = processAfter; return this; } @@ -227,7 +227,7 @@ public void setProcessAfter(@javax.annotation.Nonnull OffsetDateTime processAfte } - public PrismaticEventRecord retry(@javax.annotation.Nonnull Long retry) { + public IntegrationHubEventRecord retry(@javax.annotation.Nonnull Long retry) { this.retry = retry; return this; } @@ -255,15 +255,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticEventRecord prismaticEventRecord = (PrismaticEventRecord) o; - return Objects.equals(this.id, prismaticEventRecord.id) && - Objects.equals(this.flowId, prismaticEventRecord.flowId) && - Objects.equals(this.eventType, prismaticEventRecord.eventType) && - Objects.equals(this.eventData, prismaticEventRecord.eventData) && - Objects.equals(this.publishedAt, prismaticEventRecord.publishedAt) && - Objects.equals(this.processedAt, prismaticEventRecord.processedAt) && - Objects.equals(this.processAfter, prismaticEventRecord.processAfter) && - Objects.equals(this.retry, prismaticEventRecord.retry); + IntegrationHubEventRecord integrationHubEventRecord = (IntegrationHubEventRecord) o; + return Objects.equals(this.id, integrationHubEventRecord.id) && + Objects.equals(this.flowId, integrationHubEventRecord.flowId) && + Objects.equals(this.eventType, integrationHubEventRecord.eventType) && + Objects.equals(this.eventData, integrationHubEventRecord.eventData) && + Objects.equals(this.publishedAt, integrationHubEventRecord.publishedAt) && + Objects.equals(this.processedAt, integrationHubEventRecord.processedAt) && + Objects.equals(this.processAfter, integrationHubEventRecord.processAfter) && + Objects.equals(this.retry, integrationHubEventRecord.retry); } @Override @@ -274,7 +274,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticEventRecord {\n"); + sb.append("class IntegrationHubEventRecord {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" flowId: ").append(toIndentedString(flowId)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); @@ -314,25 +314,25 @@ private String toIndentedString(Object o) { * 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 PrismaticEventRecord + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubEventRecord */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticEventRecord.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 PrismaticEventRecord is not found in the empty JSON string", PrismaticEventRecord.openapiRequiredFields.toString())); + if (!IntegrationHubEventRecord.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 IntegrationHubEventRecord is not found in the empty JSON string", IntegrationHubEventRecord.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticEventRecord.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 `PrismaticEventRecord` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubEventRecord.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 `IntegrationHubEventRecord` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticEventRecord.openapiRequiredFields) { + for (String requiredField : IntegrationHubEventRecord.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())); } @@ -347,22 +347,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticEventRecord.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticEventRecord' and its subtypes + if (!IntegrationHubEventRecord.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubEventRecord' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticEventRecord.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubEventRecord.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticEventRecord value) throws IOException { + public void write(JsonWriter out, IntegrationHubEventRecord value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticEventRecord read(JsonReader in) throws IOException { + public IntegrationHubEventRecord read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -373,18 +373,18 @@ public PrismaticEventRecord read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticEventRecord given an JSON string + * Create an instance of IntegrationHubEventRecord given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticEventRecord - * @throws IOException if the JSON string is invalid with respect to PrismaticEventRecord + * @return An instance of IntegrationHubEventRecord + * @throws IOException if the JSON string is invalid with respect to IntegrationHubEventRecord */ - public static PrismaticEventRecord fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticEventRecord.class); + public static IntegrationHubEventRecord fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubEventRecord.class); } /** - * Convert an instance of PrismaticEventRecord to an JSON string + * Convert an instance of IntegrationHubEventRecord to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticFlow.java b/src/main/java/one/talon/model/IntegrationHubFlow.java similarity index 68% rename from src/main/java/one/talon/model/PrismaticFlow.java rename to src/main/java/one/talon/model/IntegrationHubFlow.java index 5e7780cd..0e341f3c 100644 --- a/src/main/java/one/talon/model/PrismaticFlow.java +++ b/src/main/java/one/talon/model/IntegrationHubFlow.java @@ -46,10 +46,10 @@ import one.talon.JSON; /** - * PrismaticFlow + * IntegrationHubFlow */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticFlow { +public class IntegrationHubFlow { public static final String SERIALIZED_NAME_APPLICATION_I_D = "ApplicationID"; @SerializedName(SERIALIZED_NAME_APPLICATION_I_D) @javax.annotation.Nullable @@ -60,15 +60,15 @@ public class PrismaticFlow { @javax.annotation.Nonnull private String eventType; - public static final String SERIALIZED_NAME_PRISMATIC_FLOW_URL = "PrismaticFlowUrl"; - @SerializedName(SERIALIZED_NAME_PRISMATIC_FLOW_URL) + public static final String SERIALIZED_NAME_INTEGRATION_HUB_FLOW_URL = "IntegrationHubFlowUrl"; + @SerializedName(SERIALIZED_NAME_INTEGRATION_HUB_FLOW_URL) @javax.annotation.Nonnull - private String prismaticFlowUrl; + private String integrationHubFlowUrl; - public PrismaticFlow() { + public IntegrationHubFlow() { } - public PrismaticFlow applicationID(@javax.annotation.Nullable Long applicationID) { + public IntegrationHubFlow applicationID(@javax.annotation.Nullable Long applicationID) { this.applicationID = applicationID; return this; } @@ -87,7 +87,7 @@ public void setApplicationID(@javax.annotation.Nullable Long applicationID) { } - public PrismaticFlow eventType(@javax.annotation.Nonnull String eventType) { + public IntegrationHubFlow eventType(@javax.annotation.Nonnull String eventType) { this.eventType = eventType; return this; } @@ -106,22 +106,22 @@ public void setEventType(@javax.annotation.Nonnull String eventType) { } - public PrismaticFlow prismaticFlowUrl(@javax.annotation.Nonnull String prismaticFlowUrl) { - this.prismaticFlowUrl = prismaticFlowUrl; + public IntegrationHubFlow integrationHubFlowUrl(@javax.annotation.Nonnull String integrationHubFlowUrl) { + this.integrationHubFlowUrl = integrationHubFlowUrl; return this; } /** - * The URL of the prismatic flow that we want to trigger for the event. - * @return prismaticFlowUrl + * The URL of the integration hub flow that we want to trigger for the event. + * @return integrationHubFlowUrl */ @javax.annotation.Nonnull - public String getPrismaticFlowUrl() { - return prismaticFlowUrl; + public String getIntegrationHubFlowUrl() { + return integrationHubFlowUrl; } - public void setPrismaticFlowUrl(@javax.annotation.Nonnull String prismaticFlowUrl) { - this.prismaticFlowUrl = prismaticFlowUrl; + public void setIntegrationHubFlowUrl(@javax.annotation.Nonnull String integrationHubFlowUrl) { + this.integrationHubFlowUrl = integrationHubFlowUrl; } @@ -134,24 +134,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticFlow prismaticFlow = (PrismaticFlow) o; - return Objects.equals(this.applicationID, prismaticFlow.applicationID) && - Objects.equals(this.eventType, prismaticFlow.eventType) && - Objects.equals(this.prismaticFlowUrl, prismaticFlow.prismaticFlowUrl); + IntegrationHubFlow integrationHubFlow = (IntegrationHubFlow) o; + return Objects.equals(this.applicationID, integrationHubFlow.applicationID) && + Objects.equals(this.eventType, integrationHubFlow.eventType) && + Objects.equals(this.integrationHubFlowUrl, integrationHubFlow.integrationHubFlowUrl); } @Override public int hashCode() { - return Objects.hash(applicationID, eventType, prismaticFlowUrl); + return Objects.hash(applicationID, eventType, integrationHubFlowUrl); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticFlow {\n"); + sb.append("class IntegrationHubFlow {\n"); sb.append(" applicationID: ").append(toIndentedString(applicationID)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" prismaticFlowUrl: ").append(toIndentedString(prismaticFlowUrl)).append("\n"); + sb.append(" integrationHubFlowUrl: ").append(toIndentedString(integrationHubFlowUrl)).append("\n"); sb.append("}"); return sb.toString(); } @@ -173,35 +173,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("ApplicationID", "EventType", "PrismaticFlowUrl")); + openapiFields = new HashSet(Arrays.asList("ApplicationID", "EventType", "IntegrationHubFlowUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("EventType", "PrismaticFlowUrl")); + openapiRequiredFields = new HashSet(Arrays.asList("EventType", "IntegrationHubFlowUrl")); } /** * 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 PrismaticFlow + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubFlow */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticFlow.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 PrismaticFlow is not found in the empty JSON string", PrismaticFlow.openapiRequiredFields.toString())); + if (!IntegrationHubFlow.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 IntegrationHubFlow is not found in the empty JSON string", IntegrationHubFlow.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticFlow.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 `PrismaticFlow` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubFlow.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 `IntegrationHubFlow` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticFlow.openapiRequiredFields) { + for (String requiredField : IntegrationHubFlow.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())); } @@ -210,8 +210,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("EventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `EventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("EventType").toString())); } - if (!jsonObj.get("PrismaticFlowUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `PrismaticFlowUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("PrismaticFlowUrl").toString())); + if (!jsonObj.get("IntegrationHubFlowUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `IntegrationHubFlowUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("IntegrationHubFlowUrl").toString())); } } @@ -219,22 +219,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticFlow.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticFlow' and its subtypes + if (!IntegrationHubFlow.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubFlow' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticFlow.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubFlow.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticFlow value) throws IOException { + public void write(JsonWriter out, IntegrationHubFlow value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticFlow read(JsonReader in) throws IOException { + public IntegrationHubFlow read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -245,18 +245,18 @@ public PrismaticFlow read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticFlow given an JSON string + * Create an instance of IntegrationHubFlow given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticFlow - * @throws IOException if the JSON string is invalid with respect to PrismaticFlow + * @return An instance of IntegrationHubFlow + * @throws IOException if the JSON string is invalid with respect to IntegrationHubFlow */ - public static PrismaticFlow fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticFlow.class); + public static IntegrationHubFlow fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubFlow.class); } /** - * Convert an instance of PrismaticFlow to an JSON string + * Convert an instance of IntegrationHubFlow to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticFlowConfig.java b/src/main/java/one/talon/model/IntegrationHubFlowConfig.java similarity index 74% rename from src/main/java/one/talon/model/PrismaticFlowConfig.java rename to src/main/java/one/talon/model/IntegrationHubFlowConfig.java index ccf297f9..9b16a117 100644 --- a/src/main/java/one/talon/model/PrismaticFlowConfig.java +++ b/src/main/java/one/talon/model/IntegrationHubFlowConfig.java @@ -46,10 +46,10 @@ import one.talon.JSON; /** - * PrismaticFlowConfig + * IntegrationHubFlowConfig */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticFlowConfig { +public class IntegrationHubFlowConfig { public static final String SERIALIZED_NAME_API_KEY = "ApiKey"; @SerializedName(SERIALIZED_NAME_API_KEY) @javax.annotation.Nonnull @@ -70,10 +70,10 @@ public class PrismaticFlowConfig { @javax.annotation.Nullable private Long maxRetries = 10l; - public PrismaticFlowConfig() { + public IntegrationHubFlowConfig() { } - public PrismaticFlowConfig apiKey(@javax.annotation.Nonnull String apiKey) { + public IntegrationHubFlowConfig apiKey(@javax.annotation.Nonnull String apiKey) { this.apiKey = apiKey; return this; } @@ -92,13 +92,13 @@ public void setApiKey(@javax.annotation.Nonnull String apiKey) { } - public PrismaticFlowConfig workerCount(@javax.annotation.Nullable Long workerCount) { + public IntegrationHubFlowConfig workerCount(@javax.annotation.Nullable Long workerCount) { this.workerCount = workerCount; return this; } /** - * Number of Prismatic workers to run in parallel for this flow (maximum 500). + * Number of IntegrationHub workers to run in parallel for this flow (maximum 500). * minimum: 1 * maximum: 500 * @return workerCount @@ -113,13 +113,13 @@ public void setWorkerCount(@javax.annotation.Nullable Long workerCount) { } - public PrismaticFlowConfig maxEventsPerMessage(@javax.annotation.Nullable Long maxEventsPerMessage) { + public IntegrationHubFlowConfig maxEventsPerMessage(@javax.annotation.Nullable Long maxEventsPerMessage) { this.maxEventsPerMessage = maxEventsPerMessage; return this; } /** - * Maximum number of events to send in a single message to Prismatic. + * Maximum number of events to send in a single message to IntegrationHub. * minimum: 1 * @return maxEventsPerMessage */ @@ -133,13 +133,13 @@ public void setMaxEventsPerMessage(@javax.annotation.Nullable Long maxEventsPerM } - public PrismaticFlowConfig maxRetries(@javax.annotation.Nullable Long maxRetries) { + public IntegrationHubFlowConfig maxRetries(@javax.annotation.Nullable Long maxRetries) { this.maxRetries = maxRetries; return this; } /** - * Maximum number of retries for a Prismatic event before it is ignored. + * Maximum number of retries for a IntegrationHub event before it is ignored. * minimum: 0 * @return maxRetries */ @@ -162,11 +162,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticFlowConfig prismaticFlowConfig = (PrismaticFlowConfig) o; - return Objects.equals(this.apiKey, prismaticFlowConfig.apiKey) && - Objects.equals(this.workerCount, prismaticFlowConfig.workerCount) && - Objects.equals(this.maxEventsPerMessage, prismaticFlowConfig.maxEventsPerMessage) && - Objects.equals(this.maxRetries, prismaticFlowConfig.maxRetries); + IntegrationHubFlowConfig integrationHubFlowConfig = (IntegrationHubFlowConfig) o; + return Objects.equals(this.apiKey, integrationHubFlowConfig.apiKey) && + Objects.equals(this.workerCount, integrationHubFlowConfig.workerCount) && + Objects.equals(this.maxEventsPerMessage, integrationHubFlowConfig.maxEventsPerMessage) && + Objects.equals(this.maxRetries, integrationHubFlowConfig.maxRetries); } @Override @@ -177,7 +177,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticFlowConfig {\n"); + sb.append("class IntegrationHubFlowConfig {\n"); sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); sb.append(" workerCount: ").append(toIndentedString(workerCount)).append("\n"); sb.append(" maxEventsPerMessage: ").append(toIndentedString(maxEventsPerMessage)).append("\n"); @@ -213,25 +213,25 @@ private String toIndentedString(Object o) { * 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 PrismaticFlowConfig + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubFlowConfig */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticFlowConfig.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 PrismaticFlowConfig is not found in the empty JSON string", PrismaticFlowConfig.openapiRequiredFields.toString())); + if (!IntegrationHubFlowConfig.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 IntegrationHubFlowConfig is not found in the empty JSON string", IntegrationHubFlowConfig.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticFlowConfig.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 `PrismaticFlowConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubFlowConfig.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 `IntegrationHubFlowConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticFlowConfig.openapiRequiredFields) { + for (String requiredField : IntegrationHubFlowConfig.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())); } @@ -246,22 +246,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticFlowConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticFlowConfig' and its subtypes + if (!IntegrationHubFlowConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubFlowConfig' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticFlowConfig.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubFlowConfig.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticFlowConfig value) throws IOException { + public void write(JsonWriter out, IntegrationHubFlowConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticFlowConfig read(JsonReader in) throws IOException { + public IntegrationHubFlowConfig read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -272,18 +272,18 @@ public PrismaticFlowConfig read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticFlowConfig given an JSON string + * Create an instance of IntegrationHubFlowConfig given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticFlowConfig - * @throws IOException if the JSON string is invalid with respect to PrismaticFlowConfig + * @return An instance of IntegrationHubFlowConfig + * @throws IOException if the JSON string is invalid with respect to IntegrationHubFlowConfig */ - public static PrismaticFlowConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticFlowConfig.class); + public static IntegrationHubFlowConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubFlowConfig.class); } /** - * Convert an instance of PrismaticFlowConfig to an JSON string + * Convert an instance of IntegrationHubFlowConfig to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticFlowConfigResponse.java b/src/main/java/one/talon/model/IntegrationHubFlowConfigResponse.java similarity index 71% rename from src/main/java/one/talon/model/PrismaticFlowConfigResponse.java rename to src/main/java/one/talon/model/IntegrationHubFlowConfigResponse.java index 5593741f..b4c57dcc 100644 --- a/src/main/java/one/talon/model/PrismaticFlowConfigResponse.java +++ b/src/main/java/one/talon/model/IntegrationHubFlowConfigResponse.java @@ -46,10 +46,10 @@ import one.talon.JSON; /** - * PrismaticFlowConfigResponse + * IntegrationHubFlowConfigResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticFlowConfigResponse { +public class IntegrationHubFlowConfigResponse { public static final String SERIALIZED_NAME_WORKER_COUNT = "WorkerCount"; @SerializedName(SERIALIZED_NAME_WORKER_COUNT) @javax.annotation.Nullable @@ -65,16 +65,16 @@ public class PrismaticFlowConfigResponse { @javax.annotation.Nullable private Long maxRetries; - public PrismaticFlowConfigResponse() { + public IntegrationHubFlowConfigResponse() { } - public PrismaticFlowConfigResponse workerCount(@javax.annotation.Nullable Long workerCount) { + public IntegrationHubFlowConfigResponse workerCount(@javax.annotation.Nullable Long workerCount) { this.workerCount = workerCount; return this; } /** - * Number of Prismatic workers to run in parallel for this flow (maximum 500). + * Number of IntegrationHub workers to run in parallel for this flow (maximum 500). * minimum: 1 * maximum: 500 * @return workerCount @@ -89,13 +89,13 @@ public void setWorkerCount(@javax.annotation.Nullable Long workerCount) { } - public PrismaticFlowConfigResponse maxEventsPerMessage(@javax.annotation.Nullable Long maxEventsPerMessage) { + public IntegrationHubFlowConfigResponse maxEventsPerMessage(@javax.annotation.Nullable Long maxEventsPerMessage) { this.maxEventsPerMessage = maxEventsPerMessage; return this; } /** - * Maximum number of events to send in a single message to Prismatic. + * Maximum number of events to send in a single message to IntegrationHub. * minimum: 1 * @return maxEventsPerMessage */ @@ -109,13 +109,13 @@ public void setMaxEventsPerMessage(@javax.annotation.Nullable Long maxEventsPerM } - public PrismaticFlowConfigResponse maxRetries(@javax.annotation.Nullable Long maxRetries) { + public IntegrationHubFlowConfigResponse maxRetries(@javax.annotation.Nullable Long maxRetries) { this.maxRetries = maxRetries; return this; } /** - * Maximum number of retries for a Prismatic event before it is ignored. + * Maximum number of retries for a IntegrationHub event before it is ignored. * minimum: 0 * @return maxRetries */ @@ -138,10 +138,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticFlowConfigResponse prismaticFlowConfigResponse = (PrismaticFlowConfigResponse) o; - return Objects.equals(this.workerCount, prismaticFlowConfigResponse.workerCount) && - Objects.equals(this.maxEventsPerMessage, prismaticFlowConfigResponse.maxEventsPerMessage) && - Objects.equals(this.maxRetries, prismaticFlowConfigResponse.maxRetries); + IntegrationHubFlowConfigResponse integrationHubFlowConfigResponse = (IntegrationHubFlowConfigResponse) o; + return Objects.equals(this.workerCount, integrationHubFlowConfigResponse.workerCount) && + Objects.equals(this.maxEventsPerMessage, integrationHubFlowConfigResponse.maxEventsPerMessage) && + Objects.equals(this.maxRetries, integrationHubFlowConfigResponse.maxRetries); } @Override @@ -152,7 +152,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticFlowConfigResponse {\n"); + sb.append("class IntegrationHubFlowConfigResponse {\n"); sb.append(" workerCount: ").append(toIndentedString(workerCount)).append("\n"); sb.append(" maxEventsPerMessage: ").append(toIndentedString(maxEventsPerMessage)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); @@ -187,20 +187,20 @@ private String toIndentedString(Object o) { * 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 PrismaticFlowConfigResponse + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubFlowConfigResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticFlowConfigResponse.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 PrismaticFlowConfigResponse is not found in the empty JSON string", PrismaticFlowConfigResponse.openapiRequiredFields.toString())); + if (!IntegrationHubFlowConfigResponse.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 IntegrationHubFlowConfigResponse is not found in the empty JSON string", IntegrationHubFlowConfigResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticFlowConfigResponse.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 `PrismaticFlowConfigResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubFlowConfigResponse.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 `IntegrationHubFlowConfigResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -210,22 +210,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticFlowConfigResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticFlowConfigResponse' and its subtypes + if (!IntegrationHubFlowConfigResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubFlowConfigResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticFlowConfigResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubFlowConfigResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticFlowConfigResponse value) throws IOException { + public void write(JsonWriter out, IntegrationHubFlowConfigResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticFlowConfigResponse read(JsonReader in) throws IOException { + public IntegrationHubFlowConfigResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -236,18 +236,18 @@ public PrismaticFlowConfigResponse read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticFlowConfigResponse given an JSON string + * Create an instance of IntegrationHubFlowConfigResponse given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticFlowConfigResponse - * @throws IOException if the JSON string is invalid with respect to PrismaticFlowConfigResponse + * @return An instance of IntegrationHubFlowConfigResponse + * @throws IOException if the JSON string is invalid with respect to IntegrationHubFlowConfigResponse */ - public static PrismaticFlowConfigResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticFlowConfigResponse.class); + public static IntegrationHubFlowConfigResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubFlowConfigResponse.class); } /** - * Convert an instance of PrismaticFlowConfigResponse to an JSON string + * Convert an instance of IntegrationHubFlowConfigResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticFlowResponse.java b/src/main/java/one/talon/model/IntegrationHubFlowResponse.java similarity index 64% rename from src/main/java/one/talon/model/PrismaticFlowResponse.java rename to src/main/java/one/talon/model/IntegrationHubFlowResponse.java index cfdd9f0c..6756ab3a 100644 --- a/src/main/java/one/talon/model/PrismaticFlowResponse.java +++ b/src/main/java/one/talon/model/IntegrationHubFlowResponse.java @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import one.talon.model.PrismaticFlowConfigResponse; +import one.talon.model.IntegrationHubFlowConfigResponse; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,10 +47,10 @@ import one.talon.JSON; /** - * PrismaticFlowResponse + * IntegrationHubFlowResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticFlowResponse { +public class IntegrationHubFlowResponse { public static final String SERIALIZED_NAME_ID = "Id"; @SerializedName(SERIALIZED_NAME_ID) @javax.annotation.Nonnull @@ -66,26 +66,26 @@ public class PrismaticFlowResponse { @javax.annotation.Nonnull private String eventType; - public static final String SERIALIZED_NAME_PRISMATIC_FLOW_URL = "PrismaticFlowUrl"; - @SerializedName(SERIALIZED_NAME_PRISMATIC_FLOW_URL) + public static final String SERIALIZED_NAME_INTEGRATION_HUB_FLOW_URL = "IntegrationHubFlowUrl"; + @SerializedName(SERIALIZED_NAME_INTEGRATION_HUB_FLOW_URL) @javax.annotation.Nonnull - private String prismaticFlowUrl; + private String integrationHubFlowUrl; public static final String SERIALIZED_NAME_CONFIG = "Config"; @SerializedName(SERIALIZED_NAME_CONFIG) @javax.annotation.Nonnull - private PrismaticFlowConfigResponse config; + private IntegrationHubFlowConfigResponse config; - public PrismaticFlowResponse() { + public IntegrationHubFlowResponse() { } - public PrismaticFlowResponse id(@javax.annotation.Nonnull Long id) { + public IntegrationHubFlowResponse id(@javax.annotation.Nonnull Long id) { this.id = id; return this; } /** - * ID of the prismatic flow. + * ID of the integration hub flow. * @return id */ @javax.annotation.Nonnull @@ -98,7 +98,7 @@ public void setId(@javax.annotation.Nonnull Long id) { } - public PrismaticFlowResponse applicationID(@javax.annotation.Nullable Long applicationID) { + public IntegrationHubFlowResponse applicationID(@javax.annotation.Nullable Long applicationID) { this.applicationID = applicationID; return this; } @@ -117,7 +117,7 @@ public void setApplicationID(@javax.annotation.Nullable Long applicationID) { } - public PrismaticFlowResponse eventType(@javax.annotation.Nonnull String eventType) { + public IntegrationHubFlowResponse eventType(@javax.annotation.Nonnull String eventType) { this.eventType = eventType; return this; } @@ -136,26 +136,26 @@ public void setEventType(@javax.annotation.Nonnull String eventType) { } - public PrismaticFlowResponse prismaticFlowUrl(@javax.annotation.Nonnull String prismaticFlowUrl) { - this.prismaticFlowUrl = prismaticFlowUrl; + public IntegrationHubFlowResponse integrationHubFlowUrl(@javax.annotation.Nonnull String integrationHubFlowUrl) { + this.integrationHubFlowUrl = integrationHubFlowUrl; return this; } /** - * The URL of the prismatic flow that we want to trigger for the event. - * @return prismaticFlowUrl + * The URL of the integration hub flow that we want to trigger for the event. + * @return integrationHubFlowUrl */ @javax.annotation.Nonnull - public String getPrismaticFlowUrl() { - return prismaticFlowUrl; + public String getIntegrationHubFlowUrl() { + return integrationHubFlowUrl; } - public void setPrismaticFlowUrl(@javax.annotation.Nonnull String prismaticFlowUrl) { - this.prismaticFlowUrl = prismaticFlowUrl; + public void setIntegrationHubFlowUrl(@javax.annotation.Nonnull String integrationHubFlowUrl) { + this.integrationHubFlowUrl = integrationHubFlowUrl; } - public PrismaticFlowResponse config(@javax.annotation.Nonnull PrismaticFlowConfigResponse config) { + public IntegrationHubFlowResponse config(@javax.annotation.Nonnull IntegrationHubFlowConfigResponse config) { this.config = config; return this; } @@ -165,11 +165,11 @@ public PrismaticFlowResponse config(@javax.annotation.Nonnull PrismaticFlowConfi * @return config */ @javax.annotation.Nonnull - public PrismaticFlowConfigResponse getConfig() { + public IntegrationHubFlowConfigResponse getConfig() { return config; } - public void setConfig(@javax.annotation.Nonnull PrismaticFlowConfigResponse config) { + public void setConfig(@javax.annotation.Nonnull IntegrationHubFlowConfigResponse config) { this.config = config; } @@ -183,27 +183,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticFlowResponse prismaticFlowResponse = (PrismaticFlowResponse) o; - return Objects.equals(this.id, prismaticFlowResponse.id) && - Objects.equals(this.applicationID, prismaticFlowResponse.applicationID) && - Objects.equals(this.eventType, prismaticFlowResponse.eventType) && - Objects.equals(this.prismaticFlowUrl, prismaticFlowResponse.prismaticFlowUrl) && - Objects.equals(this.config, prismaticFlowResponse.config); + IntegrationHubFlowResponse integrationHubFlowResponse = (IntegrationHubFlowResponse) o; + return Objects.equals(this.id, integrationHubFlowResponse.id) && + Objects.equals(this.applicationID, integrationHubFlowResponse.applicationID) && + Objects.equals(this.eventType, integrationHubFlowResponse.eventType) && + Objects.equals(this.integrationHubFlowUrl, integrationHubFlowResponse.integrationHubFlowUrl) && + Objects.equals(this.config, integrationHubFlowResponse.config); } @Override public int hashCode() { - return Objects.hash(id, applicationID, eventType, prismaticFlowUrl, config); + return Objects.hash(id, applicationID, eventType, integrationHubFlowUrl, config); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticFlowResponse {\n"); + sb.append("class IntegrationHubFlowResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" applicationID: ").append(toIndentedString(applicationID)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" prismaticFlowUrl: ").append(toIndentedString(prismaticFlowUrl)).append("\n"); + sb.append(" integrationHubFlowUrl: ").append(toIndentedString(integrationHubFlowUrl)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append("}"); return sb.toString(); @@ -226,35 +226,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("Id", "ApplicationID", "EventType", "PrismaticFlowUrl", "Config")); + openapiFields = new HashSet(Arrays.asList("Id", "ApplicationID", "EventType", "IntegrationHubFlowUrl", "Config")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("Id", "EventType", "PrismaticFlowUrl", "Config")); + openapiRequiredFields = new HashSet(Arrays.asList("Id", "EventType", "IntegrationHubFlowUrl", "Config")); } /** * 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 PrismaticFlowResponse + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubFlowResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticFlowResponse.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 PrismaticFlowResponse is not found in the empty JSON string", PrismaticFlowResponse.openapiRequiredFields.toString())); + if (!IntegrationHubFlowResponse.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 IntegrationHubFlowResponse is not found in the empty JSON string", IntegrationHubFlowResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticFlowResponse.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 `PrismaticFlowResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubFlowResponse.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 `IntegrationHubFlowResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticFlowResponse.openapiRequiredFields) { + for (String requiredField : IntegrationHubFlowResponse.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())); } @@ -263,33 +263,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("EventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `EventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("EventType").toString())); } - if (!jsonObj.get("PrismaticFlowUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `PrismaticFlowUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("PrismaticFlowUrl").toString())); + if (!jsonObj.get("IntegrationHubFlowUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `IntegrationHubFlowUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("IntegrationHubFlowUrl").toString())); } // validate the required field `Config` - PrismaticFlowConfigResponse.validateJsonElement(jsonObj.get("Config")); + IntegrationHubFlowConfigResponse.validateJsonElement(jsonObj.get("Config")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticFlowResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticFlowResponse' and its subtypes + if (!IntegrationHubFlowResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubFlowResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticFlowResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubFlowResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticFlowResponse value) throws IOException { + public void write(JsonWriter out, IntegrationHubFlowResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticFlowResponse read(JsonReader in) throws IOException { + public IntegrationHubFlowResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -300,18 +300,18 @@ public PrismaticFlowResponse read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticFlowResponse given an JSON string + * Create an instance of IntegrationHubFlowResponse given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticFlowResponse - * @throws IOException if the JSON string is invalid with respect to PrismaticFlowResponse + * @return An instance of IntegrationHubFlowResponse + * @throws IOException if the JSON string is invalid with respect to IntegrationHubFlowResponse */ - public static PrismaticFlowResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticFlowResponse.class); + public static IntegrationHubFlowResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubFlowResponse.class); } /** - * Convert an instance of PrismaticFlowResponse to an JSON string + * Convert an instance of IntegrationHubFlowResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticFlowWithConfig.java b/src/main/java/one/talon/model/IntegrationHubFlowWithConfig.java similarity index 64% rename from src/main/java/one/talon/model/PrismaticFlowWithConfig.java rename to src/main/java/one/talon/model/IntegrationHubFlowWithConfig.java index f7fd0bab..bb2ef401 100644 --- a/src/main/java/one/talon/model/PrismaticFlowWithConfig.java +++ b/src/main/java/one/talon/model/IntegrationHubFlowWithConfig.java @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import one.talon.model.PrismaticFlowConfig; +import one.talon.model.IntegrationHubFlowConfig; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -47,10 +47,10 @@ import one.talon.JSON; /** - * PrismaticFlowWithConfig + * IntegrationHubFlowWithConfig */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticFlowWithConfig { +public class IntegrationHubFlowWithConfig { public static final String SERIALIZED_NAME_APPLICATION_I_D = "ApplicationID"; @SerializedName(SERIALIZED_NAME_APPLICATION_I_D) @javax.annotation.Nullable @@ -61,20 +61,20 @@ public class PrismaticFlowWithConfig { @javax.annotation.Nonnull private String eventType; - public static final String SERIALIZED_NAME_PRISMATIC_FLOW_URL = "PrismaticFlowUrl"; - @SerializedName(SERIALIZED_NAME_PRISMATIC_FLOW_URL) + public static final String SERIALIZED_NAME_INTEGRATION_HUB_FLOW_URL = "IntegrationHubFlowUrl"; + @SerializedName(SERIALIZED_NAME_INTEGRATION_HUB_FLOW_URL) @javax.annotation.Nonnull - private String prismaticFlowUrl; + private String integrationHubFlowUrl; public static final String SERIALIZED_NAME_CONFIG = "Config"; @SerializedName(SERIALIZED_NAME_CONFIG) @javax.annotation.Nonnull - private PrismaticFlowConfig config; + private IntegrationHubFlowConfig config; - public PrismaticFlowWithConfig() { + public IntegrationHubFlowWithConfig() { } - public PrismaticFlowWithConfig applicationID(@javax.annotation.Nullable Long applicationID) { + public IntegrationHubFlowWithConfig applicationID(@javax.annotation.Nullable Long applicationID) { this.applicationID = applicationID; return this; } @@ -93,7 +93,7 @@ public void setApplicationID(@javax.annotation.Nullable Long applicationID) { } - public PrismaticFlowWithConfig eventType(@javax.annotation.Nonnull String eventType) { + public IntegrationHubFlowWithConfig eventType(@javax.annotation.Nonnull String eventType) { this.eventType = eventType; return this; } @@ -112,26 +112,26 @@ public void setEventType(@javax.annotation.Nonnull String eventType) { } - public PrismaticFlowWithConfig prismaticFlowUrl(@javax.annotation.Nonnull String prismaticFlowUrl) { - this.prismaticFlowUrl = prismaticFlowUrl; + public IntegrationHubFlowWithConfig integrationHubFlowUrl(@javax.annotation.Nonnull String integrationHubFlowUrl) { + this.integrationHubFlowUrl = integrationHubFlowUrl; return this; } /** - * The URL of the prismatic flow that we want to trigger for the event. - * @return prismaticFlowUrl + * The URL of the integration hub flow that we want to trigger for the event. + * @return integrationHubFlowUrl */ @javax.annotation.Nonnull - public String getPrismaticFlowUrl() { - return prismaticFlowUrl; + public String getIntegrationHubFlowUrl() { + return integrationHubFlowUrl; } - public void setPrismaticFlowUrl(@javax.annotation.Nonnull String prismaticFlowUrl) { - this.prismaticFlowUrl = prismaticFlowUrl; + public void setIntegrationHubFlowUrl(@javax.annotation.Nonnull String integrationHubFlowUrl) { + this.integrationHubFlowUrl = integrationHubFlowUrl; } - public PrismaticFlowWithConfig config(@javax.annotation.Nonnull PrismaticFlowConfig config) { + public IntegrationHubFlowWithConfig config(@javax.annotation.Nonnull IntegrationHubFlowConfig config) { this.config = config; return this; } @@ -141,11 +141,11 @@ public PrismaticFlowWithConfig config(@javax.annotation.Nonnull PrismaticFlowCon * @return config */ @javax.annotation.Nonnull - public PrismaticFlowConfig getConfig() { + public IntegrationHubFlowConfig getConfig() { return config; } - public void setConfig(@javax.annotation.Nonnull PrismaticFlowConfig config) { + public void setConfig(@javax.annotation.Nonnull IntegrationHubFlowConfig config) { this.config = config; } @@ -159,25 +159,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticFlowWithConfig prismaticFlowWithConfig = (PrismaticFlowWithConfig) o; - return Objects.equals(this.applicationID, prismaticFlowWithConfig.applicationID) && - Objects.equals(this.eventType, prismaticFlowWithConfig.eventType) && - Objects.equals(this.prismaticFlowUrl, prismaticFlowWithConfig.prismaticFlowUrl) && - Objects.equals(this.config, prismaticFlowWithConfig.config); + IntegrationHubFlowWithConfig integrationHubFlowWithConfig = (IntegrationHubFlowWithConfig) o; + return Objects.equals(this.applicationID, integrationHubFlowWithConfig.applicationID) && + Objects.equals(this.eventType, integrationHubFlowWithConfig.eventType) && + Objects.equals(this.integrationHubFlowUrl, integrationHubFlowWithConfig.integrationHubFlowUrl) && + Objects.equals(this.config, integrationHubFlowWithConfig.config); } @Override public int hashCode() { - return Objects.hash(applicationID, eventType, prismaticFlowUrl, config); + return Objects.hash(applicationID, eventType, integrationHubFlowUrl, config); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticFlowWithConfig {\n"); + sb.append("class IntegrationHubFlowWithConfig {\n"); sb.append(" applicationID: ").append(toIndentedString(applicationID)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" prismaticFlowUrl: ").append(toIndentedString(prismaticFlowUrl)).append("\n"); + sb.append(" integrationHubFlowUrl: ").append(toIndentedString(integrationHubFlowUrl)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append("}"); return sb.toString(); @@ -200,35 +200,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("ApplicationID", "EventType", "PrismaticFlowUrl", "Config")); + openapiFields = new HashSet(Arrays.asList("ApplicationID", "EventType", "IntegrationHubFlowUrl", "Config")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("EventType", "PrismaticFlowUrl", "Config")); + openapiRequiredFields = new HashSet(Arrays.asList("EventType", "IntegrationHubFlowUrl", "Config")); } /** * 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 PrismaticFlowWithConfig + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubFlowWithConfig */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticFlowWithConfig.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 PrismaticFlowWithConfig is not found in the empty JSON string", PrismaticFlowWithConfig.openapiRequiredFields.toString())); + if (!IntegrationHubFlowWithConfig.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 IntegrationHubFlowWithConfig is not found in the empty JSON string", IntegrationHubFlowWithConfig.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticFlowWithConfig.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 `PrismaticFlowWithConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubFlowWithConfig.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 `IntegrationHubFlowWithConfig` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticFlowWithConfig.openapiRequiredFields) { + for (String requiredField : IntegrationHubFlowWithConfig.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())); } @@ -237,33 +237,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("EventType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `EventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("EventType").toString())); } - if (!jsonObj.get("PrismaticFlowUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `PrismaticFlowUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("PrismaticFlowUrl").toString())); + if (!jsonObj.get("IntegrationHubFlowUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `IntegrationHubFlowUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("IntegrationHubFlowUrl").toString())); } // validate the required field `Config` - PrismaticFlowConfig.validateJsonElement(jsonObj.get("Config")); + IntegrationHubFlowConfig.validateJsonElement(jsonObj.get("Config")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticFlowWithConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticFlowWithConfig' and its subtypes + if (!IntegrationHubFlowWithConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubFlowWithConfig' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticFlowWithConfig.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubFlowWithConfig.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticFlowWithConfig value) throws IOException { + public void write(JsonWriter out, IntegrationHubFlowWithConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticFlowWithConfig read(JsonReader in) throws IOException { + public IntegrationHubFlowWithConfig read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -274,18 +274,18 @@ public PrismaticFlowWithConfig read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticFlowWithConfig given an JSON string + * Create an instance of IntegrationHubFlowWithConfig given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticFlowWithConfig - * @throws IOException if the JSON string is invalid with respect to PrismaticFlowWithConfig + * @return An instance of IntegrationHubFlowWithConfig + * @throws IOException if the JSON string is invalid with respect to IntegrationHubFlowWithConfig */ - public static PrismaticFlowWithConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticFlowWithConfig.class); + public static IntegrationHubFlowWithConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubFlowWithConfig.class); } /** - * Convert an instance of PrismaticFlowWithConfig to an JSON string + * Convert an instance of IntegrationHubFlowWithConfig to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/PrismaticPaginatedEventPayload.java b/src/main/java/one/talon/model/IntegrationHubPaginatedEventPayload.java similarity index 78% rename from src/main/java/one/talon/model/PrismaticPaginatedEventPayload.java rename to src/main/java/one/talon/model/IntegrationHubPaginatedEventPayload.java index 8a7e2b0d..f3908cbb 100644 --- a/src/main/java/one/talon/model/PrismaticPaginatedEventPayload.java +++ b/src/main/java/one/talon/model/IntegrationHubPaginatedEventPayload.java @@ -49,10 +49,10 @@ import one.talon.JSON; /** - * PrismaticPaginatedEventPayload + * IntegrationHubPaginatedEventPayload */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class PrismaticPaginatedEventPayload { +public class IntegrationHubPaginatedEventPayload { public static final String SERIALIZED_NAME_TOTAL_RESULT_SIZE = "TotalResultSize"; @SerializedName(SERIALIZED_NAME_TOTAL_RESULT_SIZE) @javax.annotation.Nonnull @@ -133,10 +133,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nonnull private List data = new ArrayList<>(); - public PrismaticPaginatedEventPayload() { + public IntegrationHubPaginatedEventPayload() { } - public PrismaticPaginatedEventPayload totalResultSize(@javax.annotation.Nonnull Long totalResultSize) { + public IntegrationHubPaginatedEventPayload totalResultSize(@javax.annotation.Nonnull Long totalResultSize) { this.totalResultSize = totalResultSize; return this; } @@ -155,7 +155,7 @@ public void setTotalResultSize(@javax.annotation.Nonnull Long totalResultSize) { } - public PrismaticPaginatedEventPayload batchedAt(@javax.annotation.Nullable OffsetDateTime batchedAt) { + public IntegrationHubPaginatedEventPayload batchedAt(@javax.annotation.Nullable OffsetDateTime batchedAt) { this.batchedAt = batchedAt; return this; } @@ -174,7 +174,7 @@ public void setBatchedAt(@javax.annotation.Nullable OffsetDateTime batchedAt) { } - public PrismaticPaginatedEventPayload eventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + public IntegrationHubPaginatedEventPayload eventType(@javax.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; return this; } @@ -193,12 +193,12 @@ public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { } - public PrismaticPaginatedEventPayload data(@javax.annotation.Nonnull List data) { + public IntegrationHubPaginatedEventPayload data(@javax.annotation.Nonnull List data) { this.data = data; return this; } - public PrismaticPaginatedEventPayload addDataItem(Object dataItem) { + public IntegrationHubPaginatedEventPayload addDataItem(Object dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -229,11 +229,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PrismaticPaginatedEventPayload prismaticPaginatedEventPayload = (PrismaticPaginatedEventPayload) o; - return Objects.equals(this.totalResultSize, prismaticPaginatedEventPayload.totalResultSize) && - Objects.equals(this.batchedAt, prismaticPaginatedEventPayload.batchedAt) && - Objects.equals(this.eventType, prismaticPaginatedEventPayload.eventType) && - Objects.equals(this.data, prismaticPaginatedEventPayload.data); + IntegrationHubPaginatedEventPayload integrationHubPaginatedEventPayload = (IntegrationHubPaginatedEventPayload) o; + return Objects.equals(this.totalResultSize, integrationHubPaginatedEventPayload.totalResultSize) && + Objects.equals(this.batchedAt, integrationHubPaginatedEventPayload.batchedAt) && + Objects.equals(this.eventType, integrationHubPaginatedEventPayload.eventType) && + Objects.equals(this.data, integrationHubPaginatedEventPayload.data); } @Override @@ -244,7 +244,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PrismaticPaginatedEventPayload {\n"); + sb.append("class IntegrationHubPaginatedEventPayload {\n"); sb.append(" totalResultSize: ").append(toIndentedString(totalResultSize)).append("\n"); sb.append(" batchedAt: ").append(toIndentedString(batchedAt)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); @@ -280,25 +280,25 @@ private String toIndentedString(Object o) { * 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 PrismaticPaginatedEventPayload + * @throws IOException if the JSON Element is invalid with respect to IntegrationHubPaginatedEventPayload */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PrismaticPaginatedEventPayload.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 PrismaticPaginatedEventPayload is not found in the empty JSON string", PrismaticPaginatedEventPayload.openapiRequiredFields.toString())); + if (!IntegrationHubPaginatedEventPayload.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 IntegrationHubPaginatedEventPayload is not found in the empty JSON string", IntegrationHubPaginatedEventPayload.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PrismaticPaginatedEventPayload.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 `PrismaticPaginatedEventPayload` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!IntegrationHubPaginatedEventPayload.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 `IntegrationHubPaginatedEventPayload` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PrismaticPaginatedEventPayload.openapiRequiredFields) { + for (String requiredField : IntegrationHubPaginatedEventPayload.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())); } @@ -321,22 +321,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrismaticPaginatedEventPayload.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrismaticPaginatedEventPayload' and its subtypes + if (!IntegrationHubPaginatedEventPayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntegrationHubPaginatedEventPayload' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrismaticPaginatedEventPayload.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntegrationHubPaginatedEventPayload.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PrismaticPaginatedEventPayload value) throws IOException { + public void write(JsonWriter out, IntegrationHubPaginatedEventPayload value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PrismaticPaginatedEventPayload read(JsonReader in) throws IOException { + public IntegrationHubPaginatedEventPayload read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -347,18 +347,18 @@ public PrismaticPaginatedEventPayload read(JsonReader in) throws IOException { } /** - * Create an instance of PrismaticPaginatedEventPayload given an JSON string + * Create an instance of IntegrationHubPaginatedEventPayload given an JSON string * * @param jsonString JSON string - * @return An instance of PrismaticPaginatedEventPayload - * @throws IOException if the JSON string is invalid with respect to PrismaticPaginatedEventPayload + * @return An instance of IntegrationHubPaginatedEventPayload + * @throws IOException if the JSON string is invalid with respect to IntegrationHubPaginatedEventPayload */ - public static PrismaticPaginatedEventPayload fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrismaticPaginatedEventPayload.class); + public static IntegrationHubPaginatedEventPayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntegrationHubPaginatedEventPayload.class); } /** - * Convert an instance of PrismaticPaginatedEventPayload to an JSON string + * Convert an instance of IntegrationHubPaginatedEventPayload to an JSON string * * @return JSON string */ diff --git a/src/main/java/one/talon/model/ListExperiments200Response.java b/src/main/java/one/talon/model/ListExperiments200Response.java new file mode 100644 index 00000000..92f00403 --- /dev/null +++ b/src/main/java/one/talon/model/ListExperiments200Response.java @@ -0,0 +1,256 @@ +/* + * 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) are used 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#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.Experiment; + +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; + +/** + * ListExperiments200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class ListExperiments200Response { + public static final String SERIALIZED_NAME_TOTAL_RESULT_SIZE = "totalResultSize"; + @SerializedName(SERIALIZED_NAME_TOTAL_RESULT_SIZE) + @javax.annotation.Nonnull + private Long totalResultSize; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nonnull + private List data = new ArrayList<>(); + + public ListExperiments200Response() { + } + + public ListExperiments200Response totalResultSize(@javax.annotation.Nonnull Long totalResultSize) { + this.totalResultSize = totalResultSize; + return this; + } + + /** + * Get totalResultSize + * @return totalResultSize + */ + @javax.annotation.Nonnull + public Long getTotalResultSize() { + return totalResultSize; + } + + public void setTotalResultSize(@javax.annotation.Nonnull Long totalResultSize) { + this.totalResultSize = totalResultSize; + } + + + public ListExperiments200Response data(@javax.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ListExperiments200Response addDataItem(Experiment 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; + } + ListExperiments200Response listExperiments200Response = (ListExperiments200Response) o; + return Objects.equals(this.totalResultSize, listExperiments200Response.totalResultSize) && + Objects.equals(this.data, listExperiments200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(totalResultSize, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListExperiments200Response {\n"); + sb.append(" totalResultSize: ").append(toIndentedString(totalResultSize)).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("totalResultSize", "data")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("totalResultSize", "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 ListExperiments200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListExperiments200Response.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 ListExperiments200Response is not found in the empty JSON string", ListExperiments200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListExperiments200Response.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 `ListExperiments200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ListExperiments200Response.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++) { + Experiment.validateJsonElement(jsonArraydata.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListExperiments200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListExperiments200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ListExperiments200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ListExperiments200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListExperiments200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ListExperiments200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListExperiments200Response + * @throws IOException if the JSON string is invalid with respect to ListExperiments200Response + */ + public static ListExperiments200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListExperiments200Response.class); + } + + /** + * Convert an instance of ListExperiments200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/NewExperiment.java b/src/main/java/one/talon/model/NewExperiment.java index 65a0299d..dae85a80 100644 --- a/src/main/java/one/talon/model/NewExperiment.java +++ b/src/main/java/one/talon/model/NewExperiment.java @@ -20,7 +20,6 @@ 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.NewCampaign; @@ -57,68 +56,6 @@ public class NewExperiment { @javax.annotation.Nonnull private Boolean isVariantAssignmentExternal; - public static final String SERIALIZED_NAME_ACTIVATED = "activated"; - @SerializedName(SERIALIZED_NAME_ACTIVATED) - @javax.annotation.Nullable - private OffsetDateTime activated; - - /** - * A disabled experiment is not evaluated for rules or coupons. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - ENABLED("enabled"), - - DISABLED("disabled"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.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 StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - @javax.annotation.Nullable - private StateEnum state = StateEnum.DISABLED; - public static final String SERIALIZED_NAME_CAMPAIGN = "campaign"; @SerializedName(SERIALIZED_NAME_CAMPAIGN) @javax.annotation.Nonnull @@ -133,7 +70,7 @@ public NewExperiment isVariantAssignmentExternal(@javax.annotation.Nonnull Boole } /** - * The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. + * The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. * @return isVariantAssignmentExternal */ @javax.annotation.Nonnull @@ -146,44 +83,6 @@ public void setIsVariantAssignmentExternal(@javax.annotation.Nonnull Boolean isV } - public NewExperiment activated(@javax.annotation.Nullable OffsetDateTime activated) { - this.activated = activated; - return this; - } - - /** - * The date and time the experiment was activated. - * @return activated - */ - @javax.annotation.Nullable - public OffsetDateTime getActivated() { - return activated; - } - - public void setActivated(@javax.annotation.Nullable OffsetDateTime activated) { - this.activated = activated; - } - - - public NewExperiment state(@javax.annotation.Nullable StateEnum state) { - this.state = state; - return this; - } - - /** - * A disabled experiment is not evaluated for rules or coupons. - * @return state - */ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - public void setState(@javax.annotation.Nullable StateEnum state) { - this.state = state; - } - - public NewExperiment campaign(@javax.annotation.Nonnull NewCampaign campaign) { this.campaign = campaign; return this; @@ -214,14 +113,12 @@ public boolean equals(Object o) { } NewExperiment newExperiment = (NewExperiment) o; return Objects.equals(this.isVariantAssignmentExternal, newExperiment.isVariantAssignmentExternal) && - Objects.equals(this.activated, newExperiment.activated) && - Objects.equals(this.state, newExperiment.state) && Objects.equals(this.campaign, newExperiment.campaign); } @Override public int hashCode() { - return Objects.hash(isVariantAssignmentExternal, activated, state, campaign); + return Objects.hash(isVariantAssignmentExternal, campaign); } @Override @@ -229,8 +126,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NewExperiment {\n"); sb.append(" isVariantAssignmentExternal: ").append(toIndentedString(isVariantAssignmentExternal)).append("\n"); - sb.append(" activated: ").append(toIndentedString(activated)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" campaign: ").append(toIndentedString(campaign)).append("\n"); sb.append("}"); return sb.toString(); @@ -253,7 +148,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("isVariantAssignmentExternal", "activated", "state", "campaign")); + openapiFields = new HashSet(Arrays.asList("isVariantAssignmentExternal", "campaign")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("isVariantAssignmentExternal", "campaign")); @@ -287,13 +182,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } // validate the required field `campaign` NewCampaign.validateJsonElement(jsonObj.get("campaign")); } diff --git a/src/main/java/one/talon/model/PriceHistoryRequest.java b/src/main/java/one/talon/model/PriceHistoryRequest.java new file mode 100644 index 00000000..d1356955 --- /dev/null +++ b/src/main/java/one/talon/model/PriceHistoryRequest.java @@ -0,0 +1,265 @@ +/* + * 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) are used 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#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.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; + +/** + * PriceHistoryRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class PriceHistoryRequest { + public static final String SERIALIZED_NAME_SKU = "sku"; + @SerializedName(SERIALIZED_NAME_SKU) + @javax.annotation.Nonnull + private String sku; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nonnull + private OffsetDateTime startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + @javax.annotation.Nonnull + private OffsetDateTime endDate; + + public PriceHistoryRequest() { + } + + public PriceHistoryRequest sku(@javax.annotation.Nonnull String sku) { + this.sku = sku; + return this; + } + + /** + * The SKU of the item for which the historical prices are being retrieved. + * @return sku + */ + @javax.annotation.Nonnull + public String getSku() { + return sku; + } + + public void setSku(@javax.annotation.Nonnull String sku) { + this.sku = sku; + } + + + public PriceHistoryRequest startDate(@javax.annotation.Nonnull OffsetDateTime startDate) { + this.startDate = startDate; + return this; + } + + /** + * The start date of the period for which historical prices should be retrieved. + * @return startDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nonnull OffsetDateTime startDate) { + this.startDate = startDate; + } + + + public PriceHistoryRequest endDate(@javax.annotation.Nonnull OffsetDateTime endDate) { + this.endDate = endDate; + return this; + } + + /** + * The end date of the period for which historical prices should be retrieved. + * @return endDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nonnull OffsetDateTime endDate) { + this.endDate = endDate; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceHistoryRequest priceHistoryRequest = (PriceHistoryRequest) o; + return Objects.equals(this.sku, priceHistoryRequest.sku) && + Objects.equals(this.startDate, priceHistoryRequest.startDate) && + Objects.equals(this.endDate, priceHistoryRequest.endDate); + } + + @Override + public int hashCode() { + return Objects.hash(sku, startDate, endDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceHistoryRequest {\n"); + sb.append(" sku: ").append(toIndentedString(sku)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).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("sku", "startDate", "endDate")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("sku", "startDate", "endDate")); + } + + /** + * 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 PriceHistoryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceHistoryRequest.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 PriceHistoryRequest is not found in the empty JSON string", PriceHistoryRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceHistoryRequest.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 `PriceHistoryRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PriceHistoryRequest.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("sku").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sku").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceHistoryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceHistoryRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceHistoryRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceHistoryRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceHistoryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceHistoryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceHistoryRequest + * @throws IOException if the JSON string is invalid with respect to PriceHistoryRequest + */ + public static PriceHistoryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceHistoryRequest.class); + } + + /** + * Convert an instance of PriceHistoryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/PriceHistoryResponse.java b/src/main/java/one/talon/model/PriceHistoryResponse.java new file mode 100644 index 00000000..a96748c7 --- /dev/null +++ b/src/main/java/one/talon/model/PriceHistoryResponse.java @@ -0,0 +1,259 @@ +/* + * 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) are used 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#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.History; + +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; + +/** + * PriceHistoryResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class PriceHistoryResponse { + public static final String SERIALIZED_NAME_SKU = "sku"; + @SerializedName(SERIALIZED_NAME_SKU) + @javax.annotation.Nonnull + private String sku; + + public static final String SERIALIZED_NAME_HISTORY = "history"; + @SerializedName(SERIALIZED_NAME_HISTORY) + @javax.annotation.Nonnull + private List history = new ArrayList<>(); + + public PriceHistoryResponse() { + } + + public PriceHistoryResponse sku(@javax.annotation.Nonnull String sku) { + this.sku = sku; + return this; + } + + /** + * The SKU of the item for which historical prices should be retrieved. + * @return sku + */ + @javax.annotation.Nonnull + public String getSku() { + return sku; + } + + public void setSku(@javax.annotation.Nonnull String sku) { + this.sku = sku; + } + + + public PriceHistoryResponse history(@javax.annotation.Nonnull List history) { + this.history = history; + return this; + } + + public PriceHistoryResponse addHistoryItem(History historyItem) { + if (this.history == null) { + this.history = new ArrayList<>(); + } + this.history.add(historyItem); + return this; + } + + /** + * Get history + * @return history + */ + @javax.annotation.Nonnull + public List getHistory() { + return history; + } + + public void setHistory(@javax.annotation.Nonnull List history) { + this.history = history; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PriceHistoryResponse priceHistoryResponse = (PriceHistoryResponse) o; + return Objects.equals(this.sku, priceHistoryResponse.sku) && + Objects.equals(this.history, priceHistoryResponse.history); + } + + @Override + public int hashCode() { + return Objects.hash(sku, history); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceHistoryResponse {\n"); + sb.append(" sku: ").append(toIndentedString(sku)).append("\n"); + sb.append(" history: ").append(toIndentedString(history)).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("sku", "history")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("sku", "history")); + } + + /** + * 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 PriceHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PriceHistoryResponse.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 PriceHistoryResponse is not found in the empty JSON string", PriceHistoryResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PriceHistoryResponse.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 `PriceHistoryResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PriceHistoryResponse.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("sku").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `sku` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sku").toString())); + } + if (jsonObj.get("history") != null) { + if (!jsonObj.get("history").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `history` to be an array in the JSON string but got `%s`", jsonObj.get("history").toString())); + } + JsonArray jsonArrayhistory = jsonObj.getAsJsonArray("history"); + // validate the required field `history` (array) + for (int i = 0; i < jsonArrayhistory.size(); i++) { + History.validateJsonElement(jsonArrayhistory.get(i)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PriceHistoryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PriceHistoryResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PriceHistoryResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PriceHistoryResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PriceHistoryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PriceHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PriceHistoryResponse + * @throws IOException if the JSON string is invalid with respect to PriceHistoryResponse + */ + public static PriceHistoryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PriceHistoryResponse.class); + } + + /** + * Convert an instance of PriceHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/PromoteExperiment.java b/src/main/java/one/talon/model/PromoteExperiment.java new file mode 100644 index 00000000..fb9968dd --- /dev/null +++ b/src/main/java/one/talon/model/PromoteExperiment.java @@ -0,0 +1,290 @@ +/* + * 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) are used 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#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 one.talon.model.ExperimentCampaignCopy; + +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; + +/** + * PromoteExperiment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class PromoteExperiment { + public static final String SERIALIZED_NAME_TARGET_APPLICATION_ID = "targetApplicationId"; + @SerializedName(SERIALIZED_NAME_TARGET_APPLICATION_ID) + @javax.annotation.Nonnull + private Long targetApplicationId; + + 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_DISABLE_EXPERIMENT = "disableExperiment"; + @SerializedName(SERIALIZED_NAME_DISABLE_EXPERIMENT) + @javax.annotation.Nullable + private Boolean disableExperiment; + + public static final String SERIALIZED_NAME_CAMPAIGN = "campaign"; + @SerializedName(SERIALIZED_NAME_CAMPAIGN) + @javax.annotation.Nonnull + private ExperimentCampaignCopy campaign; + + public PromoteExperiment() { + } + + public PromoteExperiment targetApplicationId(@javax.annotation.Nonnull Long targetApplicationId) { + this.targetApplicationId = targetApplicationId; + return this; + } + + /** + * The ID of the Application to copy the experiment. It is displayed in your Talon.One deployment URL. + * @return targetApplicationId + */ + @javax.annotation.Nonnull + public Long getTargetApplicationId() { + return targetApplicationId; + } + + public void setTargetApplicationId(@javax.annotation.Nonnull Long targetApplicationId) { + this.targetApplicationId = targetApplicationId; + } + + + public PromoteExperiment variantId(@javax.annotation.Nonnull Long variantId) { + this.variantId = variantId; + return this; + } + + /** + * The ID of the Experiment Variant to build the new campaign. + * @return variantId + */ + @javax.annotation.Nonnull + public Long getVariantId() { + return variantId; + } + + public void setVariantId(@javax.annotation.Nonnull Long variantId) { + this.variantId = variantId; + } + + + public PromoteExperiment disableExperiment(@javax.annotation.Nullable Boolean disableExperiment) { + this.disableExperiment = disableExperiment; + return this; + } + + /** + * Force disable the experiment. + * @return disableExperiment + */ + @javax.annotation.Nullable + public Boolean getDisableExperiment() { + return disableExperiment; + } + + public void setDisableExperiment(@javax.annotation.Nullable Boolean disableExperiment) { + this.disableExperiment = disableExperiment; + } + + + public PromoteExperiment campaign(@javax.annotation.Nonnull ExperimentCampaignCopy campaign) { + this.campaign = campaign; + return this; + } + + /** + * Get campaign + * @return campaign + */ + @javax.annotation.Nonnull + public ExperimentCampaignCopy getCampaign() { + return campaign; + } + + public void setCampaign(@javax.annotation.Nonnull ExperimentCampaignCopy campaign) { + this.campaign = campaign; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PromoteExperiment promoteExperiment = (PromoteExperiment) o; + return Objects.equals(this.targetApplicationId, promoteExperiment.targetApplicationId) && + Objects.equals(this.variantId, promoteExperiment.variantId) && + Objects.equals(this.disableExperiment, promoteExperiment.disableExperiment) && + Objects.equals(this.campaign, promoteExperiment.campaign); + } + + @Override + public int hashCode() { + return Objects.hash(targetApplicationId, variantId, disableExperiment, campaign); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PromoteExperiment {\n"); + sb.append(" targetApplicationId: ").append(toIndentedString(targetApplicationId)).append("\n"); + sb.append(" variantId: ").append(toIndentedString(variantId)).append("\n"); + sb.append(" disableExperiment: ").append(toIndentedString(disableExperiment)).append("\n"); + sb.append(" campaign: ").append(toIndentedString(campaign)).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("targetApplicationId", "variantId", "disableExperiment", "campaign")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("targetApplicationId", "variantId", "campaign")); + } + + /** + * 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 PromoteExperiment + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PromoteExperiment.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 PromoteExperiment is not found in the empty JSON string", PromoteExperiment.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PromoteExperiment.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 `PromoteExperiment` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PromoteExperiment.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 `campaign` + ExperimentCampaignCopy.validateJsonElement(jsonObj.get("campaign")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PromoteExperiment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PromoteExperiment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PromoteExperiment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PromoteExperiment value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PromoteExperiment read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PromoteExperiment given an JSON string + * + * @param jsonString JSON string + * @return An instance of PromoteExperiment + * @throws IOException if the JSON string is invalid with respect to PromoteExperiment + */ + public static PromoteExperiment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PromoteExperiment.class); + } + + /** + * Convert an instance of PromoteExperiment to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/one/talon/model/UpdateExperiment.java b/src/main/java/one/talon/model/UpdateExperiment.java index 88bdb665..50f8ed7b 100644 --- a/src/main/java/one/talon/model/UpdateExperiment.java +++ b/src/main/java/one/talon/model/UpdateExperiment.java @@ -70,7 +70,7 @@ public UpdateExperiment isVariantAssignmentExternal(@javax.annotation.Nonnull Bo } /** - * The source of the assignment. - false - The assignment to the variant is handled internally by the Talon.Oneandled internally by the Talon.One. - true - The assignment to the variant handled externally. + * The source of the assignment. - false - The variant assignment is handled internally by Talon.One. - true - The variant assignment is handled externally. * @return isVariantAssignmentExternal */ @javax.annotation.Nonnull diff --git a/src/main/java/one/talon/model/UpdateExperimentVariant.java b/src/main/java/one/talon/model/UpdateExperimentVariant.java index a32dd20b..6c621bd4 100644 --- a/src/main/java/one/talon/model/UpdateExperimentVariant.java +++ b/src/main/java/one/talon/model/UpdateExperimentVariant.java @@ -99,7 +99,7 @@ public UpdateExperimentVariant name(@javax.annotation.Nonnull String name) { } /** - * Get name + * The name of this variant. * @return name */ @javax.annotation.Nonnull diff --git a/src/test/java/one/talon/api/IntegrationApiTest.java b/src/test/java/one/talon/api/IntegrationApiTest.java index ac4c1346..99c6efc5 100644 --- a/src/test/java/one/talon/api/IntegrationApiTest.java +++ b/src/test/java/one/talon/api/IntegrationApiTest.java @@ -54,6 +54,8 @@ import one.talon.model.NewReferral; import one.talon.model.NewReferralsForMultipleAdvocates; import java.time.OffsetDateTime; +import one.talon.model.PriceHistoryRequest; +import one.talon.model.PriceHistoryResponse; import one.talon.model.Referral; import one.talon.model.ReopenSessionResponse; import one.talon.model.ReturnIntegrationRequest; @@ -483,6 +485,20 @@ public void linkLoyaltyCardToProfileTest() throws ApiException { // TODO: test validations } + /** + * Get summary of price history + * + * Fetch the historical price data for a given SKU within a defined timeframe. + * + * @throws ApiException if the Api call fails + */ + @Test + public void priceHistoryTest() throws ApiException { + PriceHistoryRequest priceHistoryRequest = null; + PriceHistoryResponse response = api.priceHistory(priceHistoryRequest); + // TODO: test validations + } + /** * Reopen customer session * diff --git a/src/test/java/one/talon/api/ManagementApiTest.java b/src/test/java/one/talon/api/ManagementApiTest.java index c439c112..58595883 100644 --- a/src/test/java/one/talon/api/ManagementApiTest.java +++ b/src/test/java/one/talon/api/ManagementApiTest.java @@ -47,6 +47,7 @@ import one.talon.model.DeleteUserRequest; import one.talon.model.ErrorResponse; import one.talon.model.ErrorResponseWithStatus; +import one.talon.model.Experiment; import one.talon.model.GenerateCouponRejections200Response; import one.talon.model.GetAccessLogsWithoutTotalCount200Response; import one.talon.model.GetAdditionalCosts200Response; @@ -89,6 +90,7 @@ import one.talon.model.ListAllRolesV2200Response; import one.talon.model.ListCampaignStoreBudgetLimits200Response; import one.talon.model.ListCatalogItems200Response; +import one.talon.model.ListExperiments200Response; import one.talon.model.ListStores200Response; import one.talon.model.LoginParams; import one.talon.model.LoyaltyBalancesWithTiers; @@ -764,6 +766,23 @@ public void exportAchievementsTest() throws ApiException { // TODO: test validations } + /** + * Export Application analytics aggregated by campaign + * + * Download a CSV file containing analytics data aggregated by campaign for the campaigns of an Application. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `campaign_id`: The ID of the campaign. This column also contains labels for the [total and influenced values](https://docs.talon.one/docs/product/campaigns/analytics/application-dashboard#understanding-the-analytics-data). - `start_date`: The start of the aggregation time frame in UTC. - `end_date`: The end of the aggregation time frame in UTC. - `revenue`: The total, pre-discount value of all items purchased in a customer session. - `sessions`: The number of all closed sessions. - `average_session_value`: The average customer session value, calculated by dividing the revenue value by the number of sessions. - `average_items_per_session`: The number of items from sessions divided by the number of sessions. - `coupons`: The number of times a coupon was successfully redeemed in sessions. - `discounts`: The total value of discounts given for cart items in sessions. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportApplicationCampaignAnalyticsTest() throws ApiException { + Long applicationId = null; + OffsetDateTime rangeStart = null; + OffsetDateTime rangeEnd = null; + List campaignIds = null; + String response = api.exportApplicationCampaignAnalytics(applicationId, rangeStart, rangeEnd, campaignIds); + // TODO: test validations + } + /** * Export audience members * @@ -988,6 +1007,20 @@ public void exportLoyaltyCardsTest() throws ApiException { // TODO: test validations } + /** + * Export customers' loyalty program join dates + * + * Download a CSV file containing the join dates of all customers in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `profileIntegrationID`: The integration ID of the customer profile. - `joinDate`: The customer's loyalty program join date in RFC3339 format. + * + * @throws ApiException if the Api call fails + */ + @Test + public void exportLoyaltyJoinDatesTest() throws ApiException { + String loyaltyProgramId = null; + String response = api.exportLoyaltyJoinDates(loyaltyProgramId); + // TODO: test validations + } + /** * Export customer's transaction logs * @@ -1836,6 +1869,21 @@ public void getEventTypesTest() throws ApiException { // TODO: test validations } + /** + * Get experiment in Application + * + * Retrieve the given experiment associated with the Application. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getExperimentTest() throws ApiException { + Long applicationId = null; + Long experimentId = null; + Experiment response = api.getExperiment(applicationId, experimentId); + // TODO: test validations + } + /** * Get exports * @@ -2311,7 +2359,7 @@ public void importCollectionTest() throws ApiException { /** * Import coupons * - * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + * Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. Must be at least 3 characters long. We recommend using alphanumeric characters. There is no maximum length but limiting the code to 30 characters ensures it is fully readable in the Campaign Manager. The code should be unique unless you set `skipDuplicates` to `true`. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). * * @throws ApiException if the Api call fails */ @@ -2328,7 +2376,7 @@ public void importCouponsTest() throws ApiException { /** * Import loyalty cards * - * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + * Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. The identifiers should be separated with a semicolon (;). - `attributes` (optional): A JSON object that contains the loyalty card's custom attributes and their values. These attributes must be created and connected to this loyalty program before they can be assigned to the cards through this endpoint. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids,attributes 123-456-789AT,active,Alexa001;UserA,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" ``` * * @throws ApiException if the Api call fails */ @@ -2540,6 +2588,23 @@ public void listCollectionsInApplicationTest() throws ApiException { // TODO: test validations } + /** + * List experiments + * + * List all experiments of the specified Application that match your filter criteria. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listExperimentsTest() throws ApiException { + Long applicationId = null; + Long pageSize = null; + Long skip = null; + String sort = null; + ListExperiments200Response response = api.listExperiments(applicationId, pageSize, skip, sort); + // TODO: test validations + } + /** * List stores * diff --git a/src/test/java/one/talon/model/BestPriorPriceRequestTest.java b/src/test/java/one/talon/model/BestPriorPriceRequestTest.java index 1a0761f7..6b750a43 100644 --- a/src/test/java/one/talon/model/BestPriorPriceRequestTest.java +++ b/src/test/java/one/talon/model/BestPriorPriceRequestTest.java @@ -73,6 +73,14 @@ public void strictEndDateTest() { // TODO: test strictEndDate } + /** + * Test the property 'timeframeEndDateType' + */ + @Test + public void timeframeEndDateTypeTest() { + // TODO: test timeframeEndDateType + } + /** * Test the property 'target' */ diff --git a/src/test/java/one/talon/model/BestPriorPriceTest.java b/src/test/java/one/talon/model/BestPriorPriceTest.java index 5df45489..53bac8a2 100644 --- a/src/test/java/one/talon/model/BestPriorPriceTest.java +++ b/src/test/java/one/talon/model/BestPriorPriceTest.java @@ -40,6 +40,14 @@ public void testBestPriorPrice() { // TODO: test BestPriorPrice } + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + /** * Test the property 'sku' */ diff --git a/src/test/java/one/talon/model/ExperimentCampaignCopyTest.java b/src/test/java/one/talon/model/ExperimentCampaignCopyTest.java new file mode 100644 index 00000000..b61b7bed --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentCampaignCopyTest.java @@ -0,0 +1,91 @@ +/* + * 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) are used 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#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 ExperimentCampaignCopy + */ +public class ExperimentCampaignCopyTest { + private final ExperimentCampaignCopy model = new ExperimentCampaignCopy(); + + /** + * Model tests for ExperimentCampaignCopy + */ + @Test + public void testExperimentCampaignCopy() { + // TODO: test ExperimentCampaignCopy + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'startTime' + */ + @Test + public void startTimeTest() { + // TODO: test startTime + } + + /** + * Test the property 'endTime' + */ + @Test + public void endTimeTest() { + // TODO: test endTime + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'evaluationGroupId' + */ + @Test + public void evaluationGroupIdTest() { + // TODO: test evaluationGroupId + } + +} diff --git a/src/test/java/one/talon/model/ExperimentCopyExperimentTest.java b/src/test/java/one/talon/model/ExperimentCopyExperimentTest.java new file mode 100644 index 00000000..e42d7dfc --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentCopyExperimentTest.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) are used 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#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 one.talon.model.ExperimentCampaignCopy; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentCopyExperiment + */ +public class ExperimentCopyExperimentTest { + private final ExperimentCopyExperiment model = new ExperimentCopyExperiment(); + + /** + * Model tests for ExperimentCopyExperiment + */ + @Test + public void testExperimentCopyExperiment() { + // TODO: test ExperimentCopyExperiment + } + + /** + * Test the property 'isVariantAssignmentExternal' + */ + @Test + public void isVariantAssignmentExternalTest() { + // TODO: test isVariantAssignmentExternal + } + + /** + * Test the property 'campaign' + */ + @Test + public void campaignTest() { + // TODO: test campaign + } + +} diff --git a/src/test/java/one/talon/model/ExperimentCopyTest.java b/src/test/java/one/talon/model/ExperimentCopyTest.java new file mode 100644 index 00000000..a7ddb1f6 --- /dev/null +++ b/src/test/java/one/talon/model/ExperimentCopyTest.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) are used 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#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 one.talon.model.ExperimentCopyExperiment; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ExperimentCopy + */ +public class ExperimentCopyTest { + private final ExperimentCopy model = new ExperimentCopy(); + + /** + * Model tests for ExperimentCopy + */ + @Test + public void testExperimentCopy() { + // TODO: test ExperimentCopy + } + + /** + * Test the property 'targetApplicationId' + */ + @Test + public void targetApplicationIdTest() { + // TODO: test targetApplicationId + } + + /** + * Test the property 'experiment' + */ + @Test + public void experimentTest() { + // TODO: test experiment + } + +} diff --git a/src/test/java/one/talon/model/HistoryTest.java b/src/test/java/one/talon/model/HistoryTest.java new file mode 100644 index 00000000..8db4d713 --- /dev/null +++ b/src/test/java/one/talon/model/HistoryTest.java @@ -0,0 +1,91 @@ +/* + * 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) are used 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#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.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.Arrays; +import one.talon.model.BestPriorPriceMetadata; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for History + */ +public class HistoryTest { + private final History model = new History(); + + /** + * Model tests for History + */ + @Test + public void testHistory() { + // TODO: test History + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'observedAt' + */ + @Test + public void observedAtTest() { + // TODO: test observedAt + } + + /** + * Test the property 'contextId' + */ + @Test + public void contextIdTest() { + // TODO: test contextId + } + + /** + * Test the property 'price' + */ + @Test + public void priceTest() { + // TODO: test price + } + + /** + * Test the property 'metadata' + */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** + * Test the property 'target' + */ + @Test + public void targetTest() { + // TODO: test target + } + +} diff --git a/src/test/java/one/talon/model/PrismaticConfigTest.java b/src/test/java/one/talon/model/IntegrationHubConfigTest.java similarity index 78% rename from src/test/java/one/talon/model/PrismaticConfigTest.java rename to src/test/java/one/talon/model/IntegrationHubConfigTest.java index b500b7a4..23275a87 100644 --- a/src/test/java/one/talon/model/PrismaticConfigTest.java +++ b/src/test/java/one/talon/model/IntegrationHubConfigTest.java @@ -24,25 +24,25 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticConfig + * Model tests for IntegrationHubConfig */ -public class PrismaticConfigTest { - private final PrismaticConfig model = new PrismaticConfig(); +public class IntegrationHubConfigTest { + private final IntegrationHubConfig model = new IntegrationHubConfig(); /** - * Model tests for PrismaticConfig + * Model tests for IntegrationHubConfig */ @Test - public void testPrismaticConfig() { - // TODO: test PrismaticConfig + public void testIntegrationHubConfig() { + // TODO: test IntegrationHubConfig } /** - * Test the property 'prismaticUrl' + * Test the property 'integrationHubUrl' */ @Test - public void prismaticUrlTest() { - // TODO: test prismaticUrl + public void integrationHubUrlTest() { + // TODO: test integrationHubUrl } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimitsTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimitsTest.java similarity index 78% rename from src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimitsTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimitsTest.java index 9eb81087..10743537 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsLimitsTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsLimitsTest.java @@ -26,17 +26,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadCouponBasedNotificationsLimits + * Model tests for IntegrationHubEventPayloadCouponBasedNotificationsLimits */ -public class PrismaticEventPayloadCouponBasedNotificationsLimitsTest { - private final PrismaticEventPayloadCouponBasedNotificationsLimits model = new PrismaticEventPayloadCouponBasedNotificationsLimits(); +public class IntegrationHubEventPayloadCouponBasedNotificationsLimitsTest { + private final IntegrationHubEventPayloadCouponBasedNotificationsLimits model = new IntegrationHubEventPayloadCouponBasedNotificationsLimits(); /** - * Model tests for PrismaticEventPayloadCouponBasedNotificationsLimits + * Model tests for IntegrationHubEventPayloadCouponBasedNotificationsLimits */ @Test - public void testPrismaticEventPayloadCouponBasedNotificationsLimits() { - // TODO: test PrismaticEventPayloadCouponBasedNotificationsLimits + public void testIntegrationHubEventPayloadCouponBasedNotificationsLimits() { + // TODO: test IntegrationHubEventPayloadCouponBasedNotificationsLimits } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsTest.java similarity index 88% rename from src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsTest.java index 80f73e4a..bedfb3a3 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadCouponBasedNotificationsTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadCouponBasedNotificationsTest.java @@ -23,22 +23,22 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import one.talon.model.PrismaticEventPayloadCouponBasedNotificationsLimits; +import one.talon.model.IntegrationHubEventPayloadCouponBasedNotificationsLimits; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadCouponBasedNotifications + * Model tests for IntegrationHubEventPayloadCouponBasedNotifications */ -public class PrismaticEventPayloadCouponBasedNotificationsTest { - private final PrismaticEventPayloadCouponBasedNotifications model = new PrismaticEventPayloadCouponBasedNotifications(); +public class IntegrationHubEventPayloadCouponBasedNotificationsTest { + private final IntegrationHubEventPayloadCouponBasedNotifications model = new IntegrationHubEventPayloadCouponBasedNotifications(); /** - * Model tests for PrismaticEventPayloadCouponBasedNotifications + * Model tests for IntegrationHubEventPayloadCouponBasedNotifications */ @Test - public void testPrismaticEventPayloadCouponBasedNotifications() { - // TODO: test PrismaticEventPayloadCouponBasedNotifications + public void testIntegrationHubEventPayloadCouponBasedNotifications() { + // TODO: test IntegrationHubEventPayloadCouponBasedNotifications } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotificationTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotificationTest.java similarity index 85% rename from src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotificationTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotificationTest.java index 0fd19046..34f36bec 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedNotificationTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedNotificationTest.java @@ -23,22 +23,22 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; +import one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedNotification */ -public class PrismaticEventPayloadLoyaltyProfileBasedNotificationTest { - private final PrismaticEventPayloadLoyaltyProfileBasedNotification model = new PrismaticEventPayloadLoyaltyProfileBasedNotification(); +public class IntegrationHubEventPayloadLoyaltyProfileBasedNotificationTest { + private final IntegrationHubEventPayloadLoyaltyProfileBasedNotification model = new IntegrationHubEventPayloadLoyaltyProfileBasedNotification(); /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedNotification */ @Test - public void testPrismaticEventPayloadLoyaltyProfileBasedNotification() { - // TODO: test PrismaticEventPayloadLoyaltyProfileBasedNotification + public void testIntegrationHubEventPayloadLoyaltyProfileBasedNotification() { + // TODO: test IntegrationHubEventPayloadLoyaltyProfileBasedNotification } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java similarity index 75% rename from src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java index 931e3389..701ce581 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest.java @@ -25,17 +25,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction */ -public class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest { - private final PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction model = new PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction(); +public class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationActionTest { + private final IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction model = new IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction(); /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction */ @Test - public void testPrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction() { - // TODO: test PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction + public void testIntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction() { + // TODO: test IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java similarity index 78% rename from src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java index ab0ade11..60406801 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest.java @@ -23,22 +23,22 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import one.talon.model.PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; +import one.talon.model.IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationAction; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification */ -public class PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest { - private final PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification model = new PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification(); +public class IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotificationTest { + private final IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification model = new IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification(); /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification */ @Test - public void testPrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification() { - // TODO: test PrismaticEventPayloadLoyaltyProfileBasedPointsChangedNotification + public void testIntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification() { + // TODO: test IntegrationHubEventPayloadLoyaltyProfileBasedPointsChangedNotification } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java similarity index 82% rename from src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java index de9d7939..b074e2d9 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest.java @@ -25,17 +25,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification */ -public class PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest { - private final PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification model = new PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification(); +public class IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotificationTest { + private final IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification model = new IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification(); /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification */ @Test - public void testPrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification() { - // TODO: test PrismaticEventPayloadLoyaltyProfileBasedTierDowngradeNotification + public void testIntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification() { + // TODO: test IntegrationHubEventPayloadLoyaltyProfileBasedTierDowngradeNotification } /** diff --git a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java similarity index 83% rename from src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java rename to src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java index 9aee9335..45bfc1eb 100644 --- a/src/test/java/one/talon/model/PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest.java @@ -25,17 +25,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification */ -public class PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest { - private final PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification model = new PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification(); +public class IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotificationTest { + private final IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification model = new IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification(); /** - * Model tests for PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification + * Model tests for IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification */ @Test - public void testPrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification() { - // TODO: test PrismaticEventPayloadLoyaltyProfileBasedTierUpgradeNotification + public void testIntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification() { + // TODO: test IntegrationHubEventPayloadLoyaltyProfileBasedTierUpgradeNotification } /** diff --git a/src/test/java/one/talon/model/PrismaticEventRecordTest.java b/src/test/java/one/talon/model/IntegrationHubEventRecordTest.java similarity index 88% rename from src/test/java/one/talon/model/PrismaticEventRecordTest.java rename to src/test/java/one/talon/model/IntegrationHubEventRecordTest.java index e54d49c9..852923fe 100644 --- a/src/test/java/one/talon/model/PrismaticEventRecordTest.java +++ b/src/test/java/one/talon/model/IntegrationHubEventRecordTest.java @@ -25,17 +25,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticEventRecord + * Model tests for IntegrationHubEventRecord */ -public class PrismaticEventRecordTest { - private final PrismaticEventRecord model = new PrismaticEventRecord(); +public class IntegrationHubEventRecordTest { + private final IntegrationHubEventRecord model = new IntegrationHubEventRecord(); /** - * Model tests for PrismaticEventRecord + * Model tests for IntegrationHubEventRecord */ @Test - public void testPrismaticEventRecord() { - // TODO: test PrismaticEventRecord + public void testIntegrationHubEventRecord() { + // TODO: test IntegrationHubEventRecord } /** diff --git a/src/test/java/one/talon/model/PrismaticFlowConfigResponseTest.java b/src/test/java/one/talon/model/IntegrationHubFlowConfigResponseTest.java similarity index 83% rename from src/test/java/one/talon/model/PrismaticFlowConfigResponseTest.java rename to src/test/java/one/talon/model/IntegrationHubFlowConfigResponseTest.java index 24b51377..8899f651 100644 --- a/src/test/java/one/talon/model/PrismaticFlowConfigResponseTest.java +++ b/src/test/java/one/talon/model/IntegrationHubFlowConfigResponseTest.java @@ -24,17 +24,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticFlowConfigResponse + * Model tests for IntegrationHubFlowConfigResponse */ -public class PrismaticFlowConfigResponseTest { - private final PrismaticFlowConfigResponse model = new PrismaticFlowConfigResponse(); +public class IntegrationHubFlowConfigResponseTest { + private final IntegrationHubFlowConfigResponse model = new IntegrationHubFlowConfigResponse(); /** - * Model tests for PrismaticFlowConfigResponse + * Model tests for IntegrationHubFlowConfigResponse */ @Test - public void testPrismaticFlowConfigResponse() { - // TODO: test PrismaticFlowConfigResponse + public void testIntegrationHubFlowConfigResponse() { + // TODO: test IntegrationHubFlowConfigResponse } /** diff --git a/src/test/java/one/talon/model/PrismaticFlowConfigTest.java b/src/test/java/one/talon/model/IntegrationHubFlowConfigTest.java similarity index 86% rename from src/test/java/one/talon/model/PrismaticFlowConfigTest.java rename to src/test/java/one/talon/model/IntegrationHubFlowConfigTest.java index 87395704..de482ddb 100644 --- a/src/test/java/one/talon/model/PrismaticFlowConfigTest.java +++ b/src/test/java/one/talon/model/IntegrationHubFlowConfigTest.java @@ -24,17 +24,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticFlowConfig + * Model tests for IntegrationHubFlowConfig */ -public class PrismaticFlowConfigTest { - private final PrismaticFlowConfig model = new PrismaticFlowConfig(); +public class IntegrationHubFlowConfigTest { + private final IntegrationHubFlowConfig model = new IntegrationHubFlowConfig(); /** - * Model tests for PrismaticFlowConfig + * Model tests for IntegrationHubFlowConfig */ @Test - public void testPrismaticFlowConfig() { - // TODO: test PrismaticFlowConfig + public void testIntegrationHubFlowConfig() { + // TODO: test IntegrationHubFlowConfig } /** diff --git a/src/test/java/one/talon/model/PrismaticFlowResponseTest.java b/src/test/java/one/talon/model/IntegrationHubFlowResponseTest.java similarity index 78% rename from src/test/java/one/talon/model/PrismaticFlowResponseTest.java rename to src/test/java/one/talon/model/IntegrationHubFlowResponseTest.java index 44f903bd..23f9ce55 100644 --- a/src/test/java/one/talon/model/PrismaticFlowResponseTest.java +++ b/src/test/java/one/talon/model/IntegrationHubFlowResponseTest.java @@ -20,22 +20,22 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import one.talon.model.PrismaticFlowConfigResponse; +import one.talon.model.IntegrationHubFlowConfigResponse; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticFlowResponse + * Model tests for IntegrationHubFlowResponse */ -public class PrismaticFlowResponseTest { - private final PrismaticFlowResponse model = new PrismaticFlowResponse(); +public class IntegrationHubFlowResponseTest { + private final IntegrationHubFlowResponse model = new IntegrationHubFlowResponse(); /** - * Model tests for PrismaticFlowResponse + * Model tests for IntegrationHubFlowResponse */ @Test - public void testPrismaticFlowResponse() { - // TODO: test PrismaticFlowResponse + public void testIntegrationHubFlowResponse() { + // TODO: test IntegrationHubFlowResponse } /** @@ -63,11 +63,11 @@ public void eventTypeTest() { } /** - * Test the property 'prismaticFlowUrl' + * Test the property 'integrationHubFlowUrl' */ @Test - public void prismaticFlowUrlTest() { - // TODO: test prismaticFlowUrl + public void integrationHubFlowUrlTest() { + // TODO: test integrationHubFlowUrl } /** diff --git a/src/test/java/one/talon/model/PrismaticFlowTest.java b/src/test/java/one/talon/model/IntegrationHubFlowTest.java similarity index 80% rename from src/test/java/one/talon/model/PrismaticFlowTest.java rename to src/test/java/one/talon/model/IntegrationHubFlowTest.java index e4521f4c..ad8cc344 100644 --- a/src/test/java/one/talon/model/PrismaticFlowTest.java +++ b/src/test/java/one/talon/model/IntegrationHubFlowTest.java @@ -24,17 +24,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticFlow + * Model tests for IntegrationHubFlow */ -public class PrismaticFlowTest { - private final PrismaticFlow model = new PrismaticFlow(); +public class IntegrationHubFlowTest { + private final IntegrationHubFlow model = new IntegrationHubFlow(); /** - * Model tests for PrismaticFlow + * Model tests for IntegrationHubFlow */ @Test - public void testPrismaticFlow() { - // TODO: test PrismaticFlow + public void testIntegrationHubFlow() { + // TODO: test IntegrationHubFlow } /** @@ -54,11 +54,11 @@ public void eventTypeTest() { } /** - * Test the property 'prismaticFlowUrl' + * Test the property 'integrationHubFlowUrl' */ @Test - public void prismaticFlowUrlTest() { - // TODO: test prismaticFlowUrl + public void integrationHubFlowUrlTest() { + // TODO: test integrationHubFlowUrl } } diff --git a/src/test/java/one/talon/model/PrismaticFlowWithConfigTest.java b/src/test/java/one/talon/model/IntegrationHubFlowWithConfigTest.java similarity index 77% rename from src/test/java/one/talon/model/PrismaticFlowWithConfigTest.java rename to src/test/java/one/talon/model/IntegrationHubFlowWithConfigTest.java index 00d5b2a1..b7c94c40 100644 --- a/src/test/java/one/talon/model/PrismaticFlowWithConfigTest.java +++ b/src/test/java/one/talon/model/IntegrationHubFlowWithConfigTest.java @@ -20,22 +20,22 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import one.talon.model.PrismaticFlowConfig; +import one.talon.model.IntegrationHubFlowConfig; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticFlowWithConfig + * Model tests for IntegrationHubFlowWithConfig */ -public class PrismaticFlowWithConfigTest { - private final PrismaticFlowWithConfig model = new PrismaticFlowWithConfig(); +public class IntegrationHubFlowWithConfigTest { + private final IntegrationHubFlowWithConfig model = new IntegrationHubFlowWithConfig(); /** - * Model tests for PrismaticFlowWithConfig + * Model tests for IntegrationHubFlowWithConfig */ @Test - public void testPrismaticFlowWithConfig() { - // TODO: test PrismaticFlowWithConfig + public void testIntegrationHubFlowWithConfig() { + // TODO: test IntegrationHubFlowWithConfig } /** @@ -55,11 +55,11 @@ public void eventTypeTest() { } /** - * Test the property 'prismaticFlowUrl' + * Test the property 'integrationHubFlowUrl' */ @Test - public void prismaticFlowUrlTest() { - // TODO: test prismaticFlowUrl + public void integrationHubFlowUrlTest() { + // TODO: test integrationHubFlowUrl } /** diff --git a/src/test/java/one/talon/model/PrismaticPaginatedEventPayloadTest.java b/src/test/java/one/talon/model/IntegrationHubPaginatedEventPayloadTest.java similarity index 83% rename from src/test/java/one/talon/model/PrismaticPaginatedEventPayloadTest.java rename to src/test/java/one/talon/model/IntegrationHubPaginatedEventPayloadTest.java index 30d1b635..dee836f4 100644 --- a/src/test/java/one/talon/model/PrismaticPaginatedEventPayloadTest.java +++ b/src/test/java/one/talon/model/IntegrationHubPaginatedEventPayloadTest.java @@ -27,17 +27,17 @@ import org.junit.jupiter.api.Test; /** - * Model tests for PrismaticPaginatedEventPayload + * Model tests for IntegrationHubPaginatedEventPayload */ -public class PrismaticPaginatedEventPayloadTest { - private final PrismaticPaginatedEventPayload model = new PrismaticPaginatedEventPayload(); +public class IntegrationHubPaginatedEventPayloadTest { + private final IntegrationHubPaginatedEventPayload model = new IntegrationHubPaginatedEventPayload(); /** - * Model tests for PrismaticPaginatedEventPayload + * Model tests for IntegrationHubPaginatedEventPayload */ @Test - public void testPrismaticPaginatedEventPayload() { - // TODO: test PrismaticPaginatedEventPayload + public void testIntegrationHubPaginatedEventPayload() { + // TODO: test IntegrationHubPaginatedEventPayload } /** diff --git a/src/test/java/one/talon/model/ListExperiments200ResponseTest.java b/src/test/java/one/talon/model/ListExperiments200ResponseTest.java new file mode 100644 index 00000000..3f9e9888 --- /dev/null +++ b/src/test/java/one/talon/model/ListExperiments200ResponseTest.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) are used 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#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.Experiment; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ListExperiments200Response + */ +public class ListExperiments200ResponseTest { + private final ListExperiments200Response model = new ListExperiments200Response(); + + /** + * Model tests for ListExperiments200Response + */ + @Test + public void testListExperiments200Response() { + // TODO: test ListExperiments200Response + } + + /** + * Test the property 'totalResultSize' + */ + @Test + public void totalResultSizeTest() { + // TODO: test totalResultSize + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + +} diff --git a/src/test/java/one/talon/model/NewExperimentTest.java b/src/test/java/one/talon/model/NewExperimentTest.java index 9e4a8617..fcdabb2b 100644 --- a/src/test/java/one/talon/model/NewExperimentTest.java +++ b/src/test/java/one/talon/model/NewExperimentTest.java @@ -19,7 +19,6 @@ 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.NewCampaign; import org.junit.jupiter.api.Disabled; @@ -47,22 +46,6 @@ public void isVariantAssignmentExternalTest() { // TODO: test isVariantAssignmentExternal } - /** - * Test the property 'activated' - */ - @Test - public void activatedTest() { - // TODO: test activated - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - /** * Test the property 'campaign' */ diff --git a/src/test/java/one/talon/model/PriceHistoryRequestTest.java b/src/test/java/one/talon/model/PriceHistoryRequestTest.java new file mode 100644 index 00000000..0c1fe6a1 --- /dev/null +++ b/src/test/java/one/talon/model/PriceHistoryRequestTest.java @@ -0,0 +1,65 @@ +/* + * 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) are used 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#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 PriceHistoryRequest + */ +public class PriceHistoryRequestTest { + private final PriceHistoryRequest model = new PriceHistoryRequest(); + + /** + * Model tests for PriceHistoryRequest + */ + @Test + public void testPriceHistoryRequest() { + // TODO: test PriceHistoryRequest + } + + /** + * Test the property 'sku' + */ + @Test + public void skuTest() { + // TODO: test sku + } + + /** + * Test the property 'startDate' + */ + @Test + public void startDateTest() { + // TODO: test startDate + } + + /** + * Test the property 'endDate' + */ + @Test + public void endDateTest() { + // TODO: test endDate + } + +} diff --git a/src/test/java/one/talon/model/PriceHistoryResponseTest.java b/src/test/java/one/talon/model/PriceHistoryResponseTest.java new file mode 100644 index 00000000..03d8d41e --- /dev/null +++ b/src/test/java/one/talon/model/PriceHistoryResponseTest.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) are used 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#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.History; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PriceHistoryResponse + */ +public class PriceHistoryResponseTest { + private final PriceHistoryResponse model = new PriceHistoryResponse(); + + /** + * Model tests for PriceHistoryResponse + */ + @Test + public void testPriceHistoryResponse() { + // TODO: test PriceHistoryResponse + } + + /** + * Test the property 'sku' + */ + @Test + public void skuTest() { + // TODO: test sku + } + + /** + * Test the property 'history' + */ + @Test + public void historyTest() { + // TODO: test history + } + +} diff --git a/src/test/java/one/talon/model/PromoteExperimentTest.java b/src/test/java/one/talon/model/PromoteExperimentTest.java new file mode 100644 index 00000000..d35af327 --- /dev/null +++ b/src/test/java/one/talon/model/PromoteExperimentTest.java @@ -0,0 +1,73 @@ +/* + * 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) are used 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#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 one.talon.model.ExperimentCampaignCopy; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PromoteExperiment + */ +public class PromoteExperimentTest { + private final PromoteExperiment model = new PromoteExperiment(); + + /** + * Model tests for PromoteExperiment + */ + @Test + public void testPromoteExperiment() { + // TODO: test PromoteExperiment + } + + /** + * Test the property 'targetApplicationId' + */ + @Test + public void targetApplicationIdTest() { + // TODO: test targetApplicationId + } + + /** + * Test the property 'variantId' + */ + @Test + public void variantIdTest() { + // TODO: test variantId + } + + /** + * Test the property 'disableExperiment' + */ + @Test + public void disableExperimentTest() { + // TODO: test disableExperiment + } + + /** + * Test the property 'campaign' + */ + @Test + public void campaignTest() { + // TODO: test campaign + } + +}