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,204 @@
|
|
|
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 CreateApplicationAPIKey
|
|
17
|
+
# Title for API Key
|
|
18
|
+
attr_accessor :title
|
|
19
|
+
|
|
20
|
+
# The date the API key expired
|
|
21
|
+
attr_accessor :expires
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'title' => :'title',
|
|
27
|
+
:'expires' => :'expires'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attribute type mapping.
|
|
32
|
+
def self.swagger_types
|
|
33
|
+
{
|
|
34
|
+
:'title' => :'String',
|
|
35
|
+
:'expires' => :'DateTime'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Initializes the object
|
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
41
|
+
def initialize(attributes = {})
|
|
42
|
+
return unless attributes.is_a?(Hash)
|
|
43
|
+
|
|
44
|
+
# convert string to symbol for hash key
|
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
46
|
+
|
|
47
|
+
if attributes.has_key?(:'title')
|
|
48
|
+
self.title = attributes[:'title']
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if attributes.has_key?(:'expires')
|
|
52
|
+
self.expires = attributes[:'expires']
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
57
|
+
# @return Array for valid properties with the reasons
|
|
58
|
+
def list_invalid_properties
|
|
59
|
+
invalid_properties = Array.new
|
|
60
|
+
if @title.nil?
|
|
61
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
if @expires.nil?
|
|
65
|
+
invalid_properties.push('invalid value for "expires", expires cannot be nil.')
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
invalid_properties
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Check to see if the all the properties in the model are valid
|
|
72
|
+
# @return true if the model is valid
|
|
73
|
+
def valid?
|
|
74
|
+
return false if @title.nil?
|
|
75
|
+
return false if @expires.nil?
|
|
76
|
+
true
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Checks equality by comparing each attribute.
|
|
80
|
+
# @param [Object] Object to be compared
|
|
81
|
+
def ==(o)
|
|
82
|
+
return true if self.equal?(o)
|
|
83
|
+
self.class == o.class &&
|
|
84
|
+
title == o.title &&
|
|
85
|
+
expires == o.expires
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# @see the `==` method
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def eql?(o)
|
|
91
|
+
self == o
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Calculates hash code according to all attributes.
|
|
95
|
+
# @return [Fixnum] Hash code
|
|
96
|
+
def hash
|
|
97
|
+
[title, expires].hash
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Builds the object from hash
|
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
+
# @return [Object] Returns the model itself
|
|
103
|
+
def build_from_hash(attributes)
|
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
|
107
|
+
# check to ensure the input is an array given that the the attribute
|
|
108
|
+
# is documented as an array but the input is not
|
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
111
|
+
end
|
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
self
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Deserializes the data based on type
|
|
121
|
+
# @param string type Data type
|
|
122
|
+
# @param string value Value to be deserialized
|
|
123
|
+
# @return [Object] Deserialized data
|
|
124
|
+
def _deserialize(type, value)
|
|
125
|
+
case type.to_sym
|
|
126
|
+
when :DateTime
|
|
127
|
+
DateTime.parse(value)
|
|
128
|
+
when :Date
|
|
129
|
+
Date.parse(value)
|
|
130
|
+
when :String
|
|
131
|
+
value.to_s
|
|
132
|
+
when :Integer
|
|
133
|
+
value.to_i
|
|
134
|
+
when :Float
|
|
135
|
+
value.to_f
|
|
136
|
+
when :BOOLEAN
|
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
138
|
+
true
|
|
139
|
+
else
|
|
140
|
+
false
|
|
141
|
+
end
|
|
142
|
+
when :Object
|
|
143
|
+
# generic object (usually a Hash), return directly
|
|
144
|
+
value
|
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
|
151
|
+
{}.tap do |hash|
|
|
152
|
+
value.each do |k, v|
|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
else # model
|
|
157
|
+
temp_model = TalonOne.const_get(type).new
|
|
158
|
+
temp_model.build_from_hash(value)
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Returns the string representation of the object
|
|
163
|
+
# @return [String] String presentation of the object
|
|
164
|
+
def to_s
|
|
165
|
+
to_hash.to_s
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
|
170
|
+
def to_body
|
|
171
|
+
to_hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
next if value.nil?
|
|
181
|
+
hash[param] = _to_hash(value)
|
|
182
|
+
end
|
|
183
|
+
hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Outputs non-array value in the form of hash
|
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
188
|
+
# @param [Object] value Any valid value
|
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
|
190
|
+
def _to_hash(value)
|
|
191
|
+
if value.is_a?(Array)
|
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
|
193
|
+
elsif value.is_a?(Hash)
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
196
|
+
end
|
|
197
|
+
elsif value.respond_to? :to_hash
|
|
198
|
+
value.to_hash
|
|
199
|
+
else
|
|
200
|
+
value
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -0,0 +1,365 @@
|
|
|
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 CustomerActivityReport
|
|
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 name for this customer profile.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The internal Talon.One ID of the customer.
|
|
28
|
+
attr_accessor :customer_id
|
|
29
|
+
|
|
30
|
+
# The last activity of the customer.
|
|
31
|
+
attr_accessor :last_activity
|
|
32
|
+
|
|
33
|
+
# Number of coupon redemptions in all customer campaigns.
|
|
34
|
+
attr_accessor :coupon_redemptions
|
|
35
|
+
|
|
36
|
+
# Number of coupon use attempts in all customer campaigns.
|
|
37
|
+
attr_accessor :coupon_use_attempts
|
|
38
|
+
|
|
39
|
+
# Number of failed coupon use attempts in all customer campaigns.
|
|
40
|
+
attr_accessor :coupon_failed_attempts
|
|
41
|
+
|
|
42
|
+
# Number of accrued discounts in all customer campaigns.
|
|
43
|
+
attr_accessor :accrued_discounts
|
|
44
|
+
|
|
45
|
+
# Amount of accrued revenue in all customer campaigns.
|
|
46
|
+
attr_accessor :accrued_revenue
|
|
47
|
+
|
|
48
|
+
# Number of orders in all customer campaigns.
|
|
49
|
+
attr_accessor :total_orders
|
|
50
|
+
|
|
51
|
+
# Number of orders without coupon used in all customer campaigns.
|
|
52
|
+
attr_accessor :total_orders_no_coupon
|
|
53
|
+
|
|
54
|
+
# The name of the campaign this customer belongs to.
|
|
55
|
+
attr_accessor :campaign_name
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'integration_id' => :'integrationId',
|
|
61
|
+
:'created' => :'created',
|
|
62
|
+
:'name' => :'name',
|
|
63
|
+
:'customer_id' => :'customerId',
|
|
64
|
+
:'last_activity' => :'lastActivity',
|
|
65
|
+
:'coupon_redemptions' => :'couponRedemptions',
|
|
66
|
+
:'coupon_use_attempts' => :'couponUseAttempts',
|
|
67
|
+
:'coupon_failed_attempts' => :'couponFailedAttempts',
|
|
68
|
+
:'accrued_discounts' => :'accruedDiscounts',
|
|
69
|
+
:'accrued_revenue' => :'accruedRevenue',
|
|
70
|
+
:'total_orders' => :'totalOrders',
|
|
71
|
+
:'total_orders_no_coupon' => :'totalOrdersNoCoupon',
|
|
72
|
+
:'campaign_name' => :'campaignName'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Attribute type mapping.
|
|
77
|
+
def self.swagger_types
|
|
78
|
+
{
|
|
79
|
+
:'integration_id' => :'String',
|
|
80
|
+
:'created' => :'DateTime',
|
|
81
|
+
:'name' => :'String',
|
|
82
|
+
:'customer_id' => :'Integer',
|
|
83
|
+
:'last_activity' => :'DateTime',
|
|
84
|
+
:'coupon_redemptions' => :'Integer',
|
|
85
|
+
:'coupon_use_attempts' => :'Integer',
|
|
86
|
+
:'coupon_failed_attempts' => :'Integer',
|
|
87
|
+
:'accrued_discounts' => :'Float',
|
|
88
|
+
:'accrued_revenue' => :'Float',
|
|
89
|
+
:'total_orders' => :'Integer',
|
|
90
|
+
:'total_orders_no_coupon' => :'Integer',
|
|
91
|
+
:'campaign_name' => :'String'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Initializes the object
|
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
97
|
+
def initialize(attributes = {})
|
|
98
|
+
return unless attributes.is_a?(Hash)
|
|
99
|
+
|
|
100
|
+
# convert string to symbol for hash key
|
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
102
|
+
|
|
103
|
+
if attributes.has_key?(:'integrationId')
|
|
104
|
+
self.integration_id = attributes[:'integrationId']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.has_key?(:'created')
|
|
108
|
+
self.created = attributes[:'created']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.has_key?(:'name')
|
|
112
|
+
self.name = attributes[:'name']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.has_key?(:'customerId')
|
|
116
|
+
self.customer_id = attributes[:'customerId']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.has_key?(:'lastActivity')
|
|
120
|
+
self.last_activity = attributes[:'lastActivity']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.has_key?(:'couponRedemptions')
|
|
124
|
+
self.coupon_redemptions = attributes[:'couponRedemptions']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.has_key?(:'couponUseAttempts')
|
|
128
|
+
self.coupon_use_attempts = attributes[:'couponUseAttempts']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.has_key?(:'couponFailedAttempts')
|
|
132
|
+
self.coupon_failed_attempts = attributes[:'couponFailedAttempts']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.has_key?(:'accruedDiscounts')
|
|
136
|
+
self.accrued_discounts = attributes[:'accruedDiscounts']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.has_key?(:'accruedRevenue')
|
|
140
|
+
self.accrued_revenue = attributes[:'accruedRevenue']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.has_key?(:'totalOrders')
|
|
144
|
+
self.total_orders = attributes[:'totalOrders']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.has_key?(:'totalOrdersNoCoupon')
|
|
148
|
+
self.total_orders_no_coupon = attributes[:'totalOrdersNoCoupon']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.has_key?(:'campaignName')
|
|
152
|
+
self.campaign_name = attributes[:'campaignName']
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
157
|
+
# @return Array for valid properties with the reasons
|
|
158
|
+
def list_invalid_properties
|
|
159
|
+
invalid_properties = Array.new
|
|
160
|
+
if @integration_id.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @created.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @name.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @customer_id.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @coupon_redemptions.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "coupon_redemptions", coupon_redemptions cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if @coupon_use_attempts.nil?
|
|
181
|
+
invalid_properties.push('invalid value for "coupon_use_attempts", coupon_use_attempts cannot be nil.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if @coupon_failed_attempts.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "coupon_failed_attempts", coupon_failed_attempts cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @accrued_discounts.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "accrued_discounts", accrued_discounts cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @accrued_revenue.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "accrued_revenue", accrued_revenue cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @total_orders.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "total_orders", total_orders cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @total_orders_no_coupon.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "total_orders_no_coupon", total_orders_no_coupon cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @campaign_name.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "campaign_name", campaign_name cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
invalid_properties
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Check to see if the all the properties in the model are valid
|
|
212
|
+
# @return true if the model is valid
|
|
213
|
+
def valid?
|
|
214
|
+
return false if @integration_id.nil?
|
|
215
|
+
return false if @created.nil?
|
|
216
|
+
return false if @name.nil?
|
|
217
|
+
return false if @customer_id.nil?
|
|
218
|
+
return false if @coupon_redemptions.nil?
|
|
219
|
+
return false if @coupon_use_attempts.nil?
|
|
220
|
+
return false if @coupon_failed_attempts.nil?
|
|
221
|
+
return false if @accrued_discounts.nil?
|
|
222
|
+
return false if @accrued_revenue.nil?
|
|
223
|
+
return false if @total_orders.nil?
|
|
224
|
+
return false if @total_orders_no_coupon.nil?
|
|
225
|
+
return false if @campaign_name.nil?
|
|
226
|
+
true
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Checks equality by comparing each attribute.
|
|
230
|
+
# @param [Object] Object to be compared
|
|
231
|
+
def ==(o)
|
|
232
|
+
return true if self.equal?(o)
|
|
233
|
+
self.class == o.class &&
|
|
234
|
+
integration_id == o.integration_id &&
|
|
235
|
+
created == o.created &&
|
|
236
|
+
name == o.name &&
|
|
237
|
+
customer_id == o.customer_id &&
|
|
238
|
+
last_activity == o.last_activity &&
|
|
239
|
+
coupon_redemptions == o.coupon_redemptions &&
|
|
240
|
+
coupon_use_attempts == o.coupon_use_attempts &&
|
|
241
|
+
coupon_failed_attempts == o.coupon_failed_attempts &&
|
|
242
|
+
accrued_discounts == o.accrued_discounts &&
|
|
243
|
+
accrued_revenue == o.accrued_revenue &&
|
|
244
|
+
total_orders == o.total_orders &&
|
|
245
|
+
total_orders_no_coupon == o.total_orders_no_coupon &&
|
|
246
|
+
campaign_name == o.campaign_name
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# @see the `==` method
|
|
250
|
+
# @param [Object] Object to be compared
|
|
251
|
+
def eql?(o)
|
|
252
|
+
self == o
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Calculates hash code according to all attributes.
|
|
256
|
+
# @return [Fixnum] Hash code
|
|
257
|
+
def hash
|
|
258
|
+
[integration_id, created, name, customer_id, last_activity, coupon_redemptions, coupon_use_attempts, coupon_failed_attempts, accrued_discounts, accrued_revenue, total_orders, total_orders_no_coupon, campaign_name].hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Builds the object from hash
|
|
262
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
263
|
+
# @return [Object] Returns the model itself
|
|
264
|
+
def build_from_hash(attributes)
|
|
265
|
+
return nil unless attributes.is_a?(Hash)
|
|
266
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
267
|
+
if type =~ /\AArray<(.*)>/i
|
|
268
|
+
# check to ensure the input is an array given that the the attribute
|
|
269
|
+
# is documented as an array but the input is not
|
|
270
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
271
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
272
|
+
end
|
|
273
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
274
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
275
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
self
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Deserializes the data based on type
|
|
282
|
+
# @param string type Data type
|
|
283
|
+
# @param string value Value to be deserialized
|
|
284
|
+
# @return [Object] Deserialized data
|
|
285
|
+
def _deserialize(type, value)
|
|
286
|
+
case type.to_sym
|
|
287
|
+
when :DateTime
|
|
288
|
+
DateTime.parse(value)
|
|
289
|
+
when :Date
|
|
290
|
+
Date.parse(value)
|
|
291
|
+
when :String
|
|
292
|
+
value.to_s
|
|
293
|
+
when :Integer
|
|
294
|
+
value.to_i
|
|
295
|
+
when :Float
|
|
296
|
+
value.to_f
|
|
297
|
+
when :BOOLEAN
|
|
298
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
299
|
+
true
|
|
300
|
+
else
|
|
301
|
+
false
|
|
302
|
+
end
|
|
303
|
+
when :Object
|
|
304
|
+
# generic object (usually a Hash), return directly
|
|
305
|
+
value
|
|
306
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
307
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
308
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
309
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
310
|
+
k_type = Regexp.last_match[:k_type]
|
|
311
|
+
v_type = Regexp.last_match[:v_type]
|
|
312
|
+
{}.tap do |hash|
|
|
313
|
+
value.each do |k, v|
|
|
314
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
else # model
|
|
318
|
+
temp_model = TalonOne.const_get(type).new
|
|
319
|
+
temp_model.build_from_hash(value)
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Returns the string representation of the object
|
|
324
|
+
# @return [String] String presentation of the object
|
|
325
|
+
def to_s
|
|
326
|
+
to_hash.to_s
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
330
|
+
# @return [Hash] Returns the object in the form of hash
|
|
331
|
+
def to_body
|
|
332
|
+
to_hash
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Returns the object in the form of hash
|
|
336
|
+
# @return [Hash] Returns the object in the form of hash
|
|
337
|
+
def to_hash
|
|
338
|
+
hash = {}
|
|
339
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
340
|
+
value = self.send(attr)
|
|
341
|
+
next if value.nil?
|
|
342
|
+
hash[param] = _to_hash(value)
|
|
343
|
+
end
|
|
344
|
+
hash
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
# Outputs non-array value in the form of hash
|
|
348
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
349
|
+
# @param [Object] value Any valid value
|
|
350
|
+
# @return [Hash] Returns the value in the form of hash
|
|
351
|
+
def _to_hash(value)
|
|
352
|
+
if value.is_a?(Array)
|
|
353
|
+
value.compact.map { |v| _to_hash(v) }
|
|
354
|
+
elsif value.is_a?(Hash)
|
|
355
|
+
{}.tap do |hash|
|
|
356
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
357
|
+
end
|
|
358
|
+
elsif value.respond_to? :to_hash
|
|
359
|
+
value.to_hash
|
|
360
|
+
else
|
|
361
|
+
value
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
end
|