talon_one 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +63 -0
- data/Gemfile +7 -0
- data/README.md +415 -0
- data/Rakefile +8 -0
- 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 +19 -0
- data/docs/ApplicationSessionEntity.md +8 -0
- data/docs/Attribute.md +18 -0
- data/docs/AttributeQuery.md +7 -0
- data/docs/Binding.md +9 -0
- data/docs/Campaign.md +32 -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 +11 -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 +10 -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 +12 -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 +5077 -0
- data/docs/ManagerConfig.md +8 -0
- data/docs/Meta.md +12 -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/NewSamlConnection.md +15 -0
- data/docs/NewTemplateDef.md +14 -0
- data/docs/NewUser.md +11 -0
- data/docs/NewWebhook.md +15 -0
- data/docs/Notification.md +10 -0
- data/docs/Notifications.md +7 -0
- data/docs/Referral.md +17 -0
- data/docs/ReferralRejectionReason.md +10 -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/SamlConnection.md +19 -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/UpdateApplication.md +14 -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 +17 -0
- data/docs/User.md +21 -0
- data/docs/UserEntity.md +8 -0
- data/docs/Webhook.md +18 -0
- data/docs/WebhookActivationLogEntry.md +12 -0
- data/docs/WebhookLogEntry.md +17 -0
- data/git_push.sh +55 -0
- data/lib/talon_one.rb +204 -0
- data/lib/talon_one/api/integration_api.rb +531 -0
- data/lib/talon_one/api/management_api.rb +5535 -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 +378 -0
- data/lib/talon_one/models/application_session_entity.rb +189 -0
- data/lib/talon_one/models/attribute.rb +382 -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 +534 -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 +215 -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 +208 -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 +235 -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 +221 -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 +396 -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_saml_connection.rb +356 -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/notification.rb +219 -0
- data/lib/talon_one/models/notifications.rb +174 -0
- data/lib/talon_one/models/referral.rb +348 -0
- data/lib/talon_one/models/referral_rejection_reason.rb +251 -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/saml_connection.rb +420 -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_application.rb +352 -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 +315 -0
- data/lib/talon_one/models/user.rb +400 -0
- data/lib/talon_one/models/user_entity.rb +189 -0
- data/lib/talon_one/models/webhook.rb +375 -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 +1304 -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 +111 -0
- data/spec/models/application_spec.rb +117 -0
- data/spec/models/attribute_query_spec.rb +35 -0
- data/spec/models/attribute_spec.rb +109 -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 +193 -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 +59 -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 +53 -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 +65 -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 +65 -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_saml_connection_spec.rb +83 -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/notification_spec.rb +53 -0
- data/spec/models/notifications_spec.rb +35 -0
- data/spec/models/referral_rejection_reason_spec.rb +57 -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/saml_connection_spec.rb +107 -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_application_spec.rb +81 -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 +99 -0
- data/spec/models/user_entity_spec.rb +41 -0
- data/spec/models/user_spec.rb +123 -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 +105 -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-1.1.2.gem +0 -0
- data/talon_one-1.2.0.gem +0 -0
- data/talon_one.gemspec +45 -0
- metadata +908 -0
|
@@ -0,0 +1,206 @@
|
|
|
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 'date'
|
|
14
|
+
|
|
15
|
+
module TalonOne
|
|
16
|
+
class CustomerProfileSearchQuery
|
|
17
|
+
# Properties to match against a customer profile. All provided attributes will be exactly matched against profile attributes
|
|
18
|
+
attr_accessor :attributes
|
|
19
|
+
|
|
20
|
+
attr_accessor :integration_i_ds
|
|
21
|
+
|
|
22
|
+
attr_accessor :profile_i_ds
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'attributes' => :'attributes',
|
|
28
|
+
:'integration_i_ds' => :'integrationIDs',
|
|
29
|
+
:'profile_i_ds' => :'profileIDs'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.swagger_types
|
|
35
|
+
{
|
|
36
|
+
:'attributes' => :'Object',
|
|
37
|
+
:'integration_i_ds' => :'Array<String>',
|
|
38
|
+
:'profile_i_ds' => :'Array<Integer>'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Initializes the object
|
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
44
|
+
def initialize(attributes = {})
|
|
45
|
+
return unless attributes.is_a?(Hash)
|
|
46
|
+
|
|
47
|
+
# convert string to symbol for hash key
|
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
49
|
+
|
|
50
|
+
if attributes.has_key?(:'attributes')
|
|
51
|
+
self.attributes = attributes[:'attributes']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if attributes.has_key?(:'integrationIDs')
|
|
55
|
+
if (value = attributes[:'integrationIDs']).is_a?(Array)
|
|
56
|
+
self.integration_i_ds = value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if attributes.has_key?(:'profileIDs')
|
|
61
|
+
if (value = attributes[:'profileIDs']).is_a?(Array)
|
|
62
|
+
self.profile_i_ds = value
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
68
|
+
# @return Array for valid properties with the reasons
|
|
69
|
+
def list_invalid_properties
|
|
70
|
+
invalid_properties = Array.new
|
|
71
|
+
invalid_properties
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Check to see if the all the properties in the model are valid
|
|
75
|
+
# @return true if the model is valid
|
|
76
|
+
def valid?
|
|
77
|
+
true
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Checks equality by comparing each attribute.
|
|
81
|
+
# @param [Object] Object to be compared
|
|
82
|
+
def ==(o)
|
|
83
|
+
return true if self.equal?(o)
|
|
84
|
+
self.class == o.class &&
|
|
85
|
+
attributes == o.attributes &&
|
|
86
|
+
integration_i_ds == o.integration_i_ds &&
|
|
87
|
+
profile_i_ds == o.profile_i_ds
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# @see the `==` method
|
|
91
|
+
# @param [Object] Object to be compared
|
|
92
|
+
def eql?(o)
|
|
93
|
+
self == o
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Calculates hash code according to all attributes.
|
|
97
|
+
# @return [Fixnum] Hash code
|
|
98
|
+
def hash
|
|
99
|
+
[attributes, integration_i_ds, profile_i_ds].hash
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Builds the object from hash
|
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
|
+
# @return [Object] Returns the model itself
|
|
105
|
+
def build_from_hash(attributes)
|
|
106
|
+
return nil unless attributes.is_a?(Hash)
|
|
107
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
108
|
+
if type =~ /\AArray<(.*)>/i
|
|
109
|
+
# check to ensure the input is an array given that the the attribute
|
|
110
|
+
# is documented as an array but the input is not
|
|
111
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
112
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
113
|
+
end
|
|
114
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
115
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
116
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
self
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Deserializes the data based on type
|
|
123
|
+
# @param string type Data type
|
|
124
|
+
# @param string value Value to be deserialized
|
|
125
|
+
# @return [Object] Deserialized data
|
|
126
|
+
def _deserialize(type, value)
|
|
127
|
+
case type.to_sym
|
|
128
|
+
when :DateTime
|
|
129
|
+
DateTime.parse(value)
|
|
130
|
+
when :Date
|
|
131
|
+
Date.parse(value)
|
|
132
|
+
when :String
|
|
133
|
+
value.to_s
|
|
134
|
+
when :Integer
|
|
135
|
+
value.to_i
|
|
136
|
+
when :Float
|
|
137
|
+
value.to_f
|
|
138
|
+
when :BOOLEAN
|
|
139
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
140
|
+
true
|
|
141
|
+
else
|
|
142
|
+
false
|
|
143
|
+
end
|
|
144
|
+
when :Object
|
|
145
|
+
# generic object (usually a Hash), return directly
|
|
146
|
+
value
|
|
147
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
148
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
149
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
150
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
151
|
+
k_type = Regexp.last_match[:k_type]
|
|
152
|
+
v_type = Regexp.last_match[:v_type]
|
|
153
|
+
{}.tap do |hash|
|
|
154
|
+
value.each do |k, v|
|
|
155
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
else # model
|
|
159
|
+
temp_model = TalonOne.const_get(type).new
|
|
160
|
+
temp_model.build_from_hash(value)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Returns the string representation of the object
|
|
165
|
+
# @return [String] String presentation of the object
|
|
166
|
+
def to_s
|
|
167
|
+
to_hash.to_s
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
171
|
+
# @return [Hash] Returns the object in the form of hash
|
|
172
|
+
def to_body
|
|
173
|
+
to_hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns the object in the form of hash
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_hash
|
|
179
|
+
hash = {}
|
|
180
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
181
|
+
value = self.send(attr)
|
|
182
|
+
next if value.nil?
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Outputs non-array value in the form of hash
|
|
189
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
190
|
+
# @param [Object] value Any valid value
|
|
191
|
+
# @return [Hash] Returns the value in the form of hash
|
|
192
|
+
def _to_hash(value)
|
|
193
|
+
if value.is_a?(Array)
|
|
194
|
+
value.compact.map { |v| _to_hash(v) }
|
|
195
|
+
elsif value.is_a?(Hash)
|
|
196
|
+
{}.tap do |hash|
|
|
197
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
198
|
+
end
|
|
199
|
+
elsif value.respond_to? :to_hash
|
|
200
|
+
value.to_hash
|
|
201
|
+
else
|
|
202
|
+
value
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
@@ -0,0 +1,407 @@
|
|
|
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 'date'
|
|
14
|
+
|
|
15
|
+
module TalonOne
|
|
16
|
+
#
|
|
17
|
+
class CustomerSession
|
|
18
|
+
# The ID used for this entity in the application system.
|
|
19
|
+
attr_accessor :integration_id
|
|
20
|
+
|
|
21
|
+
# The exact moment this entity was created.
|
|
22
|
+
attr_accessor :created
|
|
23
|
+
|
|
24
|
+
# The ID of the application that owns this entity.
|
|
25
|
+
attr_accessor :application_id
|
|
26
|
+
|
|
27
|
+
# ID of the customers profile as used within this Talon.One account. May be omitted or set to the empty string if the customer does not yet have a known profile ID.
|
|
28
|
+
attr_accessor :profile_id
|
|
29
|
+
|
|
30
|
+
# Any coupon code entered.
|
|
31
|
+
attr_accessor :coupon
|
|
32
|
+
|
|
33
|
+
# Any referral code entered.
|
|
34
|
+
attr_accessor :referral
|
|
35
|
+
|
|
36
|
+
# Indicates the current state of the session. All sessions must start in the \"open\" state, after which valid transitions are... 1. open -> closed 2. open -> cancelled 3. closed -> cancelled
|
|
37
|
+
attr_accessor :state
|
|
38
|
+
|
|
39
|
+
# Serialized JSON representation.
|
|
40
|
+
attr_accessor :cart_items
|
|
41
|
+
|
|
42
|
+
# Identifiers for the customer, this can be used for limits on values such as device ID.
|
|
43
|
+
attr_accessor :identifiers
|
|
44
|
+
|
|
45
|
+
# The total sum of the cart in one session.
|
|
46
|
+
attr_accessor :total
|
|
47
|
+
|
|
48
|
+
# A key-value map of the sessions attributes. The potentially valid attributes are configured in your accounts developer settings.
|
|
49
|
+
attr_accessor :attributes
|
|
50
|
+
|
|
51
|
+
# Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions.
|
|
52
|
+
attr_accessor :first_session
|
|
53
|
+
|
|
54
|
+
# A map of labelled discount values, values will be in the same currency as the application associated with the session.
|
|
55
|
+
attr_accessor :discounts
|
|
56
|
+
|
|
57
|
+
class EnumAttributeValidator
|
|
58
|
+
attr_reader :datatype
|
|
59
|
+
attr_reader :allowable_values
|
|
60
|
+
|
|
61
|
+
def initialize(datatype, allowable_values)
|
|
62
|
+
@allowable_values = allowable_values.map do |value|
|
|
63
|
+
case datatype.to_s
|
|
64
|
+
when /Integer/i
|
|
65
|
+
value.to_i
|
|
66
|
+
when /Float/i
|
|
67
|
+
value.to_f
|
|
68
|
+
else
|
|
69
|
+
value
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def valid?(value)
|
|
75
|
+
!value || allowable_values.include?(value)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
|
+
def self.attribute_map
|
|
81
|
+
{
|
|
82
|
+
:'integration_id' => :'integrationId',
|
|
83
|
+
:'created' => :'created',
|
|
84
|
+
:'application_id' => :'applicationId',
|
|
85
|
+
:'profile_id' => :'profileId',
|
|
86
|
+
:'coupon' => :'coupon',
|
|
87
|
+
:'referral' => :'referral',
|
|
88
|
+
:'state' => :'state',
|
|
89
|
+
:'cart_items' => :'cartItems',
|
|
90
|
+
:'identifiers' => :'identifiers',
|
|
91
|
+
:'total' => :'total',
|
|
92
|
+
:'attributes' => :'attributes',
|
|
93
|
+
:'first_session' => :'firstSession',
|
|
94
|
+
:'discounts' => :'discounts'
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Attribute type mapping.
|
|
99
|
+
def self.swagger_types
|
|
100
|
+
{
|
|
101
|
+
:'integration_id' => :'String',
|
|
102
|
+
:'created' => :'DateTime',
|
|
103
|
+
:'application_id' => :'Integer',
|
|
104
|
+
:'profile_id' => :'String',
|
|
105
|
+
:'coupon' => :'String',
|
|
106
|
+
:'referral' => :'String',
|
|
107
|
+
:'state' => :'String',
|
|
108
|
+
:'cart_items' => :'Array<CartItem>',
|
|
109
|
+
:'identifiers' => :'Array<String>',
|
|
110
|
+
:'total' => :'Float',
|
|
111
|
+
:'attributes' => :'Object',
|
|
112
|
+
:'first_session' => :'BOOLEAN',
|
|
113
|
+
:'discounts' => :'Hash<String, Float>'
|
|
114
|
+
}
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Initializes the object
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
def initialize(attributes = {})
|
|
120
|
+
return unless attributes.is_a?(Hash)
|
|
121
|
+
|
|
122
|
+
# convert string to symbol for hash key
|
|
123
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
124
|
+
|
|
125
|
+
if attributes.has_key?(:'integrationId')
|
|
126
|
+
self.integration_id = attributes[:'integrationId']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.has_key?(:'created')
|
|
130
|
+
self.created = attributes[:'created']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.has_key?(:'applicationId')
|
|
134
|
+
self.application_id = attributes[:'applicationId']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.has_key?(:'profileId')
|
|
138
|
+
self.profile_id = attributes[:'profileId']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.has_key?(:'coupon')
|
|
142
|
+
self.coupon = attributes[:'coupon']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.has_key?(:'referral')
|
|
146
|
+
self.referral = attributes[:'referral']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.has_key?(:'state')
|
|
150
|
+
self.state = attributes[:'state']
|
|
151
|
+
else
|
|
152
|
+
self.state = 'open'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.has_key?(:'cartItems')
|
|
156
|
+
if (value = attributes[:'cartItems']).is_a?(Array)
|
|
157
|
+
self.cart_items = value
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.has_key?(:'identifiers')
|
|
162
|
+
if (value = attributes[:'identifiers']).is_a?(Array)
|
|
163
|
+
self.identifiers = value
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.has_key?(:'total')
|
|
168
|
+
self.total = attributes[:'total']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.has_key?(:'attributes')
|
|
172
|
+
self.attributes = attributes[:'attributes']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.has_key?(:'firstSession')
|
|
176
|
+
self.first_session = attributes[:'firstSession']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.has_key?(:'discounts')
|
|
180
|
+
if (value = attributes[:'discounts']).is_a?(Hash)
|
|
181
|
+
self.discounts = value
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
187
|
+
# @return Array for valid properties with the reasons
|
|
188
|
+
def list_invalid_properties
|
|
189
|
+
invalid_properties = Array.new
|
|
190
|
+
if @integration_id.nil?
|
|
191
|
+
invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.')
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if @created.nil?
|
|
195
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if @application_id.nil?
|
|
199
|
+
invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if @profile_id.nil?
|
|
203
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @coupon.nil?
|
|
207
|
+
invalid_properties.push('invalid value for "coupon", coupon cannot be nil.')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if @referral.nil?
|
|
211
|
+
invalid_properties.push('invalid value for "referral", referral cannot be nil.')
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if @state.nil?
|
|
215
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if @cart_items.nil?
|
|
219
|
+
invalid_properties.push('invalid value for "cart_items", cart_items cannot be nil.')
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if @total.nil?
|
|
223
|
+
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if @attributes.nil?
|
|
227
|
+
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if @first_session.nil?
|
|
231
|
+
invalid_properties.push('invalid value for "first_session", first_session cannot be nil.')
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if @discounts.nil?
|
|
235
|
+
invalid_properties.push('invalid value for "discounts", discounts cannot be nil.')
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
invalid_properties
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Check to see if the all the properties in the model are valid
|
|
242
|
+
# @return true if the model is valid
|
|
243
|
+
def valid?
|
|
244
|
+
return false if @integration_id.nil?
|
|
245
|
+
return false if @created.nil?
|
|
246
|
+
return false if @application_id.nil?
|
|
247
|
+
return false if @profile_id.nil?
|
|
248
|
+
return false if @coupon.nil?
|
|
249
|
+
return false if @referral.nil?
|
|
250
|
+
return false if @state.nil?
|
|
251
|
+
state_validator = EnumAttributeValidator.new('String', ['open', 'closed', 'cancelled'])
|
|
252
|
+
return false unless state_validator.valid?(@state)
|
|
253
|
+
return false if @cart_items.nil?
|
|
254
|
+
return false if @total.nil?
|
|
255
|
+
return false if @attributes.nil?
|
|
256
|
+
return false if @first_session.nil?
|
|
257
|
+
return false if @discounts.nil?
|
|
258
|
+
true
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
262
|
+
# @param [Object] state Object to be assigned
|
|
263
|
+
def state=(state)
|
|
264
|
+
validator = EnumAttributeValidator.new('String', ['open', 'closed', 'cancelled'])
|
|
265
|
+
unless validator.valid?(state)
|
|
266
|
+
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
|
|
267
|
+
end
|
|
268
|
+
@state = state
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Checks equality by comparing each attribute.
|
|
272
|
+
# @param [Object] Object to be compared
|
|
273
|
+
def ==(o)
|
|
274
|
+
return true if self.equal?(o)
|
|
275
|
+
self.class == o.class &&
|
|
276
|
+
integration_id == o.integration_id &&
|
|
277
|
+
created == o.created &&
|
|
278
|
+
application_id == o.application_id &&
|
|
279
|
+
profile_id == o.profile_id &&
|
|
280
|
+
coupon == o.coupon &&
|
|
281
|
+
referral == o.referral &&
|
|
282
|
+
state == o.state &&
|
|
283
|
+
cart_items == o.cart_items &&
|
|
284
|
+
identifiers == o.identifiers &&
|
|
285
|
+
total == o.total &&
|
|
286
|
+
attributes == o.attributes &&
|
|
287
|
+
first_session == o.first_session &&
|
|
288
|
+
discounts == o.discounts
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# @see the `==` method
|
|
292
|
+
# @param [Object] Object to be compared
|
|
293
|
+
def eql?(o)
|
|
294
|
+
self == o
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Calculates hash code according to all attributes.
|
|
298
|
+
# @return [Fixnum] Hash code
|
|
299
|
+
def hash
|
|
300
|
+
[integration_id, created, application_id, profile_id, coupon, referral, state, cart_items, identifiers, total, attributes, first_session, discounts].hash
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Builds the object from hash
|
|
304
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
305
|
+
# @return [Object] Returns the model itself
|
|
306
|
+
def build_from_hash(attributes)
|
|
307
|
+
return nil unless attributes.is_a?(Hash)
|
|
308
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
309
|
+
if type =~ /\AArray<(.*)>/i
|
|
310
|
+
# check to ensure the input is an array given that the the attribute
|
|
311
|
+
# is documented as an array but the input is not
|
|
312
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
313
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
314
|
+
end
|
|
315
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
316
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
317
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
self
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Deserializes the data based on type
|
|
324
|
+
# @param string type Data type
|
|
325
|
+
# @param string value Value to be deserialized
|
|
326
|
+
# @return [Object] Deserialized data
|
|
327
|
+
def _deserialize(type, value)
|
|
328
|
+
case type.to_sym
|
|
329
|
+
when :DateTime
|
|
330
|
+
DateTime.parse(value)
|
|
331
|
+
when :Date
|
|
332
|
+
Date.parse(value)
|
|
333
|
+
when :String
|
|
334
|
+
value.to_s
|
|
335
|
+
when :Integer
|
|
336
|
+
value.to_i
|
|
337
|
+
when :Float
|
|
338
|
+
value.to_f
|
|
339
|
+
when :BOOLEAN
|
|
340
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
341
|
+
true
|
|
342
|
+
else
|
|
343
|
+
false
|
|
344
|
+
end
|
|
345
|
+
when :Object
|
|
346
|
+
# generic object (usually a Hash), return directly
|
|
347
|
+
value
|
|
348
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
349
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
350
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
351
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
352
|
+
k_type = Regexp.last_match[:k_type]
|
|
353
|
+
v_type = Regexp.last_match[:v_type]
|
|
354
|
+
{}.tap do |hash|
|
|
355
|
+
value.each do |k, v|
|
|
356
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
else # model
|
|
360
|
+
temp_model = TalonOne.const_get(type).new
|
|
361
|
+
temp_model.build_from_hash(value)
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Returns the string representation of the object
|
|
366
|
+
# @return [String] String presentation of the object
|
|
367
|
+
def to_s
|
|
368
|
+
to_hash.to_s
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
372
|
+
# @return [Hash] Returns the object in the form of hash
|
|
373
|
+
def to_body
|
|
374
|
+
to_hash
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Returns the object in the form of hash
|
|
378
|
+
# @return [Hash] Returns the object in the form of hash
|
|
379
|
+
def to_hash
|
|
380
|
+
hash = {}
|
|
381
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
382
|
+
value = self.send(attr)
|
|
383
|
+
next if value.nil?
|
|
384
|
+
hash[param] = _to_hash(value)
|
|
385
|
+
end
|
|
386
|
+
hash
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Outputs non-array value in the form of hash
|
|
390
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
391
|
+
# @param [Object] value Any valid value
|
|
392
|
+
# @return [Hash] Returns the value in the form of hash
|
|
393
|
+
def _to_hash(value)
|
|
394
|
+
if value.is_a?(Array)
|
|
395
|
+
value.compact.map { |v| _to_hash(v) }
|
|
396
|
+
elsif value.is_a?(Hash)
|
|
397
|
+
{}.tap do |hash|
|
|
398
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
399
|
+
end
|
|
400
|
+
elsif value.respond_to? :to_hash
|
|
401
|
+
value.to_hash
|
|
402
|
+
else
|
|
403
|
+
value
|
|
404
|
+
end
|
|
405
|
+
end
|
|
406
|
+
end
|
|
407
|
+
end
|