talon_one 2.4.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +43 -0
- data/README.md +325 -179
- data/docs/AcceptCouponEffectProps.md +1 -1
- data/docs/AcceptReferralEffectProps.md +1 -1
- data/docs/AccessLogEntry.md +15 -10
- data/docs/Account.md +9 -9
- data/docs/AccountAdditionalCost.md +13 -11
- data/docs/AccountAnalytics.md +37 -35
- data/docs/AccountDashboardStatistic.md +27 -0
- data/docs/AccountDashboardStatisticApiCalls.md +19 -0
- data/docs/AccountDashboardStatisticCampaigns.md +19 -0
- data/docs/AccountDashboardStatisticDiscount.md +21 -0
- data/docs/AccountDashboardStatisticLoyaltyPoints.md +19 -0
- data/docs/AccountDashboardStatisticReferrals.md +19 -0
- data/docs/AccountDashboardStatisticRevenue.md +21 -0
- data/docs/AccountEntity.md +1 -1
- data/docs/AccountLimits.md +12 -12
- data/docs/AddFreeItemEffectProps.md +3 -3
- data/docs/AddItemCatalogAction.md +23 -0
- data/docs/AddLoyaltyPoints.md +31 -0
- data/docs/AddLoyaltyPointsEffectProps.md +22 -10
- data/docs/AddedDeductedPointsNotificationPolicy.md +19 -0
- data/docs/AdditionalCost.md +1 -1
- data/docs/Application.md +33 -29
- data/docs/ApplicationAPIKey.md +16 -16
- data/docs/ApplicationApiHealth.md +3 -3
- data/docs/ApplicationCampaignStats.md +6 -6
- data/docs/ApplicationCustomer.md +16 -12
- data/docs/ApplicationCustomerEntity.md +1 -1
- data/docs/ApplicationEntity.md +1 -1
- data/docs/ApplicationEvent.md +7 -7
- data/docs/ApplicationNotification.md +17 -0
- data/docs/ApplicationReferee.md +5 -5
- data/docs/ApplicationSession.md +17 -15
- data/docs/ApplicationSessionEntity.md +1 -1
- data/docs/AsyncCouponCreationResponse.md +17 -0
- data/docs/Attribute.md +24 -14
- data/docs/Audience.md +19 -11
- data/docs/AudienceAnalytics.md +19 -0
- data/docs/AudienceCustomer.md +41 -0
- data/docs/AudienceIntegrationID.md +17 -0
- data/docs/AudienceMembership.md +2 -2
- data/docs/AwardGiveawayEffectProps.md +5 -5
- data/docs/BaseLoyaltyProgram.md +31 -0
- data/docs/BaseNotification.md +21 -0
- data/docs/BaseNotificationEntity.md +17 -0
- data/docs/BaseNotificationWebhook.md +25 -0
- data/docs/BaseNotifications.md +17 -0
- data/docs/BaseSamlConnection.md +1 -1
- data/docs/Binding.md +6 -4
- data/docs/BulkApplicationNotification.md +19 -0
- data/docs/BulkCampaignNotification.md +19 -0
- data/docs/Campaign.md +47 -37
- data/docs/CampaignActivationRequest.md +17 -0
- data/docs/CampaignAnalytics.md +8 -8
- data/docs/CampaignCollection.md +37 -0
- data/docs/CampaignCollectionWithoutPayload.md +35 -0
- data/docs/CampaignCopy.md +10 -10
- data/docs/CampaignCreatedNotification.md +21 -0
- data/docs/CampaignDeletedNotification.md +19 -0
- data/docs/CampaignEditedNotification.md +21 -0
- data/docs/CampaignEntity.md +1 -1
- data/docs/CampaignGroup.md +12 -12
- data/docs/CampaignNotification.md +17 -0
- data/docs/CampaignPrioritiesChangedNotification.md +21 -0
- data/docs/CampaignPrioritiesV2.md +21 -0
- data/docs/CampaignRulesetChangedNotification.md +21 -0
- data/docs/CampaignSearch.md +1 -1
- data/docs/CampaignSet.md +10 -8
- data/docs/CampaignSetBranchNode.md +6 -6
- data/docs/CampaignSetIDs.md +17 -0
- data/docs/CampaignSetLeafNode.md +1 -1
- data/docs/CampaignSetNode.md +1 -1
- data/docs/CampaignSetV2.md +25 -0
- data/docs/CampaignStateChangedNotification.md +23 -0
- data/docs/CampaignTemplate.md +61 -0
- data/docs/CampaignTemplateCollection.md +19 -0
- data/docs/CampaignTemplateParams.md +23 -0
- data/docs/CardLedgerTransactionLogEntry.md +41 -0
- data/docs/CardLedgerTransactionLogEntryIntegrationAPI.md +41 -0
- data/docs/CartItem.md +26 -18
- data/docs/Catalog.md +33 -0
- data/docs/CatalogAction.md +19 -0
- data/docs/CatalogActionFilter.md +21 -0
- data/docs/CatalogItem.md +29 -0
- data/docs/CatalogSyncRequest.md +19 -0
- data/docs/CatalogsStrikethroughNotificationPolicy.md +17 -0
- data/docs/Change.md +12 -10
- data/docs/ChangeProfilePassword.md +2 -2
- data/docs/CodeGeneratorSettings.md +4 -4
- data/docs/Collection.md +39 -0
- data/docs/CollectionItem.md +17 -0
- data/docs/CollectionWithoutPayload.md +37 -0
- data/docs/Coupon.md +33 -25
- data/docs/CouponConstraints.md +9 -7
- data/docs/CouponCreatedEffectProps.md +2 -2
- data/docs/CouponCreationJob.md +59 -0
- data/docs/CouponLimitConfigs.md +17 -0
- data/docs/CouponRejectionReason.md +3 -3
- data/docs/CouponReservations.md +2 -2
- data/docs/CouponSearch.md +1 -1
- data/docs/CouponValue.md +2 -2
- data/docs/CouponsNotificationPolicy.md +19 -0
- data/docs/CreateApplicationAPIKey.md +6 -6
- data/docs/CreateManagementKey.md +23 -0
- data/docs/CreateTemplateCampaign.md +31 -0
- data/docs/CreateTemplateCampaignResponse.md +21 -0
- data/docs/CustomEffect.md +14 -12
- data/docs/CustomEffectProps.md +12 -2
- data/docs/CustomerActivityReport.md +4 -4
- data/docs/CustomerAnalytics.md +7 -7
- data/docs/CustomerInventory.md +2 -2
- data/docs/CustomerProfile.md +17 -13
- data/docs/CustomerProfileAudienceRequestItem.md +6 -6
- data/docs/CustomerProfileIntegrationRequestV2.md +6 -4
- data/docs/CustomerProfileSearchQuery.md +1 -1
- data/docs/CustomerProfileUpdateV2Response.md +17 -0
- data/docs/CustomerSession.md +16 -14
- data/docs/CustomerSessionV2.md +34 -26
- data/docs/DeductLoyaltyPoints.md +23 -0
- data/docs/DeductLoyaltyPointsEffectProps.md +10 -6
- data/docs/Effect.md +15 -13
- data/docs/EffectEntity.md +14 -12
- data/docs/EmailEntity.md +1 -1
- data/docs/Endpoint.md +17 -0
- data/docs/Entity.md +4 -4
- data/docs/EntityWithTalangVisibleID.md +2 -2
- data/docs/Environment.md +9 -7
- data/docs/ErrorResponseWithStatus.md +21 -0
- data/docs/ErrorSource.md +1 -1
- data/docs/EvaluableCampaignIds.md +17 -0
- data/docs/Event.md +11 -11
- data/docs/EventType.md +10 -24
- data/docs/EventV2.md +23 -0
- data/docs/ExpiringPointsNotificationPolicy.md +19 -0
- data/docs/ExpiringPointsNotificationTrigger.md +19 -0
- data/docs/Export.md +8 -8
- data/docs/FeatureFlag.md +7 -7
- data/docs/FeedNotification.md +6 -6
- data/docs/FrontendState.md +16 -0
- data/docs/Giveaway.md +13 -9
- data/docs/GiveawaysPool.md +11 -9
- data/docs/Import.md +11 -11
- data/docs/ImportEntity.md +1 -1
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse20010.md +2 -2
- data/docs/InlineResponse20011.md +3 -5
- data/docs/InlineResponse20012.md +2 -2
- data/docs/InlineResponse20013.md +3 -3
- data/docs/InlineResponse20014.md +4 -2
- data/docs/InlineResponse20015.md +2 -2
- data/docs/InlineResponse20016.md +5 -3
- data/docs/InlineResponse20017.md +1 -1
- data/docs/InlineResponse20018.md +2 -2
- data/docs/InlineResponse20019.md +3 -5
- data/docs/InlineResponse2002.md +2 -2
- data/docs/InlineResponse20020.md +5 -3
- data/docs/InlineResponse20021.md +5 -3
- data/docs/InlineResponse20022.md +5 -3
- data/docs/InlineResponse20023.md +3 -3
- data/docs/InlineResponse20024.md +3 -3
- data/docs/InlineResponse20025.md +3 -3
- data/docs/InlineResponse20026.md +3 -3
- data/docs/InlineResponse20027.md +3 -5
- data/docs/InlineResponse20028.md +5 -3
- data/docs/InlineResponse20029.md +5 -3
- data/docs/InlineResponse2003.md +2 -2
- data/docs/InlineResponse20030.md +19 -0
- data/docs/InlineResponse20031.md +19 -0
- data/docs/InlineResponse20032.md +19 -0
- data/docs/InlineResponse20033.md +19 -0
- data/docs/InlineResponse20034.md +19 -0
- data/docs/InlineResponse20035.md +19 -0
- data/docs/InlineResponse20036.md +19 -0
- data/docs/InlineResponse20037.md +21 -0
- data/docs/InlineResponse20038.md +19 -0
- data/docs/InlineResponse20039.md +19 -0
- data/docs/InlineResponse2004.md +2 -2
- data/docs/InlineResponse2005.md +3 -3
- data/docs/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +3 -3
- data/docs/InlineResponse2008.md +3 -3
- data/docs/InlineResponse2009.md +2 -2
- data/docs/InlineResponse201.md +1 -1
- data/docs/IntegrationApi.md +932 -220
- data/docs/IntegrationCoupon.md +59 -0
- data/docs/IntegrationCustomerSessionResponse.md +19 -0
- data/docs/IntegrationEntity.md +4 -4
- data/docs/IntegrationEvent.md +4 -4
- data/docs/IntegrationEventV2Request.md +25 -0
- data/docs/IntegrationProfileEntity.md +2 -2
- data/docs/IntegrationRequest.md +2 -2
- data/docs/IntegrationStateV2.md +8 -4
- data/docs/InventoryCoupon.md +36 -28
- data/docs/InventoryReferral.md +43 -0
- data/docs/ItemAttribute.md +21 -0
- data/docs/LedgerEntry.md +17 -17
- data/docs/LedgerInfo.md +31 -0
- data/docs/LedgerTransactionLogEntryIntegrationAPI.md +39 -0
- data/docs/LimitConfig.md +8 -6
- data/docs/LimitCounter.md +45 -0
- data/docs/LoginParams.md +2 -2
- data/docs/Loyalty.md +4 -2
- data/docs/LoyaltyBalance.md +23 -0
- data/docs/LoyaltyBalances.md +19 -0
- data/docs/LoyaltyCard.md +39 -0
- data/docs/LoyaltyCardProfileRegistration.md +19 -0
- data/docs/LoyaltyCardRegistration.md +17 -0
- data/docs/LoyaltyDashboardData.md +33 -0
- data/docs/LoyaltyDashboardPointsBreakdown.md +19 -0
- data/docs/LoyaltyLedger.md +2 -2
- data/docs/LoyaltyLedgerEntry.md +19 -15
- data/docs/LoyaltyLedgerTransactions.md +19 -0
- data/docs/LoyaltyMembership.md +1 -1
- data/docs/LoyaltyProgram.md +26 -16
- data/docs/LoyaltyProgramBalance.md +12 -10
- data/docs/LoyaltyProgramEntity.md +1 -1
- data/docs/LoyaltyProgramLedgers.md +8 -8
- data/docs/LoyaltyProgramTransaction.md +49 -0
- data/docs/LoyaltyStatistics.md +18 -8
- data/docs/LoyaltySubLedger.md +13 -11
- data/docs/LoyaltyTier.md +8 -8
- data/docs/ManagementApi.md +4100 -1835
- data/docs/ManagementKey.md +31 -0
- data/docs/ModelReturn.md +37 -0
- data/docs/MultipleAttribute.md +17 -0
- data/docs/MultipleAudiences.md +19 -0
- data/docs/MultipleAudiencesItem.md +25 -0
- data/docs/MultipleCustomerProfileIntegrationRequestItem.md +4 -4
- data/docs/MultipleCustomerProfileIntegrationResponseV2.md +1 -1
- data/docs/MultipleNewAttribute.md +17 -0
- data/docs/MultipleNewAudiences.md +17 -0
- data/docs/MutableEntity.md +2 -2
- data/docs/NewAccountSignUp.md +2 -2
- data/docs/NewAdditionalCost.md +8 -6
- data/docs/NewApplication.md +26 -22
- data/docs/NewApplicationAPIKey.md +18 -18
- data/docs/NewAttribute.md +17 -9
- data/docs/NewAudience.md +14 -6
- data/docs/NewBaseNotification.md +19 -0
- data/docs/NewCampaign.md +17 -17
- data/docs/NewCampaignCollection.md +19 -0
- data/docs/NewCampaignGroup.md +5 -5
- data/docs/NewCampaignSet.md +3 -3
- data/docs/NewCampaignSetV2.md +21 -0
- data/docs/NewCampaignTemplate.md +43 -0
- data/docs/NewCatalog.md +21 -0
- data/docs/NewCollection.md +21 -0
- data/docs/NewCouponCreationJob.md +31 -0
- data/docs/NewCoupons.md +24 -18
- data/docs/NewCouponsForMultipleRecipients.md +17 -15
- data/docs/NewCustomEffect.md +6 -4
- data/docs/NewCustomerProfile.md +2 -2
- data/docs/NewCustomerSession.md +8 -8
- data/docs/NewCustomerSessionV2.md +19 -15
- data/docs/NewEvent.md +5 -5
- data/docs/NewEventType.md +6 -20
- data/docs/NewGiveawaysPool.md +6 -4
- data/docs/NewInternalAudience.md +21 -0
- data/docs/NewInvitation.md +5 -5
- data/docs/NewLoyaltyProgram.md +21 -11
- data/docs/NewLoyaltyTier.md +3 -3
- data/docs/NewManagementKey.md +33 -0
- data/docs/NewMultipleAudiencesItem.md +19 -0
- data/docs/NewNotificationWebhook.md +19 -0
- data/docs/NewPassword.md +2 -2
- data/docs/NewPicklist.md +19 -0
- data/docs/NewReferral.md +10 -10
- data/docs/NewReferralsForMultipleAdvocates.md +13 -13
- data/docs/NewReturn.md +17 -0
- data/docs/NewRole.md +8 -8
- data/docs/NewRuleset.md +7 -5
- data/docs/NewSamlConnection.md +1 -1
- data/docs/NewUser.md +3 -3
- data/docs/NewWebhook.md +16 -14
- data/docs/Notification.md +3 -3
- data/docs/NotificationWebhook.md +27 -0
- data/docs/OutgoingIntegrationBrazePolicy.md +19 -0
- data/docs/OutgoingIntegrationConfiguration.md +21 -0
- data/docs/OutgoingIntegrationType.md +25 -0
- data/docs/OutgoingIntegrationTypes.md +17 -0
- data/docs/OutgoingIntegrationWebhookTemplate.md +27 -0
- data/docs/OutgoingIntegrationWebhookTemplates.md +17 -0
- data/docs/PatchItemCatalogAction.md +23 -0
- data/docs/PatchManyItemsCatalogAction.md +21 -0
- data/docs/Picklist.md +31 -0
- data/docs/PriorityPosition.md +19 -0
- data/docs/ProfileAudiencesChanges.md +2 -2
- data/docs/RedeemReferralEffectProps.md +2 -2
- data/docs/Referral.md +19 -19
- data/docs/ReferralConstraints.md +5 -5
- data/docs/ReferralCreatedEffectProps.md +1 -1
- data/docs/ReferralRejectionReason.md +1 -1
- data/docs/RejectCouponEffectProps.md +5 -5
- data/docs/RejectReferralEffectProps.md +5 -5
- data/docs/RemoveItemCatalogAction.md +17 -0
- data/docs/RemoveManyItemsCatalogAction.md +17 -0
- data/docs/ReserveCouponEffectProps.md +21 -0
- data/docs/ReturnIntegrationRequest.md +19 -0
- data/docs/ReturnedCartItem.md +19 -0
- data/docs/Role.md +17 -17
- data/docs/RoleAssign.md +4 -4
- data/docs/RoleMembership.md +2 -2
- data/docs/RoleV2.md +25 -0
- data/docs/RoleV2ApplicationDetails.md +21 -0
- data/docs/RoleV2PermissionSet.md +19 -0
- data/docs/RoleV2Permissions.md +19 -0
- data/docs/RoleV2PermissionsRoles.md +21 -0
- data/docs/RollbackAddedLoyaltyPointsEffectProps.md +12 -6
- data/docs/RollbackCouponEffectProps.md +1 -1
- data/docs/RollbackDeductedLoyaltyPointsEffectProps.md +11 -9
- data/docs/RollbackDiscountEffectProps.md +13 -3
- data/docs/RollbackReferralEffectProps.md +1 -1
- data/docs/Rule.md +8 -4
- data/docs/RuleFailureReason.md +13 -13
- data/docs/Ruleset.md +17 -13
- data/docs/SamlConnection.md +5 -5
- data/docs/Session.md +5 -5
- data/docs/SetDiscountEffectProps.md +6 -4
- data/docs/SetDiscountPerAdditionalCostEffectProps.md +25 -0
- data/docs/SetDiscountPerAdditionalCostPerItemEffectProps.md +29 -0
- data/docs/SetDiscountPerItemEffectProps.md +17 -5
- data/docs/ShowBundleMetadataEffectProps.md +3 -3
- data/docs/ShowNotificationEffectProps.md +3 -3
- data/docs/StrikethroughChangedItem.md +29 -0
- data/docs/StrikethroughEffect.md +27 -0
- data/docs/StrikethroughLabelingNotification.md +25 -0
- data/docs/StrikethroughSetDiscountPerItemEffectProps.md +19 -0
- data/docs/StrikethroughTrigger.md +25 -0
- data/docs/TalangAttribute.md +33 -0
- data/docs/TalangAttributeVisibility.md +19 -0
- data/docs/TemplateArgDef.md +5 -1
- data/docs/TemplateDef.md +5 -5
- data/docs/TemplateLimitConfig.md +23 -0
- data/docs/Tier.md +19 -0
- data/docs/TransferLoyaltyCard.md +17 -0
- data/docs/TriggerWebhookEffectProps.md +2 -2
- data/docs/UpdateAccount.md +2 -2
- data/docs/UpdateApplication.md +25 -21
- data/docs/UpdateAttributeEffectProps.md +2 -2
- data/docs/UpdateAudience.md +2 -2
- data/docs/UpdateCampaign.md +15 -15
- data/docs/UpdateCampaignCollection.md +17 -0
- data/docs/UpdateCampaignGroup.md +5 -5
- data/docs/UpdateCampaignTemplate.md +47 -0
- data/docs/UpdateCatalog.md +21 -0
- data/docs/UpdateCollection.md +19 -0
- data/docs/UpdateCoupon.md +17 -11
- data/docs/UpdateCouponBatch.md +11 -9
- data/docs/UpdateCustomEffect.md +6 -4
- data/docs/UpdateLoyaltyCard.md +17 -0
- data/docs/UpdateLoyaltyProgram.md +15 -9
- data/docs/UpdatePicklist.md +19 -0
- data/docs/UpdateReferral.md +7 -7
- data/docs/UpdateReferralBatch.md +25 -0
- data/docs/UpdateRole.md +8 -8
- data/docs/UpdateUser.md +7 -7
- data/docs/UpdateUserLatestFeedTimestamp.md +1 -1
- data/docs/User.md +17 -17
- data/docs/UserEntity.md +2 -2
- data/docs/UserFeedNotifications.md +2 -2
- data/docs/Webhook.md +22 -20
- data/docs/WebhookActivationLogEntry.md +9 -9
- data/docs/WebhookLogEntry.md +18 -15
- data/docs/WillAwardGiveawayEffectProps.md +3 -3
- data/lib/talon_one/api/integration_api.rb +1168 -231
- data/lib/talon_one/api/management_api.rb +5076 -2861
- data/lib/talon_one/api_client.rb +2 -2
- data/lib/talon_one/api_error.rb +2 -2
- data/lib/talon_one/configuration.rb +8 -8
- data/lib/talon_one/models/accept_coupon_effect_props.rb +3 -3
- data/lib/talon_one/models/accept_referral_effect_props.rb +3 -3
- data/lib/talon_one/models/access_log_entry.rb +6 -6
- data/lib/talon_one/models/account.rb +8 -8
- data/lib/talon_one/models/account_additional_cost.rb +98 -10
- data/lib/talon_one/models/account_analytics.rb +39 -24
- data/lib/talon_one/models/account_dashboard_statistic.rb +271 -0
- data/lib/talon_one/models/account_dashboard_statistic_api_calls.rb +227 -0
- data/lib/talon_one/models/account_dashboard_statistic_campaigns.rb +227 -0
- data/lib/talon_one/models/account_dashboard_statistic_discount.rb +242 -0
- data/lib/talon_one/models/account_dashboard_statistic_loyalty_points.rb +227 -0
- data/lib/talon_one/models/account_dashboard_statistic_referrals.rb +227 -0
- data/lib/talon_one/models/account_dashboard_statistic_revenue.rb +242 -0
- data/lib/talon_one/models/account_entity.rb +2 -2
- data/lib/talon_one/models/account_limits.rb +14 -14
- data/lib/talon_one/models/add_free_item_effect_props.rb +4 -4
- data/lib/talon_one/models/add_item_catalog_action.rb +245 -0
- data/lib/talon_one/models/add_loyalty_points.rb +311 -0
- data/lib/talon_one/models/add_loyalty_points_effect_props.rb +109 -15
- data/lib/talon_one/models/added_deducted_points_notification_policy.rb +269 -0
- data/lib/talon_one/models/additional_cost.rb +2 -2
- data/lib/talon_one/models/api_error.rb +2 -2
- data/lib/talon_one/models/application.rb +53 -17
- data/lib/talon_one/models/application_api_health.rb +5 -5
- data/lib/talon_one/models/application_api_key.rb +12 -12
- data/lib/talon_one/models/application_campaign_stats.rb +9 -9
- data/lib/talon_one/models/application_customer.rb +68 -14
- data/lib/talon_one/models/application_customer_entity.rb +2 -2
- data/lib/talon_one/models/application_entity.rb +2 -2
- data/lib/talon_one/models/application_event.rb +5 -5
- data/lib/talon_one/models/application_notification.rb +212 -0
- data/lib/talon_one/models/application_referee.rb +44 -6
- data/lib/talon_one/models/application_session.rb +60 -11
- data/lib/talon_one/models/application_session_entity.rb +2 -2
- data/lib/talon_one/models/async_coupon_creation_response.rb +212 -0
- data/lib/talon_one/models/attribute.rb +108 -9
- data/lib/talon_one/models/attributes_mandatory.rb +2 -2
- data/lib/talon_one/models/attributes_settings.rb +2 -2
- data/lib/talon_one/models/audience.rb +57 -56
- data/lib/talon_one/models/audience_analytics.rb +218 -0
- data/lib/talon_one/models/audience_customer.rb +395 -0
- data/lib/talon_one/models/audience_integration_id.rb +231 -0
- data/lib/talon_one/models/audience_membership.rb +2 -2
- data/lib/talon_one/models/award_giveaway_effect_props.rb +21 -2
- data/lib/talon_one/models/base_loyalty_program.rb +294 -0
- data/lib/talon_one/models/base_notification.rb +260 -0
- data/lib/talon_one/models/base_notification_entity.rb +211 -0
- data/lib/talon_one/models/base_notification_webhook.rb +275 -0
- data/lib/talon_one/models/base_notifications.rb +209 -0
- data/lib/talon_one/models/base_saml_connection.rb +2 -2
- data/lib/talon_one/models/binding.rb +17 -7
- data/lib/talon_one/models/bulk_application_notification.rb +227 -0
- data/lib/talon_one/models/bulk_campaign_notification.rb +227 -0
- data/lib/talon_one/models/campaign.rb +66 -16
- data/lib/talon_one/models/campaign_activation_request.rb +214 -0
- data/lib/talon_one/models/campaign_analytics.rb +2 -2
- data/lib/talon_one/models/campaign_collection.rb +370 -0
- data/lib/talon_one/models/campaign_collection_without_payload.rb +358 -0
- data/lib/talon_one/models/campaign_copy.rb +6 -6
- data/lib/talon_one/models/campaign_created_notification.rb +235 -0
- data/lib/talon_one/models/campaign_deleted_notification.rb +227 -0
- data/lib/talon_one/models/campaign_edited_notification.rb +235 -0
- data/lib/talon_one/models/campaign_entity.rb +2 -2
- data/lib/talon_one/models/campaign_group.rb +7 -7
- data/lib/talon_one/models/campaign_group_entity.rb +2 -2
- data/lib/talon_one/models/campaign_notification.rb +212 -0
- data/lib/talon_one/models/campaign_priorities_changed_notification.rb +236 -0
- data/lib/talon_one/models/campaign_priorities_v2.rb +230 -0
- data/lib/talon_one/models/campaign_ruleset_changed_notification.rb +230 -0
- data/lib/talon_one/models/campaign_search.rb +3 -3
- data/lib/talon_one/models/campaign_set.rb +19 -9
- data/lib/talon_one/models/campaign_set_branch_node.rb +5 -5
- data/lib/talon_one/models/campaign_set_i_ds.rb +208 -0
- data/lib/talon_one/models/campaign_set_leaf_node.rb +3 -3
- data/lib/talon_one/models/campaign_set_node.rb +2 -2
- data/lib/talon_one/models/campaign_set_v2.rb +291 -0
- data/lib/talon_one/models/campaign_state_changed_notification.rb +251 -0
- data/lib/talon_one/models/campaign_template.rb +543 -0
- data/lib/talon_one/models/campaign_template_collection.rb +252 -0
- data/lib/talon_one/models/campaign_template_params.rb +305 -0
- data/lib/talon_one/models/card_ledger_transaction_log_entry.rb +508 -0
- data/lib/talon_one/models/card_ledger_transaction_log_entry_integration_api.rb +508 -0
- data/lib/talon_one/models/cart_item.rb +59 -41
- data/lib/talon_one/models/catalog.rb +330 -0
- data/lib/talon_one/models/catalog_action.rb +261 -0
- data/lib/talon_one/models/catalog_action_filter.rb +277 -0
- data/lib/talon_one/models/catalog_item.rb +313 -0
- data/lib/talon_one/models/catalog_sync_request.rb +238 -0
- data/lib/talon_one/models/catalogs_strikethrough_notification_policy.rb +231 -0
- data/lib/talon_one/models/change.rb +20 -10
- data/lib/talon_one/models/change_profile_password.rb +2 -2
- data/lib/talon_one/models/code_generator_settings.rb +4 -4
- data/lib/talon_one/models/collection.rb +382 -0
- data/lib/talon_one/models/collection_item.rb +212 -0
- data/lib/talon_one/models/collection_without_payload.rb +370 -0
- data/lib/talon_one/models/coupon.rb +100 -15
- data/lib/talon_one/models/coupon_constraints.rb +40 -6
- data/lib/talon_one/models/coupon_created_effect_props.rb +4 -4
- data/lib/talon_one/models/coupon_creation_job.rb +603 -0
- data/lib/talon_one/models/coupon_limit_configs.rb +209 -0
- data/lib/talon_one/models/coupon_rejection_reason.rb +4 -4
- data/lib/talon_one/models/coupon_reservations.rb +3 -3
- data/lib/talon_one/models/coupon_search.rb +3 -3
- data/lib/talon_one/models/coupon_value.rb +3 -3
- data/lib/talon_one/models/coupons_notification_policy.rb +269 -0
- data/lib/talon_one/models/create_application_api_key.rb +7 -7
- data/lib/talon_one/models/create_management_key.rb +256 -0
- data/lib/talon_one/models/create_template_campaign.rb +314 -0
- data/lib/talon_one/models/create_template_campaign_response.rb +236 -0
- data/lib/talon_one/models/custom_effect.rb +76 -19
- data/lib/talon_one/models/custom_effect_props.rb +67 -12
- data/lib/talon_one/models/customer_activity_report.rb +24 -5
- data/lib/talon_one/models/customer_analytics.rb +10 -10
- data/lib/talon_one/models/customer_inventory.rb +4 -3
- data/lib/talon_one/models/customer_profile.rb +66 -22
- data/lib/talon_one/models/customer_profile_audience_request.rb +2 -2
- data/lib/talon_one/models/customer_profile_audience_request_item.rb +24 -2
- data/lib/talon_one/models/customer_profile_integration_request_v2.rb +17 -5
- data/lib/talon_one/models/customer_profile_search_query.rb +3 -3
- data/lib/talon_one/models/customer_profile_update_v2_response.rb +212 -0
- data/lib/talon_one/models/customer_session.rb +47 -13
- data/lib/talon_one/models/customer_session_v2.rb +103 -30
- data/lib/talon_one/models/{loyalty_points.rb → deduct_loyalty_points.rb} +28 -38
- data/lib/talon_one/models/deduct_loyalty_points_effect_props.rb +51 -11
- data/lib/talon_one/models/effect.rb +20 -9
- data/lib/talon_one/models/effect_entity.rb +23 -13
- data/lib/talon_one/models/email_entity.rb +2 -2
- data/lib/talon_one/models/endpoint.rb +212 -0
- data/lib/talon_one/models/entity.rb +4 -4
- data/lib/talon_one/models/entity_with_talang_visible_id.rb +2 -2
- data/lib/talon_one/models/environment.rb +24 -11
- data/lib/talon_one/models/error_effect_props.rb +2 -2
- data/lib/talon_one/models/error_response.rb +2 -2
- data/lib/talon_one/models/error_response_with_status.rb +228 -0
- data/lib/talon_one/models/error_source.rb +3 -3
- data/lib/talon_one/models/evaluable_campaign_ids.rb +209 -0
- data/lib/talon_one/models/event.rb +6 -6
- data/lib/talon_one/models/event_type.rb +11 -154
- data/lib/talon_one/models/event_v2.rb +264 -0
- data/lib/talon_one/models/expiring_points_notification_policy.rb +247 -0
- data/lib/talon_one/models/expiring_points_notification_trigger.rb +280 -0
- data/lib/talon_one/models/export.rb +8 -8
- data/lib/talon_one/models/feature_flag.rb +6 -6
- data/lib/talon_one/models/features_feed.rb +2 -2
- data/lib/talon_one/models/feed_notification.rb +9 -9
- data/lib/talon_one/models/frontend_state.rb +39 -0
- data/lib/talon_one/models/func_arg_def.rb +4 -4
- data/lib/talon_one/models/function_def.rb +2 -2
- data/lib/talon_one/models/giveaway.rb +29 -9
- data/lib/talon_one/models/giveaways_pool.rb +22 -7
- data/lib/talon_one/models/import.rb +7 -7
- data/lib/talon_one/models/import_entity.rb +2 -2
- data/lib/talon_one/models/inline_response200.rb +2 -2
- data/lib/talon_one/models/inline_response2001.rb +13 -13
- data/lib/talon_one/models/inline_response20010.rb +3 -3
- data/lib/talon_one/models/inline_response20011.rb +9 -13
- data/lib/talon_one/models/inline_response20012.rb +3 -3
- data/lib/talon_one/models/inline_response20013.rb +15 -13
- data/lib/talon_one/models/inline_response20014.rb +13 -9
- data/lib/talon_one/models/inline_response20015.rb +8 -3
- data/lib/talon_one/models/inline_response20016.rb +13 -9
- data/lib/talon_one/models/inline_response20017.rb +3 -3
- data/lib/talon_one/models/inline_response20018.rb +3 -3
- data/lib/talon_one/models/inline_response20019.rb +9 -13
- data/lib/talon_one/models/inline_response2002.rb +3 -3
- data/lib/talon_one/models/inline_response20020.rb +13 -9
- data/lib/talon_one/models/inline_response20021.rb +13 -9
- data/lib/talon_one/models/inline_response20022.rb +13 -9
- data/lib/talon_one/models/inline_response20023.rb +13 -13
- data/lib/talon_one/models/inline_response20024.rb +13 -13
- data/lib/talon_one/models/inline_response20025.rb +10 -15
- data/lib/talon_one/models/inline_response20026.rb +13 -13
- data/lib/talon_one/models/inline_response20027.rb +9 -13
- data/lib/talon_one/models/inline_response20028.rb +13 -9
- data/lib/talon_one/models/inline_response20029.rb +13 -9
- data/lib/talon_one/models/inline_response2003.rb +3 -3
- data/lib/talon_one/models/inline_response20030.rb +227 -0
- data/lib/talon_one/models/inline_response20031.rb +227 -0
- data/lib/talon_one/models/inline_response20032.rb +227 -0
- data/lib/talon_one/models/inline_response20033.rb +227 -0
- data/lib/talon_one/models/inline_response20034.rb +227 -0
- data/lib/talon_one/models/inline_response20035.rb +227 -0
- data/lib/talon_one/models/inline_response20036.rb +227 -0
- data/lib/talon_one/models/inline_response20037.rb +231 -0
- data/lib/talon_one/models/inline_response20038.rb +227 -0
- data/lib/talon_one/models/inline_response20039.rb +227 -0
- data/lib/talon_one/models/inline_response2004.rb +3 -3
- data/lib/talon_one/models/inline_response2005.rb +13 -13
- data/lib/talon_one/models/inline_response2006.rb +13 -13
- data/lib/talon_one/models/inline_response2007.rb +13 -13
- data/lib/talon_one/models/inline_response2008.rb +13 -13
- data/lib/talon_one/models/inline_response2009.rb +3 -3
- data/lib/talon_one/models/inline_response201.rb +2 -2
- data/lib/talon_one/models/integration_coupon.rb +569 -0
- data/lib/talon_one/models/integration_customer_session_response.rb +217 -0
- data/lib/talon_one/models/integration_entity.rb +23 -4
- data/lib/talon_one/models/integration_event.rb +3 -3
- data/lib/talon_one/models/integration_event_v2_request.rb +298 -0
- data/lib/talon_one/models/integration_profile_entity.rb +3 -3
- data/lib/talon_one/models/integration_request.rb +3 -3
- data/lib/talon_one/models/integration_state.rb +2 -2
- data/lib/talon_one/models/integration_state_v2.rb +30 -9
- data/lib/talon_one/models/inventory_coupon.rb +98 -13
- data/lib/talon_one/models/inventory_referral.rb +446 -0
- data/lib/talon_one/models/item_attribute.rb +243 -0
- data/lib/talon_one/models/ledger_entry.rb +11 -11
- data/lib/talon_one/models/ledger_info.rb +302 -0
- data/lib/talon_one/models/ledger_transaction_log_entry_integration_api.rb +474 -0
- data/lib/talon_one/models/library_attribute.rb +2 -2
- data/lib/talon_one/models/limit_config.rb +28 -6
- data/lib/talon_one/models/limit_counter.rb +398 -0
- data/lib/talon_one/models/login_params.rb +2 -2
- data/lib/talon_one/models/loyalty.rb +16 -4
- data/lib/talon_one/models/loyalty_balance.rb +238 -0
- data/lib/talon_one/models/{new_feature_flags.rb → loyalty_balances.rb} +22 -30
- data/lib/talon_one/models/loyalty_card.rb +419 -0
- data/lib/talon_one/models/loyalty_card_profile_registration.rb +246 -0
- data/lib/talon_one/models/loyalty_card_registration.rb +212 -0
- data/lib/talon_one/models/loyalty_dashboard_data.rb +331 -0
- data/lib/talon_one/models/loyalty_dashboard_points_breakdown.rb +225 -0
- data/lib/talon_one/models/loyalty_ledger.rb +4 -4
- data/lib/talon_one/models/loyalty_ledger_entry.rb +27 -13
- data/lib/talon_one/models/loyalty_ledger_transactions.rb +220 -0
- data/lib/talon_one/models/loyalty_membership.rb +2 -2
- data/lib/talon_one/models/loyalty_program.rb +143 -37
- data/lib/talon_one/models/loyalty_program_balance.rb +21 -11
- data/lib/talon_one/models/loyalty_program_entity.rb +2 -2
- data/lib/talon_one/models/loyalty_program_ledgers.rb +8 -8
- data/lib/talon_one/models/loyalty_program_transaction.rb +553 -0
- data/lib/talon_one/models/loyalty_statistics.rb +83 -10
- data/lib/talon_one/models/loyalty_sub_ledger.rb +26 -17
- data/lib/talon_one/models/loyalty_tier.rb +10 -10
- data/lib/talon_one/models/management_key.rb +317 -0
- data/lib/talon_one/models/manager_config.rb +2 -2
- data/lib/talon_one/models/meta.rb +2 -2
- data/lib/talon_one/models/model_return.rb +384 -0
- data/lib/talon_one/models/multi_application_entity.rb +2 -2
- data/lib/talon_one/models/multiple_attribute.rb +208 -0
- data/lib/talon_one/models/{feature_flags.rb → multiple_audiences.rb} +19 -34
- data/lib/talon_one/models/multiple_audiences_item.rb +354 -0
- data/lib/talon_one/models/multiple_customer_profile_integration_request.rb +2 -2
- data/lib/talon_one/models/multiple_customer_profile_integration_request_item.rb +23 -4
- data/lib/talon_one/models/multiple_customer_profile_integration_response_v2.rb +3 -3
- data/lib/talon_one/models/multiple_new_attribute.rb +208 -0
- data/lib/talon_one/models/multiple_new_audiences.rb +213 -0
- data/lib/talon_one/models/mutable_entity.rb +3 -3
- data/lib/talon_one/models/new_account.rb +2 -2
- data/lib/talon_one/models/new_account_sign_up.rb +2 -2
- data/lib/talon_one/models/new_additional_cost.rb +96 -8
- data/lib/talon_one/models/new_application.rb +50 -14
- data/lib/talon_one/models/new_application_api_key.rb +13 -13
- data/lib/talon_one/models/new_attribute.rb +97 -7
- data/lib/talon_one/models/new_audience.rb +56 -54
- data/lib/talon_one/models/new_base_notification.rb +226 -0
- data/lib/talon_one/models/new_campaign.rb +10 -10
- data/lib/talon_one/models/new_campaign_collection.rb +253 -0
- data/lib/talon_one/models/new_campaign_group.rb +4 -4
- data/lib/talon_one/models/new_campaign_set.rb +3 -3
- data/lib/talon_one/models/new_campaign_set_v2.rb +261 -0
- data/lib/talon_one/models/new_campaign_template.rb +418 -0
- data/lib/talon_one/models/new_catalog.rb +240 -0
- data/lib/talon_one/models/new_collection.rb +265 -0
- data/lib/talon_one/models/new_coupon_creation_job.rb +396 -0
- data/lib/talon_one/models/new_coupons.rb +87 -14
- data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +44 -10
- data/lib/talon_one/models/new_custom_effect.rb +74 -16
- data/lib/talon_one/models/new_customer_profile.rb +3 -3
- data/lib/talon_one/models/new_customer_session.rb +7 -7
- data/lib/talon_one/models/new_customer_session_v2.rb +38 -14
- data/lib/talon_one/models/new_event.rb +3 -3
- data/lib/talon_one/models/new_event_type.rb +9 -152
- data/lib/talon_one/models/new_giveaways_pool.rb +22 -7
- data/lib/talon_one/models/{update_loyalty_tier.rb → new_internal_audience.rb} +34 -39
- data/lib/talon_one/models/new_invitation.rb +5 -5
- data/lib/talon_one/models/new_invite_email.rb +2 -2
- data/lib/talon_one/models/new_loyalty_program.rb +128 -25
- data/lib/talon_one/models/new_loyalty_tier.rb +9 -9
- data/lib/talon_one/models/new_management_key.rb +332 -0
- data/lib/talon_one/models/new_multiple_audiences_item.rb +266 -0
- data/lib/talon_one/models/new_notification_webhook.rb +229 -0
- data/lib/talon_one/models/new_password.rb +2 -2
- data/lib/talon_one/models/new_password_email.rb +2 -2
- data/lib/talon_one/models/new_picklist.rb +263 -0
- data/lib/talon_one/models/new_referral.rb +24 -5
- data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +7 -7
- data/lib/talon_one/models/new_return.rb +214 -0
- data/lib/talon_one/models/new_role.rb +17 -17
- data/lib/talon_one/models/new_ruleset.rb +17 -5
- data/lib/talon_one/models/new_saml_connection.rb +2 -2
- data/lib/talon_one/models/new_template_def.rb +2 -2
- data/lib/talon_one/models/new_user.rb +2 -2
- data/lib/talon_one/models/new_webhook.rb +30 -9
- data/lib/talon_one/models/notification.rb +5 -5
- data/lib/talon_one/models/notification_webhook.rb +290 -0
- data/lib/talon_one/models/outgoing_integration_braze_policy.rb +227 -0
- data/lib/talon_one/models/outgoing_integration_configuration.rb +241 -0
- data/lib/talon_one/models/outgoing_integration_type.rb +357 -0
- data/lib/talon_one/models/outgoing_integration_types.rb +209 -0
- data/lib/talon_one/models/outgoing_integration_webhook_template.rb +328 -0
- data/lib/talon_one/models/outgoing_integration_webhook_templates.rb +209 -0
- data/lib/talon_one/models/patch_item_catalog_action.rb +245 -0
- data/lib/talon_one/models/patch_many_items_catalog_action.rb +230 -0
- data/lib/talon_one/models/picklist.rb +339 -0
- data/lib/talon_one/models/priority_position.rb +264 -0
- data/lib/talon_one/models/profile_audiences_changes.rb +2 -2
- data/lib/talon_one/models/redeem_referral_effect_props.rb +5 -5
- data/lib/talon_one/models/referral.rb +27 -8
- data/lib/talon_one/models/referral_constraints.rb +4 -4
- data/lib/talon_one/models/referral_created_effect_props.rb +3 -3
- data/lib/talon_one/models/referral_rejection_reason.rb +4 -4
- data/lib/talon_one/models/reject_coupon_effect_props.rb +7 -7
- data/lib/talon_one/models/reject_referral_effect_props.rb +7 -7
- data/lib/talon_one/models/remove_item_catalog_action.rb +213 -0
- data/lib/talon_one/models/remove_many_items_catalog_action.rb +210 -0
- data/lib/talon_one/models/reserve_coupon_effect_props.rb +243 -0
- data/lib/talon_one/models/return_integration_request.rb +246 -0
- data/lib/talon_one/models/returned_cart_item.rb +222 -0
- data/lib/talon_one/models/role.rb +10 -10
- data/lib/talon_one/models/role_assign.rb +4 -4
- data/lib/talon_one/models/role_membership.rb +4 -4
- data/lib/talon_one/models/role_v2.rb +248 -0
- data/lib/talon_one/models/role_v2_application_details.rb +227 -0
- data/lib/talon_one/models/role_v2_permission_set.rb +228 -0
- data/lib/talon_one/models/role_v2_permissions.rb +218 -0
- data/lib/talon_one/models/role_v2_permissions_roles.rb +230 -0
- data/lib/talon_one/models/rollback_added_loyalty_points_effect_props.rb +74 -10
- data/lib/talon_one/models/rollback_coupon_effect_props.rb +3 -3
- data/lib/talon_one/models/rollback_deducted_loyalty_points_effect_props.rb +57 -13
- data/lib/talon_one/models/rollback_discount_effect_props.rb +59 -9
- data/lib/talon_one/models/rollback_referral_effect_props.rb +3 -3
- data/lib/talon_one/models/rule.rb +23 -3
- data/lib/talon_one/models/rule_failure_reason.rb +15 -15
- data/lib/talon_one/models/ruleset.rb +40 -23
- data/lib/talon_one/models/saml_connection.rb +4 -4
- data/lib/talon_one/models/saml_connection_metadata.rb +2 -2
- data/lib/talon_one/models/saml_login_endpoint.rb +2 -2
- data/lib/talon_one/models/session.rb +4 -4
- data/lib/talon_one/models/set_discount_effect_props.rb +19 -9
- data/lib/talon_one/models/set_discount_per_additional_cost_effect_props.rb +268 -0
- data/lib/talon_one/models/set_discount_per_additional_cost_per_item_effect_props.rb +293 -0
- data/lib/talon_one/models/set_discount_per_item_effect_props.rb +71 -11
- data/lib/talon_one/models/show_bundle_metadata_effect_props.rb +6 -6
- data/lib/talon_one/models/show_notification_effect_props.rb +5 -5
- data/lib/talon_one/models/slot_def.rb +2 -2
- data/lib/talon_one/models/strikethrough_changed_item.rb +318 -0
- data/lib/talon_one/models/strikethrough_effect.rb +287 -0
- data/lib/talon_one/models/strikethrough_labeling_notification.rb +273 -0
- data/lib/talon_one/models/strikethrough_set_discount_per_item_effect_props.rb +228 -0
- data/lib/talon_one/models/strikethrough_trigger.rb +273 -0
- data/lib/talon_one/models/talang_attribute.rb +363 -0
- data/lib/talon_one/models/{application_customer_search.rb → talang_attribute_visibility.rb} +22 -30
- data/lib/talon_one/models/template_arg_def.rb +28 -8
- data/lib/talon_one/models/template_def.rb +4 -4
- data/lib/talon_one/models/template_limit_config.rb +308 -0
- data/lib/talon_one/models/tier.rb +227 -0
- data/lib/talon_one/models/transfer_loyalty_card.rb +231 -0
- data/lib/talon_one/models/trigger_webhook_effect_props.rb +4 -4
- data/lib/talon_one/models/update_account.rb +4 -4
- data/lib/talon_one/models/update_application.rb +52 -16
- data/lib/talon_one/models/update_attribute_effect_props.rb +4 -4
- data/lib/talon_one/models/update_audience.rb +3 -3
- data/lib/talon_one/models/update_campaign.rb +7 -7
- data/lib/talon_one/models/update_campaign_collection.rb +207 -0
- data/lib/talon_one/models/update_campaign_group.rb +4 -4
- data/lib/talon_one/models/update_campaign_template.rb +445 -0
- data/lib/talon_one/models/update_catalog.rb +229 -0
- data/lib/talon_one/models/update_collection.rb +219 -0
- data/lib/talon_one/models/update_coupon.rb +84 -11
- data/lib/talon_one/models/update_coupon_batch.rb +39 -10
- data/lib/talon_one/models/update_custom_effect.rb +73 -16
- data/lib/talon_one/models/update_loyalty_card.rb +212 -0
- data/lib/talon_one/models/update_loyalty_program.rb +57 -10
- data/lib/talon_one/models/update_picklist.rb +264 -0
- data/lib/talon_one/models/update_referral.rb +20 -5
- data/lib/talon_one/models/update_referral_batch.rb +276 -0
- data/lib/talon_one/models/update_role.rb +14 -14
- data/lib/talon_one/models/update_user.rb +5 -5
- data/lib/talon_one/models/update_user_latest_feed_timestamp.rb +4 -4
- data/lib/talon_one/models/user.rb +7 -7
- data/lib/talon_one/models/user_entity.rb +3 -3
- data/lib/talon_one/models/user_feed_notifications.rb +5 -5
- data/lib/talon_one/models/webhook.rb +33 -12
- data/lib/talon_one/models/webhook_activation_log_entry.rb +7 -7
- data/lib/talon_one/models/webhook_log_entry.rb +8 -8
- data/lib/talon_one/models/will_award_giveaway_effect_props.rb +21 -2
- data/lib/talon_one/version.rb +3 -3
- data/lib/talon_one.rb +153 -7
- data/spec/api/integration_api_spec.rb +249 -72
- data/spec/api/management_api_spec.rb +951 -580
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/accept_coupon_effect_props_spec.rb +2 -2
- data/spec/models/accept_referral_effect_props_spec.rb +2 -2
- data/spec/models/access_log_entry_spec.rb +2 -2
- data/spec/models/account_additional_cost_spec.rb +12 -2
- data/spec/models/account_analytics_spec.rb +8 -2
- data/spec/models/account_dashboard_statistic_api_calls_spec.rb +47 -0
- data/spec/models/account_dashboard_statistic_campaigns_spec.rb +47 -0
- data/spec/models/account_dashboard_statistic_discount_spec.rb +53 -0
- data/spec/models/account_dashboard_statistic_loyalty_points_spec.rb +47 -0
- data/spec/models/account_dashboard_statistic_referrals_spec.rb +47 -0
- data/spec/models/account_dashboard_statistic_revenue_spec.rb +53 -0
- data/spec/models/account_dashboard_statistic_spec.rb +71 -0
- data/spec/models/account_entity_spec.rb +2 -2
- data/spec/models/account_limits_spec.rb +2 -2
- data/spec/models/account_spec.rb +2 -2
- data/spec/models/add_free_item_effect_props_spec.rb +2 -2
- data/spec/models/add_item_catalog_action_spec.rb +59 -0
- data/spec/models/add_loyalty_points_effect_props_spec.rb +38 -2
- data/spec/models/add_loyalty_points_spec.rb +83 -0
- data/spec/models/added_deducted_points_notification_policy_spec.rb +51 -0
- data/spec/models/additional_cost_spec.rb +2 -2
- data/spec/models/api_error_spec.rb +2 -2
- data/spec/models/application_api_health_spec.rb +2 -2
- data/spec/models/application_api_key_spec.rb +3 -3
- data/spec/models/application_campaign_stats_spec.rb +2 -2
- data/spec/models/application_customer_entity_spec.rb +2 -2
- data/spec/models/application_customer_spec.rb +14 -2
- data/spec/models/application_entity_spec.rb +2 -2
- data/spec/models/application_event_spec.rb +2 -2
- data/spec/models/application_notification_spec.rb +41 -0
- data/spec/models/application_referee_spec.rb +2 -2
- data/spec/models/application_session_entity_spec.rb +2 -2
- data/spec/models/application_session_spec.rb +9 -3
- data/spec/models/application_spec.rb +18 -2
- data/spec/models/async_coupon_creation_response_spec.rb +41 -0
- data/spec/models/attribute_spec.rb +36 -2
- data/spec/models/attributes_mandatory_spec.rb +2 -2
- data/spec/models/attributes_settings_spec.rb +2 -2
- data/spec/models/audience_analytics_spec.rb +47 -0
- data/spec/models/audience_customer_spec.rb +113 -0
- data/spec/models/audience_integration_id_spec.rb +41 -0
- data/spec/models/audience_membership_spec.rb +2 -2
- data/spec/models/audience_spec.rb +26 -6
- data/spec/models/award_giveaway_effect_props_spec.rb +2 -2
- data/spec/models/base_loyalty_program_spec.rb +83 -0
- data/spec/models/base_notification_entity_spec.rb +41 -0
- data/spec/models/base_notification_spec.rb +53 -0
- data/spec/models/base_notification_webhook_spec.rb +65 -0
- data/spec/models/base_notifications_spec.rb +41 -0
- data/spec/models/base_saml_connection_spec.rb +2 -2
- data/spec/models/binding_spec.rb +8 -2
- data/spec/models/bulk_application_notification_spec.rb +47 -0
- data/spec/models/bulk_campaign_notification_spec.rb +47 -0
- data/spec/models/campaign_activation_request_spec.rb +41 -0
- data/spec/models/campaign_analytics_spec.rb +2 -2
- data/spec/models/campaign_collection_spec.rb +101 -0
- data/spec/models/campaign_collection_without_payload_spec.rb +95 -0
- data/spec/models/campaign_copy_spec.rb +2 -2
- data/spec/models/campaign_created_notification_spec.rb +53 -0
- data/spec/models/campaign_deleted_notification_spec.rb +47 -0
- data/spec/models/campaign_edited_notification_spec.rb +53 -0
- data/spec/models/campaign_entity_spec.rb +2 -2
- data/spec/models/campaign_group_entity_spec.rb +2 -2
- data/spec/models/campaign_group_spec.rb +2 -2
- data/spec/models/campaign_notification_spec.rb +41 -0
- data/spec/models/campaign_priorities_changed_notification_spec.rb +53 -0
- data/spec/models/campaign_priorities_v2_spec.rb +53 -0
- data/spec/models/campaign_ruleset_changed_notification_spec.rb +53 -0
- data/spec/models/campaign_search_spec.rb +2 -2
- data/spec/models/campaign_set_branch_node_spec.rb +2 -2
- data/spec/models/campaign_set_i_ds_spec.rb +41 -0
- data/spec/models/campaign_set_leaf_node_spec.rb +2 -2
- data/spec/models/campaign_set_node_spec.rb +2 -2
- data/spec/models/campaign_set_spec.rb +8 -2
- data/spec/models/campaign_set_v2_spec.rb +65 -0
- data/spec/models/campaign_spec.rb +33 -3
- data/spec/models/campaign_state_changed_notification_spec.rb +59 -0
- data/spec/models/campaign_template_collection_spec.rb +47 -0
- data/spec/models/campaign_template_params_spec.rb +63 -0
- data/spec/models/campaign_template_spec.rb +181 -0
- data/spec/models/card_ledger_transaction_log_entry_integration_api_spec.rb +117 -0
- data/spec/models/card_ledger_transaction_log_entry_spec.rb +117 -0
- data/spec/models/cart_item_spec.rb +26 -2
- data/spec/models/catalog_action_filter_spec.rb +57 -0
- data/spec/models/catalog_action_spec.rb +51 -0
- data/spec/models/catalog_item_spec.rb +77 -0
- data/spec/models/catalog_spec.rb +89 -0
- data/spec/models/catalog_sync_request_spec.rb +47 -0
- data/spec/models/catalogs_strikethrough_notification_policy_spec.rb +41 -0
- data/spec/models/change_profile_password_spec.rb +2 -2
- data/spec/models/change_spec.rb +8 -2
- data/spec/models/code_generator_settings_spec.rb +2 -2
- data/spec/models/collection_item_spec.rb +41 -0
- data/spec/models/collection_spec.rb +107 -0
- data/spec/models/collection_without_payload_spec.rb +101 -0
- data/spec/models/coupon_constraints_spec.rb +8 -2
- data/spec/models/coupon_created_effect_props_spec.rb +2 -2
- data/spec/models/coupon_creation_job_spec.rb +167 -0
- data/spec/models/coupon_limit_configs_spec.rb +41 -0
- data/spec/models/coupon_rejection_reason_spec.rb +3 -3
- data/spec/models/coupon_reservations_spec.rb +2 -2
- data/spec/models/coupon_search_spec.rb +2 -2
- data/spec/models/coupon_spec.rb +26 -2
- data/spec/models/coupon_value_spec.rb +2 -2
- data/spec/models/coupons_notification_policy_spec.rb +51 -0
- data/spec/models/create_application_api_key_spec.rb +3 -3
- data/spec/models/create_management_key_spec.rb +59 -0
- data/spec/models/create_template_campaign_response_spec.rb +53 -0
- data/spec/models/create_template_campaign_spec.rb +83 -0
- data/spec/models/custom_effect_props_spec.rb +33 -3
- data/spec/models/custom_effect_spec.rb +14 -8
- data/spec/models/customer_activity_report_spec.rb +2 -2
- data/spec/models/customer_analytics_spec.rb +2 -2
- data/spec/models/customer_inventory_spec.rb +2 -2
- data/spec/models/customer_profile_audience_request_item_spec.rb +2 -2
- data/spec/models/customer_profile_audience_request_spec.rb +2 -2
- data/spec/models/customer_profile_integration_request_v2_spec.rb +8 -2
- data/spec/models/customer_profile_search_query_spec.rb +2 -2
- data/spec/models/customer_profile_spec.rb +15 -3
- data/spec/models/customer_profile_update_v2_response_spec.rb +41 -0
- data/spec/models/customer_session_spec.rb +9 -3
- data/spec/models/customer_session_v2_spec.rb +28 -4
- data/spec/models/deduct_loyalty_points_effect_props_spec.rb +14 -2
- data/spec/models/deduct_loyalty_points_spec.rb +59 -0
- data/spec/models/effect_entity_spec.rb +8 -2
- data/spec/models/effect_spec.rb +8 -2
- data/spec/models/email_entity_spec.rb +2 -2
- data/spec/models/endpoint_spec.rb +41 -0
- data/spec/models/entity_spec.rb +2 -2
- data/spec/models/entity_with_talang_visible_id_spec.rb +2 -2
- data/spec/models/environment_spec.rb +9 -3
- data/spec/models/error_effect_props_spec.rb +2 -2
- data/spec/models/error_response_spec.rb +2 -2
- data/spec/models/error_response_with_status_spec.rb +53 -0
- data/spec/models/error_source_spec.rb +2 -2
- data/spec/models/evaluable_campaign_ids_spec.rb +41 -0
- data/spec/models/event_spec.rb +2 -2
- data/spec/models/event_type_spec.rb +2 -52
- data/spec/models/event_v2_spec.rb +59 -0
- data/spec/models/expiring_points_notification_policy_spec.rb +47 -0
- data/spec/models/expiring_points_notification_trigger_spec.rb +51 -0
- data/spec/models/export_spec.rb +3 -3
- data/spec/models/feature_flag_spec.rb +2 -2
- data/spec/models/features_feed_spec.rb +2 -2
- data/spec/models/feed_notification_spec.rb +2 -2
- data/spec/models/frontend_state_spec.rb +35 -0
- data/spec/models/func_arg_def_spec.rb +3 -3
- data/spec/models/function_def_spec.rb +2 -2
- data/spec/models/giveaway_spec.rb +14 -2
- data/spec/models/giveaways_pool_spec.rb +8 -2
- data/spec/models/import_entity_spec.rb +2 -2
- data/spec/models/import_spec.rb +2 -2
- data/spec/models/inline_response20010_spec.rb +2 -2
- data/spec/models/inline_response20011_spec.rb +2 -8
- data/spec/models/inline_response20012_spec.rb +2 -2
- data/spec/models/inline_response20013_spec.rb +3 -3
- data/spec/models/inline_response20014_spec.rb +8 -2
- data/spec/models/inline_response20015_spec.rb +2 -2
- data/spec/models/inline_response20016_spec.rb +8 -2
- data/spec/models/inline_response20017_spec.rb +2 -2
- data/spec/models/inline_response20018_spec.rb +2 -2
- data/spec/models/inline_response20019_spec.rb +2 -8
- data/spec/models/inline_response2001_spec.rb +3 -3
- data/spec/models/inline_response20020_spec.rb +8 -2
- data/spec/models/inline_response20021_spec.rb +8 -2
- data/spec/models/inline_response20022_spec.rb +8 -2
- data/spec/models/inline_response20023_spec.rb +3 -3
- data/spec/models/inline_response20024_spec.rb +3 -3
- data/spec/models/inline_response20025_spec.rb +3 -3
- data/spec/models/inline_response20026_spec.rb +3 -3
- data/spec/models/inline_response20027_spec.rb +2 -8
- data/spec/models/inline_response20028_spec.rb +8 -2
- data/spec/models/inline_response20029_spec.rb +8 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response20030_spec.rb +47 -0
- data/spec/models/inline_response20031_spec.rb +47 -0
- data/spec/models/inline_response20032_spec.rb +47 -0
- data/spec/models/inline_response20033_spec.rb +47 -0
- data/spec/models/inline_response20034_spec.rb +47 -0
- data/spec/models/inline_response20035_spec.rb +47 -0
- data/spec/models/inline_response20036_spec.rb +47 -0
- data/spec/models/inline_response20037_spec.rb +53 -0
- data/spec/models/inline_response20038_spec.rb +47 -0
- data/spec/models/inline_response20039_spec.rb +47 -0
- data/spec/models/inline_response2003_spec.rb +2 -2
- data/spec/models/inline_response2004_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +3 -3
- data/spec/models/inline_response2006_spec.rb +3 -3
- data/spec/models/inline_response2007_spec.rb +3 -3
- data/spec/models/inline_response2008_spec.rb +3 -3
- data/spec/models/inline_response2009_spec.rb +2 -2
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/inline_response201_spec.rb +2 -2
- data/spec/models/integration_coupon_spec.rb +167 -0
- data/spec/models/integration_customer_session_response_spec.rb +47 -0
- data/spec/models/integration_entity_spec.rb +2 -2
- data/spec/models/integration_event_spec.rb +2 -2
- data/spec/models/integration_event_v2_request_spec.rb +69 -0
- data/spec/models/integration_profile_entity_spec.rb +2 -2
- data/spec/models/integration_request_spec.rb +3 -3
- data/spec/models/integration_state_spec.rb +2 -2
- data/spec/models/integration_state_v2_spec.rb +14 -2
- data/spec/models/inventory_coupon_spec.rb +26 -2
- data/spec/models/inventory_referral_spec.rb +119 -0
- data/spec/models/item_attribute_spec.rb +53 -0
- data/spec/models/ledger_entry_spec.rb +2 -2
- data/spec/models/ledger_info_spec.rb +83 -0
- data/spec/models/ledger_transaction_log_entry_integration_api_spec.rb +111 -0
- data/spec/models/library_attribute_spec.rb +2 -2
- data/spec/models/limit_config_spec.rb +12 -2
- data/spec/models/limit_counter_spec.rb +125 -0
- data/spec/models/login_params_spec.rb +2 -2
- data/spec/models/loyalty_balance_spec.rb +59 -0
- data/spec/models/loyalty_balances_spec.rb +47 -0
- data/spec/models/loyalty_card_profile_registration_spec.rb +47 -0
- data/spec/models/loyalty_card_registration_spec.rb +41 -0
- data/spec/models/loyalty_card_spec.rb +107 -0
- data/spec/models/loyalty_dashboard_data_spec.rb +89 -0
- data/spec/models/loyalty_dashboard_points_breakdown_spec.rb +47 -0
- data/spec/models/loyalty_ledger_entry_spec.rb +14 -2
- data/spec/models/loyalty_ledger_spec.rb +2 -2
- data/spec/models/loyalty_ledger_transactions_spec.rb +47 -0
- data/spec/models/loyalty_membership_spec.rb +2 -2
- data/spec/models/loyalty_program_balance_spec.rb +8 -2
- data/spec/models/loyalty_program_entity_spec.rb +2 -2
- data/spec/models/loyalty_program_ledgers_spec.rb +2 -2
- data/spec/models/loyalty_program_spec.rb +39 -9
- data/spec/models/loyalty_program_transaction_spec.rb +141 -0
- data/spec/models/loyalty_spec.rb +8 -2
- data/spec/models/loyalty_statistics_spec.rb +32 -2
- data/spec/models/loyalty_sub_ledger_spec.rb +8 -2
- data/spec/models/loyalty_tier_spec.rb +2 -2
- data/spec/models/management_key_spec.rb +83 -0
- data/spec/models/manager_config_spec.rb +2 -2
- data/spec/models/meta_spec.rb +2 -2
- data/spec/models/model_return_spec.rb +101 -0
- data/spec/models/multi_application_entity_spec.rb +2 -2
- data/spec/models/multiple_attribute_spec.rb +41 -0
- data/spec/models/multiple_audiences_item_spec.rb +69 -0
- data/spec/models/multiple_audiences_spec.rb +47 -0
- data/spec/models/multiple_customer_profile_integration_request_item_spec.rb +2 -2
- data/spec/models/multiple_customer_profile_integration_request_spec.rb +2 -2
- data/spec/models/multiple_customer_profile_integration_response_v2_spec.rb +2 -2
- data/spec/models/multiple_new_attribute_spec.rb +41 -0
- data/spec/models/multiple_new_audiences_spec.rb +41 -0
- data/spec/models/mutable_entity_spec.rb +2 -2
- data/spec/models/new_account_sign_up_spec.rb +2 -2
- data/spec/models/new_account_spec.rb +2 -2
- data/spec/models/new_additional_cost_spec.rb +12 -2
- data/spec/models/new_application_api_key_spec.rb +3 -3
- data/spec/models/new_application_spec.rb +18 -2
- data/spec/models/new_attribute_spec.rb +30 -2
- data/spec/models/new_audience_spec.rb +26 -6
- data/spec/models/new_base_notification_spec.rb +47 -0
- data/spec/models/new_campaign_collection_spec.rb +47 -0
- data/spec/models/new_campaign_group_spec.rb +2 -2
- data/spec/models/new_campaign_set_spec.rb +2 -2
- data/spec/models/new_campaign_set_v2_spec.rb +53 -0
- data/spec/models/new_campaign_spec.rb +3 -3
- data/spec/models/new_campaign_template_spec.rb +127 -0
- data/spec/models/new_catalog_spec.rb +53 -0
- data/spec/models/new_collection_spec.rb +53 -0
- data/spec/models/new_coupon_creation_job_spec.rb +83 -0
- data/spec/models/new_coupons_for_multiple_recipients_spec.rb +8 -2
- data/spec/models/new_coupons_spec.rb +20 -2
- data/spec/models/new_custom_effect_spec.rb +14 -8
- data/spec/models/new_customer_profile_spec.rb +2 -2
- data/spec/models/new_customer_session_spec.rb +3 -3
- data/spec/models/new_customer_session_v2_spec.rb +15 -3
- data/spec/models/new_event_spec.rb +2 -2
- data/spec/models/new_event_type_spec.rb +2 -52
- data/spec/models/new_giveaways_pool_spec.rb +8 -2
- data/spec/models/new_internal_audience_spec.rb +53 -0
- data/spec/models/new_invitation_spec.rb +2 -2
- data/spec/models/new_invite_email_spec.rb +2 -2
- data/spec/models/new_loyalty_program_spec.rb +38 -8
- data/spec/models/new_loyalty_tier_spec.rb +2 -2
- data/spec/models/new_management_key_spec.rb +89 -0
- data/spec/models/new_multiple_audiences_item_spec.rb +47 -0
- data/spec/models/new_notification_webhook_spec.rb +47 -0
- data/spec/models/new_password_email_spec.rb +2 -2
- data/spec/models/new_password_spec.rb +2 -2
- data/spec/models/new_picklist_spec.rb +51 -0
- data/spec/models/new_referral_spec.rb +2 -2
- data/spec/models/new_referrals_for_multiple_advocates_spec.rb +2 -2
- data/spec/models/new_return_spec.rb +41 -0
- data/spec/models/new_role_spec.rb +3 -3
- data/spec/models/new_ruleset_spec.rb +8 -2
- data/spec/models/new_saml_connection_spec.rb +2 -2
- data/spec/models/new_template_def_spec.rb +2 -2
- data/spec/models/new_user_spec.rb +2 -2
- data/spec/models/new_webhook_spec.rb +2 -2
- data/spec/models/notification_spec.rb +2 -2
- data/spec/models/notification_webhook_spec.rb +71 -0
- data/spec/models/outgoing_integration_braze_policy_spec.rb +47 -0
- data/spec/models/outgoing_integration_configuration_spec.rb +53 -0
- data/spec/models/outgoing_integration_type_spec.rb +65 -0
- data/spec/models/outgoing_integration_types_spec.rb +41 -0
- data/spec/models/outgoing_integration_webhook_template_spec.rb +65 -0
- data/spec/models/outgoing_integration_webhook_templates_spec.rb +41 -0
- data/spec/models/patch_item_catalog_action_spec.rb +59 -0
- data/spec/models/patch_many_items_catalog_action_spec.rb +53 -0
- data/spec/models/picklist_spec.rb +87 -0
- data/spec/models/priority_position_spec.rb +51 -0
- data/spec/models/profile_audiences_changes_spec.rb +2 -2
- data/spec/models/redeem_referral_effect_props_spec.rb +2 -2
- data/spec/models/referral_constraints_spec.rb +2 -2
- data/spec/models/referral_created_effect_props_spec.rb +2 -2
- data/spec/models/referral_rejection_reason_spec.rb +3 -3
- data/spec/models/referral_spec.rb +2 -2
- data/spec/models/reject_coupon_effect_props_spec.rb +2 -2
- data/spec/models/reject_referral_effect_props_spec.rb +2 -2
- data/spec/models/remove_item_catalog_action_spec.rb +41 -0
- data/spec/models/remove_many_items_catalog_action_spec.rb +41 -0
- data/spec/models/reserve_coupon_effect_props_spec.rb +53 -0
- data/spec/models/return_integration_request_spec.rb +51 -0
- data/spec/models/returned_cart_item_spec.rb +47 -0
- data/spec/models/role_assign_spec.rb +2 -2
- data/spec/models/role_membership_spec.rb +2 -2
- data/spec/models/role_spec.rb +2 -2
- data/spec/models/role_v2_application_details_spec.rb +53 -0
- data/spec/models/role_v2_permission_set_spec.rb +47 -0
- data/spec/models/role_v2_permissions_roles_spec.rb +53 -0
- data/spec/models/role_v2_permissions_spec.rb +47 -0
- data/spec/models/role_v2_spec.rb +65 -0
- data/spec/models/rollback_added_loyalty_points_effect_props_spec.rb +20 -2
- data/spec/models/rollback_coupon_effect_props_spec.rb +2 -2
- data/spec/models/rollback_deducted_loyalty_points_effect_props_spec.rb +8 -2
- data/spec/models/rollback_discount_effect_props_spec.rb +32 -2
- data/spec/models/rollback_referral_effect_props_spec.rb +2 -2
- data/spec/models/rule_failure_reason_spec.rb +2 -2
- data/spec/models/rule_spec.rb +14 -2
- data/spec/models/ruleset_spec.rb +17 -5
- data/spec/models/saml_connection_metadata_spec.rb +2 -2
- data/spec/models/saml_connection_spec.rb +2 -2
- data/spec/models/saml_login_endpoint_spec.rb +2 -2
- data/spec/models/session_spec.rb +2 -2
- data/spec/models/set_discount_effect_props_spec.rb +8 -2
- data/spec/models/set_discount_per_additional_cost_effect_props_spec.rb +65 -0
- data/spec/models/set_discount_per_additional_cost_per_item_effect_props_spec.rb +77 -0
- data/spec/models/set_discount_per_item_effect_props_spec.rb +38 -2
- data/spec/models/show_bundle_metadata_effect_props_spec.rb +2 -2
- data/spec/models/show_notification_effect_props_spec.rb +2 -2
- data/spec/models/slot_def_spec.rb +2 -2
- data/spec/models/strikethrough_changed_item_spec.rb +77 -0
- data/spec/models/strikethrough_effect_spec.rb +71 -0
- data/spec/models/strikethrough_labeling_notification_spec.rb +65 -0
- data/spec/models/strikethrough_set_discount_per_item_effect_props_spec.rb +47 -0
- data/spec/models/strikethrough_trigger_spec.rb +65 -0
- data/spec/models/talang_attribute_spec.rb +97 -0
- data/spec/models/talang_attribute_visibility_spec.rb +47 -0
- data/spec/models/template_arg_def_spec.rb +15 -3
- data/spec/models/template_def_spec.rb +2 -2
- data/spec/models/template_limit_config_spec.rb +67 -0
- data/spec/models/tier_spec.rb +47 -0
- data/spec/models/transfer_loyalty_card_spec.rb +41 -0
- data/spec/models/trigger_webhook_effect_props_spec.rb +2 -2
- data/spec/models/update_account_spec.rb +2 -2
- data/spec/models/update_application_spec.rb +18 -2
- data/spec/models/update_attribute_effect_props_spec.rb +2 -2
- data/spec/models/update_audience_spec.rb +2 -2
- data/spec/models/update_campaign_collection_spec.rb +41 -0
- data/spec/models/update_campaign_group_spec.rb +2 -2
- data/spec/models/update_campaign_spec.rb +3 -3
- data/spec/models/update_campaign_template_spec.rb +139 -0
- data/spec/models/update_catalog_spec.rb +53 -0
- data/spec/models/update_collection_spec.rb +47 -0
- data/spec/models/update_coupon_batch_spec.rb +8 -2
- data/spec/models/update_coupon_spec.rb +20 -2
- data/spec/models/update_custom_effect_spec.rb +14 -8
- data/spec/models/update_loyalty_card_spec.rb +41 -0
- data/spec/models/update_loyalty_program_spec.rb +20 -2
- data/spec/models/update_picklist_spec.rb +51 -0
- data/spec/models/update_referral_batch_spec.rb +65 -0
- data/spec/models/update_referral_spec.rb +2 -2
- data/spec/models/update_role_spec.rb +3 -3
- data/spec/models/update_user_latest_feed_timestamp_spec.rb +2 -2
- data/spec/models/update_user_spec.rb +2 -2
- data/spec/models/user_entity_spec.rb +2 -2
- data/spec/models/user_feed_notifications_spec.rb +2 -2
- data/spec/models/user_spec.rb +2 -2
- data/spec/models/webhook_activation_log_entry_spec.rb +2 -2
- data/spec/models/webhook_log_entry_spec.rb +2 -2
- data/spec/models/webhook_spec.rb +2 -2
- data/spec/models/will_award_giveaway_effect_props_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- data/talon_one.gemspec +2 -2
- metadata +828 -243
- data/docs/ApplicationCustomerSearch.md +0 -21
- data/docs/FeatureFlags.md +0 -23
- data/docs/LoyaltyPoints.md +0 -25
- data/docs/NewFeatureFlags.md +0 -21
- data/docs/UpdateLoyaltyTier.md +0 -19
- data/spec/models/application_customer_search_spec.rb +0 -53
- data/spec/models/feature_flags_spec.rb +0 -59
- data/spec/models/loyalty_points_spec.rb +0 -65
- data/spec/models/new_feature_flags_spec.rb +0 -53
- data/spec/models/update_loyalty_tier_spec.rb +0 -47
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Talon.One API
|
3
3
|
|
4
|
-
#
|
4
|
+
#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}`
|
5
5
|
|
6
|
-
The version of the OpenAPI document:
|
6
|
+
The version of the OpenAPI document:
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -19,10 +19,74 @@ module TalonOne
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Create
|
23
|
-
#
|
24
|
-
# @param
|
25
|
-
# @param
|
22
|
+
# Create audience
|
23
|
+
# Create an audience. The audience can be created directly from scratch or can come from third party platforms. **Note:** Audiences can also be created from scratch via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/creating-audiences). To create an audience from an existing audience from a [technology partner](https://docs.talon.one/docs/dev/technology-partners/overview): 1. Set the `integration` property to `mparticle`, `segment` etc., depending on a third-party platform. 1. Set `integrationId` to the ID of this audience in a third-party platform. To create an audience from an existing audience in another platform: 1. Do not use the `integration` property. 1. Set `integrationId` to the ID of this audience in the 3rd-party platform. To create an audience from scratch: 1. Only set the `name` property. Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder.
|
24
|
+
# @param body [NewAudience] body
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Audience]
|
27
|
+
def create_audience_v2(body, opts = {})
|
28
|
+
data, _status_code, _headers = create_audience_v2_with_http_info(body, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create audience
|
33
|
+
# Create an audience. The audience can be created directly from scratch or can come from third party platforms. **Note:** Audiences can also be created from scratch via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/creating-audiences). To create an audience from an existing audience from a [technology partner](https://docs.talon.one/docs/dev/technology-partners/overview): 1. Set the `integration` property to `mparticle`, `segment` etc., depending on a third-party platform. 1. Set `integrationId` to the ID of this audience in a third-party platform. To create an audience from an existing audience in another platform: 1. Do not use the `integration` property. 1. Set `integrationId` to the ID of this audience in the 3rd-party platform. To create an audience from scratch: 1. Only set the `name` property. Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder.
|
34
|
+
# @param body [NewAudience] body
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Audience, Integer, Hash)>] Audience data, response status code and response headers
|
37
|
+
def create_audience_v2_with_http_info(body, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.create_audience_v2 ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'body' is set
|
42
|
+
if @api_client.config.client_side_validation && body.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.create_audience_v2"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/v2/audiences'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'Audience'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: IntegrationApi#create_audience_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Create coupon reservation
|
87
|
+
# Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
|
88
|
+
# @param coupon_value [String] The code of the coupon.
|
89
|
+
# @param body [CouponReservations] body
|
26
90
|
# @param [Hash] opts the optional parameters
|
27
91
|
# @return [Coupon]
|
28
92
|
def create_coupon_reservation(coupon_value, body, opts = {})
|
@@ -30,10 +94,10 @@ module TalonOne
|
|
30
94
|
data
|
31
95
|
end
|
32
96
|
|
33
|
-
# Create
|
34
|
-
#
|
35
|
-
# @param coupon_value [String] The
|
36
|
-
# @param body [CouponReservations]
|
97
|
+
# Create coupon reservation
|
98
|
+
# Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
|
99
|
+
# @param coupon_value [String] The code of the coupon.
|
100
|
+
# @param body [CouponReservations] body
|
37
101
|
# @param [Hash] opts the optional parameters
|
38
102
|
# @return [Array<(Coupon, Integer, Hash)>] Coupon data, response status code and response headers
|
39
103
|
def create_coupon_reservation_with_http_info(coupon_value, body, opts = {})
|
@@ -71,7 +135,7 @@ module TalonOne
|
|
71
135
|
return_type = opts[:return_type] || 'Coupon'
|
72
136
|
|
73
137
|
# auth_names
|
74
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
138
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
75
139
|
|
76
140
|
new_options = opts.merge(
|
77
141
|
:header_params => header_params,
|
@@ -89,9 +153,9 @@ module TalonOne
|
|
89
153
|
return data, status_code, headers
|
90
154
|
end
|
91
155
|
|
92
|
-
# Create
|
156
|
+
# Create referral code for an advocate
|
93
157
|
# Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the `campaignId` parameter, and will be associated with the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
|
94
|
-
# @param body [NewReferral]
|
158
|
+
# @param body [NewReferral] body
|
95
159
|
# @param [Hash] opts the optional parameters
|
96
160
|
# @return [Referral]
|
97
161
|
def create_referral(body, opts = {})
|
@@ -99,9 +163,9 @@ module TalonOne
|
|
99
163
|
data
|
100
164
|
end
|
101
165
|
|
102
|
-
# Create
|
166
|
+
# Create referral code for an advocate
|
103
167
|
# Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the `campaignId` parameter, and will be associated with the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
|
104
|
-
# @param body [NewReferral]
|
168
|
+
# @param body [NewReferral] body
|
105
169
|
# @param [Hash] opts the optional parameters
|
106
170
|
# @return [Array<(Referral, Integer, Hash)>] Referral data, response status code and response headers
|
107
171
|
def create_referral_with_http_info(body, opts = {})
|
@@ -135,7 +199,7 @@ module TalonOne
|
|
135
199
|
return_type = opts[:return_type] || 'Referral'
|
136
200
|
|
137
201
|
# auth_names
|
138
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
202
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
139
203
|
|
140
204
|
new_options = opts.merge(
|
141
205
|
:header_params => header_params,
|
@@ -155,9 +219,9 @@ module TalonOne
|
|
155
219
|
|
156
220
|
# Create referral codes for multiple advocates
|
157
221
|
# Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the `campaignId` parameter, and one referral code will be associated with one advocate using the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
|
158
|
-
# @param body [NewReferralsForMultipleAdvocates]
|
222
|
+
# @param body [NewReferralsForMultipleAdvocates] body
|
159
223
|
# @param [Hash] opts the optional parameters
|
160
|
-
# @option opts [String] :silent
|
224
|
+
# @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (default to 'yes')
|
161
225
|
# @return [InlineResponse201]
|
162
226
|
def create_referrals_for_multiple_advocates(body, opts = {})
|
163
227
|
data, _status_code, _headers = create_referrals_for_multiple_advocates_with_http_info(body, opts)
|
@@ -166,9 +230,9 @@ module TalonOne
|
|
166
230
|
|
167
231
|
# Create referral codes for multiple advocates
|
168
232
|
# Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the `campaignId` parameter, and one referral code will be associated with one advocate using the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
|
169
|
-
# @param body [NewReferralsForMultipleAdvocates]
|
233
|
+
# @param body [NewReferralsForMultipleAdvocates] body
|
170
234
|
# @param [Hash] opts the optional parameters
|
171
|
-
# @option opts [String] :silent
|
235
|
+
# @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles.
|
172
236
|
# @return [Array<(InlineResponse201, Integer, Hash)>] InlineResponse201 data, response status code and response headers
|
173
237
|
def create_referrals_for_multiple_advocates_with_http_info(body, opts = {})
|
174
238
|
if @api_client.config.debugging
|
@@ -202,7 +266,7 @@ module TalonOne
|
|
202
266
|
return_type = opts[:return_type] || 'InlineResponse201'
|
203
267
|
|
204
268
|
# auth_names
|
205
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
269
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
206
270
|
|
207
271
|
new_options = opts.merge(
|
208
272
|
:header_params => header_params,
|
@@ -220,10 +284,134 @@ module TalonOne
|
|
220
284
|
return data, status_code, headers
|
221
285
|
end
|
222
286
|
|
287
|
+
# Delete audience memberships
|
288
|
+
# Remove all members from this audience.
|
289
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @return [nil]
|
292
|
+
def delete_audience_memberships_v2(audience_id, opts = {})
|
293
|
+
delete_audience_memberships_v2_with_http_info(audience_id, opts)
|
294
|
+
nil
|
295
|
+
end
|
296
|
+
|
297
|
+
# Delete audience memberships
|
298
|
+
# Remove all members from this audience.
|
299
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
302
|
+
def delete_audience_memberships_v2_with_http_info(audience_id, opts = {})
|
303
|
+
if @api_client.config.debugging
|
304
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.delete_audience_memberships_v2 ...'
|
305
|
+
end
|
306
|
+
# verify the required parameter 'audience_id' is set
|
307
|
+
if @api_client.config.client_side_validation && audience_id.nil?
|
308
|
+
fail ArgumentError, "Missing the required parameter 'audience_id' when calling IntegrationApi.delete_audience_memberships_v2"
|
309
|
+
end
|
310
|
+
# resource path
|
311
|
+
local_var_path = '/v2/audiences/{audienceId}/memberships'.sub('{' + 'audienceId' + '}', CGI.escape(audience_id.to_s))
|
312
|
+
|
313
|
+
# query parameters
|
314
|
+
query_params = opts[:query_params] || {}
|
315
|
+
|
316
|
+
# header parameters
|
317
|
+
header_params = opts[:header_params] || {}
|
318
|
+
# HTTP header 'Accept' (if needed)
|
319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
320
|
+
|
321
|
+
# form parameters
|
322
|
+
form_params = opts[:form_params] || {}
|
323
|
+
|
324
|
+
# http body (model)
|
325
|
+
post_body = opts[:body]
|
326
|
+
|
327
|
+
# return_type
|
328
|
+
return_type = opts[:return_type]
|
329
|
+
|
330
|
+
# auth_names
|
331
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
332
|
+
|
333
|
+
new_options = opts.merge(
|
334
|
+
:header_params => header_params,
|
335
|
+
:query_params => query_params,
|
336
|
+
:form_params => form_params,
|
337
|
+
:body => post_body,
|
338
|
+
:auth_names => auth_names,
|
339
|
+
:return_type => return_type
|
340
|
+
)
|
341
|
+
|
342
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
343
|
+
if @api_client.config.debugging
|
344
|
+
@api_client.config.logger.debug "API called: IntegrationApi#delete_audience_memberships_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
345
|
+
end
|
346
|
+
return data, status_code, headers
|
347
|
+
end
|
348
|
+
|
349
|
+
# Delete audience
|
350
|
+
# Delete an audience created by a third-party integration. **Warning:** This endpoint also removes any associations recorded between a customer profile and this audience. **Note:** Audiences can also be deleted via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/managing-audiences#deleting-an-audience).
|
351
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
352
|
+
# @param [Hash] opts the optional parameters
|
353
|
+
# @return [nil]
|
354
|
+
def delete_audience_v2(audience_id, opts = {})
|
355
|
+
delete_audience_v2_with_http_info(audience_id, opts)
|
356
|
+
nil
|
357
|
+
end
|
358
|
+
|
359
|
+
# Delete audience
|
360
|
+
# Delete an audience created by a third-party integration. **Warning:** This endpoint also removes any associations recorded between a customer profile and this audience. **Note:** Audiences can also be deleted via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/managing-audiences#deleting-an-audience).
|
361
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
362
|
+
# @param [Hash] opts the optional parameters
|
363
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
364
|
+
def delete_audience_v2_with_http_info(audience_id, opts = {})
|
365
|
+
if @api_client.config.debugging
|
366
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.delete_audience_v2 ...'
|
367
|
+
end
|
368
|
+
# verify the required parameter 'audience_id' is set
|
369
|
+
if @api_client.config.client_side_validation && audience_id.nil?
|
370
|
+
fail ArgumentError, "Missing the required parameter 'audience_id' when calling IntegrationApi.delete_audience_v2"
|
371
|
+
end
|
372
|
+
# resource path
|
373
|
+
local_var_path = '/v2/audiences/{audienceId}'.sub('{' + 'audienceId' + '}', CGI.escape(audience_id.to_s))
|
374
|
+
|
375
|
+
# query parameters
|
376
|
+
query_params = opts[:query_params] || {}
|
377
|
+
|
378
|
+
# header parameters
|
379
|
+
header_params = opts[:header_params] || {}
|
380
|
+
# HTTP header 'Accept' (if needed)
|
381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
382
|
+
|
383
|
+
# form parameters
|
384
|
+
form_params = opts[:form_params] || {}
|
385
|
+
|
386
|
+
# http body (model)
|
387
|
+
post_body = opts[:body]
|
388
|
+
|
389
|
+
# return_type
|
390
|
+
return_type = opts[:return_type]
|
391
|
+
|
392
|
+
# auth_names
|
393
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
394
|
+
|
395
|
+
new_options = opts.merge(
|
396
|
+
:header_params => header_params,
|
397
|
+
:query_params => query_params,
|
398
|
+
:form_params => form_params,
|
399
|
+
:body => post_body,
|
400
|
+
:auth_names => auth_names,
|
401
|
+
:return_type => return_type
|
402
|
+
)
|
403
|
+
|
404
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug "API called: IntegrationApi#delete_audience_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
407
|
+
end
|
408
|
+
return data, status_code, headers
|
409
|
+
end
|
410
|
+
|
223
411
|
# Delete coupon reservations
|
224
|
-
#
|
225
|
-
# @param coupon_value [String] The
|
226
|
-
# @param body [CouponReservations]
|
412
|
+
# Remove all the coupon reservations from the provided customer profile integration IDs and the provided coupon code.
|
413
|
+
# @param coupon_value [String] The code of the coupon.
|
414
|
+
# @param body [CouponReservations] body
|
227
415
|
# @param [Hash] opts the optional parameters
|
228
416
|
# @return [nil]
|
229
417
|
def delete_coupon_reservation(coupon_value, body, opts = {})
|
@@ -232,9 +420,9 @@ module TalonOne
|
|
232
420
|
end
|
233
421
|
|
234
422
|
# Delete coupon reservations
|
235
|
-
#
|
236
|
-
# @param coupon_value [String] The
|
237
|
-
# @param body [CouponReservations]
|
423
|
+
# Remove all the coupon reservations from the provided customer profile integration IDs and the provided coupon code.
|
424
|
+
# @param coupon_value [String] The code of the coupon.
|
425
|
+
# @param body [CouponReservations] body
|
238
426
|
# @param [Hash] opts the optional parameters
|
239
427
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
240
428
|
def delete_coupon_reservation_with_http_info(coupon_value, body, opts = {})
|
@@ -257,6 +445,8 @@ module TalonOne
|
|
257
445
|
|
258
446
|
# header parameters
|
259
447
|
header_params = opts[:header_params] || {}
|
448
|
+
# HTTP header 'Accept' (if needed)
|
449
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
260
450
|
# HTTP header 'Content-Type'
|
261
451
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
262
452
|
|
@@ -270,7 +460,7 @@ module TalonOne
|
|
270
460
|
return_type = opts[:return_type]
|
271
461
|
|
272
462
|
# auth_names
|
273
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
463
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
274
464
|
|
275
465
|
new_options = opts.merge(
|
276
466
|
:header_params => header_params,
|
@@ -288,9 +478,9 @@ module TalonOne
|
|
288
478
|
return data, status_code, headers
|
289
479
|
end
|
290
480
|
|
291
|
-
# Delete
|
292
|
-
# Delete all attributes on the customer profile and on entities that reference
|
293
|
-
# @param integration_id [String] The
|
481
|
+
# Delete customer's personal data
|
482
|
+
# Delete all attributes on the customer profile and on entities that reference this customer profile. **Important:** To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
|
483
|
+
# @param integration_id [String] The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
|
294
484
|
# @param [Hash] opts the optional parameters
|
295
485
|
# @return [nil]
|
296
486
|
def delete_customer_data(integration_id, opts = {})
|
@@ -298,9 +488,9 @@ module TalonOne
|
|
298
488
|
nil
|
299
489
|
end
|
300
490
|
|
301
|
-
# Delete
|
302
|
-
# Delete all attributes on the customer profile and on entities that reference
|
303
|
-
# @param integration_id [String] The
|
491
|
+
# Delete customer's personal data
|
492
|
+
# Delete all attributes on the customer profile and on entities that reference this customer profile. **Important:** To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
|
493
|
+
# @param integration_id [String] The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
|
304
494
|
# @param [Hash] opts the optional parameters
|
305
495
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
306
496
|
def delete_customer_data_with_http_info(integration_id, opts = {})
|
@@ -319,6 +509,8 @@ module TalonOne
|
|
319
509
|
|
320
510
|
# header parameters
|
321
511
|
header_params = opts[:header_params] || {}
|
512
|
+
# HTTP header 'Accept' (if needed)
|
513
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
322
514
|
|
323
515
|
# form parameters
|
324
516
|
form_params = opts[:form_params] || {}
|
@@ -330,7 +522,7 @@ module TalonOne
|
|
330
522
|
return_type = opts[:return_type]
|
331
523
|
|
332
524
|
# auth_names
|
333
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
525
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
334
526
|
|
335
527
|
new_options = opts.merge(
|
336
528
|
:header_params => header_params,
|
@@ -348,30 +540,30 @@ module TalonOne
|
|
348
540
|
return data, status_code, headers
|
349
541
|
end
|
350
542
|
|
351
|
-
#
|
352
|
-
#
|
353
|
-
# @param integration_id [String] The
|
543
|
+
# List customer data
|
544
|
+
# Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons.
|
545
|
+
# @param integration_id [String] The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
|
354
546
|
# @param [Hash] opts the optional parameters
|
355
|
-
# @option opts [Boolean] :profile
|
356
|
-
# @option opts [Boolean] :referrals
|
357
|
-
# @option opts [Boolean] :coupons
|
358
|
-
# @option opts [Boolean] :loyalty
|
359
|
-
# @option opts [Boolean] :giveaways
|
547
|
+
# @option opts [Boolean] :profile Set to `true` to include customer profile information in the response.
|
548
|
+
# @option opts [Boolean] :referrals Set to `true` to include referral information in the response.
|
549
|
+
# @option opts [Boolean] :coupons Set to `true` to include coupon information in the response.
|
550
|
+
# @option opts [Boolean] :loyalty Set to `true` to include loyalty information in the response.
|
551
|
+
# @option opts [Boolean] :giveaways Set to `true` to include giveaways information in the response.
|
360
552
|
# @return [CustomerInventory]
|
361
553
|
def get_customer_inventory(integration_id, opts = {})
|
362
554
|
data, _status_code, _headers = get_customer_inventory_with_http_info(integration_id, opts)
|
363
555
|
data
|
364
556
|
end
|
365
557
|
|
366
|
-
#
|
367
|
-
#
|
368
|
-
# @param integration_id [String] The
|
558
|
+
# List customer data
|
559
|
+
# Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons.
|
560
|
+
# @param integration_id [String] The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint.
|
369
561
|
# @param [Hash] opts the optional parameters
|
370
|
-
# @option opts [Boolean] :profile
|
371
|
-
# @option opts [Boolean] :referrals
|
372
|
-
# @option opts [Boolean] :coupons
|
373
|
-
# @option opts [Boolean] :loyalty
|
374
|
-
# @option opts [Boolean] :giveaways
|
562
|
+
# @option opts [Boolean] :profile Set to `true` to include customer profile information in the response.
|
563
|
+
# @option opts [Boolean] :referrals Set to `true` to include referral information in the response.
|
564
|
+
# @option opts [Boolean] :coupons Set to `true` to include coupon information in the response.
|
565
|
+
# @option opts [Boolean] :loyalty Set to `true` to include loyalty information in the response.
|
566
|
+
# @option opts [Boolean] :giveaways Set to `true` to include giveaways information in the response.
|
375
567
|
# @return [Array<(CustomerInventory, Integer, Hash)>] CustomerInventory data, response status code and response headers
|
376
568
|
def get_customer_inventory_with_http_info(integration_id, opts = {})
|
377
569
|
if @api_client.config.debugging
|
@@ -407,7 +599,7 @@ module TalonOne
|
|
407
599
|
return_type = opts[:return_type] || 'CustomerInventory'
|
408
600
|
|
409
601
|
# auth_names
|
410
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
602
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
411
603
|
|
412
604
|
new_options = opts.merge(
|
413
605
|
:header_params => header_params,
|
@@ -425,31 +617,31 @@ module TalonOne
|
|
425
617
|
return data, status_code, headers
|
426
618
|
end
|
427
619
|
|
428
|
-
# Get
|
429
|
-
#
|
430
|
-
# @param
|
620
|
+
# Get customer session
|
621
|
+
# Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - [Update customer session](#tag/Customer-sessions/operation/updateCustomerSessionV2) - [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2)
|
622
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
431
623
|
# @param [Hash] opts the optional parameters
|
432
|
-
# @return [
|
433
|
-
def
|
434
|
-
data, _status_code, _headers =
|
624
|
+
# @return [IntegrationCustomerSessionResponse]
|
625
|
+
def get_customer_session(customer_session_id, opts = {})
|
626
|
+
data, _status_code, _headers = get_customer_session_with_http_info(customer_session_id, opts)
|
435
627
|
data
|
436
628
|
end
|
437
629
|
|
438
|
-
# Get
|
439
|
-
#
|
440
|
-
# @param
|
630
|
+
# Get customer session
|
631
|
+
# Get the details of the given customer session. You can get the same data via other endpoints that also apply changes, which can help you save requests and increase performance. See: - [Update customer session](#tag/Customer-sessions/operation/updateCustomerSessionV2) - [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2)
|
632
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
441
633
|
# @param [Hash] opts the optional parameters
|
442
|
-
# @return [Array<(
|
443
|
-
def
|
634
|
+
# @return [Array<(IntegrationCustomerSessionResponse, Integer, Hash)>] IntegrationCustomerSessionResponse data, response status code and response headers
|
635
|
+
def get_customer_session_with_http_info(customer_session_id, opts = {})
|
444
636
|
if @api_client.config.debugging
|
445
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
637
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_customer_session ...'
|
446
638
|
end
|
447
|
-
# verify the required parameter '
|
448
|
-
if @api_client.config.client_side_validation &&
|
449
|
-
fail ArgumentError, "Missing the required parameter '
|
639
|
+
# verify the required parameter 'customer_session_id' is set
|
640
|
+
if @api_client.config.client_side_validation && customer_session_id.nil?
|
641
|
+
fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.get_customer_session"
|
450
642
|
end
|
451
643
|
# resource path
|
452
|
-
local_var_path = '/
|
644
|
+
local_var_path = '/v2/customer_sessions/{customerSessionId}'.sub('{' + 'customerSessionId' + '}', CGI.escape(customer_session_id.to_s))
|
453
645
|
|
454
646
|
# query parameters
|
455
647
|
query_params = opts[:query_params] || {}
|
@@ -466,10 +658,10 @@ module TalonOne
|
|
466
658
|
post_body = opts[:body]
|
467
659
|
|
468
660
|
# return_type
|
469
|
-
return_type = opts[:return_type] || '
|
661
|
+
return_type = opts[:return_type] || 'IntegrationCustomerSessionResponse'
|
470
662
|
|
471
663
|
# auth_names
|
472
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
664
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
473
665
|
|
474
666
|
new_options = opts.merge(
|
475
667
|
:header_params => header_params,
|
@@ -482,61 +674,65 @@ module TalonOne
|
|
482
674
|
|
483
675
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
484
676
|
if @api_client.config.debugging
|
485
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
677
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_customer_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
486
678
|
end
|
487
679
|
return data, status_code, headers
|
488
680
|
end
|
489
681
|
|
490
|
-
#
|
491
|
-
#
|
492
|
-
# @param
|
682
|
+
# Get customer's loyalty points
|
683
|
+
# Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. **Note:** For more information, see [our documentation on managing loyalty data](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-data#obtaining-the-loyalty-balances-of-a-customer).
|
684
|
+
# @param loyalty_program_id [Integer] 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.
|
685
|
+
# @param integration_id [String] The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
|
493
686
|
# @param [Hash] opts the optional parameters
|
494
|
-
# @option opts [
|
495
|
-
# @return [
|
496
|
-
def
|
497
|
-
data, _status_code, _headers =
|
687
|
+
# @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string.
|
688
|
+
# @return [LoyaltyBalances]
|
689
|
+
def get_loyalty_balances(loyalty_program_id, integration_id, opts = {})
|
690
|
+
data, _status_code, _headers = get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts)
|
498
691
|
data
|
499
692
|
end
|
500
693
|
|
501
|
-
#
|
502
|
-
#
|
503
|
-
# @param
|
694
|
+
# Get customer's loyalty points
|
695
|
+
# Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. **Note:** For more information, see [our documentation on managing loyalty data](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-data#obtaining-the-loyalty-balances-of-a-customer).
|
696
|
+
# @param loyalty_program_id [Integer] 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.
|
697
|
+
# @param integration_id [String] The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
|
504
698
|
# @param [Hash] opts the optional parameters
|
505
|
-
# @option opts [
|
506
|
-
# @return [Array<(
|
507
|
-
def
|
699
|
+
# @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string.
|
700
|
+
# @return [Array<(LoyaltyBalances, Integer, Hash)>] LoyaltyBalances data, response status code and response headers
|
701
|
+
def get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts = {})
|
508
702
|
if @api_client.config.debugging
|
509
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
703
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_balances ...'
|
510
704
|
end
|
511
|
-
# verify the required parameter '
|
512
|
-
if @api_client.config.client_side_validation &&
|
513
|
-
fail ArgumentError, "Missing the required parameter '
|
705
|
+
# verify the required parameter 'loyalty_program_id' is set
|
706
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
707
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_balances"
|
708
|
+
end
|
709
|
+
# verify the required parameter 'integration_id' is set
|
710
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
711
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.get_loyalty_balances"
|
514
712
|
end
|
515
713
|
# resource path
|
516
|
-
local_var_path = '/v1/
|
714
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
|
517
715
|
|
518
716
|
# query parameters
|
519
717
|
query_params = opts[:query_params] || {}
|
520
|
-
query_params[:'
|
718
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
521
719
|
|
522
720
|
# header parameters
|
523
721
|
header_params = opts[:header_params] || {}
|
524
722
|
# HTTP header 'Accept' (if needed)
|
525
723
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
526
|
-
# HTTP header 'Content-Type'
|
527
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
528
724
|
|
529
725
|
# form parameters
|
530
726
|
form_params = opts[:form_params] || {}
|
531
727
|
|
532
728
|
# http body (model)
|
533
|
-
post_body = opts[:body]
|
729
|
+
post_body = opts[:body]
|
534
730
|
|
535
731
|
# return_type
|
536
|
-
return_type = opts[:return_type] || '
|
732
|
+
return_type = opts[:return_type] || 'LoyaltyBalances'
|
537
733
|
|
538
734
|
# auth_names
|
539
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
735
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
540
736
|
|
541
737
|
new_options = opts.merge(
|
542
738
|
:header_params => header_params,
|
@@ -547,69 +743,71 @@ module TalonOne
|
|
547
743
|
:return_type => return_type
|
548
744
|
)
|
549
745
|
|
550
|
-
data, status_code, headers = @api_client.call_api(:
|
746
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
551
747
|
if @api_client.config.debugging
|
552
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
748
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_loyalty_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
553
749
|
end
|
554
750
|
return data, status_code, headers
|
555
751
|
end
|
556
752
|
|
557
|
-
#
|
558
|
-
#
|
559
|
-
# @param
|
560
|
-
# @param
|
753
|
+
# Get loyalty balances for a loyalty card
|
754
|
+
# Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned.
|
755
|
+
# @param loyalty_program_id [Integer] 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.
|
756
|
+
# @param loyalty_card_identifier [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
561
757
|
# @param [Hash] opts the optional parameters
|
562
|
-
# @option opts [
|
563
|
-
# @return [
|
564
|
-
def
|
565
|
-
data, _status_code, _headers =
|
758
|
+
# @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string.
|
759
|
+
# @return [LoyaltyBalances]
|
760
|
+
def get_loyalty_card_balances(loyalty_program_id, loyalty_card_identifier, opts = {})
|
761
|
+
data, _status_code, _headers = get_loyalty_card_balances_with_http_info(loyalty_program_id, loyalty_card_identifier, opts)
|
566
762
|
data
|
567
763
|
end
|
568
764
|
|
569
|
-
#
|
570
|
-
#
|
571
|
-
# @param
|
572
|
-
# @param
|
765
|
+
# Get loyalty balances for a loyalty card
|
766
|
+
# Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned.
|
767
|
+
# @param loyalty_program_id [Integer] 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.
|
768
|
+
# @param loyalty_card_identifier [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
573
769
|
# @param [Hash] opts the optional parameters
|
574
|
-
# @option opts [
|
575
|
-
# @return [Array<(
|
576
|
-
def
|
770
|
+
# @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string.
|
771
|
+
# @return [Array<(LoyaltyBalances, Integer, Hash)>] LoyaltyBalances data, response status code and response headers
|
772
|
+
def get_loyalty_card_balances_with_http_info(loyalty_program_id, loyalty_card_identifier, opts = {})
|
577
773
|
if @api_client.config.debugging
|
578
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
774
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_card_balances ...'
|
579
775
|
end
|
580
|
-
# verify the required parameter '
|
581
|
-
if @api_client.config.client_side_validation &&
|
582
|
-
fail ArgumentError, "Missing the required parameter '
|
776
|
+
# verify the required parameter 'loyalty_program_id' is set
|
777
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
778
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_card_balances"
|
583
779
|
end
|
584
|
-
# verify the required parameter '
|
585
|
-
if @api_client.config.client_side_validation &&
|
586
|
-
fail ArgumentError, "Missing the required parameter '
|
780
|
+
# verify the required parameter 'loyalty_card_identifier' is set
|
781
|
+
if @api_client.config.client_side_validation && loyalty_card_identifier.nil?
|
782
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_identifier' when calling IntegrationApi.get_loyalty_card_balances"
|
783
|
+
end
|
784
|
+
if @api_client.config.client_side_validation && loyalty_card_identifier.to_s.length > 108
|
785
|
+
fail ArgumentError, 'invalid value for "loyalty_card_identifier" when calling IntegrationApi.get_loyalty_card_balances, the character length must be smaller than or equal to 108.'
|
587
786
|
end
|
787
|
+
|
588
788
|
# resource path
|
589
|
-
local_var_path = '/v1/
|
789
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardIdentifier}/balances'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardIdentifier' + '}', CGI.escape(loyalty_card_identifier.to_s))
|
590
790
|
|
591
791
|
# query parameters
|
592
792
|
query_params = opts[:query_params] || {}
|
593
|
-
query_params[:'
|
793
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
594
794
|
|
595
795
|
# header parameters
|
596
796
|
header_params = opts[:header_params] || {}
|
597
797
|
# HTTP header 'Accept' (if needed)
|
598
798
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
599
|
-
# HTTP header 'Content-Type'
|
600
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
601
799
|
|
602
800
|
# form parameters
|
603
801
|
form_params = opts[:form_params] || {}
|
604
802
|
|
605
803
|
# http body (model)
|
606
|
-
post_body = opts[:body]
|
804
|
+
post_body = opts[:body]
|
607
805
|
|
608
806
|
# return_type
|
609
|
-
return_type = opts[:return_type] || '
|
807
|
+
return_type = opts[:return_type] || 'LoyaltyBalances'
|
610
808
|
|
611
809
|
# auth_names
|
612
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
810
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
613
811
|
|
614
812
|
new_options = opts.merge(
|
615
813
|
:header_params => header_params,
|
@@ -620,55 +818,88 @@ module TalonOne
|
|
620
818
|
:return_type => return_type
|
621
819
|
)
|
622
820
|
|
623
|
-
data, status_code, headers = @api_client.call_api(:
|
821
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
624
822
|
if @api_client.config.debugging
|
625
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
823
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_loyalty_card_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
626
824
|
end
|
627
825
|
return data, status_code, headers
|
628
826
|
end
|
629
827
|
|
630
|
-
#
|
631
|
-
#
|
632
|
-
# @param
|
828
|
+
# Get loyalty card transaction logs
|
829
|
+
# Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
|
830
|
+
# @param loyalty_program_id [Integer] 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.
|
831
|
+
# @param loyalty_card_identifier [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
633
832
|
# @param [Hash] opts the optional parameters
|
634
|
-
# @
|
635
|
-
|
636
|
-
|
637
|
-
|
833
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
834
|
+
# @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
835
|
+
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
836
|
+
# @option opts [Integer] :page_size The number of items in this response. (default to 1000)
|
837
|
+
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
838
|
+
# @return [CardLedgerTransactionLogEntryIntegrationAPI]
|
839
|
+
def get_loyalty_card_transactions(loyalty_program_id, loyalty_card_identifier, opts = {})
|
840
|
+
data, _status_code, _headers = get_loyalty_card_transactions_with_http_info(loyalty_program_id, loyalty_card_identifier, opts)
|
841
|
+
data
|
638
842
|
end
|
639
843
|
|
640
|
-
#
|
641
|
-
#
|
642
|
-
# @param
|
844
|
+
# Get loyalty card transaction logs
|
845
|
+
# Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
|
846
|
+
# @param loyalty_program_id [Integer] 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.
|
847
|
+
# @param loyalty_card_identifier [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
643
848
|
# @param [Hash] opts the optional parameters
|
644
|
-
# @
|
645
|
-
|
849
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
850
|
+
# @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
851
|
+
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
852
|
+
# @option opts [Integer] :page_size The number of items in this response.
|
853
|
+
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
854
|
+
# @return [Array<(CardLedgerTransactionLogEntryIntegrationAPI, Integer, Hash)>] CardLedgerTransactionLogEntryIntegrationAPI data, response status code and response headers
|
855
|
+
def get_loyalty_card_transactions_with_http_info(loyalty_program_id, loyalty_card_identifier, opts = {})
|
646
856
|
if @api_client.config.debugging
|
647
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
857
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_card_transactions ...'
|
648
858
|
end
|
649
|
-
# verify the required parameter '
|
650
|
-
if @api_client.config.client_side_validation &&
|
651
|
-
fail ArgumentError, "Missing the required parameter '
|
859
|
+
# verify the required parameter 'loyalty_program_id' is set
|
860
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
861
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_card_transactions"
|
862
|
+
end
|
863
|
+
# verify the required parameter 'loyalty_card_identifier' is set
|
864
|
+
if @api_client.config.client_side_validation && loyalty_card_identifier.nil?
|
865
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_identifier' when calling IntegrationApi.get_loyalty_card_transactions"
|
866
|
+
end
|
867
|
+
if @api_client.config.client_side_validation && loyalty_card_identifier.to_s.length > 108
|
868
|
+
fail ArgumentError, 'invalid value for "loyalty_card_identifier" when calling IntegrationApi.get_loyalty_card_transactions, the character length must be smaller than or equal to 108.'
|
869
|
+
end
|
870
|
+
|
871
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
|
872
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_card_transactions, must be smaller than or equal to 1000.'
|
873
|
+
end
|
874
|
+
|
875
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
876
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_card_transactions, must be greater than or equal to 1.'
|
652
877
|
end
|
878
|
+
|
653
879
|
# resource path
|
654
|
-
local_var_path = '/
|
880
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardIdentifier}/transactions'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardIdentifier' + '}', CGI.escape(loyalty_card_identifier.to_s))
|
655
881
|
|
656
882
|
# query parameters
|
657
883
|
query_params = opts[:query_params] || {}
|
884
|
+
query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
|
885
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
886
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
887
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
888
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
658
889
|
|
659
890
|
# header parameters
|
660
891
|
header_params = opts[:header_params] || {}
|
661
|
-
# HTTP header '
|
662
|
-
header_params['
|
892
|
+
# HTTP header 'Accept' (if needed)
|
893
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
663
894
|
|
664
895
|
# form parameters
|
665
896
|
form_params = opts[:form_params] || {}
|
666
897
|
|
667
898
|
# http body (model)
|
668
|
-
post_body = opts[:body]
|
899
|
+
post_body = opts[:body]
|
669
900
|
|
670
901
|
# return_type
|
671
|
-
return_type = opts[:return_type]
|
902
|
+
return_type = opts[:return_type] || 'CardLedgerTransactionLogEntryIntegrationAPI'
|
672
903
|
|
673
904
|
# auth_names
|
674
905
|
auth_names = opts[:auth_names] || ['api_key_v1']
|
@@ -682,60 +913,217 @@ module TalonOne
|
|
682
913
|
:return_type => return_type
|
683
914
|
)
|
684
915
|
|
685
|
-
data, status_code, headers = @api_client.call_api(:
|
916
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
686
917
|
if @api_client.config.debugging
|
687
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
918
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_loyalty_card_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
688
919
|
end
|
689
920
|
return data, status_code, headers
|
690
921
|
end
|
691
922
|
|
692
|
-
#
|
693
|
-
#
|
694
|
-
# @param
|
695
|
-
# @param
|
923
|
+
# List customer's loyalty transactions
|
924
|
+
# Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date. If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. **Note:** To retrieve all loyalty program transaction logs in a given loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint.
|
925
|
+
# @param loyalty_program_id [Integer] 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.
|
926
|
+
# @param integration_id [String] The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
|
696
927
|
# @param [Hash] opts the optional parameters
|
697
|
-
# @option opts [
|
698
|
-
# @option opts [
|
699
|
-
# @
|
700
|
-
|
701
|
-
|
928
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
929
|
+
# @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
930
|
+
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
931
|
+
# @option opts [Integer] :page_size The number of items in this response. (default to 50)
|
932
|
+
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
933
|
+
# @return [InlineResponse2001]
|
934
|
+
def get_loyalty_program_profile_transactions(loyalty_program_id, integration_id, opts = {})
|
935
|
+
data, _status_code, _headers = get_loyalty_program_profile_transactions_with_http_info(loyalty_program_id, integration_id, opts)
|
702
936
|
data
|
703
937
|
end
|
704
938
|
|
705
|
-
#
|
706
|
-
#
|
707
|
-
# @param
|
708
|
-
# @param
|
939
|
+
# List customer's loyalty transactions
|
940
|
+
# Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date. If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. **Note:** To retrieve all loyalty program transaction logs in a given loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint.
|
941
|
+
# @param loyalty_program_id [Integer] 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.
|
942
|
+
# @param integration_id [String] The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
|
709
943
|
# @param [Hash] opts the optional parameters
|
710
|
-
# @option opts [
|
711
|
-
# @option opts [
|
712
|
-
# @
|
713
|
-
|
944
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
945
|
+
# @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
946
|
+
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
947
|
+
# @option opts [Integer] :page_size The number of items in this response.
|
948
|
+
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
949
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
950
|
+
def get_loyalty_program_profile_transactions_with_http_info(loyalty_program_id, integration_id, opts = {})
|
714
951
|
if @api_client.config.debugging
|
715
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
952
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_program_profile_transactions ...'
|
953
|
+
end
|
954
|
+
# verify the required parameter 'loyalty_program_id' is set
|
955
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
956
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_program_profile_transactions"
|
716
957
|
end
|
717
958
|
# verify the required parameter 'integration_id' is set
|
718
959
|
if @api_client.config.client_side_validation && integration_id.nil?
|
719
|
-
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.
|
960
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.get_loyalty_program_profile_transactions"
|
720
961
|
end
|
721
|
-
|
722
|
-
|
723
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_customer_profile_v2"
|
962
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
|
963
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_program_profile_transactions, must be smaller than or equal to 50.'
|
724
964
|
end
|
965
|
+
|
966
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
967
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_program_profile_transactions, must be greater than or equal to 1.'
|
968
|
+
end
|
969
|
+
|
725
970
|
# resource path
|
726
|
-
local_var_path = '/
|
971
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
|
727
972
|
|
728
973
|
# query parameters
|
729
974
|
query_params = opts[:query_params] || {}
|
730
|
-
query_params[:'
|
731
|
-
query_params[:'
|
975
|
+
query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
|
976
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
977
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
978
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
979
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
732
980
|
|
733
981
|
# header parameters
|
734
982
|
header_params = opts[:header_params] || {}
|
735
983
|
# HTTP header 'Accept' (if needed)
|
736
984
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
737
|
-
|
738
|
-
|
985
|
+
|
986
|
+
# form parameters
|
987
|
+
form_params = opts[:form_params] || {}
|
988
|
+
|
989
|
+
# http body (model)
|
990
|
+
post_body = opts[:body]
|
991
|
+
|
992
|
+
# return_type
|
993
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
994
|
+
|
995
|
+
# auth_names
|
996
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
997
|
+
|
998
|
+
new_options = opts.merge(
|
999
|
+
:header_params => header_params,
|
1000
|
+
:query_params => query_params,
|
1001
|
+
:form_params => form_params,
|
1002
|
+
:body => post_body,
|
1003
|
+
:auth_names => auth_names,
|
1004
|
+
:return_type => return_type
|
1005
|
+
)
|
1006
|
+
|
1007
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1008
|
+
if @api_client.config.debugging
|
1009
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_loyalty_program_profile_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1010
|
+
end
|
1011
|
+
return data, status_code, headers
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# List customers that have this coupon reserved
|
1015
|
+
# Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints.
|
1016
|
+
# @param coupon_value [String] The code of the coupon.
|
1017
|
+
# @param [Hash] opts the optional parameters
|
1018
|
+
# @return [InlineResponse200]
|
1019
|
+
def get_reserved_customers(coupon_value, opts = {})
|
1020
|
+
data, _status_code, _headers = get_reserved_customers_with_http_info(coupon_value, opts)
|
1021
|
+
data
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
# List customers that have this coupon reserved
|
1025
|
+
# Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints.
|
1026
|
+
# @param coupon_value [String] The code of the coupon.
|
1027
|
+
# @param [Hash] opts the optional parameters
|
1028
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
1029
|
+
def get_reserved_customers_with_http_info(coupon_value, opts = {})
|
1030
|
+
if @api_client.config.debugging
|
1031
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_reserved_customers ...'
|
1032
|
+
end
|
1033
|
+
# verify the required parameter 'coupon_value' is set
|
1034
|
+
if @api_client.config.client_side_validation && coupon_value.nil?
|
1035
|
+
fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.get_reserved_customers"
|
1036
|
+
end
|
1037
|
+
# resource path
|
1038
|
+
local_var_path = '/v1/coupon_reservations/customerprofiles/{couponValue}'.sub('{' + 'couponValue' + '}', CGI.escape(coupon_value.to_s))
|
1039
|
+
|
1040
|
+
# query parameters
|
1041
|
+
query_params = opts[:query_params] || {}
|
1042
|
+
|
1043
|
+
# header parameters
|
1044
|
+
header_params = opts[:header_params] || {}
|
1045
|
+
# HTTP header 'Accept' (if needed)
|
1046
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1047
|
+
|
1048
|
+
# form parameters
|
1049
|
+
form_params = opts[:form_params] || {}
|
1050
|
+
|
1051
|
+
# http body (model)
|
1052
|
+
post_body = opts[:body]
|
1053
|
+
|
1054
|
+
# return_type
|
1055
|
+
return_type = opts[:return_type] || 'InlineResponse200'
|
1056
|
+
|
1057
|
+
# auth_names
|
1058
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1059
|
+
|
1060
|
+
new_options = opts.merge(
|
1061
|
+
:header_params => header_params,
|
1062
|
+
:query_params => query_params,
|
1063
|
+
:form_params => form_params,
|
1064
|
+
:body => post_body,
|
1065
|
+
:auth_names => auth_names,
|
1066
|
+
:return_type => return_type
|
1067
|
+
)
|
1068
|
+
|
1069
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1070
|
+
if @api_client.config.debugging
|
1071
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_reserved_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1072
|
+
end
|
1073
|
+
return data, status_code, headers
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# Link customer profile to loyalty card
|
1077
|
+
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/creating-loyalty-programs#creating-card-based-loyalty-programs) allows.
|
1078
|
+
# @param loyalty_program_id [Integer] 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.
|
1079
|
+
# @param loyalty_card_identifier [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
1080
|
+
# @param body [LoyaltyCardRegistration] body
|
1081
|
+
# @param [Hash] opts the optional parameters
|
1082
|
+
# @return [LoyaltyCard]
|
1083
|
+
def link_loyalty_card_to_profile(loyalty_program_id, loyalty_card_identifier, body, opts = {})
|
1084
|
+
data, _status_code, _headers = link_loyalty_card_to_profile_with_http_info(loyalty_program_id, loyalty_card_identifier, body, opts)
|
1085
|
+
data
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
# Link customer profile to loyalty card
|
1089
|
+
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/creating-loyalty-programs#creating-card-based-loyalty-programs) allows.
|
1090
|
+
# @param loyalty_program_id [Integer] 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.
|
1091
|
+
# @param loyalty_card_identifier [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
1092
|
+
# @param body [LoyaltyCardRegistration] body
|
1093
|
+
# @param [Hash] opts the optional parameters
|
1094
|
+
# @return [Array<(LoyaltyCard, Integer, Hash)>] LoyaltyCard data, response status code and response headers
|
1095
|
+
def link_loyalty_card_to_profile_with_http_info(loyalty_program_id, loyalty_card_identifier, body, opts = {})
|
1096
|
+
if @api_client.config.debugging
|
1097
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.link_loyalty_card_to_profile ...'
|
1098
|
+
end
|
1099
|
+
# verify the required parameter 'loyalty_program_id' is set
|
1100
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
1101
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.link_loyalty_card_to_profile"
|
1102
|
+
end
|
1103
|
+
# verify the required parameter 'loyalty_card_identifier' is set
|
1104
|
+
if @api_client.config.client_side_validation && loyalty_card_identifier.nil?
|
1105
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_identifier' when calling IntegrationApi.link_loyalty_card_to_profile"
|
1106
|
+
end
|
1107
|
+
if @api_client.config.client_side_validation && loyalty_card_identifier.to_s.length > 108
|
1108
|
+
fail ArgumentError, 'invalid value for "loyalty_card_identifier" when calling IntegrationApi.link_loyalty_card_to_profile, the character length must be smaller than or equal to 108.'
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
# verify the required parameter 'body' is set
|
1112
|
+
if @api_client.config.client_side_validation && body.nil?
|
1113
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.link_loyalty_card_to_profile"
|
1114
|
+
end
|
1115
|
+
# resource path
|
1116
|
+
local_var_path = '/v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardIdentifier}/link_profile'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardIdentifier' + '}', CGI.escape(loyalty_card_identifier.to_s))
|
1117
|
+
|
1118
|
+
# query parameters
|
1119
|
+
query_params = opts[:query_params] || {}
|
1120
|
+
|
1121
|
+
# header parameters
|
1122
|
+
header_params = opts[:header_params] || {}
|
1123
|
+
# HTTP header 'Accept' (if needed)
|
1124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1125
|
+
# HTTP header 'Content-Type'
|
1126
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
739
1127
|
|
740
1128
|
# form parameters
|
741
1129
|
form_params = opts[:form_params] || {}
|
@@ -743,6 +1131,68 @@ module TalonOne
|
|
743
1131
|
# http body (model)
|
744
1132
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
745
1133
|
|
1134
|
+
# return_type
|
1135
|
+
return_type = opts[:return_type] || 'LoyaltyCard'
|
1136
|
+
|
1137
|
+
# auth_names
|
1138
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1139
|
+
|
1140
|
+
new_options = opts.merge(
|
1141
|
+
:header_params => header_params,
|
1142
|
+
:query_params => query_params,
|
1143
|
+
:form_params => form_params,
|
1144
|
+
:body => post_body,
|
1145
|
+
:auth_names => auth_names,
|
1146
|
+
:return_type => return_type
|
1147
|
+
)
|
1148
|
+
|
1149
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1150
|
+
if @api_client.config.debugging
|
1151
|
+
@api_client.config.logger.debug "API called: IntegrationApi#link_loyalty_card_to_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1152
|
+
end
|
1153
|
+
return data, status_code, headers
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
# Reopen customer session
|
1157
|
+
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below. <details> <summary><strong>Effects and budgets unimpacted by a session reopening</strong></summary> <div> <p>The following effects and budgets are left the way they were once the session was originally closed:</p> <ul> <li>Add free item effect</li> <li>Any <strong>not pending</strong> pending loyalty points.</li> <li>Award giveaway</li> <li>Coupon and referral creation</li> <li>Coupon reservation</li> <li>Custom effect</li> <li>Update attribute value</li> <li>Update cart item attribute value</li> </ul> </div> <p>To see an example of roll back, see the <a href=\"https://docs.talon.one/docs/dev/tutorials/rolling-back-effects\">Cancelling a session with campaign budgets tutorial</a>.</p> </details> **Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one.
|
1158
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1159
|
+
# @param [Hash] opts the optional parameters
|
1160
|
+
# @return [IntegrationStateV2]
|
1161
|
+
def reopen_customer_session(customer_session_id, opts = {})
|
1162
|
+
data, _status_code, _headers = reopen_customer_session_with_http_info(customer_session_id, opts)
|
1163
|
+
data
|
1164
|
+
end
|
1165
|
+
|
1166
|
+
# Reopen customer session
|
1167
|
+
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below. <details> <summary><strong>Effects and budgets unimpacted by a session reopening</strong></summary> <div> <p>The following effects and budgets are left the way they were once the session was originally closed:</p> <ul> <li>Add free item effect</li> <li>Any <strong>not pending</strong> pending loyalty points.</li> <li>Award giveaway</li> <li>Coupon and referral creation</li> <li>Coupon reservation</li> <li>Custom effect</li> <li>Update attribute value</li> <li>Update cart item attribute value</li> </ul> </div> <p>To see an example of roll back, see the <a href=\"https://docs.talon.one/docs/dev/tutorials/rolling-back-effects\">Cancelling a session with campaign budgets tutorial</a>.</p> </details> **Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one.
|
1168
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1169
|
+
# @param [Hash] opts the optional parameters
|
1170
|
+
# @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers
|
1171
|
+
def reopen_customer_session_with_http_info(customer_session_id, opts = {})
|
1172
|
+
if @api_client.config.debugging
|
1173
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.reopen_customer_session ...'
|
1174
|
+
end
|
1175
|
+
# verify the required parameter 'customer_session_id' is set
|
1176
|
+
if @api_client.config.client_side_validation && customer_session_id.nil?
|
1177
|
+
fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.reopen_customer_session"
|
1178
|
+
end
|
1179
|
+
# resource path
|
1180
|
+
local_var_path = '/v2/customer_sessions/{customerSessionId}/reopen'.sub('{' + 'customerSessionId' + '}', CGI.escape(customer_session_id.to_s))
|
1181
|
+
|
1182
|
+
# query parameters
|
1183
|
+
query_params = opts[:query_params] || {}
|
1184
|
+
|
1185
|
+
# header parameters
|
1186
|
+
header_params = opts[:header_params] || {}
|
1187
|
+
# HTTP header 'Accept' (if needed)
|
1188
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1189
|
+
|
1190
|
+
# form parameters
|
1191
|
+
form_params = opts[:form_params] || {}
|
1192
|
+
|
1193
|
+
# http body (model)
|
1194
|
+
post_body = opts[:body]
|
1195
|
+
|
746
1196
|
# return_type
|
747
1197
|
return_type = opts[:return_type] || 'IntegrationStateV2'
|
748
1198
|
|
@@ -760,42 +1210,48 @@ module TalonOne
|
|
760
1210
|
|
761
1211
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
762
1212
|
if @api_client.config.debugging
|
763
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
1213
|
+
@api_client.config.logger.debug "API called: IntegrationApi#reopen_customer_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
764
1214
|
end
|
765
1215
|
return data, status_code, headers
|
766
1216
|
end
|
767
1217
|
|
768
|
-
#
|
769
|
-
#
|
770
|
-
# @param
|
1218
|
+
# Return cart items
|
1219
|
+
# Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. Its behavior depends on whether [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled for the Application. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session).
|
1220
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1221
|
+
# @param body [ReturnIntegrationRequest] body
|
771
1222
|
# @param [Hash] opts the optional parameters
|
772
|
-
# @option opts [
|
773
|
-
# @return [
|
774
|
-
def
|
775
|
-
data, _status_code, _headers =
|
1223
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1224
|
+
# @return [IntegrationStateV2]
|
1225
|
+
def return_cart_items(customer_session_id, body, opts = {})
|
1226
|
+
data, _status_code, _headers = return_cart_items_with_http_info(customer_session_id, body, opts)
|
776
1227
|
data
|
777
1228
|
end
|
778
1229
|
|
779
|
-
#
|
780
|
-
#
|
781
|
-
# @param
|
1230
|
+
# Return cart items
|
1231
|
+
# Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. Its behavior depends on whether [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled for the Application. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session).
|
1232
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1233
|
+
# @param body [ReturnIntegrationRequest] body
|
782
1234
|
# @param [Hash] opts the optional parameters
|
783
|
-
# @option opts [
|
784
|
-
# @return [Array<(
|
785
|
-
def
|
1235
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1236
|
+
# @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers
|
1237
|
+
def return_cart_items_with_http_info(customer_session_id, body, opts = {})
|
786
1238
|
if @api_client.config.debugging
|
787
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
1239
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.return_cart_items ...'
|
1240
|
+
end
|
1241
|
+
# verify the required parameter 'customer_session_id' is set
|
1242
|
+
if @api_client.config.client_side_validation && customer_session_id.nil?
|
1243
|
+
fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.return_cart_items"
|
788
1244
|
end
|
789
1245
|
# verify the required parameter 'body' is set
|
790
1246
|
if @api_client.config.client_side_validation && body.nil?
|
791
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.
|
1247
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.return_cart_items"
|
792
1248
|
end
|
793
1249
|
# resource path
|
794
|
-
local_var_path = '/v2/
|
1250
|
+
local_var_path = '/v2/customer_sessions/{customerSessionId}/returns'.sub('{' + 'customerSessionId' + '}', CGI.escape(customer_session_id.to_s))
|
795
1251
|
|
796
1252
|
# query parameters
|
797
1253
|
query_params = opts[:query_params] || {}
|
798
|
-
query_params[:'
|
1254
|
+
query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].nil?
|
799
1255
|
|
800
1256
|
# header parameters
|
801
1257
|
header_params = opts[:header_params] || {}
|
@@ -811,7 +1267,77 @@ module TalonOne
|
|
811
1267
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
812
1268
|
|
813
1269
|
# return_type
|
814
|
-
return_type = opts[:return_type] || '
|
1270
|
+
return_type = opts[:return_type] || 'IntegrationStateV2'
|
1271
|
+
|
1272
|
+
# auth_names
|
1273
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1274
|
+
|
1275
|
+
new_options = opts.merge(
|
1276
|
+
:header_params => header_params,
|
1277
|
+
:query_params => query_params,
|
1278
|
+
:form_params => form_params,
|
1279
|
+
:body => post_body,
|
1280
|
+
:auth_names => auth_names,
|
1281
|
+
:return_type => return_type
|
1282
|
+
)
|
1283
|
+
|
1284
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1285
|
+
if @api_client.config.debugging
|
1286
|
+
@api_client.config.logger.debug "API called: IntegrationApi#return_cart_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1287
|
+
end
|
1288
|
+
return data, status_code, headers
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# Sync cart item catalog
|
1292
|
+
# Perform one or more of the following sync actions on this cart item catalog, up to 1000 actions: - Add an item to the catalog. - Edit the attributes of an item in the catalog. - Edit the attributes of more than one item in the catalog. - Remove an item from the catalog. - Remove more than one item from the catalog. **Note:** For more information, see [our documentation on managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs#displaying-the-details-and-content-of-a-catalog) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: <details> <summary><strong>Adding an item to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoe\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100 }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of an item in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\" }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of several items at once</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing an item from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ``` </div> </details> <details> <summary><strong>Removing several items from the catalog at once</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing shoes of sizes above 45 from the catalog</strong></summary> <div> <p> Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:</p> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details>
|
1293
|
+
# @param catalog_id [Integer] The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.
|
1294
|
+
# @param body [CatalogSyncRequest] body
|
1295
|
+
# @param [Hash] opts the optional parameters
|
1296
|
+
# @return [Catalog]
|
1297
|
+
def sync_catalog(catalog_id, body, opts = {})
|
1298
|
+
data, _status_code, _headers = sync_catalog_with_http_info(catalog_id, body, opts)
|
1299
|
+
data
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
# Sync cart item catalog
|
1303
|
+
# Perform one or more of the following sync actions on this cart item catalog, up to 1000 actions: - Add an item to the catalog. - Edit the attributes of an item in the catalog. - Edit the attributes of more than one item in the catalog. - Remove an item from the catalog. - Remove more than one item from the catalog. **Note:** For more information, see [our documentation on managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs#displaying-the-details-and-content-of-a-catalog) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action: <details> <summary><strong>Adding an item to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoe\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100 }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of an item in the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\" }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of several items at once</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing an item from the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ``` </div> </details> <details> <summary><strong>Removing several items from the catalog at once</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details> <details> <summary><strong>Removing shoes of sizes above 45 from the catalog</strong></summary> <div> <p> Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:</p> ```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ``` </div> </details>
|
1304
|
+
# @param catalog_id [Integer] The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**.
|
1305
|
+
# @param body [CatalogSyncRequest] body
|
1306
|
+
# @param [Hash] opts the optional parameters
|
1307
|
+
# @return [Array<(Catalog, Integer, Hash)>] Catalog data, response status code and response headers
|
1308
|
+
def sync_catalog_with_http_info(catalog_id, body, opts = {})
|
1309
|
+
if @api_client.config.debugging
|
1310
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.sync_catalog ...'
|
1311
|
+
end
|
1312
|
+
# verify the required parameter 'catalog_id' is set
|
1313
|
+
if @api_client.config.client_side_validation && catalog_id.nil?
|
1314
|
+
fail ArgumentError, "Missing the required parameter 'catalog_id' when calling IntegrationApi.sync_catalog"
|
1315
|
+
end
|
1316
|
+
# verify the required parameter 'body' is set
|
1317
|
+
if @api_client.config.client_side_validation && body.nil?
|
1318
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.sync_catalog"
|
1319
|
+
end
|
1320
|
+
# resource path
|
1321
|
+
local_var_path = '/v1/catalogs/{catalogId}/sync'.sub('{' + 'catalogId' + '}', CGI.escape(catalog_id.to_s))
|
1322
|
+
|
1323
|
+
# query parameters
|
1324
|
+
query_params = opts[:query_params] || {}
|
1325
|
+
|
1326
|
+
# header parameters
|
1327
|
+
header_params = opts[:header_params] || {}
|
1328
|
+
# HTTP header 'Accept' (if needed)
|
1329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1330
|
+
# HTTP header 'Content-Type'
|
1331
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1332
|
+
|
1333
|
+
# form parameters
|
1334
|
+
form_params = opts[:form_params] || {}
|
1335
|
+
|
1336
|
+
# http body (model)
|
1337
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1338
|
+
|
1339
|
+
# return_type
|
1340
|
+
return_type = opts[:return_type] || 'Catalog'
|
815
1341
|
|
816
1342
|
# auth_names
|
817
1343
|
auth_names = opts[:auth_names] || ['api_key_v1']
|
@@ -827,44 +1353,38 @@ module TalonOne
|
|
827
1353
|
|
828
1354
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
829
1355
|
if @api_client.config.debugging
|
830
|
-
@api_client.config.logger.debug "API called: IntegrationApi#
|
1356
|
+
@api_client.config.logger.debug "API called: IntegrationApi#sync_catalog\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
831
1357
|
end
|
832
1358
|
return data, status_code, headers
|
833
1359
|
end
|
834
1360
|
|
835
|
-
#
|
836
|
-
#
|
837
|
-
# @param
|
838
|
-
# @param body [NewCustomerSession]
|
1361
|
+
# Track event
|
1362
|
+
# <div class=\"redoc-section\"> <p class=\"title\">Deprecation warning</p> <p>This endpoint is DEPRECATED and will be sunset on March 31st 2023. Use <a href=\"https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2\">Track Event V2</a> instead.</p> <p>See <a href=\"https://docs.talon.one/docs/dev/tutorials/migrating-to-v2\">Migrating to V2</a>.</p> </div> Triggers a custom event in a customer session. You can then check this event in your rules. Before using this endpoint, create your event as a custom attribute of type `event`. An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same `profileId` or an error will be returned.
|
1363
|
+
# @param body [NewEvent] body
|
839
1364
|
# @param [Hash] opts the optional parameters
|
840
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1365
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
841
1366
|
# @return [IntegrationState]
|
842
|
-
def
|
843
|
-
data, _status_code, _headers =
|
1367
|
+
def track_event(body, opts = {})
|
1368
|
+
data, _status_code, _headers = track_event_with_http_info(body, opts)
|
844
1369
|
data
|
845
1370
|
end
|
846
1371
|
|
847
|
-
#
|
848
|
-
#
|
849
|
-
# @param
|
850
|
-
# @param body [NewCustomerSession]
|
1372
|
+
# Track event
|
1373
|
+
# <div class=\"redoc-section\"> <p class=\"title\">Deprecation warning</p> <p>This endpoint is DEPRECATED and will be sunset on March 31st 2023. Use <a href=\"https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2\">Track Event V2</a> instead.</p> <p>See <a href=\"https://docs.talon.one/docs/dev/tutorials/migrating-to-v2\">Migrating to V2</a>.</p> </div> Triggers a custom event in a customer session. You can then check this event in your rules. Before using this endpoint, create your event as a custom attribute of type `event`. An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same `profileId` or an error will be returned.
|
1374
|
+
# @param body [NewEvent] body
|
851
1375
|
# @param [Hash] opts the optional parameters
|
852
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1376
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
853
1377
|
# @return [Array<(IntegrationState, Integer, Hash)>] IntegrationState data, response status code and response headers
|
854
|
-
def
|
1378
|
+
def track_event_with_http_info(body, opts = {})
|
855
1379
|
if @api_client.config.debugging
|
856
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.
|
857
|
-
end
|
858
|
-
# verify the required parameter 'customer_session_id' is set
|
859
|
-
if @api_client.config.client_side_validation && customer_session_id.nil?
|
860
|
-
fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.update_customer_session"
|
1380
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.track_event ...'
|
861
1381
|
end
|
862
1382
|
# verify the required parameter 'body' is set
|
863
1383
|
if @api_client.config.client_side_validation && body.nil?
|
864
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.
|
1384
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.track_event"
|
865
1385
|
end
|
866
1386
|
# resource path
|
867
|
-
local_var_path = '/v1/
|
1387
|
+
local_var_path = '/v1/events'
|
868
1388
|
|
869
1389
|
# query parameters
|
870
1390
|
query_params = opts[:query_params] || {}
|
@@ -887,7 +1407,7 @@ module TalonOne
|
|
887
1407
|
return_type = opts[:return_type] || 'IntegrationState'
|
888
1408
|
|
889
1409
|
# auth_names
|
890
|
-
auth_names = opts[:auth_names] || ['api_key_v1'
|
1410
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
891
1411
|
|
892
1412
|
new_options = opts.merge(
|
893
1413
|
:header_params => header_params,
|
@@ -898,31 +1418,448 @@ module TalonOne
|
|
898
1418
|
:return_type => return_type
|
899
1419
|
)
|
900
1420
|
|
901
|
-
data, status_code, headers = @api_client.call_api(:
|
1421
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1422
|
+
if @api_client.config.debugging
|
1423
|
+
@api_client.config.logger.debug "API called: IntegrationApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1424
|
+
end
|
1425
|
+
return data, status_code, headers
|
1426
|
+
end
|
1427
|
+
|
1428
|
+
# Track event V2
|
1429
|
+
# Triggers a custom event. You can build a condition around this event in your rules. Talon.One offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). **Important:** - `profileId` is required. An event V2 is associated with a customer profile. - Before using this endpoint, create your event as a custom attribute of type `event`. See the [Developer docs](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event). When you successfully sent an event to Talon.One, you can list received events in the **Events** view in the Campaign Manager.
|
1430
|
+
# @param body [IntegrationEventV2Request] body
|
1431
|
+
# @param [Hash] opts the optional parameters
|
1432
|
+
# @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (default to 'yes')
|
1433
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1434
|
+
# @return [IntegrationStateV2]
|
1435
|
+
def track_event_v2(body, opts = {})
|
1436
|
+
data, _status_code, _headers = track_event_v2_with_http_info(body, opts)
|
1437
|
+
data
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
# Track event V2
|
1441
|
+
# Triggers a custom event. You can build a condition around this event in your rules. Talon.One offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). **Important:** - `profileId` is required. An event V2 is associated with a customer profile. - Before using this endpoint, create your event as a custom attribute of type `event`. See the [Developer docs](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event). When you successfully sent an event to Talon.One, you can list received events in the **Events** view in the Campaign Manager.
|
1442
|
+
# @param body [IntegrationEventV2Request] body
|
1443
|
+
# @param [Hash] opts the optional parameters
|
1444
|
+
# @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles.
|
1445
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1446
|
+
# @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers
|
1447
|
+
def track_event_v2_with_http_info(body, opts = {})
|
902
1448
|
if @api_client.config.debugging
|
903
|
-
@api_client.config.logger.debug
|
1449
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.track_event_v2 ...'
|
1450
|
+
end
|
1451
|
+
# verify the required parameter 'body' is set
|
1452
|
+
if @api_client.config.client_side_validation && body.nil?
|
1453
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.track_event_v2"
|
1454
|
+
end
|
1455
|
+
# resource path
|
1456
|
+
local_var_path = '/v2/events'
|
1457
|
+
|
1458
|
+
# query parameters
|
1459
|
+
query_params = opts[:query_params] || {}
|
1460
|
+
query_params[:'silent'] = opts[:'silent'] if !opts[:'silent'].nil?
|
1461
|
+
query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].nil?
|
1462
|
+
|
1463
|
+
# header parameters
|
1464
|
+
header_params = opts[:header_params] || {}
|
1465
|
+
# HTTP header 'Accept' (if needed)
|
1466
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1467
|
+
# HTTP header 'Content-Type'
|
1468
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1469
|
+
|
1470
|
+
# form parameters
|
1471
|
+
form_params = opts[:form_params] || {}
|
1472
|
+
|
1473
|
+
# http body (model)
|
1474
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1475
|
+
|
1476
|
+
# return_type
|
1477
|
+
return_type = opts[:return_type] || 'IntegrationStateV2'
|
1478
|
+
|
1479
|
+
# auth_names
|
1480
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1481
|
+
|
1482
|
+
new_options = opts.merge(
|
1483
|
+
:header_params => header_params,
|
1484
|
+
:query_params => query_params,
|
1485
|
+
:form_params => form_params,
|
1486
|
+
:body => post_body,
|
1487
|
+
:auth_names => auth_names,
|
1488
|
+
:return_type => return_type
|
1489
|
+
)
|
1490
|
+
|
1491
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1492
|
+
if @api_client.config.debugging
|
1493
|
+
@api_client.config.logger.debug "API called: IntegrationApi#track_event_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1494
|
+
end
|
1495
|
+
return data, status_code, headers
|
1496
|
+
end
|
1497
|
+
|
1498
|
+
# Update profile attributes for all customers in audience
|
1499
|
+
# Update the specified profile attributes to the provided values for all customers in the specified audience.
|
1500
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
1501
|
+
# @param body [Object] body
|
1502
|
+
# @param [Hash] opts the optional parameters
|
1503
|
+
# @return [nil]
|
1504
|
+
def update_audience_customers_attributes(audience_id, body, opts = {})
|
1505
|
+
update_audience_customers_attributes_with_http_info(audience_id, body, opts)
|
1506
|
+
nil
|
1507
|
+
end
|
1508
|
+
|
1509
|
+
# Update profile attributes for all customers in audience
|
1510
|
+
# Update the specified profile attributes to the provided values for all customers in the specified audience.
|
1511
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
1512
|
+
# @param body [Object] body
|
1513
|
+
# @param [Hash] opts the optional parameters
|
1514
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1515
|
+
def update_audience_customers_attributes_with_http_info(audience_id, body, opts = {})
|
1516
|
+
if @api_client.config.debugging
|
1517
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_audience_customers_attributes ...'
|
1518
|
+
end
|
1519
|
+
# verify the required parameter 'audience_id' is set
|
1520
|
+
if @api_client.config.client_side_validation && audience_id.nil?
|
1521
|
+
fail ArgumentError, "Missing the required parameter 'audience_id' when calling IntegrationApi.update_audience_customers_attributes"
|
1522
|
+
end
|
1523
|
+
# verify the required parameter 'body' is set
|
1524
|
+
if @api_client.config.client_side_validation && body.nil?
|
1525
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_audience_customers_attributes"
|
1526
|
+
end
|
1527
|
+
# resource path
|
1528
|
+
local_var_path = '/v2/audience_customers/{audienceId}/attributes'.sub('{' + 'audienceId' + '}', CGI.escape(audience_id.to_s))
|
1529
|
+
|
1530
|
+
# query parameters
|
1531
|
+
query_params = opts[:query_params] || {}
|
1532
|
+
|
1533
|
+
# header parameters
|
1534
|
+
header_params = opts[:header_params] || {}
|
1535
|
+
# HTTP header 'Accept' (if needed)
|
1536
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1537
|
+
# HTTP header 'Content-Type'
|
1538
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1539
|
+
|
1540
|
+
# form parameters
|
1541
|
+
form_params = opts[:form_params] || {}
|
1542
|
+
|
1543
|
+
# http body (model)
|
1544
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1545
|
+
|
1546
|
+
# return_type
|
1547
|
+
return_type = opts[:return_type]
|
1548
|
+
|
1549
|
+
# auth_names
|
1550
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1551
|
+
|
1552
|
+
new_options = opts.merge(
|
1553
|
+
:header_params => header_params,
|
1554
|
+
:query_params => query_params,
|
1555
|
+
:form_params => form_params,
|
1556
|
+
:body => post_body,
|
1557
|
+
:auth_names => auth_names,
|
1558
|
+
:return_type => return_type
|
1559
|
+
)
|
1560
|
+
|
1561
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1562
|
+
if @api_client.config.debugging
|
1563
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_audience_customers_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1564
|
+
end
|
1565
|
+
return data, status_code, headers
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
# Update audience name
|
1569
|
+
# Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the rule engine. To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.
|
1570
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
1571
|
+
# @param body [UpdateAudience] body
|
1572
|
+
# @param [Hash] opts the optional parameters
|
1573
|
+
# @return [Audience]
|
1574
|
+
def update_audience_v2(audience_id, body, opts = {})
|
1575
|
+
data, _status_code, _headers = update_audience_v2_with_http_info(audience_id, body, opts)
|
1576
|
+
data
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
# Update audience name
|
1580
|
+
# Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the rule engine. To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.
|
1581
|
+
# @param audience_id [Integer] The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2).
|
1582
|
+
# @param body [UpdateAudience] body
|
1583
|
+
# @param [Hash] opts the optional parameters
|
1584
|
+
# @return [Array<(Audience, Integer, Hash)>] Audience data, response status code and response headers
|
1585
|
+
def update_audience_v2_with_http_info(audience_id, body, opts = {})
|
1586
|
+
if @api_client.config.debugging
|
1587
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_audience_v2 ...'
|
1588
|
+
end
|
1589
|
+
# verify the required parameter 'audience_id' is set
|
1590
|
+
if @api_client.config.client_side_validation && audience_id.nil?
|
1591
|
+
fail ArgumentError, "Missing the required parameter 'audience_id' when calling IntegrationApi.update_audience_v2"
|
1592
|
+
end
|
1593
|
+
# verify the required parameter 'body' is set
|
1594
|
+
if @api_client.config.client_side_validation && body.nil?
|
1595
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_audience_v2"
|
1596
|
+
end
|
1597
|
+
# resource path
|
1598
|
+
local_var_path = '/v2/audiences/{audienceId}'.sub('{' + 'audienceId' + '}', CGI.escape(audience_id.to_s))
|
1599
|
+
|
1600
|
+
# query parameters
|
1601
|
+
query_params = opts[:query_params] || {}
|
1602
|
+
|
1603
|
+
# header parameters
|
1604
|
+
header_params = opts[:header_params] || {}
|
1605
|
+
# HTTP header 'Accept' (if needed)
|
1606
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1607
|
+
# HTTP header 'Content-Type'
|
1608
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1609
|
+
|
1610
|
+
# form parameters
|
1611
|
+
form_params = opts[:form_params] || {}
|
1612
|
+
|
1613
|
+
# http body (model)
|
1614
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1615
|
+
|
1616
|
+
# return_type
|
1617
|
+
return_type = opts[:return_type] || 'Audience'
|
1618
|
+
|
1619
|
+
# auth_names
|
1620
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1621
|
+
|
1622
|
+
new_options = opts.merge(
|
1623
|
+
:header_params => header_params,
|
1624
|
+
:query_params => query_params,
|
1625
|
+
:form_params => form_params,
|
1626
|
+
:body => post_body,
|
1627
|
+
:auth_names => auth_names,
|
1628
|
+
:return_type => return_type
|
1629
|
+
)
|
1630
|
+
|
1631
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1632
|
+
if @api_client.config.debugging
|
1633
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_audience_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1634
|
+
end
|
1635
|
+
return data, status_code, headers
|
1636
|
+
end
|
1637
|
+
|
1638
|
+
# Update multiple customer profiles' audiences
|
1639
|
+
# Update the specified customer profiles with the specified audiences. Use this endpoint when customers join or leave audiences. The limit of customer profiles per request is 1000.
|
1640
|
+
# @param body [CustomerProfileAudienceRequest] body
|
1641
|
+
# @param [Hash] opts the optional parameters
|
1642
|
+
# @return [nil]
|
1643
|
+
def update_customer_profile_audiences(body, opts = {})
|
1644
|
+
update_customer_profile_audiences_with_http_info(body, opts)
|
1645
|
+
nil
|
1646
|
+
end
|
1647
|
+
|
1648
|
+
# Update multiple customer profiles' audiences
|
1649
|
+
# Update the specified customer profiles with the specified audiences. Use this endpoint when customers join or leave audiences. The limit of customer profiles per request is 1000.
|
1650
|
+
# @param body [CustomerProfileAudienceRequest] body
|
1651
|
+
# @param [Hash] opts the optional parameters
|
1652
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1653
|
+
def update_customer_profile_audiences_with_http_info(body, opts = {})
|
1654
|
+
if @api_client.config.debugging
|
1655
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile_audiences ...'
|
1656
|
+
end
|
1657
|
+
# verify the required parameter 'body' is set
|
1658
|
+
if @api_client.config.client_side_validation && body.nil?
|
1659
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_customer_profile_audiences"
|
1660
|
+
end
|
1661
|
+
# resource path
|
1662
|
+
local_var_path = '/v2/customer_audiences'
|
1663
|
+
|
1664
|
+
# query parameters
|
1665
|
+
query_params = opts[:query_params] || {}
|
1666
|
+
|
1667
|
+
# header parameters
|
1668
|
+
header_params = opts[:header_params] || {}
|
1669
|
+
# HTTP header 'Accept' (if needed)
|
1670
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1671
|
+
# HTTP header 'Content-Type'
|
1672
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1673
|
+
|
1674
|
+
# form parameters
|
1675
|
+
form_params = opts[:form_params] || {}
|
1676
|
+
|
1677
|
+
# http body (model)
|
1678
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1679
|
+
|
1680
|
+
# return_type
|
1681
|
+
return_type = opts[:return_type]
|
1682
|
+
|
1683
|
+
# auth_names
|
1684
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1685
|
+
|
1686
|
+
new_options = opts.merge(
|
1687
|
+
:header_params => header_params,
|
1688
|
+
:query_params => query_params,
|
1689
|
+
:form_params => form_params,
|
1690
|
+
:body => post_body,
|
1691
|
+
:auth_names => auth_names,
|
1692
|
+
:return_type => return_type
|
1693
|
+
)
|
1694
|
+
|
1695
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1696
|
+
if @api_client.config.debugging
|
1697
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_customer_profile_audiences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1698
|
+
end
|
1699
|
+
return data, status_code, headers
|
1700
|
+
end
|
1701
|
+
|
1702
|
+
# Update customer profile
|
1703
|
+
# Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities#customer-profile). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. <div class=\"redoc-section\"> <p class=\"title\">Performance tips</p> Updating a customer profile returns a response with the requested integration state. You can use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. </div>
|
1704
|
+
# @param integration_id [String] The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
|
1705
|
+
# @param body [CustomerProfileIntegrationRequestV2] body
|
1706
|
+
# @param [Hash] opts the optional parameters
|
1707
|
+
# @option opts [Boolean] :run_rule_engine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (default to false)
|
1708
|
+
# @option opts [Boolean] :dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run.
|
1709
|
+
# @return [IntegrationStateV2]
|
1710
|
+
def update_customer_profile_v2(integration_id, body, opts = {})
|
1711
|
+
data, _status_code, _headers = update_customer_profile_v2_with_http_info(integration_id, body, opts)
|
1712
|
+
data
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
# Update customer profile
|
1716
|
+
# Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities#customer-profile). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. <div class=\"redoc-section\"> <p class=\"title\">Performance tips</p> Updating a customer profile returns a response with the requested integration state. You can use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. </div>
|
1717
|
+
# @param integration_id [String] The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
|
1718
|
+
# @param body [CustomerProfileIntegrationRequestV2] body
|
1719
|
+
# @param [Hash] opts the optional parameters
|
1720
|
+
# @option opts [Boolean] :run_rule_engine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body.
|
1721
|
+
# @option opts [Boolean] :dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run.
|
1722
|
+
# @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers
|
1723
|
+
def update_customer_profile_v2_with_http_info(integration_id, body, opts = {})
|
1724
|
+
if @api_client.config.debugging
|
1725
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile_v2 ...'
|
1726
|
+
end
|
1727
|
+
# verify the required parameter 'integration_id' is set
|
1728
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
1729
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.update_customer_profile_v2"
|
1730
|
+
end
|
1731
|
+
# verify the required parameter 'body' is set
|
1732
|
+
if @api_client.config.client_side_validation && body.nil?
|
1733
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_customer_profile_v2"
|
1734
|
+
end
|
1735
|
+
# resource path
|
1736
|
+
local_var_path = '/v2/customer_profiles/{integrationId}'.sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
|
1737
|
+
|
1738
|
+
# query parameters
|
1739
|
+
query_params = opts[:query_params] || {}
|
1740
|
+
query_params[:'runRuleEngine'] = opts[:'run_rule_engine'] if !opts[:'run_rule_engine'].nil?
|
1741
|
+
query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].nil?
|
1742
|
+
|
1743
|
+
# header parameters
|
1744
|
+
header_params = opts[:header_params] || {}
|
1745
|
+
# HTTP header 'Accept' (if needed)
|
1746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1747
|
+
# HTTP header 'Content-Type'
|
1748
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1749
|
+
|
1750
|
+
# form parameters
|
1751
|
+
form_params = opts[:form_params] || {}
|
1752
|
+
|
1753
|
+
# http body (model)
|
1754
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1755
|
+
|
1756
|
+
# return_type
|
1757
|
+
return_type = opts[:return_type] || 'IntegrationStateV2'
|
1758
|
+
|
1759
|
+
# auth_names
|
1760
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1761
|
+
|
1762
|
+
new_options = opts.merge(
|
1763
|
+
:header_params => header_params,
|
1764
|
+
:query_params => query_params,
|
1765
|
+
:form_params => form_params,
|
1766
|
+
:body => post_body,
|
1767
|
+
:auth_names => auth_names,
|
1768
|
+
:return_type => return_type
|
1769
|
+
)
|
1770
|
+
|
1771
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1772
|
+
if @api_client.config.debugging
|
1773
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_customer_profile_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1774
|
+
end
|
1775
|
+
return data, status_code, headers
|
1776
|
+
end
|
1777
|
+
|
1778
|
+
# Update multiple customer profiles
|
1779
|
+
# Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities#customer-profile) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](https://docs.talon.one/integration-api#tag/Customer-sessions).
|
1780
|
+
# @param body [MultipleCustomerProfileIntegrationRequest] body
|
1781
|
+
# @param [Hash] opts the optional parameters
|
1782
|
+
# @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (default to 'yes')
|
1783
|
+
# @return [MultipleCustomerProfileIntegrationResponseV2]
|
1784
|
+
def update_customer_profiles_v2(body, opts = {})
|
1785
|
+
data, _status_code, _headers = update_customer_profiles_v2_with_http_info(body, opts)
|
1786
|
+
data
|
1787
|
+
end
|
1788
|
+
|
1789
|
+
# Update multiple customer profiles
|
1790
|
+
# Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities#customer-profile) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](https://docs.talon.one/integration-api#tag/Customer-sessions).
|
1791
|
+
# @param body [MultipleCustomerProfileIntegrationRequest] body
|
1792
|
+
# @param [Hash] opts the optional parameters
|
1793
|
+
# @option opts [String] :silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles.
|
1794
|
+
# @return [Array<(MultipleCustomerProfileIntegrationResponseV2, Integer, Hash)>] MultipleCustomerProfileIntegrationResponseV2 data, response status code and response headers
|
1795
|
+
def update_customer_profiles_v2_with_http_info(body, opts = {})
|
1796
|
+
if @api_client.config.debugging
|
1797
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profiles_v2 ...'
|
1798
|
+
end
|
1799
|
+
# verify the required parameter 'body' is set
|
1800
|
+
if @api_client.config.client_side_validation && body.nil?
|
1801
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_customer_profiles_v2"
|
1802
|
+
end
|
1803
|
+
# resource path
|
1804
|
+
local_var_path = '/v2/customer_profiles'
|
1805
|
+
|
1806
|
+
# query parameters
|
1807
|
+
query_params = opts[:query_params] || {}
|
1808
|
+
query_params[:'silent'] = opts[:'silent'] if !opts[:'silent'].nil?
|
1809
|
+
|
1810
|
+
# header parameters
|
1811
|
+
header_params = opts[:header_params] || {}
|
1812
|
+
# HTTP header 'Accept' (if needed)
|
1813
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1814
|
+
# HTTP header 'Content-Type'
|
1815
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1816
|
+
|
1817
|
+
# form parameters
|
1818
|
+
form_params = opts[:form_params] || {}
|
1819
|
+
|
1820
|
+
# http body (model)
|
1821
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1822
|
+
|
1823
|
+
# return_type
|
1824
|
+
return_type = opts[:return_type] || 'MultipleCustomerProfileIntegrationResponseV2'
|
1825
|
+
|
1826
|
+
# auth_names
|
1827
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1828
|
+
|
1829
|
+
new_options = opts.merge(
|
1830
|
+
:header_params => header_params,
|
1831
|
+
:query_params => query_params,
|
1832
|
+
:form_params => form_params,
|
1833
|
+
:body => post_body,
|
1834
|
+
:auth_names => auth_names,
|
1835
|
+
:return_type => return_type
|
1836
|
+
)
|
1837
|
+
|
1838
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1839
|
+
if @api_client.config.debugging
|
1840
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_customer_profiles_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
904
1841
|
end
|
905
1842
|
return data, status_code, headers
|
906
1843
|
end
|
907
1844
|
|
908
|
-
# Update
|
909
|
-
# Update
|
910
|
-
# @param customer_session_id [String] The
|
911
|
-
# @param body [IntegrationRequest]
|
1845
|
+
# Update customer session
|
1846
|
+
# Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities#customer-session) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). <div class=\"redoc-section\"> <p class=\"title\">Performance tips</p> Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. </div> For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
|
1847
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1848
|
+
# @param body [IntegrationRequest] body
|
912
1849
|
# @param [Hash] opts the optional parameters
|
913
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1850
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run.
|
914
1851
|
# @return [IntegrationStateV2]
|
915
1852
|
def update_customer_session_v2(customer_session_id, body, opts = {})
|
916
1853
|
data, _status_code, _headers = update_customer_session_v2_with_http_info(customer_session_id, body, opts)
|
917
1854
|
data
|
918
1855
|
end
|
919
1856
|
|
920
|
-
# Update
|
921
|
-
# Update
|
922
|
-
# @param customer_session_id [String] The
|
923
|
-
# @param body [IntegrationRequest]
|
1857
|
+
# Update customer session
|
1858
|
+
# Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities#customer-session) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). <div class=\"redoc-section\"> <p class=\"title\">Performance tips</p> Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. </div> For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
|
1859
|
+
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1860
|
+
# @param body [IntegrationRequest] body
|
924
1861
|
# @param [Hash] opts the optional parameters
|
925
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1862
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run.
|
926
1863
|
# @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers
|
927
1864
|
def update_customer_session_v2_with_http_info(customer_session_id, body, opts = {})
|
928
1865
|
if @api_client.config.debugging
|