talon_one 0.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +4 -0
- data/README.md +393 -57
- data/Rakefile +6 -8
- data/docs/APIError.md +10 -0
- data/docs/AccessLogEntry.md +14 -0
- data/docs/Account.md +25 -0
- data/docs/AccountAnalytics.md +21 -0
- data/docs/AccountEntity.md +8 -0
- data/docs/AccountLimits.md +18 -0
- data/docs/Application.md +20 -0
- data/docs/ApplicationAPIKey.md +14 -0
- data/docs/ApplicationApiHealth.md +9 -0
- data/docs/ApplicationCustomer.md +16 -0
- data/docs/ApplicationCustomerEntity.md +8 -0
- data/docs/ApplicationCustomerSearch.md +10 -0
- data/docs/ApplicationEntity.md +8 -0
- data/docs/ApplicationEvent.md +15 -0
- data/docs/ApplicationSession.md +18 -0
- data/docs/ApplicationSessionEntity.md +8 -0
- data/docs/Attribute.md +20 -0
- data/docs/AttributeQuery.md +7 -0
- data/docs/Binding.md +9 -0
- data/docs/Campaign.md +30 -0
- data/docs/CampaignAnalytics.md +22 -0
- data/docs/CampaignCopy.md +9 -0
- data/docs/CampaignEntity.md +8 -0
- data/docs/CampaignSearch.md +8 -0
- data/docs/CampaignSet.md +11 -0
- data/docs/CampaignSetBranchNode.md +11 -0
- data/docs/CampaignSetLeafNode.md +9 -0
- data/docs/CampaignSetNode.md +8 -0
- data/docs/CartItem.md +19 -0
- data/docs/CartItemAdjustment.md +10 -0
- data/docs/Change.md +13 -0
- data/docs/CodeGeneratorSettings.md +9 -0
- data/docs/Coupon.md +21 -0
- data/docs/CouponConstraints.md +10 -0
- data/docs/CouponRejectionReason.md +10 -0
- data/docs/CouponReservations.md +8 -0
- data/docs/CouponSearch.md +8 -0
- data/docs/CouponValue.md +8 -0
- data/docs/CreateApplicationAPIKey.md +9 -0
- data/docs/CustomerActivityReport.md +20 -0
- data/docs/CustomerAnalytics.md +14 -0
- data/docs/CustomerProfile.md +15 -0
- data/docs/CustomerProfileSearchQuery.md +10 -0
- data/docs/CustomerSession.md +20 -0
- data/docs/EmailEntity.md +8 -0
- data/docs/Entity.md +9 -0
- data/docs/Environment.md +14 -0
- data/docs/ErrorResponse.md +9 -0
- data/docs/ErrorSource.md +10 -0
- data/docs/Event.md +17 -0
- data/docs/EventType.md +19 -0
- data/docs/Export.md +13 -0
- data/docs/FeatureFlag.md +11 -0
- data/docs/FeatureFlags.md +11 -0
- data/docs/FeaturesFeed.md +9 -0
- data/docs/FuncArgDef.md +9 -0
- data/docs/FunctionDef.md +12 -0
- data/docs/Import.md +13 -0
- data/docs/ImportCoupons.md +8 -0
- data/docs/InlineResponse200.md +9 -0
- data/docs/InlineResponse2001.md +9 -0
- data/docs/InlineResponse20010.md +9 -0
- data/docs/InlineResponse20011.md +9 -0
- data/docs/InlineResponse20012.md +9 -0
- data/docs/InlineResponse20013.md +9 -0
- data/docs/InlineResponse20014.md +9 -0
- data/docs/InlineResponse20015.md +9 -0
- data/docs/InlineResponse20016.md +9 -0
- data/docs/InlineResponse20017.md +9 -0
- data/docs/InlineResponse20018.md +9 -0
- data/docs/InlineResponse20019.md +9 -0
- data/docs/InlineResponse2002.md +9 -0
- data/docs/InlineResponse20020.md +9 -0
- data/docs/InlineResponse20021.md +9 -0
- data/docs/InlineResponse20022.md +9 -0
- data/docs/InlineResponse20023.md +9 -0
- data/docs/InlineResponse20024.md +9 -0
- data/docs/InlineResponse20025.md +9 -0
- data/docs/InlineResponse20026.md +9 -0
- data/docs/InlineResponse20027.md +9 -0
- data/docs/InlineResponse20028.md +9 -0
- data/docs/InlineResponse2003.md +9 -0
- data/docs/InlineResponse2004.md +9 -0
- data/docs/InlineResponse2005.md +9 -0
- data/docs/InlineResponse2006.md +9 -0
- data/docs/InlineResponse2007.md +9 -0
- data/docs/InlineResponse2008.md +9 -0
- data/docs/InlineResponse2009.md +9 -0
- data/docs/IntegrationApi.md +558 -0
- data/docs/IntegrationEntity.md +9 -0
- data/docs/IntegrationEvent.md +10 -0
- data/docs/IntegrationProfileEntity.md +8 -0
- data/docs/IntegrationState.md +11 -0
- data/docs/LedgerEntry.md +17 -0
- data/docs/LibraryAttribute.md +14 -0
- data/docs/LimitConfig.md +10 -0
- data/docs/LoginParams.md +9 -0
- data/docs/Loyalty.md +8 -0
- data/docs/LoyaltyLedger.md +9 -0
- data/docs/LoyaltyLedgerEntry.md +17 -0
- data/docs/LoyaltyMembership.md +9 -0
- data/docs/LoyaltyPoints.md +11 -0
- data/docs/LoyaltyProgram.md +15 -0
- data/docs/LoyaltyProgramBalance.md +8 -0
- data/docs/LoyaltyProgramLedgers.md +11 -0
- data/docs/LoyaltySubLedger.md +10 -0
- data/docs/ManagementApi.md +5067 -0
- data/docs/ManagerConfig.md +8 -0
- data/docs/Meta.md +11 -0
- data/docs/MiscUpdateUserLatestFeature.md +8 -0
- data/docs/MultiApplicationEntity.md +8 -0
- data/docs/MutableEntity.md +8 -0
- data/docs/NewAccount.md +8 -0
- data/docs/NewAccountSignUp.md +10 -0
- data/docs/NewApplication.md +15 -0
- data/docs/NewApplicationAPIKey.md +15 -0
- data/docs/NewAttribute.md +15 -0
- data/docs/NewCampaign.md +19 -0
- data/docs/NewCampaignSet.md +9 -0
- data/docs/NewCoupons.md +16 -0
- data/docs/NewCustomerProfile.md +8 -0
- data/docs/NewCustomerSession.md +15 -0
- data/docs/NewEvent.md +11 -0
- data/docs/NewEventType.md +17 -0
- data/docs/NewFeatureFlags.md +10 -0
- data/docs/NewImport.md +8 -0
- data/docs/NewInvitation.md +11 -0
- data/docs/NewInviteEmail.md +9 -0
- data/docs/NewLoyaltyProgram.md +13 -0
- data/docs/NewPassword.md +9 -0
- data/docs/NewPasswordEmail.md +8 -0
- data/docs/NewReferral.md +12 -0
- data/docs/NewRole.md +11 -0
- data/docs/NewRuleset.md +11 -0
- data/docs/NewTemplateDef.md +14 -0
- data/docs/NewUser.md +11 -0
- data/docs/NewWebhook.md +15 -0
- data/docs/Referral.md +17 -0
- data/docs/Role.md +13 -0
- data/docs/RoleAssign.md +9 -0
- data/docs/RoleMembership.md +9 -0
- data/docs/Rule.md +12 -0
- data/docs/Ruleset.md +16 -0
- data/docs/Session.md +10 -0
- data/docs/SlotDef.md +13 -0
- data/docs/TemplateArgDef.md +11 -0
- data/docs/TemplateDef.md +18 -0
- data/docs/UpdateAccount.md +10 -0
- data/docs/UpdateCampaign.md +19 -0
- data/docs/UpdateCoupon.md +12 -0
- data/docs/UpdateCouponBatch.md +12 -0
- data/docs/UpdateLoyaltyProgram.md +12 -0
- data/docs/UpdateRole.md +11 -0
- data/docs/UpdateUser.md +16 -0
- data/docs/User.md +19 -0
- data/docs/UserEntity.md +8 -0
- data/docs/Webhook.md +19 -0
- data/docs/WebhookActivationLogEntry.md +12 -0
- data/docs/WebhookLogEntry.md +17 -0
- data/git_push.sh +55 -0
- data/lib/talon_one.rb +195 -4
- data/lib/talon_one/api/integration_api.rb +531 -0
- data/lib/talon_one/api/management_api.rb +5520 -0
- data/lib/talon_one/api_client.rb +389 -0
- data/lib/talon_one/api_error.rb +38 -0
- data/lib/talon_one/configuration.rb +223 -0
- data/lib/talon_one/models/access_log_entry.rb +280 -0
- data/lib/talon_one/models/account.rb +462 -0
- data/lib/talon_one/models/account_analytics.rb +384 -0
- data/lib/talon_one/models/account_entity.rb +189 -0
- data/lib/talon_one/models/account_limits.rb +341 -0
- data/lib/talon_one/models/api_error.rb +213 -0
- data/lib/talon_one/models/application.rb +482 -0
- data/lib/talon_one/models/application_api_health.rb +239 -0
- data/lib/talon_one/models/application_api_key.rb +279 -0
- data/lib/talon_one/models/application_customer.rb +307 -0
- data/lib/talon_one/models/application_customer_entity.rb +184 -0
- data/lib/talon_one/models/application_customer_search.rb +206 -0
- data/lib/talon_one/models/application_entity.rb +189 -0
- data/lib/talon_one/models/application_event.rb +287 -0
- data/lib/talon_one/models/application_session.rb +368 -0
- data/lib/talon_one/models/application_session_entity.rb +189 -0
- data/lib/talon_one/models/attribute.rb +416 -0
- data/lib/talon_one/models/attribute_query.rb +174 -0
- data/lib/talon_one/models/binding.rb +206 -0
- data/lib/talon_one/models/campaign.rb +514 -0
- data/lib/talon_one/models/campaign_analytics.rb +399 -0
- data/lib/talon_one/models/campaign_copy.rb +201 -0
- data/lib/talon_one/models/campaign_entity.rb +189 -0
- data/lib/talon_one/models/campaign_search.rb +189 -0
- data/lib/talon_one/models/campaign_set.rb +234 -0
- data/lib/talon_one/models/campaign_set_branch_node.rb +282 -0
- data/lib/talon_one/models/campaign_set_leaf_node.rb +238 -0
- data/lib/talon_one/models/campaign_set_node.rb +188 -0
- data/lib/talon_one/models/cart_item.rb +365 -0
- data/lib/talon_one/models/cart_item_adjustment.rb +248 -0
- data/lib/talon_one/models/change.rb +255 -0
- data/lib/talon_one/models/code_generator_settings.rb +225 -0
- data/lib/talon_one/models/coupon.rb +392 -0
- data/lib/talon_one/models/coupon_constraints.rb +228 -0
- data/lib/talon_one/models/coupon_rejection_reason.rb +251 -0
- data/lib/talon_one/models/coupon_reservations.rb +191 -0
- data/lib/talon_one/models/coupon_search.rb +189 -0
- data/lib/talon_one/models/coupon_value.rb +199 -0
- data/lib/talon_one/models/create_application_api_key.rb +204 -0
- data/lib/talon_one/models/customer_activity_report.rb +365 -0
- data/lib/talon_one/models/customer_analytics.rb +280 -0
- data/lib/talon_one/models/customer_profile.rb +292 -0
- data/lib/talon_one/models/customer_profile_search_query.rb +206 -0
- data/lib/talon_one/models/customer_session.rb +407 -0
- data/lib/talon_one/models/email_entity.rb +189 -0
- data/lib/talon_one/models/entity.rb +204 -0
- data/lib/talon_one/models/environment.rb +285 -0
- data/lib/talon_one/models/error_response.rb +201 -0
- data/lib/talon_one/models/error_source.rb +205 -0
- data/lib/talon_one/models/event.rb +332 -0
- data/lib/talon_one/models/event_type.rb +426 -0
- data/lib/talon_one/models/export.rb +299 -0
- data/lib/talon_one/models/feature_flag.rb +224 -0
- data/lib/talon_one/models/feature_flags.rb +220 -0
- data/lib/talon_one/models/features_feed.rb +193 -0
- data/lib/talon_one/models/func_arg_def.rb +243 -0
- data/lib/talon_one/models/function_def.rb +260 -0
- data/lib/talon_one/models/import.rb +318 -0
- data/lib/talon_one/models/import_coupons.rb +188 -0
- data/lib/talon_one/models/inline_response_200.rb +204 -0
- data/lib/talon_one/models/inline_response_200_1.rb +204 -0
- data/lib/talon_one/models/inline_response_200_10.rb +204 -0
- data/lib/talon_one/models/inline_response_200_11.rb +204 -0
- data/lib/talon_one/models/inline_response_200_12.rb +204 -0
- data/lib/talon_one/models/inline_response_200_13.rb +204 -0
- data/lib/talon_one/models/inline_response_200_14.rb +204 -0
- data/lib/talon_one/models/inline_response_200_15.rb +204 -0
- data/lib/talon_one/models/inline_response_200_16.rb +204 -0
- data/lib/talon_one/models/inline_response_200_17.rb +204 -0
- data/lib/talon_one/models/inline_response_200_18.rb +204 -0
- data/lib/talon_one/models/inline_response_200_19.rb +204 -0
- data/lib/talon_one/models/inline_response_200_2.rb +204 -0
- data/lib/talon_one/models/inline_response_200_20.rb +204 -0
- data/lib/talon_one/models/inline_response_200_21.rb +204 -0
- data/lib/talon_one/models/inline_response_200_22.rb +204 -0
- data/lib/talon_one/models/inline_response_200_23.rb +204 -0
- data/lib/talon_one/models/inline_response_200_24.rb +204 -0
- data/lib/talon_one/models/inline_response_200_25.rb +204 -0
- data/lib/talon_one/models/inline_response_200_26.rb +204 -0
- data/lib/talon_one/models/inline_response_200_27.rb +204 -0
- data/lib/talon_one/models/inline_response_200_28.rb +204 -0
- data/lib/talon_one/models/inline_response_200_3.rb +204 -0
- data/lib/talon_one/models/inline_response_200_4.rb +204 -0
- data/lib/talon_one/models/inline_response_200_5.rb +204 -0
- data/lib/talon_one/models/inline_response_200_6.rb +204 -0
- data/lib/talon_one/models/inline_response_200_7.rb +204 -0
- data/lib/talon_one/models/inline_response_200_8.rb +204 -0
- data/lib/talon_one/models/inline_response_200_9.rb +204 -0
- data/lib/talon_one/models/integration_entity.rb +204 -0
- data/lib/talon_one/models/integration_event.rb +234 -0
- data/lib/talon_one/models/integration_profile_entity.rb +184 -0
- data/lib/talon_one/models/integration_state.rb +226 -0
- data/lib/talon_one/models/ledger_entry.rb +320 -0
- data/lib/talon_one/models/library_attribute.rb +330 -0
- data/lib/talon_one/models/limit_config.rb +274 -0
- data/lib/talon_one/models/login_params.rb +205 -0
- data/lib/talon_one/models/loyalty.rb +192 -0
- data/lib/talon_one/models/loyalty_ledger.rb +202 -0
- data/lib/talon_one/models/loyalty_ledger_entry.rb +336 -0
- data/lib/talon_one/models/loyalty_membership.rb +199 -0
- data/lib/talon_one/models/loyalty_points.rb +220 -0
- data/lib/talon_one/models/loyalty_program.rb +297 -0
- data/lib/talon_one/models/loyalty_program_balance.rb +189 -0
- data/lib/talon_one/models/loyalty_program_ledgers.rb +232 -0
- data/lib/talon_one/models/loyalty_sub_ledger.rb +213 -0
- data/lib/talon_one/models/manager_config.rb +188 -0
- data/lib/talon_one/models/meta.rb +212 -0
- data/lib/talon_one/models/misc_update_user_latest_feature.rb +183 -0
- data/lib/talon_one/models/multi_application_entity.rb +191 -0
- data/lib/talon_one/models/mutable_entity.rb +189 -0
- data/lib/talon_one/models/new_account.rb +207 -0
- data/lib/talon_one/models/new_account_sign_up.rb +238 -0
- data/lib/talon_one/models/new_application.rb +404 -0
- data/lib/talon_one/models/new_application_api_key.rb +295 -0
- data/lib/talon_one/models/new_attribute.rb +337 -0
- data/lib/talon_one/models/new_campaign.rb +378 -0
- data/lib/talon_one/models/new_campaign_set.rb +204 -0
- data/lib/talon_one/models/new_coupons.rb +334 -0
- data/lib/talon_one/models/new_customer_profile.rb +184 -0
- data/lib/talon_one/models/new_customer_session.rb +295 -0
- data/lib/talon_one/models/new_event.rb +268 -0
- data/lib/talon_one/models/new_event_type.rb +396 -0
- data/lib/talon_one/models/new_feature_flags.rb +204 -0
- data/lib/talon_one/models/new_import.rb +224 -0
- data/lib/talon_one/models/new_invitation.rb +226 -0
- data/lib/talon_one/models/new_invite_email.rb +240 -0
- data/lib/talon_one/models/new_loyalty_program.rb +257 -0
- data/lib/talon_one/models/new_password.rb +222 -0
- data/lib/talon_one/models/new_password_email.rb +207 -0
- data/lib/talon_one/models/new_referral.rb +234 -0
- data/lib/talon_one/models/new_role.rb +232 -0
- data/lib/talon_one/models/new_ruleset.rb +228 -0
- data/lib/talon_one/models/new_template_def.rb +308 -0
- data/lib/talon_one/models/new_user.rb +248 -0
- data/lib/talon_one/models/new_webhook.rb +330 -0
- data/lib/talon_one/models/referral.rb +348 -0
- data/lib/talon_one/models/role.rb +247 -0
- data/lib/talon_one/models/role_assign.rb +209 -0
- data/lib/talon_one/models/role_membership.rb +204 -0
- data/lib/talon_one/models/rule.rb +245 -0
- data/lib/talon_one/models/ruleset.rb +299 -0
- data/lib/talon_one/models/session.rb +219 -0
- data/lib/talon_one/models/slot_def.rb +254 -0
- data/lib/talon_one/models/template_arg_def.rb +293 -0
- data/lib/talon_one/models/template_def.rb +398 -0
- data/lib/talon_one/models/update_account.rb +233 -0
- data/lib/talon_one/models/update_campaign.rb +373 -0
- data/lib/talon_one/models/update_coupon.rb +249 -0
- data/lib/talon_one/models/update_coupon_batch.rb +254 -0
- data/lib/talon_one/models/update_loyalty_program.rb +227 -0
- data/lib/talon_one/models/update_role.rb +216 -0
- data/lib/talon_one/models/update_user.rb +306 -0
- data/lib/talon_one/models/user.rb +381 -0
- data/lib/talon_one/models/user_entity.rb +189 -0
- data/lib/talon_one/models/webhook.rb +392 -0
- data/lib/talon_one/models/webhook_activation_log_entry.rb +250 -0
- data/lib/talon_one/models/webhook_log_entry.rb +305 -0
- data/lib/talon_one/version.rb +15 -0
- data/spec/api/integration_api_spec.rb +147 -0
- data/spec/api/management_api_spec.rb +1299 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_log_entry_spec.rb +77 -0
- data/spec/models/account_analytics_spec.rb +119 -0
- data/spec/models/account_entity_spec.rb +41 -0
- data/spec/models/account_limits_spec.rb +101 -0
- data/spec/models/account_spec.rb +147 -0
- data/spec/models/api_error_spec.rb +53 -0
- data/spec/models/application_api_health_spec.rb +51 -0
- data/spec/models/application_api_key_spec.rb +77 -0
- data/spec/models/application_customer_entity_spec.rb +41 -0
- data/spec/models/application_customer_search_spec.rb +53 -0
- data/spec/models/application_customer_spec.rb +89 -0
- data/spec/models/application_entity_spec.rb +41 -0
- data/spec/models/application_event_spec.rb +83 -0
- data/spec/models/application_session_entity_spec.rb +41 -0
- data/spec/models/application_session_spec.rb +105 -0
- data/spec/models/application_spec.rb +117 -0
- data/spec/models/attribute_query_spec.rb +35 -0
- data/spec/models/attribute_spec.rb +121 -0
- data/spec/models/binding_spec.rb +47 -0
- data/spec/models/campaign_analytics_spec.rb +125 -0
- data/spec/models/campaign_copy_spec.rb +47 -0
- data/spec/models/campaign_entity_spec.rb +41 -0
- data/spec/models/campaign_search_spec.rb +41 -0
- data/spec/models/campaign_set_branch_node_spec.rb +67 -0
- data/spec/models/campaign_set_leaf_node_spec.rb +51 -0
- data/spec/models/campaign_set_node_spec.rb +41 -0
- data/spec/models/campaign_set_spec.rb +59 -0
- data/spec/models/campaign_spec.rb +181 -0
- data/spec/models/cart_item_adjustment_spec.rb +53 -0
- data/spec/models/cart_item_spec.rb +107 -0
- data/spec/models/change_spec.rb +71 -0
- data/spec/models/code_generator_settings_spec.rb +47 -0
- data/spec/models/coupon_constraints_spec.rb +53 -0
- data/spec/models/coupon_rejection_reason_spec.rb +57 -0
- data/spec/models/coupon_reservations_spec.rb +41 -0
- data/spec/models/coupon_search_spec.rb +41 -0
- data/spec/models/coupon_spec.rb +119 -0
- data/spec/models/coupon_value_spec.rb +41 -0
- data/spec/models/create_application_api_key_spec.rb +47 -0
- data/spec/models/customer_activity_report_spec.rb +113 -0
- data/spec/models/customer_analytics_spec.rb +77 -0
- data/spec/models/customer_profile_search_query_spec.rb +53 -0
- data/spec/models/customer_profile_spec.rb +83 -0
- data/spec/models/customer_session_spec.rb +117 -0
- data/spec/models/email_entity_spec.rb +41 -0
- data/spec/models/entity_spec.rb +47 -0
- data/spec/models/environment_spec.rb +77 -0
- data/spec/models/error_response_spec.rb +47 -0
- data/spec/models/error_source_spec.rb +53 -0
- data/spec/models/event_spec.rb +95 -0
- data/spec/models/event_type_spec.rb +115 -0
- data/spec/models/export_spec.rb +75 -0
- data/spec/models/feature_flag_spec.rb +59 -0
- data/spec/models/feature_flags_spec.rb +59 -0
- data/spec/models/features_feed_spec.rb +47 -0
- data/spec/models/func_arg_def_spec.rb +51 -0
- data/spec/models/function_def_spec.rb +65 -0
- data/spec/models/import_coupons_spec.rb +41 -0
- data/spec/models/import_spec.rb +75 -0
- data/spec/models/inline_response_200_10_spec.rb +47 -0
- data/spec/models/inline_response_200_11_spec.rb +47 -0
- data/spec/models/inline_response_200_12_spec.rb +47 -0
- data/spec/models/inline_response_200_13_spec.rb +47 -0
- data/spec/models/inline_response_200_14_spec.rb +47 -0
- data/spec/models/inline_response_200_15_spec.rb +47 -0
- data/spec/models/inline_response_200_16_spec.rb +47 -0
- data/spec/models/inline_response_200_17_spec.rb +47 -0
- data/spec/models/inline_response_200_18_spec.rb +47 -0
- data/spec/models/inline_response_200_19_spec.rb +47 -0
- data/spec/models/inline_response_200_1_spec.rb +47 -0
- data/spec/models/inline_response_200_20_spec.rb +47 -0
- data/spec/models/inline_response_200_21_spec.rb +47 -0
- data/spec/models/inline_response_200_22_spec.rb +47 -0
- data/spec/models/inline_response_200_23_spec.rb +47 -0
- data/spec/models/inline_response_200_24_spec.rb +47 -0
- data/spec/models/inline_response_200_25_spec.rb +47 -0
- data/spec/models/inline_response_200_26_spec.rb +47 -0
- data/spec/models/inline_response_200_27_spec.rb +47 -0
- data/spec/models/inline_response_200_28_spec.rb +47 -0
- data/spec/models/inline_response_200_2_spec.rb +47 -0
- data/spec/models/inline_response_200_3_spec.rb +47 -0
- data/spec/models/inline_response_200_4_spec.rb +47 -0
- data/spec/models/inline_response_200_5_spec.rb +47 -0
- data/spec/models/inline_response_200_6_spec.rb +47 -0
- data/spec/models/inline_response_200_7_spec.rb +47 -0
- data/spec/models/inline_response_200_8_spec.rb +47 -0
- data/spec/models/inline_response_200_9_spec.rb +47 -0
- data/spec/models/inline_response_200_spec.rb +47 -0
- data/spec/models/integration_entity_spec.rb +47 -0
- data/spec/models/integration_event_spec.rb +53 -0
- data/spec/models/integration_profile_entity_spec.rb +41 -0
- data/spec/models/integration_state_spec.rb +59 -0
- data/spec/models/ledger_entry_spec.rb +95 -0
- data/spec/models/library_attribute_spec.rb +85 -0
- data/spec/models/limit_config_spec.rb +61 -0
- data/spec/models/login_params_spec.rb +47 -0
- data/spec/models/loyalty_ledger_entry_spec.rb +99 -0
- data/spec/models/loyalty_ledger_spec.rb +47 -0
- data/spec/models/loyalty_membership_spec.rb +47 -0
- data/spec/models/loyalty_points_spec.rb +59 -0
- data/spec/models/loyalty_program_balance_spec.rb +41 -0
- data/spec/models/loyalty_program_ledgers_spec.rb +59 -0
- data/spec/models/loyalty_program_spec.rb +83 -0
- data/spec/models/loyalty_spec.rb +41 -0
- data/spec/models/loyalty_sub_ledger_spec.rb +53 -0
- data/spec/models/manager_config_spec.rb +41 -0
- data/spec/models/meta_spec.rb +59 -0
- data/spec/models/misc_update_user_latest_feature_spec.rb +41 -0
- data/spec/models/multi_application_entity_spec.rb +41 -0
- data/spec/models/mutable_entity_spec.rb +41 -0
- data/spec/models/new_account_sign_up_spec.rb +53 -0
- data/spec/models/new_account_spec.rb +41 -0
- data/spec/models/new_application_api_key_spec.rb +83 -0
- data/spec/models/new_application_spec.rb +87 -0
- data/spec/models/new_attribute_spec.rb +91 -0
- data/spec/models/new_campaign_set_spec.rb +47 -0
- data/spec/models/new_campaign_spec.rb +115 -0
- data/spec/models/new_coupons_spec.rb +89 -0
- data/spec/models/new_customer_profile_spec.rb +41 -0
- data/spec/models/new_customer_session_spec.rb +87 -0
- data/spec/models/new_event_spec.rb +59 -0
- data/spec/models/new_event_type_spec.rb +103 -0
- data/spec/models/new_feature_flags_spec.rb +53 -0
- data/spec/models/new_import_spec.rb +45 -0
- data/spec/models/new_invitation_spec.rb +59 -0
- data/spec/models/new_invite_email_spec.rb +47 -0
- data/spec/models/new_loyalty_program_spec.rb +71 -0
- data/spec/models/new_password_email_spec.rb +41 -0
- data/spec/models/new_password_spec.rb +47 -0
- data/spec/models/new_referral_spec.rb +65 -0
- data/spec/models/new_role_spec.rb +59 -0
- data/spec/models/new_ruleset_spec.rb +59 -0
- data/spec/models/new_template_def_spec.rb +77 -0
- data/spec/models/new_user_spec.rb +59 -0
- data/spec/models/new_webhook_spec.rb +87 -0
- data/spec/models/referral_spec.rb +95 -0
- data/spec/models/role_assign_spec.rb +47 -0
- data/spec/models/role_membership_spec.rb +47 -0
- data/spec/models/role_spec.rb +71 -0
- data/spec/models/rule_spec.rb +65 -0
- data/spec/models/ruleset_spec.rb +89 -0
- data/spec/models/session_spec.rb +53 -0
- data/spec/models/slot_def_spec.rb +71 -0
- data/spec/models/template_arg_def_spec.rb +63 -0
- data/spec/models/template_def_spec.rb +101 -0
- data/spec/models/update_account_spec.rb +53 -0
- data/spec/models/update_campaign_spec.rb +115 -0
- data/spec/models/update_coupon_batch_spec.rb +65 -0
- data/spec/models/update_coupon_spec.rb +65 -0
- data/spec/models/update_loyalty_program_spec.rb +65 -0
- data/spec/models/update_role_spec.rb +59 -0
- data/spec/models/update_user_spec.rb +93 -0
- data/spec/models/user_entity_spec.rb +41 -0
- data/spec/models/user_spec.rb +111 -0
- data/spec/models/webhook_activation_log_entry_spec.rb +65 -0
- data/spec/models/webhook_log_entry_spec.rb +95 -0
- data/spec/models/webhook_spec.rb +111 -0
- data/spec/spec_helper.rb +111 -0
- data/talon_one-1.0.0.gem +0 -0
- data/talon_one-1.1.0.gem +0 -0
- data/talon_one-1.1.1.gem +0 -0
- data/talon_one.gemspec +43 -15
- metadata +808 -32
- data/.gitignore +0 -3
- data/.travis.yml +0 -5
- data/lib/integration/client.rb +0 -89
- data/lib/integration/client_error.rb +0 -9
- data/lib/integration/customer_profile.rb +0 -21
- data/lib/integration/effect.rb +0 -24
- data/lib/integration/event.rb +0 -45
- data/lib/integration/referral_code.rb +0 -49
- data/lib/integration/rule_engine_result.rb +0 -23
- data/lib/integration/search_profiles_result.rb +0 -17
- data/lib/management/client.rb +0 -112
- data/test/test_helper.rb +0 -20
- data/test/test_integration_api_live.rb +0 -86
- data/test/test_integration_params.rb +0 -23
@@ -0,0 +1,531 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.7
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module TalonOne
|
16
|
+
class IntegrationApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a new coupon reservation
|
23
|
+
# Creates a coupon reservation for all passed customer profiles on this couponID
|
24
|
+
# @param coupon_value The value of a coupon
|
25
|
+
# @param body
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [Coupon]
|
28
|
+
def create_coupon_reservation(coupon_value, body, opts = {})
|
29
|
+
data, _status_code, _headers = create_coupon_reservation_with_http_info(coupon_value, body, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new coupon reservation
|
34
|
+
# Creates a coupon reservation for all passed customer profiles on this couponID
|
35
|
+
# @param coupon_value The value of a coupon
|
36
|
+
# @param body
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(Coupon, Fixnum, Hash)>] Coupon data, response status code and response headers
|
39
|
+
def create_coupon_reservation_with_http_info(coupon_value, body, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.create_coupon_reservation ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'coupon_value' is set
|
44
|
+
if @api_client.config.client_side_validation && coupon_value.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.create_coupon_reservation"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'body' is set
|
48
|
+
if @api_client.config.client_side_validation && body.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.create_coupon_reservation"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/v1/coupon_reservations/{couponValue}'.sub('{' + 'couponValue' + '}', coupon_value.to_s)
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = @api_client.object_to_http_body(body)
|
69
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => 'Coupon')
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: IntegrationApi#create_coupon_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
# Create a referral code for an advocate
|
83
|
+
# Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the `campaignId` parameter, and will be associated with the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
|
84
|
+
# @param body
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [Referral]
|
87
|
+
def create_referral(body, opts = {})
|
88
|
+
data, _status_code, _headers = create_referral_with_http_info(body, opts)
|
89
|
+
data
|
90
|
+
end
|
91
|
+
|
92
|
+
# Create a referral code for an advocate
|
93
|
+
# Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the `campaignId` parameter, and will be associated with the profile specified in the `advocateProfileIntegrationId` parameter as the advocate's profile.
|
94
|
+
# @param body
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Array<(Referral, Fixnum, Hash)>] Referral data, response status code and response headers
|
97
|
+
def create_referral_with_http_info(body, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.create_referral ...'
|
100
|
+
end
|
101
|
+
# verify the required parameter 'body' is set
|
102
|
+
if @api_client.config.client_side_validation && body.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.create_referral"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/v1/referrals'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = @api_client.object_to_http_body(body)
|
123
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
124
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
125
|
+
:header_params => header_params,
|
126
|
+
:query_params => query_params,
|
127
|
+
:form_params => form_params,
|
128
|
+
:body => post_body,
|
129
|
+
:auth_names => auth_names,
|
130
|
+
:return_type => 'Referral')
|
131
|
+
if @api_client.config.debugging
|
132
|
+
@api_client.config.logger.debug "API called: IntegrationApi#create_referral\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
133
|
+
end
|
134
|
+
return data, status_code, headers
|
135
|
+
end
|
136
|
+
# Delete coupon reservations
|
137
|
+
# Removes all passed customer profiles reservation from this coupon
|
138
|
+
# @param coupon_value The value of a coupon
|
139
|
+
# @param body
|
140
|
+
# @param [Hash] opts the optional parameters
|
141
|
+
# @return [nil]
|
142
|
+
def delete_coupon_reservation(coupon_value, body, opts = {})
|
143
|
+
delete_coupon_reservation_with_http_info(coupon_value, body, opts)
|
144
|
+
nil
|
145
|
+
end
|
146
|
+
|
147
|
+
# Delete coupon reservations
|
148
|
+
# Removes all passed customer profiles reservation from this coupon
|
149
|
+
# @param coupon_value The value of a coupon
|
150
|
+
# @param body
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
153
|
+
def delete_coupon_reservation_with_http_info(coupon_value, body, opts = {})
|
154
|
+
if @api_client.config.debugging
|
155
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.delete_coupon_reservation ...'
|
156
|
+
end
|
157
|
+
# verify the required parameter 'coupon_value' is set
|
158
|
+
if @api_client.config.client_side_validation && coupon_value.nil?
|
159
|
+
fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.delete_coupon_reservation"
|
160
|
+
end
|
161
|
+
# verify the required parameter 'body' is set
|
162
|
+
if @api_client.config.client_side_validation && body.nil?
|
163
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.delete_coupon_reservation"
|
164
|
+
end
|
165
|
+
# resource path
|
166
|
+
local_var_path = '/v1/coupon_reservations/{couponValue}'.sub('{' + 'couponValue' + '}', coupon_value.to_s)
|
167
|
+
|
168
|
+
# query parameters
|
169
|
+
query_params = {}
|
170
|
+
|
171
|
+
# header parameters
|
172
|
+
header_params = {}
|
173
|
+
# HTTP header 'Accept' (if needed)
|
174
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
175
|
+
# HTTP header 'Content-Type'
|
176
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
177
|
+
|
178
|
+
# form parameters
|
179
|
+
form_params = {}
|
180
|
+
|
181
|
+
# http body (model)
|
182
|
+
post_body = @api_client.object_to_http_body(body)
|
183
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
184
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
185
|
+
:header_params => header_params,
|
186
|
+
:query_params => query_params,
|
187
|
+
:form_params => form_params,
|
188
|
+
:body => post_body,
|
189
|
+
:auth_names => auth_names)
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug "API called: IntegrationApi#delete_coupon_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
192
|
+
end
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
# Delete the personal data of a customer.
|
196
|
+
# Delete all attributes on the customer profile and on entities that reference that customer profile.
|
197
|
+
# @param integration_id The custom identifier for this profile, must be unique within the account.
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @return [nil]
|
200
|
+
def delete_customer_data(integration_id, opts = {})
|
201
|
+
delete_customer_data_with_http_info(integration_id, opts)
|
202
|
+
nil
|
203
|
+
end
|
204
|
+
|
205
|
+
# Delete the personal data of a customer.
|
206
|
+
# Delete all attributes on the customer profile and on entities that reference that customer profile.
|
207
|
+
# @param integration_id The custom identifier for this profile, must be unique within the account.
|
208
|
+
# @param [Hash] opts the optional parameters
|
209
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
210
|
+
def delete_customer_data_with_http_info(integration_id, opts = {})
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.delete_customer_data ...'
|
213
|
+
end
|
214
|
+
# verify the required parameter 'integration_id' is set
|
215
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
216
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.delete_customer_data"
|
217
|
+
end
|
218
|
+
# resource path
|
219
|
+
local_var_path = '/v1/customer_data/{integrationId}'.sub('{' + 'integrationId' + '}', integration_id.to_s)
|
220
|
+
|
221
|
+
# query parameters
|
222
|
+
query_params = {}
|
223
|
+
|
224
|
+
# header parameters
|
225
|
+
header_params = {}
|
226
|
+
# HTTP header 'Accept' (if needed)
|
227
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
228
|
+
# HTTP header 'Content-Type'
|
229
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
230
|
+
|
231
|
+
# form parameters
|
232
|
+
form_params = {}
|
233
|
+
|
234
|
+
# http body (model)
|
235
|
+
post_body = nil
|
236
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
237
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
238
|
+
:header_params => header_params,
|
239
|
+
:query_params => query_params,
|
240
|
+
:form_params => form_params,
|
241
|
+
:body => post_body,
|
242
|
+
:auth_names => auth_names)
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug "API called: IntegrationApi#delete_customer_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
245
|
+
end
|
246
|
+
return data, status_code, headers
|
247
|
+
end
|
248
|
+
# Get all valid reserved coupons
|
249
|
+
# Returns all coupons this user is subscribed to that are valid and usable
|
250
|
+
# @param integration_id The custom identifier for this profile, must be unique within the account.
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [InlineResponse2001]
|
253
|
+
def get_reserved_coupons(integration_id, opts = {})
|
254
|
+
data, _status_code, _headers = get_reserved_coupons_with_http_info(integration_id, opts)
|
255
|
+
data
|
256
|
+
end
|
257
|
+
|
258
|
+
# Get all valid reserved coupons
|
259
|
+
# Returns all coupons this user is subscribed to that are valid and usable
|
260
|
+
# @param integration_id The custom identifier for this profile, must be unique within the account.
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
|
263
|
+
def get_reserved_coupons_with_http_info(integration_id, opts = {})
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_reserved_coupons ...'
|
266
|
+
end
|
267
|
+
# verify the required parameter 'integration_id' is set
|
268
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
269
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.get_reserved_coupons"
|
270
|
+
end
|
271
|
+
# resource path
|
272
|
+
local_var_path = '/v1/coupon_reservations/coupons/{integrationId}'.sub('{' + 'integrationId' + '}', integration_id.to_s)
|
273
|
+
|
274
|
+
# query parameters
|
275
|
+
query_params = {}
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
281
|
+
# HTTP header 'Content-Type'
|
282
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = nil
|
289
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names,
|
296
|
+
:return_type => 'InlineResponse2001')
|
297
|
+
if @api_client.config.debugging
|
298
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_reserved_coupons\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
299
|
+
end
|
300
|
+
return data, status_code, headers
|
301
|
+
end
|
302
|
+
# Get the users that have this coupon reserved
|
303
|
+
# Returns all users that have this coupon marked as reserved
|
304
|
+
# @param coupon_value The value of a coupon
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @return [InlineResponse200]
|
307
|
+
def get_reserved_customers(coupon_value, opts = {})
|
308
|
+
data, _status_code, _headers = get_reserved_customers_with_http_info(coupon_value, opts)
|
309
|
+
data
|
310
|
+
end
|
311
|
+
|
312
|
+
# Get the users that have this coupon reserved
|
313
|
+
# Returns all users that have this coupon marked as reserved
|
314
|
+
# @param coupon_value The value of a coupon
|
315
|
+
# @param [Hash] opts the optional parameters
|
316
|
+
# @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
|
317
|
+
def get_reserved_customers_with_http_info(coupon_value, opts = {})
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_reserved_customers ...'
|
320
|
+
end
|
321
|
+
# verify the required parameter 'coupon_value' is set
|
322
|
+
if @api_client.config.client_side_validation && coupon_value.nil?
|
323
|
+
fail ArgumentError, "Missing the required parameter 'coupon_value' when calling IntegrationApi.get_reserved_customers"
|
324
|
+
end
|
325
|
+
# resource path
|
326
|
+
local_var_path = '/v1/coupon_reservations/customerprofiles/{couponValue}'.sub('{' + 'couponValue' + '}', coupon_value.to_s)
|
327
|
+
|
328
|
+
# query parameters
|
329
|
+
query_params = {}
|
330
|
+
|
331
|
+
# header parameters
|
332
|
+
header_params = {}
|
333
|
+
# HTTP header 'Accept' (if needed)
|
334
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
335
|
+
# HTTP header 'Content-Type'
|
336
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
337
|
+
|
338
|
+
# form parameters
|
339
|
+
form_params = {}
|
340
|
+
|
341
|
+
# http body (model)
|
342
|
+
post_body = nil
|
343
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
344
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
345
|
+
:header_params => header_params,
|
346
|
+
:query_params => query_params,
|
347
|
+
:form_params => form_params,
|
348
|
+
:body => post_body,
|
349
|
+
:auth_names => auth_names,
|
350
|
+
:return_type => 'InlineResponse200')
|
351
|
+
if @api_client.config.debugging
|
352
|
+
@api_client.config.logger.debug "API called: IntegrationApi#get_reserved_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
353
|
+
end
|
354
|
+
return data, status_code, headers
|
355
|
+
end
|
356
|
+
# Track an Event
|
357
|
+
# Records an arbitrary event in a customer session. For example, an integration might record an event when a user updates their payment information. The `sessionId` body parameter is required, an event is always part of a session. Much like updating a customer session, if either the profile or the session do not exist, a new empty one will be created. Note that if the specified session already exists, it must belong to the same `profileId` or an error will be returned. As with customer sessions, you can use an empty string for `profileId` to indicate that this is an anonymous session. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place.
|
358
|
+
# @param body
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @return [IntegrationState]
|
361
|
+
def track_event(body, opts = {})
|
362
|
+
data, _status_code, _headers = track_event_with_http_info(body, opts)
|
363
|
+
data
|
364
|
+
end
|
365
|
+
|
366
|
+
# Track an Event
|
367
|
+
# Records an arbitrary event in a customer session. For example, an integration might record an event when a user updates their payment information. The `sessionId` body parameter is required, an event is always part of a session. Much like updating a customer session, if either the profile or the session do not exist, a new empty one will be created. Note that if the specified session already exists, it must belong to the same `profileId` or an error will be returned. As with customer sessions, you can use an empty string for `profileId` to indicate that this is an anonymous session. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place.
|
368
|
+
# @param body
|
369
|
+
# @param [Hash] opts the optional parameters
|
370
|
+
# @return [Array<(IntegrationState, Fixnum, Hash)>] IntegrationState data, response status code and response headers
|
371
|
+
def track_event_with_http_info(body, opts = {})
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.track_event ...'
|
374
|
+
end
|
375
|
+
# verify the required parameter 'body' is set
|
376
|
+
if @api_client.config.client_side_validation && body.nil?
|
377
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.track_event"
|
378
|
+
end
|
379
|
+
# resource path
|
380
|
+
local_var_path = '/v1/events'
|
381
|
+
|
382
|
+
# query parameters
|
383
|
+
query_params = {}
|
384
|
+
|
385
|
+
# header parameters
|
386
|
+
header_params = {}
|
387
|
+
# HTTP header 'Accept' (if needed)
|
388
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
389
|
+
# HTTP header 'Content-Type'
|
390
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
391
|
+
|
392
|
+
# form parameters
|
393
|
+
form_params = {}
|
394
|
+
|
395
|
+
# http body (model)
|
396
|
+
post_body = @api_client.object_to_http_body(body)
|
397
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
398
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
399
|
+
:header_params => header_params,
|
400
|
+
:query_params => query_params,
|
401
|
+
:form_params => form_params,
|
402
|
+
:body => post_body,
|
403
|
+
:auth_names => auth_names,
|
404
|
+
:return_type => 'IntegrationState')
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug "API called: IntegrationApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
407
|
+
end
|
408
|
+
return data, status_code, headers
|
409
|
+
end
|
410
|
+
# Update a Customer Profile
|
411
|
+
# Update (or create) a [Customer Profile][]. This profile information can then be matched and/or updated by campaign [Rules][]. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID **not** change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. [Customer Profile]: /Getting-Started/entities#customer-profile [Rules]: /Getting-Started/entities#campaigns-rulesets-and-coupons
|
412
|
+
# @param integration_id The custom identifier for this profile, must be unique within the account.
|
413
|
+
# @param body
|
414
|
+
# @param [Hash] opts the optional parameters
|
415
|
+
# @return [IntegrationState]
|
416
|
+
def update_customer_profile(integration_id, body, opts = {})
|
417
|
+
data, _status_code, _headers = update_customer_profile_with_http_info(integration_id, body, opts)
|
418
|
+
data
|
419
|
+
end
|
420
|
+
|
421
|
+
# Update a Customer Profile
|
422
|
+
# Update (or create) a [Customer Profile][]. This profile information can then be matched and/or updated by campaign [Rules][]. The `integrationId` may be any identifier that will remain stable for the customer. For example, you might use a database ID, an email, or a phone number as the `integrationId`. It is vital that this ID **not** change over time, so **don't** use any identifier that the customer can update themselves. E.g. if your application allows a customer to update their e-mail address, you should instead use a database ID. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. [Customer Profile]: /Getting-Started/entities#customer-profile [Rules]: /Getting-Started/entities#campaigns-rulesets-and-coupons
|
423
|
+
# @param integration_id The custom identifier for this profile, must be unique within the account.
|
424
|
+
# @param body
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @return [Array<(IntegrationState, Fixnum, Hash)>] IntegrationState data, response status code and response headers
|
427
|
+
def update_customer_profile_with_http_info(integration_id, body, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_profile ...'
|
430
|
+
end
|
431
|
+
# verify the required parameter 'integration_id' is set
|
432
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationApi.update_customer_profile"
|
434
|
+
end
|
435
|
+
# verify the required parameter 'body' is set
|
436
|
+
if @api_client.config.client_side_validation && body.nil?
|
437
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_customer_profile"
|
438
|
+
end
|
439
|
+
# resource path
|
440
|
+
local_var_path = '/v1/customer_profiles/{integrationId}'.sub('{' + 'integrationId' + '}', integration_id.to_s)
|
441
|
+
|
442
|
+
# query parameters
|
443
|
+
query_params = {}
|
444
|
+
|
445
|
+
# header parameters
|
446
|
+
header_params = {}
|
447
|
+
# HTTP header 'Accept' (if needed)
|
448
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
449
|
+
# HTTP header 'Content-Type'
|
450
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
451
|
+
|
452
|
+
# form parameters
|
453
|
+
form_params = {}
|
454
|
+
|
455
|
+
# http body (model)
|
456
|
+
post_body = @api_client.object_to_http_body(body)
|
457
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
458
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
459
|
+
:header_params => header_params,
|
460
|
+
:query_params => query_params,
|
461
|
+
:form_params => form_params,
|
462
|
+
:body => post_body,
|
463
|
+
:auth_names => auth_names,
|
464
|
+
:return_type => 'IntegrationState')
|
465
|
+
if @api_client.config.debugging
|
466
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_customer_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
467
|
+
end
|
468
|
+
return data, status_code, headers
|
469
|
+
end
|
470
|
+
# Update a Customer Session
|
471
|
+
# Update (or create) a [Customer Session][]. For example, the items in a customers cart are part of a session. The Talon.One platform supports multiple simultaneous sessions for the same profile, so if you have multiple ways of accessing the same application you have the option of either tracking multiple independent sessions or using the same session across all of them. You should share sessions when application access points share other state, such as the users cart. If two points of access to the application have independent state (e.g. a user can have different items in their cart across the two) they should use independent customer session ID's. The `profileId` parameter in the request body should correspond to an `integrationId` for a customer profile, to track an anonymous session use the empty string (`\"\"`) as the `profileId`. Note that you do **not** need to create a customer profile first: if the specified profile does not yet exist, an empty profile will be created automatically. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. [Customer Session]: /Getting-Started/entities#customer-session
|
472
|
+
# @param customer_session_id The custom identifier for this session, must be unique within the account.
|
473
|
+
# @param body
|
474
|
+
# @param [Hash] opts the optional parameters
|
475
|
+
# @return [IntegrationState]
|
476
|
+
def update_customer_session(customer_session_id, body, opts = {})
|
477
|
+
data, _status_code, _headers = update_customer_session_with_http_info(customer_session_id, body, opts)
|
478
|
+
data
|
479
|
+
end
|
480
|
+
|
481
|
+
# Update a Customer Session
|
482
|
+
# Update (or create) a [Customer Session][]. For example, the items in a customers cart are part of a session. The Talon.One platform supports multiple simultaneous sessions for the same profile, so if you have multiple ways of accessing the same application you have the option of either tracking multiple independent sessions or using the same session across all of them. You should share sessions when application access points share other state, such as the users cart. If two points of access to the application have independent state (e.g. a user can have different items in their cart across the two) they should use independent customer session ID's. The `profileId` parameter in the request body should correspond to an `integrationId` for a customer profile, to track an anonymous session use the empty string (`\"\"`) as the `profileId`. Note that you do **not** need to create a customer profile first: if the specified profile does not yet exist, an empty profile will be created automatically. Updating a customer profile will return a response with the full integration state. This includes the current state of the customer profile, the customer session, the event that was recorded, and an array of effects that took place. The currency for the session and the cart items in the session is the same as that of the application with which the session is associated. [Customer Session]: /Getting-Started/entities#customer-session
|
483
|
+
# @param customer_session_id The custom identifier for this session, must be unique within the account.
|
484
|
+
# @param body
|
485
|
+
# @param [Hash] opts the optional parameters
|
486
|
+
# @return [Array<(IntegrationState, Fixnum, Hash)>] IntegrationState data, response status code and response headers
|
487
|
+
def update_customer_session_with_http_info(customer_session_id, body, opts = {})
|
488
|
+
if @api_client.config.debugging
|
489
|
+
@api_client.config.logger.debug 'Calling API: IntegrationApi.update_customer_session ...'
|
490
|
+
end
|
491
|
+
# verify the required parameter 'customer_session_id' is set
|
492
|
+
if @api_client.config.client_side_validation && customer_session_id.nil?
|
493
|
+
fail ArgumentError, "Missing the required parameter 'customer_session_id' when calling IntegrationApi.update_customer_session"
|
494
|
+
end
|
495
|
+
# verify the required parameter 'body' is set
|
496
|
+
if @api_client.config.client_side_validation && body.nil?
|
497
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.update_customer_session"
|
498
|
+
end
|
499
|
+
# resource path
|
500
|
+
local_var_path = '/v1/customer_sessions/{customerSessionId}'.sub('{' + 'customerSessionId' + '}', customer_session_id.to_s)
|
501
|
+
|
502
|
+
# query parameters
|
503
|
+
query_params = {}
|
504
|
+
|
505
|
+
# header parameters
|
506
|
+
header_params = {}
|
507
|
+
# HTTP header 'Accept' (if needed)
|
508
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
509
|
+
# HTTP header 'Content-Type'
|
510
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
511
|
+
|
512
|
+
# form parameters
|
513
|
+
form_params = {}
|
514
|
+
|
515
|
+
# http body (model)
|
516
|
+
post_body = @api_client.object_to_http_body(body)
|
517
|
+
auth_names = ['api_key_v1', 'integration_auth']
|
518
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
519
|
+
:header_params => header_params,
|
520
|
+
:query_params => query_params,
|
521
|
+
:form_params => form_params,
|
522
|
+
:body => post_body,
|
523
|
+
:auth_names => auth_names,
|
524
|
+
:return_type => 'IntegrationState')
|
525
|
+
if @api_client.config.debugging
|
526
|
+
@api_client.config.logger.debug "API called: IntegrationApi#update_customer_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
527
|
+
end
|
528
|
+
return data, status_code, headers
|
529
|
+
end
|
530
|
+
end
|
531
|
+
end
|