talon_one 3.0.1 → 4.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 +9 -6
- data/README.md +150 -51
- data/docs/AccountAnalytics.md +3 -1
- data/docs/AccountDashboardStatistic.md +0 -2
- data/docs/AccountDashboardStatisticCampaigns.md +4 -2
- data/docs/Achievement.md +39 -0
- data/docs/AchievementAdditionalProperties.md +23 -0
- data/docs/AchievementProgress.md +35 -0
- data/docs/AddItemCatalogAction.md +3 -1
- data/docs/AddLoyaltyPoints.md +2 -2
- data/docs/AddLoyaltyPointsEffectProps.md +1 -1
- data/docs/AddToAudienceEffectProps.md +23 -0
- data/docs/AdditionalCampaignProperties.md +59 -0
- data/docs/Application.md +3 -5
- data/docs/ApplicationAPIKey.md +6 -2
- data/docs/ApplicationAnalyticsDataPoint.md +31 -0
- data/docs/ApplicationAnalyticsDataPointAvgItemsPerSession.md +19 -0
- data/docs/ApplicationAnalyticsDataPointAvgSessionValue.md +19 -0
- data/docs/ApplicationAnalyticsDataPointSessionsCount.md +19 -0
- data/docs/ApplicationAnalyticsDataPointTotalRevenue.md +19 -0
- data/docs/ApplicationCampaignAnalytics.md +45 -0
- data/docs/ApplicationCampaignAnalyticsAvgItemsPerSession.md +21 -0
- data/docs/ApplicationCampaignAnalyticsAvgSessionValue.md +21 -0
- data/docs/ApplicationCampaignAnalyticsCouponsCount.md +19 -0
- data/docs/ApplicationCampaignAnalyticsSessionsCount.md +21 -0
- data/docs/ApplicationCampaignAnalyticsTotalDiscounts.md +19 -0
- data/docs/ApplicationCampaignAnalyticsTotalRevenue.md +21 -0
- data/docs/ApplicationCustomer.md +2 -2
- data/docs/ApplicationEvent.md +4 -0
- data/docs/ApplicationNotification.md +1 -1
- data/docs/ApplicationSession.md +5 -3
- data/docs/ApplicationStoreEntity.md +17 -0
- data/docs/Audience.md +1 -1
- data/docs/AudienceAnalytics.md +1 -1
- data/docs/AudienceCustomer.md +2 -2
- data/docs/BaseCampaign.md +45 -0
- data/docs/BaseLoyaltyProgram.md +9 -1
- data/docs/BaseNotification.md +5 -1
- data/docs/BaseNotificationEntity.md +3 -1
- data/docs/BaseNotificationWebhook.md +3 -1
- data/docs/BulkOperationOnCampaigns.md +19 -0
- data/docs/Campaign.md +25 -17
- data/docs/CampaignBudget.md +21 -0
- data/docs/CampaignCopy.md +3 -1
- data/docs/CampaignCreatedNotification.md +2 -2
- data/docs/CampaignEvaluationGroup.md +31 -0
- data/docs/CampaignEvaluationPosition.md +21 -0
- data/docs/CampaignEvaluationTreeChangedNotification.md +21 -0
- data/docs/CampaignGroup.md +6 -6
- data/docs/CampaignNotificationPolicy.md +17 -0
- data/docs/CampaignSet.md +3 -5
- data/docs/CampaignSetBranchNode.md +13 -3
- data/docs/CampaignTemplate.md +2 -0
- data/docs/CardExpiringPointsNotificationPolicy.md +21 -0
- data/docs/CardExpiringPointsNotificationTrigger.md +19 -0
- data/docs/CardLedgerPointsEntryIntegrationAPI.md +35 -0
- data/docs/CartItem.md +4 -2
- data/docs/CatalogItem.md +3 -1
- data/docs/ChangeLoyaltyTierLevelEffectProps.md +27 -0
- data/docs/Coupon.md +4 -2
- data/docs/CouponCreationJob.md +1 -1
- data/docs/CouponsNotificationPolicy.md +3 -1
- data/docs/CreateAchievement.md +27 -0
- data/docs/CreateApplicationAPIKey.md +7 -3
- data/docs/CreateTemplateCampaign.md +6 -2
- data/docs/CustomEffectProps.md +1 -1
- data/docs/CustomerInventory.md +3 -1
- data/docs/CustomerProfile.md +2 -2
- data/docs/CustomerProfileAudienceRequestItem.md +1 -1
- data/docs/CustomerProfileIntegrationResponseV2.md +33 -0
- data/docs/CustomerSession.md +1 -1
- data/docs/CustomerSessionV2.md +8 -6
- data/docs/DeactivateUserRequest.md +17 -0
- data/docs/DeleteUserRequest.md +17 -0
- data/docs/Effect.md +2 -0
- data/docs/EffectEntity.md +3 -1
- data/docs/EmailEntity.md +1 -1
- data/docs/Environment.md +2 -0
- data/docs/Event.md +2 -0
- data/docs/EventV2.md +4 -2
- data/docs/ExpiringCouponsNotificationPolicy.md +21 -0
- data/docs/ExpiringCouponsNotificationTrigger.md +19 -0
- data/docs/ExpiringPointsNotificationPolicy.md +4 -2
- data/docs/FuncArgDef.md +1 -1
- data/docs/GetIntegrationCouponRequest.md +19 -0
- data/docs/IdentifiableEntity.md +17 -0
- data/docs/IncreaseAchievementProgressEffectProps.md +29 -0
- data/docs/InlineResponse20010.md +1 -1
- data/docs/InlineResponse20011.md +1 -1
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +3 -3
- data/docs/InlineResponse20014.md +2 -2
- data/docs/InlineResponse20015.md +3 -5
- data/docs/InlineResponse20016.md +3 -3
- data/docs/InlineResponse20017.md +1 -1
- data/docs/InlineResponse20018.md +1 -1
- data/docs/InlineResponse20019.md +2 -2
- data/docs/InlineResponse20020.md +1 -1
- data/docs/InlineResponse20021.md +2 -4
- data/docs/InlineResponse20022.md +3 -3
- data/docs/InlineResponse20023.md +1 -1
- data/docs/InlineResponse20024.md +3 -1
- data/docs/InlineResponse20025.md +1 -1
- data/docs/InlineResponse20026.md +2 -2
- data/docs/InlineResponse20027.md +2 -2
- data/docs/InlineResponse20028.md +3 -3
- data/docs/InlineResponse20029.md +3 -5
- data/docs/InlineResponse2003.md +3 -3
- data/docs/InlineResponse20030.md +1 -1
- data/docs/InlineResponse20031.md +3 -3
- data/docs/InlineResponse20032.md +3 -3
- data/docs/InlineResponse20033.md +5 -3
- data/docs/InlineResponse20034.md +1 -1
- data/docs/InlineResponse20035.md +5 -3
- data/docs/InlineResponse20036.md +1 -1
- data/docs/InlineResponse20037.md +1 -1
- data/docs/InlineResponse20038.md +2 -4
- data/docs/InlineResponse20039.md +1 -1
- data/docs/InlineResponse2004.md +3 -3
- data/docs/InlineResponse20040.md +1 -1
- data/docs/InlineResponse20041.md +19 -0
- data/docs/InlineResponse20042.md +21 -0
- data/docs/InlineResponse20043.md +19 -0
- data/docs/InlineResponse20044.md +19 -0
- data/docs/InlineResponse20045.md +21 -0
- data/docs/InlineResponse20046.md +19 -0
- data/docs/InlineResponse20047.md +19 -0
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +2 -2
- data/docs/InlineResponse2009.md +1 -1
- data/docs/IntegrationApi.md +204 -117
- data/docs/IntegrationCoupon.md +3 -1
- data/docs/IntegrationEvent.md +2 -0
- data/docs/IntegrationEventV2Request.md +4 -2
- data/docs/IntegrationRequest.md +1 -1
- data/docs/IntegrationStoreEntity.md +17 -0
- data/docs/InventoryCoupon.md +4 -2
- data/docs/LedgerPointsEntryIntegrationAPI.md +33 -0
- data/docs/LoginParams.md +1 -1
- data/docs/LoyaltyLedgerTransactions.md +1 -1
- data/docs/LoyaltyProgram.md +15 -1
- data/docs/LoyaltyProgramLedgers.md +2 -0
- data/docs/LoyaltyProgramSubledgers.md +19 -0
- data/docs/LoyaltyProgramTransaction.md +4 -2
- data/docs/ManagementApi.md +3313 -1620
- data/docs/MessageLogEntries.md +19 -0
- data/docs/MessageLogEntry.md +39 -0
- data/docs/MessageLogRequest.md +19 -0
- data/docs/MessageLogResponse.md +21 -0
- data/docs/NewAccountSignUp.md +1 -1
- data/docs/NewApplication.md +6 -10
- data/docs/NewApplicationAPIKey.md +6 -2
- data/docs/NewAudience.md +1 -1
- data/docs/NewBaseNotification.md +2 -0
- data/docs/NewCampaign.md +8 -2
- data/docs/NewCampaignEvaluationGroup.md +27 -0
- data/docs/NewCampaignGroup.md +6 -6
- data/docs/NewCampaignTemplate.md +3 -1
- data/docs/NewCoupons.md +4 -2
- data/docs/NewCustomerSession.md +1 -1
- data/docs/NewCustomerSessionV2.md +5 -3
- data/docs/NewEvent.md +2 -0
- data/docs/NewInternalAudience.md +1 -1
- data/docs/NewInvitation.md +8 -6
- data/docs/NewInviteEmail.md +4 -4
- data/docs/NewLoyaltyProgram.md +8 -0
- data/docs/NewNotificationTest.md +29 -0
- data/docs/NewNotificationWebhook.md +3 -1
- data/docs/NewPicklist.md +1 -1
- data/docs/NewRoleV2.md +23 -0
- data/docs/NewStore.md +23 -0
- data/docs/NewUser.md +1 -1
- data/docs/NotificationActivation.md +17 -0
- data/docs/NotificationListItem.md +23 -0
- data/docs/NotificationTest.md +27 -0
- data/docs/OneTimeCode.md +23 -0
- data/docs/OutgoingIntegrationCleverTapPolicy.md +21 -0
- data/docs/OutgoingIntegrationConfiguration.md +1 -1
- data/docs/OutgoingIntegrationIterablePolicy.md +19 -0
- data/docs/OutgoingIntegrationMoEngagePolicy.md +23 -0
- data/docs/OutgoingIntegrationTemplate.md +33 -0
- data/docs/OutgoingIntegrationTemplateWithConfigurationDetails.md +35 -0
- data/docs/OutgoingIntegrationTemplates.md +17 -0
- data/docs/OutgoingIntegrationType.md +1 -1
- data/docs/PatchItemCatalogAction.md +2 -0
- data/docs/PendingPointsNotificationPolicy.md +19 -0
- data/docs/Picklist.md +1 -1
- data/docs/Product.md +17 -0
- data/docs/RemoveFromAudienceEffectProps.md +23 -0
- data/docs/ReturnedCartItem.md +1 -1
- data/docs/Role.md +1 -1
- data/docs/RoleAssign.md +2 -2
- data/docs/RoleV2.md +12 -6
- data/docs/RoleV2ApplicationDetails.md +6 -4
- data/docs/RoleV2Base.md +23 -0
- data/docs/RoleV2PermissionSet.md +3 -3
- data/docs/RoleV2Permissions.md +3 -3
- data/docs/RoleV2RolesGroup.md +21 -0
- data/docs/RollbackAddedLoyaltyPointsEffectProps.md +1 -1
- data/docs/RollbackDiscountEffectProps.md +1 -1
- data/docs/SSOConfig.md +17 -0
- data/docs/SamlConnectionInternal.md +19 -0
- data/docs/SamlLoginEndpoint.md +4 -2
- data/docs/SetDiscountPerAdditionalCostPerItemEffectProps.md +1 -1
- data/docs/SetDiscountPerItemEffectProps.md +6 -2
- data/docs/Store.md +33 -0
- data/docs/TemplateArgDef.md +1 -1
- data/docs/Tier.md +5 -1
- data/docs/TierDowngradeNotificationPolicy.md +19 -0
- data/docs/TierUpgradeNotificationPolicy.md +19 -0
- data/docs/TierWillDowngradeNotificationPolicy.md +21 -0
- data/docs/TierWillDowngradeNotificationTrigger.md +19 -0
- data/docs/TimePoint.md +27 -0
- data/docs/TrackEventV2Response.md +33 -0
- data/docs/TwoFAConfig.md +19 -0
- data/docs/UpdateAchievement.md +27 -0
- data/docs/UpdateApplication.md +4 -6
- data/docs/UpdateApplicationAPIKey.md +17 -0
- data/docs/UpdateCampaign.md +9 -3
- data/docs/UpdateCampaignEvaluationGroup.md +27 -0
- data/docs/UpdateCampaignGroup.md +6 -6
- data/docs/UpdateCampaignTemplate.md +3 -1
- data/docs/UpdateCoupon.md +4 -2
- data/docs/UpdateCouponBatch.md +2 -2
- data/docs/UpdateLoyaltyProgram.md +8 -0
- data/docs/UpdatePicklist.md +1 -1
- data/docs/UpdateStore.md +21 -0
- data/docs/UpdateUser.md +8 -6
- data/docs/User.md +19 -13
- data/docs/WebhookWithOutgoingIntegrationDetails.md +45 -0
- data/lib/talon_one/api/integration_api.rb +283 -136
- data/lib/talon_one/api/management_api.rb +2787 -890
- data/lib/talon_one/api_client.rb +2 -1
- data/lib/talon_one/api_error.rb +8 -1
- data/lib/talon_one/models/account_additional_cost.rb +3 -3
- data/lib/talon_one/models/account_analytics.rb +19 -4
- data/lib/talon_one/models/account_dashboard_statistic.rb +1 -13
- data/lib/talon_one/models/account_dashboard_statistic_campaigns.rb +20 -5
- data/lib/talon_one/models/achievement.rb +406 -0
- data/lib/talon_one/models/achievement_additional_properties.rb +252 -0
- data/lib/talon_one/models/achievement_progress.rb +410 -0
- data/lib/talon_one/models/add_item_catalog_action.rb +12 -3
- data/lib/talon_one/models/add_loyalty_points.rb +2 -2
- data/lib/talon_one/models/add_loyalty_points_effect_props.rb +1 -1
- data/lib/talon_one/models/add_to_audience_effect_props.rb +238 -0
- data/lib/talon_one/models/additional_campaign_properties.rb +463 -0
- data/lib/talon_one/models/application.rb +12 -50
- data/lib/talon_one/models/application_analytics_data_point.rb +273 -0
- data/lib/talon_one/models/application_analytics_data_point_avg_items_per_session.rb +216 -0
- data/lib/talon_one/models/application_analytics_data_point_avg_session_value.rb +216 -0
- data/lib/talon_one/models/application_analytics_data_point_sessions_count.rb +216 -0
- data/lib/talon_one/models/application_analytics_data_point_total_revenue.rb +216 -0
- data/lib/talon_one/models/application_api_key.rb +37 -5
- data/lib/talon_one/models/application_campaign_analytics.rb +379 -0
- data/lib/talon_one/models/application_campaign_analytics_avg_items_per_session.rb +225 -0
- data/lib/talon_one/models/application_campaign_analytics_avg_session_value.rb +225 -0
- data/lib/talon_one/models/application_campaign_analytics_coupons_count.rb +216 -0
- data/lib/talon_one/models/application_campaign_analytics_sessions_count.rb +225 -0
- data/lib/talon_one/models/application_campaign_analytics_total_discounts.rb +216 -0
- data/lib/talon_one/models/application_campaign_analytics_total_revenue.rb +225 -0
- data/lib/talon_one/models/application_customer.rb +2 -2
- data/lib/talon_one/models/application_event.rb +45 -1
- data/lib/talon_one/models/application_notification.rb +1 -1
- data/lib/talon_one/models/application_session.rb +51 -17
- data/lib/talon_one/models/application_store_entity.rb +207 -0
- data/lib/talon_one/models/attribute.rb +2 -2
- data/lib/talon_one/models/audience_analytics.rb +2 -2
- data/lib/talon_one/models/audience_customer.rb +2 -2
- data/lib/talon_one/models/base_campaign.rb +449 -0
- data/lib/talon_one/models/base_loyalty_program.rb +102 -4
- data/lib/talon_one/models/base_notification.rb +65 -4
- data/lib/talon_one/models/base_notification_entity.rb +16 -4
- data/lib/talon_one/models/base_notification_webhook.rb +16 -4
- data/lib/talon_one/models/bulk_operation_on_campaigns.rb +263 -0
- data/lib/talon_one/models/campaign.rb +105 -20
- data/lib/talon_one/models/campaign_budget.rb +280 -0
- data/lib/talon_one/models/campaign_copy.rb +14 -4
- data/lib/talon_one/models/campaign_created_notification.rb +10 -10
- data/lib/talon_one/models/campaign_evaluation_group.rb +378 -0
- data/lib/talon_one/models/campaign_evaluation_position.rb +243 -0
- data/lib/talon_one/models/campaign_evaluation_tree_changed_notification.rb +236 -0
- data/lib/talon_one/models/campaign_group.rb +4 -4
- data/lib/talon_one/models/campaign_notification_policy.rb +231 -0
- data/lib/talon_one/models/campaign_set.rb +16 -31
- data/lib/talon_one/models/campaign_set_branch_node.rb +100 -6
- data/lib/talon_one/models/campaign_template.rb +30 -1
- data/lib/talon_one/models/card_expiring_points_notification_policy.rb +259 -0
- data/lib/talon_one/models/card_expiring_points_notification_trigger.rb +280 -0
- data/lib/talon_one/models/card_ledger_points_entry_integration_api.rb +410 -0
- data/lib/talon_one/models/cart_item.rb +12 -3
- data/lib/talon_one/models/catalog_item.rb +13 -4
- data/lib/talon_one/models/change_loyalty_tier_level_effect_props.rb +278 -0
- data/lib/talon_one/models/coupon.rb +15 -5
- data/lib/talon_one/models/coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/coupons_notification_policy.rb +16 -4
- data/lib/talon_one/models/create_achievement.rb +320 -0
- data/lib/talon_one/models/create_application_api_key.rb +40 -8
- data/lib/talon_one/models/create_template_campaign.rb +27 -5
- data/lib/talon_one/models/custom_effect_props.rb +1 -1
- data/lib/talon_one/models/customer_inventory.rb +15 -4
- data/lib/talon_one/models/customer_profile.rb +2 -2
- data/lib/talon_one/models/customer_profile_audience_request_item.rb +1 -1
- data/lib/talon_one/models/customer_profile_integration_response_v2.rb +307 -0
- data/lib/talon_one/models/customer_session.rb +1 -1
- data/lib/talon_one/models/customer_session_v2.rb +41 -7
- data/lib/talon_one/models/deactivate_user_request.rb +213 -0
- data/lib/talon_one/models/delete_user_request.rb +213 -0
- data/lib/talon_one/models/effect.rb +11 -1
- data/lib/talon_one/models/effect_entity.rb +14 -4
- data/lib/talon_one/models/email_entity.rb +1 -1
- data/lib/talon_one/models/environment.rb +13 -1
- data/lib/talon_one/models/event.rb +35 -1
- data/lib/talon_one/models/event_v2.rb +37 -3
- data/lib/talon_one/models/expiring_coupons_notification_policy.rb +259 -0
- data/lib/talon_one/models/expiring_coupons_notification_trigger.rb +280 -0
- data/lib/talon_one/models/expiring_points_notification_policy.rb +16 -4
- data/lib/talon_one/models/func_arg_def.rb +0 -5
- data/lib/talon_one/models/get_integration_coupon_request.rb +257 -0
- data/lib/talon_one/models/identifiable_entity.rb +212 -0
- data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +298 -0
- data/lib/talon_one/models/inline_response20010.rb +1 -1
- data/lib/talon_one/models/inline_response20011.rb +1 -1
- data/lib/talon_one/models/inline_response20012.rb +1 -1
- data/lib/talon_one/models/inline_response20013.rb +11 -11
- data/lib/talon_one/models/inline_response20014.rb +1 -3
- data/lib/talon_one/models/inline_response20015.rb +7 -11
- data/lib/talon_one/models/inline_response20016.rb +3 -1
- data/lib/talon_one/models/inline_response20017.rb +1 -1
- data/lib/talon_one/models/inline_response20018.rb +1 -1
- data/lib/talon_one/models/inline_response20019.rb +10 -10
- data/lib/talon_one/models/inline_response20020.rb +1 -1
- data/lib/talon_one/models/inline_response20021.rb +7 -11
- data/lib/talon_one/models/inline_response20022.rb +10 -10
- data/lib/talon_one/models/inline_response20023.rb +1 -1
- data/lib/talon_one/models/inline_response20024.rb +10 -6
- data/lib/talon_one/models/inline_response20025.rb +1 -1
- data/lib/talon_one/models/inline_response20026.rb +6 -1
- data/lib/talon_one/models/inline_response20027.rb +1 -6
- data/lib/talon_one/models/inline_response20028.rb +11 -11
- data/lib/talon_one/models/inline_response20029.rb +7 -11
- data/lib/talon_one/models/inline_response2003.rb +11 -11
- data/lib/talon_one/models/inline_response20030.rb +1 -1
- data/lib/talon_one/models/inline_response20031.rb +8 -13
- data/lib/talon_one/models/inline_response20032.rb +8 -13
- data/lib/talon_one/models/inline_response20033.rb +11 -7
- data/lib/talon_one/models/inline_response20034.rb +1 -1
- data/lib/talon_one/models/inline_response20035.rb +11 -7
- data/lib/talon_one/models/inline_response20036.rb +1 -1
- data/lib/talon_one/models/inline_response20037.rb +1 -1
- data/lib/talon_one/models/inline_response20038.rb +7 -11
- data/lib/talon_one/models/inline_response20039.rb +1 -1
- data/lib/talon_one/models/inline_response2004.rb +11 -11
- data/lib/talon_one/models/inline_response20040.rb +1 -1
- data/lib/talon_one/models/inline_response20041.rb +227 -0
- data/lib/talon_one/models/inline_response20042.rb +231 -0
- data/lib/talon_one/models/inline_response20043.rb +227 -0
- data/lib/talon_one/models/inline_response20044.rb +227 -0
- data/lib/talon_one/models/inline_response20045.rb +231 -0
- data/lib/talon_one/models/inline_response20046.rb +222 -0
- data/lib/talon_one/models/inline_response20047.rb +227 -0
- data/lib/talon_one/models/inline_response2005.rb +1 -1
- data/lib/talon_one/models/inline_response2006.rb +1 -1
- data/lib/talon_one/models/inline_response2007.rb +1 -1
- data/lib/talon_one/models/inline_response2008.rb +10 -10
- data/lib/talon_one/models/inline_response2009.rb +1 -1
- data/lib/talon_one/models/integration_coupon.rb +12 -2
- data/lib/talon_one/models/integration_event.rb +35 -1
- data/lib/talon_one/models/integration_event_v2_request.rb +37 -3
- data/lib/talon_one/models/integration_request.rb +1 -1
- data/lib/talon_one/models/integration_store_entity.rb +231 -0
- data/lib/talon_one/models/inventory_coupon.rb +13 -3
- data/lib/talon_one/models/ledger_points_entry_integration_api.rb +400 -0
- data/lib/talon_one/models/login_params.rb +1 -1
- data/lib/talon_one/models/loyalty.rb +1 -1
- data/lib/talon_one/models/loyalty_ledger_transactions.rb +1 -1
- data/lib/talon_one/models/loyalty_program.rb +136 -4
- data/lib/talon_one/models/loyalty_program_ledgers.rb +12 -2
- data/lib/talon_one/models/loyalty_program_subledgers.rb +230 -0
- data/lib/talon_one/models/loyalty_program_transaction.rb +13 -3
- data/lib/talon_one/models/message_log_entries.rb +241 -0
- data/lib/talon_one/models/message_log_entry.rb +395 -0
- data/lib/talon_one/models/message_log_request.rb +249 -0
- data/lib/talon_one/models/message_log_response.rb +264 -0
- data/lib/talon_one/models/new_account_sign_up.rb +1 -1
- data/lib/talon_one/models/new_additional_cost.rb +3 -3
- data/lib/talon_one/models/new_application.rb +2 -51
- data/lib/talon_one/models/new_application_api_key.rb +37 -5
- data/lib/talon_one/models/new_attribute.rb +2 -2
- data/lib/talon_one/models/new_base_notification.rb +13 -1
- data/lib/talon_one/models/new_campaign.rb +52 -5
- data/lib/talon_one/models/new_campaign_evaluation_group.rb +347 -0
- data/lib/talon_one/models/new_campaign_group.rb +4 -4
- data/lib/talon_one/models/new_campaign_template.rb +33 -4
- data/lib/talon_one/models/new_coupons.rb +15 -5
- data/lib/talon_one/models/new_customer_session.rb +1 -1
- data/lib/talon_one/models/new_customer_session_v2.rb +38 -4
- data/lib/talon_one/models/new_event.rb +35 -1
- data/lib/talon_one/models/new_invitation.rb +24 -18
- data/lib/talon_one/models/new_invite_email.rb +2 -38
- data/lib/talon_one/models/new_loyalty_program.rb +99 -1
- data/lib/talon_one/models/new_notification_test.rb +327 -0
- data/lib/talon_one/models/new_notification_webhook.rb +16 -4
- data/lib/talon_one/models/new_picklist.rb +1 -1
- data/lib/talon_one/models/new_role_v2.rb +249 -0
- data/lib/talon_one/models/new_store.rb +309 -0
- data/lib/talon_one/models/new_user.rb +1 -1
- data/lib/talon_one/models/notification_activation.rb +212 -0
- data/lib/talon_one/models/notification_list_item.rb +257 -0
- data/lib/talon_one/models/notification_test.rb +227 -0
- data/lib/talon_one/models/one_time_code.rb +252 -0
- data/lib/talon_one/models/outgoing_integration_clever_tap_policy.rb +242 -0
- data/lib/talon_one/models/outgoing_integration_configuration.rb +1 -0
- data/lib/talon_one/models/outgoing_integration_iterable_policy.rb +227 -0
- data/lib/talon_one/models/outgoing_integration_mo_engage_policy.rb +257 -0
- data/lib/talon_one/models/outgoing_integration_template.rb +409 -0
- data/lib/talon_one/models/outgoing_integration_template_with_configuration_details.rb +425 -0
- data/lib/talon_one/models/outgoing_integration_templates.rb +209 -0
- data/lib/talon_one/models/patch_item_catalog_action.rb +11 -2
- data/lib/talon_one/models/pending_points_notification_policy.rb +243 -0
- data/lib/talon_one/models/picklist.rb +1 -1
- data/lib/talon_one/models/product.rb +232 -0
- data/lib/talon_one/models/remove_from_audience_effect_props.rb +238 -0
- data/lib/talon_one/models/returned_cart_item.rb +1 -1
- data/lib/talon_one/models/role.rb +1 -1
- data/lib/talon_one/models/role_assign.rb +2 -2
- data/lib/talon_one/models/role_v2.rb +63 -12
- data/lib/talon_one/models/role_v2_application_details.rb +17 -7
- data/lib/talon_one/models/role_v2_base.rb +238 -0
- data/lib/talon_one/models/role_v2_permission_set.rb +12 -11
- data/lib/talon_one/models/role_v2_permissions.rb +2 -2
- data/lib/talon_one/models/role_v2_roles_group.rb +233 -0
- data/lib/talon_one/models/rollback_added_loyalty_points_effect_props.rb +1 -1
- data/lib/talon_one/models/rollback_discount_effect_props.rb +1 -1
- data/lib/talon_one/models/saml_connection_internal.rb +265 -0
- data/lib/talon_one/models/saml_login_endpoint.rb +17 -2
- data/lib/talon_one/models/set_discount_per_additional_cost_per_item_effect_props.rb +1 -1
- data/lib/talon_one/models/set_discount_per_item_effect_props.rb +25 -5
- data/lib/talon_one/models/sso_config.rb +212 -0
- data/lib/talon_one/models/store.rb +381 -0
- data/lib/talon_one/models/talang_attribute.rb +2 -2
- data/lib/talon_one/models/template_arg_def.rb +0 -5
- data/lib/talon_one/models/tier.rb +58 -4
- data/lib/talon_one/models/tier_downgrade_notification_policy.rb +243 -0
- data/lib/talon_one/models/tier_upgrade_notification_policy.rb +243 -0
- data/lib/talon_one/models/tier_will_downgrade_notification_policy.rb +259 -0
- data/lib/talon_one/models/tier_will_downgrade_notification_trigger.rb +261 -0
- data/lib/talon_one/models/time_point.rb +345 -0
- data/lib/talon_one/models/track_event_v2_response.rb +307 -0
- data/lib/talon_one/models/two_fa_config.rb +222 -0
- data/lib/talon_one/models/update_achievement.rb +291 -0
- data/lib/talon_one/models/update_application.rb +15 -53
- data/lib/talon_one/models/update_application_api_key.rb +212 -0
- data/lib/talon_one/models/update_campaign.rb +52 -6
- data/lib/talon_one/models/update_campaign_evaluation_group.rb +348 -0
- data/lib/talon_one/models/update_campaign_group.rb +4 -4
- data/lib/talon_one/models/update_campaign_template.rb +28 -4
- data/lib/talon_one/models/update_coupon.rb +15 -5
- data/lib/talon_one/models/update_coupon_batch.rb +2 -2
- data/lib/talon_one/models/update_loyalty_program.rb +99 -1
- data/lib/talon_one/models/update_picklist.rb +1 -1
- data/lib/talon_one/models/update_store.rb +265 -0
- data/lib/talon_one/models/update_user.rb +25 -14
- data/lib/talon_one/models/user.rb +73 -42
- data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +449 -0
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +86 -16
- data/spec/api/integration_api_spec.rb +74 -47
- data/spec/api/management_api_spec.rb +669 -299
- data/spec/models/account_analytics_spec.rb +6 -0
- data/spec/models/account_dashboard_statistic_campaigns_spec.rb +6 -0
- data/spec/models/account_dashboard_statistic_spec.rb +0 -6
- data/spec/models/achievement_additional_properties_spec.rb +59 -0
- data/spec/models/achievement_progress_spec.rb +99 -0
- data/spec/models/achievement_spec.rb +107 -0
- data/spec/models/add_item_catalog_action_spec.rb +6 -0
- data/spec/models/add_to_audience_effect_props_spec.rb +59 -0
- data/spec/models/additional_campaign_properties_spec.rb +171 -0
- data/spec/models/application_analytics_data_point_avg_items_per_session_spec.rb +47 -0
- data/spec/models/application_analytics_data_point_avg_session_value_spec.rb +47 -0
- data/spec/models/application_analytics_data_point_sessions_count_spec.rb +47 -0
- data/spec/models/application_analytics_data_point_spec.rb +83 -0
- data/spec/models/application_analytics_data_point_total_revenue_spec.rb +47 -0
- data/spec/models/application_api_key_spec.rb +17 -1
- data/spec/models/application_campaign_analytics_avg_items_per_session_spec.rb +53 -0
- data/spec/models/application_campaign_analytics_avg_session_value_spec.rb +53 -0
- data/spec/models/application_campaign_analytics_coupons_count_spec.rb +47 -0
- data/spec/models/application_campaign_analytics_sessions_count_spec.rb +53 -0
- data/spec/models/application_campaign_analytics_spec.rb +129 -0
- data/spec/models/application_campaign_analytics_total_discounts_spec.rb +47 -0
- data/spec/models/application_campaign_analytics_total_revenue_spec.rb +53 -0
- data/spec/models/application_event_spec.rb +12 -0
- data/spec/models/application_session_spec.rb +9 -3
- data/spec/models/application_spec.rb +6 -20
- data/spec/models/application_store_entity_spec.rb +41 -0
- data/spec/models/attribute_spec.rb +1 -1
- data/spec/models/base_campaign_spec.rb +137 -0
- data/spec/models/base_loyalty_program_spec.rb +36 -0
- data/spec/models/base_notification_entity_spec.rb +6 -0
- data/spec/models/base_notification_spec.rb +16 -0
- data/spec/models/base_notification_webhook_spec.rb +6 -0
- data/spec/models/bulk_operation_on_campaigns_spec.rb +51 -0
- data/spec/models/campaign_budget_spec.rb +53 -0
- data/spec/models/campaign_copy_spec.rb +6 -0
- data/spec/models/campaign_created_notification_spec.rb +1 -1
- data/spec/models/campaign_evaluation_group_spec.rb +91 -0
- data/spec/models/campaign_evaluation_position_spec.rb +53 -0
- data/spec/models/campaign_evaluation_tree_changed_notification_spec.rb +53 -0
- data/spec/models/campaign_notification_policy_spec.rb +41 -0
- data/spec/models/campaign_set_branch_node_spec.rb +38 -0
- data/spec/models/campaign_set_spec.rb +2 -8
- data/spec/models/campaign_spec.rb +33 -1
- data/spec/models/campaign_template_spec.rb +11 -1
- data/spec/models/card_expiring_points_notification_policy_spec.rb +53 -0
- data/spec/models/card_expiring_points_notification_trigger_spec.rb +51 -0
- data/spec/models/card_ledger_points_entry_integration_api_spec.rb +95 -0
- data/spec/models/cart_item_spec.rb +6 -0
- data/spec/models/catalog_item_spec.rb +6 -0
- data/spec/models/change_loyalty_tier_level_effect_props_spec.rb +71 -0
- data/spec/models/coupon_spec.rb +6 -0
- data/spec/models/coupons_notification_policy_spec.rb +6 -0
- data/spec/models/create_achievement_spec.rb +71 -0
- data/spec/models/create_application_api_key_spec.rb +17 -1
- data/spec/models/create_template_campaign_spec.rb +12 -0
- data/spec/models/customer_inventory_spec.rb +6 -0
- data/spec/models/customer_profile_integration_response_v2_spec.rb +89 -0
- data/spec/models/customer_session_v2_spec.rb +6 -0
- data/spec/models/deactivate_user_request_spec.rb +41 -0
- data/spec/models/delete_user_request_spec.rb +41 -0
- data/spec/models/effect_entity_spec.rb +6 -0
- data/spec/models/effect_spec.rb +6 -0
- data/spec/models/environment_spec.rb +6 -0
- data/spec/models/event_spec.rb +6 -0
- data/spec/models/event_v2_spec.rb +6 -0
- data/spec/models/expiring_coupons_notification_policy_spec.rb +53 -0
- data/spec/models/expiring_coupons_notification_trigger_spec.rb +51 -0
- data/spec/models/expiring_points_notification_policy_spec.rb +6 -0
- data/spec/models/get_integration_coupon_request_spec.rb +47 -0
- data/spec/models/identifiable_entity_spec.rb +41 -0
- data/spec/models/increase_achievement_progress_effect_props_spec.rb +77 -0
- data/spec/models/inline_response20013_spec.rb +1 -1
- data/spec/models/inline_response20015_spec.rb +0 -6
- data/spec/models/inline_response20019_spec.rb +1 -1
- data/spec/models/inline_response20021_spec.rb +0 -6
- data/spec/models/inline_response20022_spec.rb +2 -2
- data/spec/models/inline_response20024_spec.rb +6 -0
- data/spec/models/inline_response20028_spec.rb +1 -1
- data/spec/models/inline_response20029_spec.rb +0 -6
- data/spec/models/inline_response20031_spec.rb +1 -1
- data/spec/models/inline_response20032_spec.rb +1 -1
- data/spec/models/inline_response20033_spec.rb +6 -0
- data/spec/models/inline_response20035_spec.rb +6 -0
- data/spec/models/inline_response20038_spec.rb +0 -6
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response20041_spec.rb +47 -0
- data/spec/models/inline_response20042_spec.rb +53 -0
- data/spec/models/inline_response20043_spec.rb +47 -0
- data/spec/models/inline_response20044_spec.rb +47 -0
- data/spec/models/inline_response20045_spec.rb +53 -0
- data/spec/models/inline_response20046_spec.rb +47 -0
- data/spec/models/inline_response20047_spec.rb +47 -0
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2008_spec.rb +1 -1
- data/spec/models/integration_coupon_spec.rb +6 -0
- data/spec/models/integration_event_spec.rb +6 -0
- data/spec/models/integration_event_v2_request_spec.rb +6 -0
- data/spec/models/integration_store_entity_spec.rb +41 -0
- data/spec/models/inventory_coupon_spec.rb +6 -0
- data/spec/models/ledger_points_entry_integration_api_spec.rb +89 -0
- data/spec/models/loyalty_program_ledgers_spec.rb +6 -0
- data/spec/models/loyalty_program_spec.rb +54 -0
- data/spec/models/loyalty_program_subledgers_spec.rb +47 -0
- data/spec/models/loyalty_program_transaction_spec.rb +6 -0
- data/spec/models/message_log_entries_spec.rb +47 -0
- data/spec/models/message_log_entry_spec.rb +111 -0
- data/spec/models/message_log_request_spec.rb +47 -0
- data/spec/models/message_log_response_spec.rb +53 -0
- data/spec/models/new_application_api_key_spec.rb +17 -1
- data/spec/models/new_application_spec.rb +0 -20
- data/spec/models/new_attribute_spec.rb +1 -1
- data/spec/models/new_base_notification_spec.rb +6 -0
- data/spec/models/new_campaign_evaluation_group_spec.rb +79 -0
- data/spec/models/new_campaign_spec.rb +23 -1
- data/spec/models/new_campaign_template_spec.rb +11 -1
- data/spec/models/new_coupons_spec.rb +6 -0
- data/spec/models/new_customer_session_v2_spec.rb +6 -0
- data/spec/models/new_event_spec.rb +6 -0
- data/spec/models/new_invitation_spec.rb +7 -1
- data/spec/models/new_loyalty_program_spec.rb +36 -0
- data/spec/models/new_notification_test_spec.rb +79 -0
- data/spec/models/new_notification_webhook_spec.rb +6 -0
- data/spec/models/new_role_v2_spec.rb +59 -0
- data/spec/models/new_store_spec.rb +59 -0
- data/spec/models/notification_activation_spec.rb +41 -0
- data/spec/models/notification_list_item_spec.rb +59 -0
- data/spec/models/notification_test_spec.rb +47 -0
- data/spec/models/one_time_code_spec.rb +59 -0
- data/spec/models/outgoing_integration_clever_tap_policy_spec.rb +53 -0
- data/spec/models/outgoing_integration_iterable_policy_spec.rb +47 -0
- data/spec/models/outgoing_integration_mo_engage_policy_spec.rb +59 -0
- data/spec/models/outgoing_integration_template_spec.rb +87 -0
- data/spec/models/outgoing_integration_template_with_configuration_details_spec.rb +93 -0
- data/spec/models/outgoing_integration_templates_spec.rb +41 -0
- data/spec/models/patch_item_catalog_action_spec.rb +6 -0
- data/spec/models/pending_points_notification_policy_spec.rb +47 -0
- data/spec/models/product_spec.rb +41 -0
- data/spec/models/remove_from_audience_effect_props_spec.rb +59 -0
- data/spec/models/role_v2_application_details_spec.rb +6 -0
- data/spec/models/role_v2_base_spec.rb +59 -0
- data/spec/models/role_v2_permission_set_spec.rb +1 -1
- data/spec/models/role_v2_roles_group_spec.rb +53 -0
- data/spec/models/role_v2_spec.rb +21 -3
- data/spec/models/saml_connection_internal_spec.rb +47 -0
- data/spec/models/saml_login_endpoint_spec.rb +6 -0
- data/spec/models/set_discount_per_item_effect_props_spec.rb +12 -0
- data/spec/models/sso_config_spec.rb +41 -0
- data/spec/models/store_spec.rb +89 -0
- data/spec/models/talang_attribute_spec.rb +1 -1
- data/spec/models/tier_downgrade_notification_policy_spec.rb +47 -0
- data/spec/models/tier_spec.rb +16 -0
- data/spec/models/tier_upgrade_notification_policy_spec.rb +47 -0
- data/spec/models/tier_will_downgrade_notification_policy_spec.rb +53 -0
- data/spec/models/tier_will_downgrade_notification_trigger_spec.rb +51 -0
- data/spec/models/time_point_spec.rb +71 -0
- data/spec/models/track_event_v2_response_spec.rb +89 -0
- data/spec/models/two_fa_config_spec.rb +47 -0
- data/spec/models/update_achievement_spec.rb +71 -0
- data/spec/models/update_application_api_key_spec.rb +41 -0
- data/spec/models/update_application_spec.rb +6 -20
- data/spec/models/update_campaign_evaluation_group_spec.rb +79 -0
- data/spec/models/update_campaign_spec.rb +23 -1
- data/spec/models/update_campaign_template_spec.rb +11 -1
- data/spec/models/update_coupon_spec.rb +6 -0
- data/spec/models/update_loyalty_program_spec.rb +36 -0
- data/spec/models/update_store_spec.rb +53 -0
- data/spec/models/update_user_spec.rb +12 -6
- data/spec/models/user_spec.rb +23 -5
- data/spec/models/webhook_with_outgoing_integration_details_spec.rb +123 -0
- data/talon_one.gemspec +1 -1
- metadata +713 -369
@@ -84,7 +84,7 @@ module TalonOne
|
|
84
84
|
end
|
85
85
|
|
86
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.
|
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. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <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). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
|
88
88
|
# @param coupon_value [String] The code of the coupon.
|
89
89
|
# @param body [CouponReservations] body
|
90
90
|
# @param [Hash] opts the optional parameters
|
@@ -95,7 +95,7 @@ module TalonOne
|
|
95
95
|
end
|
96
96
|
|
97
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.
|
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. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <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). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint.
|
99
99
|
# @param coupon_value [String] The code of the coupon.
|
100
100
|
# @param body [CouponReservations] body
|
101
101
|
# @param [Hash] opts the optional parameters
|
@@ -286,7 +286,7 @@ module TalonOne
|
|
286
286
|
|
287
287
|
# Delete audience memberships
|
288
288
|
# Remove all members from this audience.
|
289
|
-
# @param audience_id [Integer] The ID of the audience.
|
289
|
+
# @param audience_id [Integer] The ID of the audience.
|
290
290
|
# @param [Hash] opts the optional parameters
|
291
291
|
# @return [nil]
|
292
292
|
def delete_audience_memberships_v2(audience_id, opts = {})
|
@@ -296,7 +296,7 @@ module TalonOne
|
|
296
296
|
|
297
297
|
# Delete audience memberships
|
298
298
|
# Remove all members from this audience.
|
299
|
-
# @param audience_id [Integer] The ID of the audience.
|
299
|
+
# @param audience_id [Integer] The ID of the audience.
|
300
300
|
# @param [Hash] opts the optional parameters
|
301
301
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
302
302
|
def delete_audience_memberships_v2_with_http_info(audience_id, opts = {})
|
@@ -348,7 +348,7 @@ module TalonOne
|
|
348
348
|
|
349
349
|
# Delete audience
|
350
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.
|
351
|
+
# @param audience_id [Integer] The ID of the audience.
|
352
352
|
# @param [Hash] opts the optional parameters
|
353
353
|
# @return [nil]
|
354
354
|
def delete_audience_v2(audience_id, opts = {})
|
@@ -358,7 +358,7 @@ module TalonOne
|
|
358
358
|
|
359
359
|
# Delete audience
|
360
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.
|
361
|
+
# @param audience_id [Integer] The ID of the audience.
|
362
362
|
# @param [Hash] opts the optional parameters
|
363
363
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
364
364
|
def delete_audience_v2_with_http_info(audience_id, opts = {})
|
@@ -480,7 +480,7 @@ module TalonOne
|
|
480
480
|
|
481
481
|
# Delete customer's personal data
|
482
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
|
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.
|
484
484
|
# @param [Hash] opts the optional parameters
|
485
485
|
# @return [nil]
|
486
486
|
def delete_customer_data(integration_id, opts = {})
|
@@ -490,7 +490,7 @@ module TalonOne
|
|
490
490
|
|
491
491
|
# Delete customer's personal data
|
492
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
|
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.
|
494
494
|
# @param [Hash] opts the optional parameters
|
495
495
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
496
496
|
def delete_customer_data_with_http_info(integration_id, opts = {})
|
@@ -542,13 +542,14 @@ module TalonOne
|
|
542
542
|
|
543
543
|
# List customer data
|
544
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
|
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.
|
546
546
|
# @param [Hash] opts the optional parameters
|
547
547
|
# @option opts [Boolean] :profile Set to `true` to include customer profile information in the response.
|
548
548
|
# @option opts [Boolean] :referrals Set to `true` to include referral information in the response.
|
549
549
|
# @option opts [Boolean] :coupons Set to `true` to include coupon information in the response.
|
550
550
|
# @option opts [Boolean] :loyalty Set to `true` to include loyalty information in the response.
|
551
551
|
# @option opts [Boolean] :giveaways Set to `true` to include giveaways information in the response.
|
552
|
+
# @option opts [Boolean] :achievements Set to `true` to include achievement information in the response.
|
552
553
|
# @return [CustomerInventory]
|
553
554
|
def get_customer_inventory(integration_id, opts = {})
|
554
555
|
data, _status_code, _headers = get_customer_inventory_with_http_info(integration_id, opts)
|
@@ -557,13 +558,14 @@ module TalonOne
|
|
557
558
|
|
558
559
|
# List customer data
|
559
560
|
# 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
|
561
|
+
# @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.
|
561
562
|
# @param [Hash] opts the optional parameters
|
562
563
|
# @option opts [Boolean] :profile Set to `true` to include customer profile information in the response.
|
563
564
|
# @option opts [Boolean] :referrals Set to `true` to include referral information in the response.
|
564
565
|
# @option opts [Boolean] :coupons Set to `true` to include coupon information in the response.
|
565
566
|
# @option opts [Boolean] :loyalty Set to `true` to include loyalty information in the response.
|
566
567
|
# @option opts [Boolean] :giveaways Set to `true` to include giveaways information in the response.
|
568
|
+
# @option opts [Boolean] :achievements Set to `true` to include achievement information in the response.
|
567
569
|
# @return [Array<(CustomerInventory, Integer, Hash)>] CustomerInventory data, response status code and response headers
|
568
570
|
def get_customer_inventory_with_http_info(integration_id, opts = {})
|
569
571
|
if @api_client.config.debugging
|
@@ -583,6 +585,7 @@ module TalonOne
|
|
583
585
|
query_params[:'coupons'] = opts[:'coupons'] if !opts[:'coupons'].nil?
|
584
586
|
query_params[:'loyalty'] = opts[:'loyalty'] if !opts[:'loyalty'].nil?
|
585
587
|
query_params[:'giveaways'] = opts[:'giveaways'] if !opts[:'giveaways'].nil?
|
588
|
+
query_params[:'achievements'] = opts[:'achievements'] if !opts[:'achievements'].nil?
|
586
589
|
|
587
590
|
# header parameters
|
588
591
|
header_params = opts[:header_params] || {}
|
@@ -680,11 +683,12 @@ module TalonOne
|
|
680
683
|
end
|
681
684
|
|
682
685
|
# 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.
|
684
|
-
# @param loyalty_program_id [Integer] Identifier of the
|
686
|
+
# Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: 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. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data)
|
687
|
+
# @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
685
688
|
# @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.
|
686
689
|
# @param [Hash] opts the optional parameters
|
687
|
-
# @option opts [DateTime] :end_date Used to return
|
690
|
+
# @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
691
|
+
# @option opts [Array<String>] :subledger_id Filter results by one or more subledger IDs. Must be exact match.
|
688
692
|
# @return [LoyaltyBalances]
|
689
693
|
def get_loyalty_balances(loyalty_program_id, integration_id, opts = {})
|
690
694
|
data, _status_code, _headers = get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts)
|
@@ -692,11 +696,12 @@ module TalonOne
|
|
692
696
|
end
|
693
697
|
|
694
698
|
# 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.
|
696
|
-
# @param loyalty_program_id [Integer] Identifier of the
|
699
|
+
# Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: 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. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data)
|
700
|
+
# @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
697
701
|
# @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.
|
698
702
|
# @param [Hash] opts the optional parameters
|
699
|
-
# @option opts [DateTime] :end_date Used to return
|
703
|
+
# @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
704
|
+
# @option opts [Array<String>] :subledger_id Filter results by one or more subledger IDs. Must be exact match.
|
700
705
|
# @return [Array<(LoyaltyBalances, Integer, Hash)>] LoyaltyBalances data, response status code and response headers
|
701
706
|
def get_loyalty_balances_with_http_info(loyalty_program_id, integration_id, opts = {})
|
702
707
|
if @api_client.config.debugging
|
@@ -716,6 +721,7 @@ module TalonOne
|
|
716
721
|
# query parameters
|
717
722
|
query_params = opts[:query_params] || {}
|
718
723
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
724
|
+
query_params[:'subledgerId'] = @api_client.build_collection_param(opts[:'subledger_id'], :csv) if !opts[:'subledger_id'].nil?
|
719
725
|
|
720
726
|
# header parameters
|
721
727
|
header_params = opts[:header_params] || {}
|
@@ -755,7 +761,8 @@ module TalonOne
|
|
755
761
|
# @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
762
|
# @param loyalty_card_id [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.
|
757
763
|
# @param [Hash] opts the optional parameters
|
758
|
-
# @option opts [DateTime] :end_date Used to return
|
764
|
+
# @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
765
|
+
# @option opts [Array<String>] :subledger_id Filter results by one or more subledger IDs. Must be exact match.
|
759
766
|
# @return [LoyaltyBalances]
|
760
767
|
def get_loyalty_card_balances(loyalty_program_id, loyalty_card_id, opts = {})
|
761
768
|
data, _status_code, _headers = get_loyalty_card_balances_with_http_info(loyalty_program_id, loyalty_card_id, opts)
|
@@ -767,7 +774,8 @@ module TalonOne
|
|
767
774
|
# @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
775
|
# @param loyalty_card_id [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.
|
769
776
|
# @param [Hash] opts the optional parameters
|
770
|
-
# @option opts [DateTime] :end_date Used to return
|
777
|
+
# @option opts [DateTime] :end_date Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
778
|
+
# @option opts [Array<String>] :subledger_id Filter results by one or more subledger IDs. Must be exact match.
|
771
779
|
# @return [Array<(LoyaltyBalances, Integer, Hash)>] LoyaltyBalances data, response status code and response headers
|
772
780
|
def get_loyalty_card_balances_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
|
773
781
|
if @api_client.config.debugging
|
@@ -791,6 +799,7 @@ module TalonOne
|
|
791
799
|
# query parameters
|
792
800
|
query_params = opts[:query_params] || {}
|
793
801
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
802
|
+
query_params[:'subledgerId'] = @api_client.build_collection_param(opts[:'subledger_id'], :csv) if !opts[:'subledger_id'].nil?
|
794
803
|
|
795
804
|
# header parameters
|
796
805
|
header_params = opts[:header_params] || {}
|
@@ -825,16 +834,113 @@ module TalonOne
|
|
825
834
|
return data, status_code, headers
|
826
835
|
end
|
827
836
|
|
837
|
+
# List card's unused loyalty points
|
838
|
+
# Get paginated results of loyalty points for a given loyalty card identifier in a card-based loyalty program. This endpoint returns only the balances of unused points on a loyalty card. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past.
|
839
|
+
# @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.
|
840
|
+
# @param loyalty_card_id [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.
|
841
|
+
# @param [Hash] opts the optional parameters
|
842
|
+
# @option opts [String] :status Filter points based on their status. (default to 'active')
|
843
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
844
|
+
# @option opts [Integer] :page_size The number of items in the response. (default to 50)
|
845
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
846
|
+
# @return [InlineResponse2003]
|
847
|
+
def get_loyalty_card_points(loyalty_program_id, loyalty_card_id, opts = {})
|
848
|
+
data, _status_code, _headers = get_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, opts)
|
849
|
+
data
|
850
|
+
end
|
851
|
+
|
852
|
+
# List card's unused loyalty points
|
853
|
+
# Get paginated results of loyalty points for a given loyalty card identifier in a card-based loyalty program. This endpoint returns only the balances of unused points on a loyalty card. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past.
|
854
|
+
# @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.
|
855
|
+
# @param loyalty_card_id [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.
|
856
|
+
# @param [Hash] opts the optional parameters
|
857
|
+
# @option opts [String] :status Filter points based on their status.
|
858
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
859
|
+
# @option opts [Integer] :page_size The number of items in the response.
|
860
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
861
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
|
862
|
+
def get_loyalty_card_points_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
|
863
|
+
if @api_client.config.debugging
|
864
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_card_points ...'
|
865
|
+
end
|
866
|
+
# verify the required parameter 'loyalty_program_id' is set
|
867
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
868
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_card_points"
|
869
|
+
end
|
870
|
+
# verify the required parameter 'loyalty_card_id' is set
|
871
|
+
if @api_client.config.client_side_validation && loyalty_card_id.nil?
|
872
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling IntegrationApi.get_loyalty_card_points"
|
873
|
+
end
|
874
|
+
if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
|
875
|
+
fail ArgumentError, 'invalid value for "loyalty_card_id" when calling IntegrationApi.get_loyalty_card_points, the character length must be smaller than or equal to 108.'
|
876
|
+
end
|
877
|
+
|
878
|
+
allowable_values = ["active", "pending", "expired"]
|
879
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
880
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
881
|
+
end
|
882
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
|
883
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_card_points, must be smaller than or equal to 50.'
|
884
|
+
end
|
885
|
+
|
886
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
887
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_card_points, must be greater than or equal to 1.'
|
888
|
+
end
|
889
|
+
|
890
|
+
# resource path
|
891
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/points'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardId' + '}', CGI.escape(loyalty_card_id.to_s))
|
892
|
+
|
893
|
+
# query parameters
|
894
|
+
query_params = opts[:query_params] || {}
|
895
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
896
|
+
query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
|
897
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
898
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
899
|
+
|
900
|
+
# header parameters
|
901
|
+
header_params = opts[:header_params] || {}
|
902
|
+
# HTTP header 'Accept' (if needed)
|
903
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
904
|
+
|
905
|
+
# form parameters
|
906
|
+
form_params = opts[:form_params] || {}
|
907
|
+
|
908
|
+
# http body (model)
|
909
|
+
post_body = opts[:body]
|
910
|
+
|
911
|
+
# return_type
|
912
|
+
return_type = opts[:return_type] || 'InlineResponse2003'
|
913
|
+
|
914
|
+
# auth_names
|
915
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
916
|
+
|
917
|
+
new_options = opts.merge(
|
918
|
+
:header_params => header_params,
|
919
|
+
:query_params => query_params,
|
920
|
+
:form_params => form_params,
|
921
|
+
:body => post_body,
|
922
|
+
:auth_names => auth_names,
|
923
|
+
:return_type => return_type
|
924
|
+
)
|
925
|
+
|
926
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
927
|
+
if @api_client.config.debugging
|
928
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_loyalty_card_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
929
|
+
end
|
930
|
+
return data, status_code, headers
|
931
|
+
end
|
932
|
+
|
828
933
|
# List card's transactions
|
829
934
|
# 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
935
|
# @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
936
|
# @param loyalty_card_id [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.
|
832
937
|
# @param [Hash] opts the optional parameters
|
833
938
|
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
834
|
-
# @option opts [
|
835
|
-
# @option opts [DateTime] :
|
836
|
-
# @option opts [
|
837
|
-
# @option opts [Integer] :
|
939
|
+
# @option opts [String] :loyalty_transaction_type Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file.
|
940
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
941
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
942
|
+
# @option opts [Integer] :page_size The number of items in the response. (default to 1000)
|
943
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
838
944
|
# @return [InlineResponse2001]
|
839
945
|
def get_loyalty_card_transactions(loyalty_program_id, loyalty_card_id, opts = {})
|
840
946
|
data, _status_code, _headers = get_loyalty_card_transactions_with_http_info(loyalty_program_id, loyalty_card_id, opts)
|
@@ -847,10 +953,11 @@ module TalonOne
|
|
847
953
|
# @param loyalty_card_id [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.
|
848
954
|
# @param [Hash] opts the optional parameters
|
849
955
|
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
850
|
-
# @option opts [
|
851
|
-
# @option opts [DateTime] :
|
852
|
-
# @option opts [
|
853
|
-
# @option opts [Integer] :
|
956
|
+
# @option opts [String] :loyalty_transaction_type Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file.
|
957
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
958
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
959
|
+
# @option opts [Integer] :page_size The number of items in the response.
|
960
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
854
961
|
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
855
962
|
def get_loyalty_card_transactions_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
|
856
963
|
if @api_client.config.debugging
|
@@ -868,6 +975,10 @@ module TalonOne
|
|
868
975
|
fail ArgumentError, 'invalid value for "loyalty_card_id" when calling IntegrationApi.get_loyalty_card_transactions, the character length must be smaller than or equal to 108.'
|
869
976
|
end
|
870
977
|
|
978
|
+
allowable_values = ["manual", "session", "import"]
|
979
|
+
if @api_client.config.client_side_validation && opts[:'loyalty_transaction_type'] && !allowable_values.include?(opts[:'loyalty_transaction_type'])
|
980
|
+
fail ArgumentError, "invalid value for \"loyalty_transaction_type\", must be one of #{allowable_values}"
|
981
|
+
end
|
871
982
|
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
|
872
983
|
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_card_transactions, must be smaller than or equal to 1000.'
|
873
984
|
end
|
@@ -882,6 +993,7 @@ module TalonOne
|
|
882
993
|
# query parameters
|
883
994
|
query_params = opts[:query_params] || {}
|
884
995
|
query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
|
996
|
+
query_params[:'loyaltyTransactionType'] = opts[:'loyalty_transaction_type'] if !opts[:'loyalty_transaction_type'].nil?
|
885
997
|
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
886
998
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
887
999
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
@@ -920,16 +1032,109 @@ module TalonOne
|
|
920
1032
|
return data, status_code, headers
|
921
1033
|
end
|
922
1034
|
|
1035
|
+
# List customer's unused loyalty points
|
1036
|
+
# Get paginated results of loyalty points for a given Integration ID in the specified profile-based loyalty program. This endpoint returns only the balances of unused points linked to a customer profile. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past.
|
1037
|
+
# @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
1038
|
+
# @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.
|
1039
|
+
# @param [Hash] opts the optional parameters
|
1040
|
+
# @option opts [String] :status Filter points based on their status. (default to 'active')
|
1041
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
1042
|
+
# @option opts [Integer] :page_size The number of items in the response. (default to 50)
|
1043
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
1044
|
+
# @return [InlineResponse2004]
|
1045
|
+
def get_loyalty_program_profile_points(loyalty_program_id, integration_id, opts = {})
|
1046
|
+
data, _status_code, _headers = get_loyalty_program_profile_points_with_http_info(loyalty_program_id, integration_id, opts)
|
1047
|
+
data
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# List customer's unused loyalty points
|
1051
|
+
# Get paginated results of loyalty points for a given Integration ID in the specified profile-based loyalty program. This endpoint returns only the balances of unused points linked to a customer profile. You can filter points by status: - `active`: Points ready to be redeemed. - `pending`: Points with a start date in the future. - `expired`: Points with an expiration date in the past.
|
1052
|
+
# @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
1053
|
+
# @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.
|
1054
|
+
# @param [Hash] opts the optional parameters
|
1055
|
+
# @option opts [String] :status Filter points based on their status.
|
1056
|
+
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
1057
|
+
# @option opts [Integer] :page_size The number of items in the response.
|
1058
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
1059
|
+
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
1060
|
+
def get_loyalty_program_profile_points_with_http_info(loyalty_program_id, integration_id, opts = {})
|
1061
|
+
if @api_client.config.debugging
|
1062
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_program_profile_points ...'
|
1063
|
+
end
|
1064
|
+
# verify the required parameter 'loyalty_program_id' is set
|
1065
|
+
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
1066
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_program_profile_points"
|
1067
|
+
end
|
1068
|
+
# verify the required parameter 'integration_id' is set
|
1069
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
1070
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.get_loyalty_program_profile_points"
|
1071
|
+
end
|
1072
|
+
allowable_values = ["active", "pending", "expired"]
|
1073
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
1074
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
1075
|
+
end
|
1076
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
|
1077
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_program_profile_points, must be smaller than or equal to 50.'
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
1081
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_program_profile_points, must be greater than or equal to 1.'
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
# resource path
|
1085
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/points'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))
|
1086
|
+
|
1087
|
+
# query parameters
|
1088
|
+
query_params = opts[:query_params] || {}
|
1089
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
1090
|
+
query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
|
1091
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
1092
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
1093
|
+
|
1094
|
+
# header parameters
|
1095
|
+
header_params = opts[:header_params] || {}
|
1096
|
+
# HTTP header 'Accept' (if needed)
|
1097
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1098
|
+
|
1099
|
+
# form parameters
|
1100
|
+
form_params = opts[:form_params] || {}
|
1101
|
+
|
1102
|
+
# http body (model)
|
1103
|
+
post_body = opts[:body]
|
1104
|
+
|
1105
|
+
# return_type
|
1106
|
+
return_type = opts[:return_type] || 'InlineResponse2004'
|
1107
|
+
|
1108
|
+
# auth_names
|
1109
|
+
auth_names = opts[:auth_names] || ['api_key_v1']
|
1110
|
+
|
1111
|
+
new_options = opts.merge(
|
1112
|
+
:header_params => header_params,
|
1113
|
+
:query_params => query_params,
|
1114
|
+
:form_params => form_params,
|
1115
|
+
:body => post_body,
|
1116
|
+
:auth_names => auth_names,
|
1117
|
+
:return_type => return_type
|
1118
|
+
)
|
1119
|
+
|
1120
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1121
|
+
if @api_client.config.debugging
|
1122
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_loyalty_program_profile_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1123
|
+
end
|
1124
|
+
return data, status_code, headers
|
1125
|
+
end
|
1126
|
+
|
923
1127
|
# List customer's loyalty transactions
|
924
1128
|
# 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
|
1129
|
+
# @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
926
1130
|
# @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.
|
927
1131
|
# @param [Hash] opts the optional parameters
|
928
1132
|
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
929
|
-
# @option opts [
|
930
|
-
# @option opts [DateTime] :
|
931
|
-
# @option opts [
|
932
|
-
# @option opts [Integer] :
|
1133
|
+
# @option opts [String] :loyalty_transaction_type Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file.
|
1134
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
1135
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
1136
|
+
# @option opts [Integer] :page_size The number of items in the response. (default to 50)
|
1137
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
933
1138
|
# @return [InlineResponse2002]
|
934
1139
|
def get_loyalty_program_profile_transactions(loyalty_program_id, integration_id, opts = {})
|
935
1140
|
data, _status_code, _headers = get_loyalty_program_profile_transactions_with_http_info(loyalty_program_id, integration_id, opts)
|
@@ -938,14 +1143,15 @@ module TalonOne
|
|
938
1143
|
|
939
1144
|
# List customer's loyalty transactions
|
940
1145
|
# 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
|
1146
|
+
# @param loyalty_program_id [Integer] Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
942
1147
|
# @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.
|
943
1148
|
# @param [Hash] opts the optional parameters
|
944
1149
|
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
945
|
-
# @option opts [
|
946
|
-
# @option opts [DateTime] :
|
947
|
-
# @option opts [
|
948
|
-
# @option opts [Integer] :
|
1150
|
+
# @option opts [String] :loyalty_transaction_type Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file.
|
1151
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
1152
|
+
# @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. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered.
|
1153
|
+
# @option opts [Integer] :page_size The number of items in the response.
|
1154
|
+
# @option opts [Integer] :skip The number of items to skip when paging through large result sets.
|
949
1155
|
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
950
1156
|
def get_loyalty_program_profile_transactions_with_http_info(loyalty_program_id, integration_id, opts = {})
|
951
1157
|
if @api_client.config.debugging
|
@@ -959,6 +1165,10 @@ module TalonOne
|
|
959
1165
|
if @api_client.config.client_side_validation && integration_id.nil?
|
960
1166
|
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.get_loyalty_program_profile_transactions"
|
961
1167
|
end
|
1168
|
+
allowable_values = ["manual", "session", "import"]
|
1169
|
+
if @api_client.config.client_side_validation && opts[:'loyalty_transaction_type'] && !allowable_values.include?(opts[:'loyalty_transaction_type'])
|
1170
|
+
fail ArgumentError, "invalid value for \"loyalty_transaction_type\", must be one of #{allowable_values}"
|
1171
|
+
end
|
962
1172
|
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50
|
963
1173
|
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationApi.get_loyalty_program_profile_transactions, must be smaller than or equal to 50.'
|
964
1174
|
end
|
@@ -973,6 +1183,7 @@ module TalonOne
|
|
973
1183
|
# query parameters
|
974
1184
|
query_params = opts[:query_params] || {}
|
975
1185
|
query_params[:'subledgerId'] = opts[:'subledger_id'] if !opts[:'subledger_id'].nil?
|
1186
|
+
query_params[:'loyaltyTransactionType'] = opts[:'loyalty_transaction_type'] if !opts[:'loyalty_transaction_type'].nil?
|
976
1187
|
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
977
1188
|
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
978
1189
|
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
@@ -1074,7 +1285,7 @@ module TalonOne
|
|
1074
1285
|
end
|
1075
1286
|
|
1076
1287
|
# Link customer profile to card
|
1077
|
-
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/
|
1288
|
+
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-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/card-based/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/card-based/creating-cb-programs) allows.
|
1078
1289
|
# @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
1290
|
# @param loyalty_card_id [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
1291
|
# @param body [LoyaltyCardRegistration] body
|
@@ -1086,7 +1297,7 @@ module TalonOne
|
|
1086
1297
|
end
|
1087
1298
|
|
1088
1299
|
# Link customer profile to card
|
1089
|
-
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/
|
1300
|
+
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-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/card-based/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/card-based/creating-cb-programs) allows.
|
1090
1301
|
# @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
1302
|
# @param loyalty_card_id [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
1303
|
# @param body [LoyaltyCardRegistration] body
|
@@ -1154,7 +1365,7 @@ module TalonOne
|
|
1154
1365
|
end
|
1155
1366
|
|
1156
1367
|
# Reopen customer session
|
1157
|
-
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities
|
1368
|
+
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). 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>non-pending</strong> 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
1369
|
# @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
1370
|
# @param [Hash] opts the optional parameters
|
1160
1371
|
# @return [ReopenSessionResponse]
|
@@ -1164,7 +1375,7 @@ module TalonOne
|
|
1164
1375
|
end
|
1165
1376
|
|
1166
1377
|
# Reopen customer session
|
1167
|
-
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities
|
1378
|
+
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). 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>non-pending</strong> 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
1379
|
# @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
1380
|
# @param [Hash] opts the optional parameters
|
1170
1381
|
# @return [Array<(ReopenSessionResponse, Integer, Hash)>] ReopenSessionResponse data, response status code and response headers
|
@@ -1216,7 +1427,7 @@ module TalonOne
|
|
1216
1427
|
end
|
1217
1428
|
|
1218
1429
|
# 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`.
|
1430
|
+
# Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. **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-sessions#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session).
|
1220
1431
|
# @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
1432
|
# @param body [ReturnIntegrationRequest] body
|
1222
1433
|
# @param [Hash] opts the optional parameters
|
@@ -1228,7 +1439,7 @@ module TalonOne
|
|
1228
1439
|
end
|
1229
1440
|
|
1230
1441
|
# 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`.
|
1442
|
+
# Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. **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-sessions#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session).
|
1232
1443
|
# @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
1444
|
# @param body [ReturnIntegrationRequest] body
|
1234
1445
|
# @param [Hash] opts the optional parameters
|
@@ -1289,7 +1500,7 @@ module TalonOne
|
|
1289
1500
|
end
|
1290
1501
|
|
1291
1502
|
# Sync cart item catalog
|
1292
|
-
# Perform one or more of the following
|
1503
|
+
# Perform one or more of the following actions for a given cart item catalog: - Adding an item to the catalog. - Adding several items to the catalog. - Editing the attributes of an item in the catalog. - Editing the attributes of several items in the catalog. - Removing an item from the catalog. - Removing several items from the catalog. You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [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-attributes) 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\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Adding several items to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"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\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of several items in the catalog</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</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
1504
|
# @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
1505
|
# @param body [CatalogSyncRequest] body
|
1295
1506
|
# @param [Hash] opts the optional parameters
|
@@ -1300,7 +1511,7 @@ module TalonOne
|
|
1300
1511
|
end
|
1301
1512
|
|
1302
1513
|
# Sync cart item catalog
|
1303
|
-
# Perform one or more of the following
|
1514
|
+
# Perform one or more of the following actions for a given cart item catalog: - Adding an item to the catalog. - Adding several items to the catalog. - Editing the attributes of an item in the catalog. - Editing the attributes of several items in the catalog. - Removing an item from the catalog. - Removing several items from the catalog. You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. For more information, read [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-attributes) 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\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" } ] } ``` </div> </details> <details> <summary><strong>Adding several items to the catalog</strong></summary> <div> ```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241027\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"type\": \"ADD\" }, { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoes\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100, \"product\": { \"name\": \"sneakers\" } }, \"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\", \"product\": { \"name\": \"sneakers\" } }, \"type\": \"PATCH\" } ] } ``` </div> </details> <details> <summary><strong>Editing the attributes of several items in the catalog</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</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
1515
|
# @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
1516
|
# @param body [CatalogSyncRequest] body
|
1306
1517
|
# @param [Hash] opts the optional parameters
|
@@ -1359,91 +1570,24 @@ module TalonOne
|
|
1359
1570
|
end
|
1360
1571
|
|
1361
1572
|
# Track event
|
1362
|
-
#
|
1363
|
-
# @param body [NewEvent] body
|
1364
|
-
# @param [Hash] opts the optional parameters
|
1365
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1366
|
-
# @return [IntegrationState]
|
1367
|
-
def track_event(body, opts = {})
|
1368
|
-
data, _status_code, _headers = track_event_with_http_info(body, opts)
|
1369
|
-
data
|
1370
|
-
end
|
1371
|
-
|
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
|
1375
|
-
# @param [Hash] opts the optional parameters
|
1376
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1377
|
-
# @return [Array<(IntegrationState, Integer, Hash)>] IntegrationState data, response status code and response headers
|
1378
|
-
def track_event_with_http_info(body, opts = {})
|
1379
|
-
if @api_client.config.debugging
|
1380
|
-
@api_client.config.logger.debug 'Calling API: IntegrationApi.track_event ...'
|
1381
|
-
end
|
1382
|
-
# verify the required parameter 'body' is set
|
1383
|
-
if @api_client.config.client_side_validation && body.nil?
|
1384
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.track_event"
|
1385
|
-
end
|
1386
|
-
# resource path
|
1387
|
-
local_var_path = '/v1/events'
|
1388
|
-
|
1389
|
-
# query parameters
|
1390
|
-
query_params = opts[:query_params] || {}
|
1391
|
-
query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].nil?
|
1392
|
-
|
1393
|
-
# header parameters
|
1394
|
-
header_params = opts[:header_params] || {}
|
1395
|
-
# HTTP header 'Accept' (if needed)
|
1396
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1397
|
-
# HTTP header 'Content-Type'
|
1398
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1399
|
-
|
1400
|
-
# form parameters
|
1401
|
-
form_params = opts[:form_params] || {}
|
1402
|
-
|
1403
|
-
# http body (model)
|
1404
|
-
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1405
|
-
|
1406
|
-
# return_type
|
1407
|
-
return_type = opts[:return_type] || 'IntegrationState'
|
1408
|
-
|
1409
|
-
# auth_names
|
1410
|
-
auth_names = opts[:auth_names] || ['api_key_v1']
|
1411
|
-
|
1412
|
-
new_options = opts.merge(
|
1413
|
-
:header_params => header_params,
|
1414
|
-
:query_params => query_params,
|
1415
|
-
:form_params => form_params,
|
1416
|
-
:body => post_body,
|
1417
|
-
:auth_names => auth_names,
|
1418
|
-
:return_type => return_type
|
1419
|
-
)
|
1420
|
-
|
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.
|
1573
|
+
# Triggers a custom event. To use this endpoint: 1. Define a [custom event](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the **Events** view in the Campaign Manager. Talon.One also offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/entities/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). <div class=\"redoc-section\"> <p class=\"title\">Important</p> 1. `profileId` is required even though the schema does not say it. 1. If the customer profile ID is new, a new profile is automatically created but the `customer_profile_created` [built-in event ](https://docs.talon.one/docs/dev/concepts/entities/events) is **not** triggered. 1. We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). </div>
|
1430
1574
|
# @param body [IntegrationEventV2Request] body
|
1431
1575
|
# @param [Hash] opts the optional parameters
|
1432
1576
|
# @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
1577
|
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1434
|
-
# @return [
|
1578
|
+
# @return [TrackEventV2Response]
|
1435
1579
|
def track_event_v2(body, opts = {})
|
1436
1580
|
data, _status_code, _headers = track_event_v2_with_http_info(body, opts)
|
1437
1581
|
data
|
1438
1582
|
end
|
1439
1583
|
|
1440
|
-
# Track event
|
1441
|
-
# Triggers a custom event.
|
1584
|
+
# Track event
|
1585
|
+
# Triggers a custom event. To use this endpoint: 1. Define a [custom event](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the **Events** view in the Campaign Manager. Talon.One also offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/entities/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). <div class=\"redoc-section\"> <p class=\"title\">Important</p> 1. `profileId` is required even though the schema does not say it. 1. If the customer profile ID is new, a new profile is automatically created but the `customer_profile_created` [built-in event ](https://docs.talon.one/docs/dev/concepts/entities/events) is **not** triggered. 1. We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). </div>
|
1442
1586
|
# @param body [IntegrationEventV2Request] body
|
1443
1587
|
# @param [Hash] opts the optional parameters
|
1444
1588
|
# @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
1589
|
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`.
|
1446
|
-
# @return [Array<(
|
1590
|
+
# @return [Array<(TrackEventV2Response, Integer, Hash)>] TrackEventV2Response data, response status code and response headers
|
1447
1591
|
def track_event_v2_with_http_info(body, opts = {})
|
1448
1592
|
if @api_client.config.debugging
|
1449
1593
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.track_event_v2 ...'
|
@@ -1474,7 +1618,7 @@ module TalonOne
|
|
1474
1618
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1475
1619
|
|
1476
1620
|
# return_type
|
1477
|
-
return_type = opts[:return_type] || '
|
1621
|
+
return_type = opts[:return_type] || 'TrackEventV2Response'
|
1478
1622
|
|
1479
1623
|
# auth_names
|
1480
1624
|
auth_names = opts[:auth_names] || ['api_key_v1']
|
@@ -1497,7 +1641,7 @@ module TalonOne
|
|
1497
1641
|
|
1498
1642
|
# Update profile attributes for all customers in audience
|
1499
1643
|
# 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.
|
1644
|
+
# @param audience_id [Integer] The ID of the audience.
|
1501
1645
|
# @param body [Object] body
|
1502
1646
|
# @param [Hash] opts the optional parameters
|
1503
1647
|
# @return [nil]
|
@@ -1508,7 +1652,7 @@ module TalonOne
|
|
1508
1652
|
|
1509
1653
|
# Update profile attributes for all customers in audience
|
1510
1654
|
# 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.
|
1655
|
+
# @param audience_id [Integer] The ID of the audience.
|
1512
1656
|
# @param body [Object] body
|
1513
1657
|
# @param [Hash] opts the optional parameters
|
1514
1658
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
@@ -1566,8 +1710,8 @@ module TalonOne
|
|
1566
1710
|
end
|
1567
1711
|
|
1568
1712
|
# 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
|
1570
|
-
# @param audience_id [Integer] The ID of the audience.
|
1713
|
+
# 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.
|
1714
|
+
# @param audience_id [Integer] The ID of the audience.
|
1571
1715
|
# @param body [UpdateAudience] body
|
1572
1716
|
# @param [Hash] opts the optional parameters
|
1573
1717
|
# @return [Audience]
|
@@ -1577,8 +1721,8 @@ module TalonOne
|
|
1577
1721
|
end
|
1578
1722
|
|
1579
1723
|
# 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
|
1581
|
-
# @param audience_id [Integer] The ID of the audience.
|
1724
|
+
# 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.
|
1725
|
+
# @param audience_id [Integer] The ID of the audience.
|
1582
1726
|
# @param body [UpdateAudience] body
|
1583
1727
|
# @param [Hash] opts the optional parameters
|
1584
1728
|
# @return [Array<(Audience, Integer, Hash)>] Audience data, response status code and response headers
|
@@ -1636,7 +1780,7 @@ module TalonOne
|
|
1636
1780
|
end
|
1637
1781
|
|
1638
1782
|
# Update multiple customer profiles' audiences
|
1639
|
-
#
|
1783
|
+
# Add customer profiles to or remove them from an audience. The endpoint supports 1000 audience actions (`add` or `remove`) per request. **Note:** You can also do this using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect.
|
1640
1784
|
# @param body [CustomerProfileAudienceRequest] body
|
1641
1785
|
# @param [Hash] opts the optional parameters
|
1642
1786
|
# @return [nil]
|
@@ -1646,7 +1790,7 @@ module TalonOne
|
|
1646
1790
|
end
|
1647
1791
|
|
1648
1792
|
# Update multiple customer profiles' audiences
|
1649
|
-
#
|
1793
|
+
# Add customer profiles to or remove them from an audience. The endpoint supports 1000 audience actions (`add` or `remove`) per request. **Note:** You can also do this using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect.
|
1650
1794
|
# @param body [CustomerProfileAudienceRequest] body
|
1651
1795
|
# @param [Hash] opts the optional parameters
|
1652
1796
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
@@ -1700,26 +1844,26 @@ module TalonOne
|
|
1700
1844
|
end
|
1701
1845
|
|
1702
1846
|
# Update customer profile
|
1703
|
-
# Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities
|
1847
|
+
# Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. <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. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). </div>
|
1704
1848
|
# @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
1849
|
# @param body [CustomerProfileIntegrationRequestV2] body
|
1706
1850
|
# @param [Hash] opts the optional parameters
|
1707
1851
|
# @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
1852
|
# @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 [
|
1853
|
+
# @return [CustomerProfileIntegrationResponseV2]
|
1710
1854
|
def update_customer_profile_v2(integration_id, body, opts = {})
|
1711
1855
|
data, _status_code, _headers = update_customer_profile_v2_with_http_info(integration_id, body, opts)
|
1712
1856
|
data
|
1713
1857
|
end
|
1714
1858
|
|
1715
1859
|
# Update customer profile
|
1716
|
-
# Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities
|
1860
|
+
# Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. <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. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). </div>
|
1717
1861
|
# @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
1862
|
# @param body [CustomerProfileIntegrationRequestV2] body
|
1719
1863
|
# @param [Hash] opts the optional parameters
|
1720
1864
|
# @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
1865
|
# @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<(
|
1866
|
+
# @return [Array<(CustomerProfileIntegrationResponseV2, Integer, Hash)>] CustomerProfileIntegrationResponseV2 data, response status code and response headers
|
1723
1867
|
def update_customer_profile_v2_with_http_info(integration_id, body, opts = {})
|
1724
1868
|
if @api_client.config.debugging
|
1725
1869
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile_v2 ...'
|
@@ -1754,7 +1898,7 @@ module TalonOne
|
|
1754
1898
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1755
1899
|
|
1756
1900
|
# return_type
|
1757
|
-
return_type = opts[:return_type] || '
|
1901
|
+
return_type = opts[:return_type] || 'CustomerProfileIntegrationResponseV2'
|
1758
1902
|
|
1759
1903
|
# auth_names
|
1760
1904
|
auth_names = opts[:auth_names] || ['api_key_v1']
|
@@ -1776,7 +1920,7 @@ module TalonOne
|
|
1776
1920
|
end
|
1777
1921
|
|
1778
1922
|
# Update multiple customer profiles
|
1779
|
-
# Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities
|
1923
|
+
# Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) 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). **Note:** This endpoint does not trigger the Rule Engine. To trigger the Rule Engine for customer profile updates, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.
|
1780
1924
|
# @param body [MultipleCustomerProfileIntegrationRequest] body
|
1781
1925
|
# @param [Hash] opts the optional parameters
|
1782
1926
|
# @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')
|
@@ -1787,7 +1931,7 @@ module TalonOne
|
|
1787
1931
|
end
|
1788
1932
|
|
1789
1933
|
# Update multiple customer profiles
|
1790
|
-
# Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities
|
1934
|
+
# Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) 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). **Note:** This endpoint does not trigger the Rule Engine. To trigger the Rule Engine for customer profile updates, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.
|
1791
1935
|
# @param body [MultipleCustomerProfileIntegrationRequest] body
|
1792
1936
|
# @param [Hash] opts the optional parameters
|
1793
1937
|
# @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.
|
@@ -1843,11 +1987,12 @@ module TalonOne
|
|
1843
1987
|
end
|
1844
1988
|
|
1845
1989
|
# Update customer session
|
1846
|
-
# Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities
|
1990
|
+
# Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** 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-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** 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. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-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
1991
|
# @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
1992
|
# @param body [IntegrationRequest] body
|
1849
1993
|
# @param [Hash] opts the optional parameters
|
1850
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`
|
1994
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests).
|
1995
|
+
# @option opts [DateTime] :now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`.
|
1851
1996
|
# @return [IntegrationStateV2]
|
1852
1997
|
def update_customer_session_v2(customer_session_id, body, opts = {})
|
1853
1998
|
data, _status_code, _headers = update_customer_session_v2_with_http_info(customer_session_id, body, opts)
|
@@ -1855,11 +2000,12 @@ module TalonOne
|
|
1855
2000
|
end
|
1856
2001
|
|
1857
2002
|
# Update customer session
|
1858
|
-
# Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities
|
2003
|
+
# Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer's cart with Talon.One. **Note:** 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-sessions) and their states and refer to the `state` parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** 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. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-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
2004
|
# @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
2005
|
# @param body [IntegrationRequest] body
|
1861
2006
|
# @param [Hash] opts the optional parameters
|
1862
|
-
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`
|
2007
|
+
# @option opts [Boolean] :dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests).
|
2008
|
+
# @option opts [DateTime] :now A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`.
|
1863
2009
|
# @return [Array<(IntegrationStateV2, Integer, Hash)>] IntegrationStateV2 data, response status code and response headers
|
1864
2010
|
def update_customer_session_v2_with_http_info(customer_session_id, body, opts = {})
|
1865
2011
|
if @api_client.config.debugging
|
@@ -1879,6 +2025,7 @@ module TalonOne
|
|
1879
2025
|
# query parameters
|
1880
2026
|
query_params = opts[:query_params] || {}
|
1881
2027
|
query_params[:'dry'] = opts[:'dry'] if !opts[:'dry'].nil?
|
2028
|
+
query_params[:'now'] = opts[:'now'] if !opts[:'now'].nil?
|
1882
2029
|
|
1883
2030
|
# header parameters
|
1884
2031
|
header_params = opts[:header_params] || {}
|