talon_one 0.1.1 → 1.1.2
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +4 -0
- data/README.md +393 -57
- data/Rakefile +6 -8
- data/docs/APIError.md +10 -0
- data/docs/AccessLogEntry.md +14 -0
- data/docs/Account.md +25 -0
- data/docs/AccountAnalytics.md +21 -0
- data/docs/AccountEntity.md +8 -0
- data/docs/AccountLimits.md +18 -0
- data/docs/Application.md +20 -0
- data/docs/ApplicationAPIKey.md +14 -0
- data/docs/ApplicationApiHealth.md +9 -0
- data/docs/ApplicationCustomer.md +16 -0
- data/docs/ApplicationCustomerEntity.md +8 -0
- data/docs/ApplicationCustomerSearch.md +10 -0
- data/docs/ApplicationEntity.md +8 -0
- data/docs/ApplicationEvent.md +15 -0
- data/docs/ApplicationSession.md +18 -0
- data/docs/ApplicationSessionEntity.md +8 -0
- data/docs/Attribute.md +20 -0
- data/docs/AttributeQuery.md +7 -0
- data/docs/Binding.md +9 -0
- data/docs/Campaign.md +30 -0
- data/docs/CampaignAnalytics.md +22 -0
- data/docs/CampaignCopy.md +9 -0
- data/docs/CampaignEntity.md +8 -0
- data/docs/CampaignSearch.md +8 -0
- data/docs/CampaignSet.md +11 -0
- data/docs/CampaignSetBranchNode.md +11 -0
- data/docs/CampaignSetLeafNode.md +9 -0
- data/docs/CampaignSetNode.md +8 -0
- data/docs/CartItem.md +19 -0
- data/docs/CartItemAdjustment.md +10 -0
- data/docs/Change.md +13 -0
- data/docs/CodeGeneratorSettings.md +9 -0
- data/docs/Coupon.md +21 -0
- data/docs/CouponConstraints.md +10 -0
- data/docs/CouponRejectionReason.md +10 -0
- data/docs/CouponReservations.md +8 -0
- data/docs/CouponSearch.md +8 -0
- data/docs/CouponValue.md +8 -0
- data/docs/CreateApplicationAPIKey.md +9 -0
- data/docs/CustomerActivityReport.md +20 -0
- data/docs/CustomerAnalytics.md +14 -0
- data/docs/CustomerProfile.md +15 -0
- data/docs/CustomerProfileSearchQuery.md +10 -0
- data/docs/CustomerSession.md +20 -0
- data/docs/EmailEntity.md +8 -0
- data/docs/Entity.md +9 -0
- data/docs/Environment.md +14 -0
- data/docs/ErrorResponse.md +9 -0
- data/docs/ErrorSource.md +10 -0
- data/docs/Event.md +17 -0
- data/docs/EventType.md +19 -0
- data/docs/Export.md +13 -0
- data/docs/FeatureFlag.md +11 -0
- data/docs/FeatureFlags.md +11 -0
- data/docs/FeaturesFeed.md +9 -0
- data/docs/FuncArgDef.md +9 -0
- data/docs/FunctionDef.md +12 -0
- data/docs/Import.md +13 -0
- data/docs/ImportCoupons.md +8 -0
- data/docs/InlineResponse200.md +9 -0
- data/docs/InlineResponse2001.md +9 -0
- data/docs/InlineResponse20010.md +9 -0
- data/docs/InlineResponse20011.md +9 -0
- data/docs/InlineResponse20012.md +9 -0
- data/docs/InlineResponse20013.md +9 -0
- data/docs/InlineResponse20014.md +9 -0
- data/docs/InlineResponse20015.md +9 -0
- data/docs/InlineResponse20016.md +9 -0
- data/docs/InlineResponse20017.md +9 -0
- data/docs/InlineResponse20018.md +9 -0
- data/docs/InlineResponse20019.md +9 -0
- data/docs/InlineResponse2002.md +9 -0
- data/docs/InlineResponse20020.md +9 -0
- data/docs/InlineResponse20021.md +9 -0
- data/docs/InlineResponse20022.md +9 -0
- data/docs/InlineResponse20023.md +9 -0
- data/docs/InlineResponse20024.md +9 -0
- data/docs/InlineResponse20025.md +9 -0
- data/docs/InlineResponse20026.md +9 -0
- data/docs/InlineResponse20027.md +9 -0
- data/docs/InlineResponse20028.md +9 -0
- data/docs/InlineResponse2003.md +9 -0
- data/docs/InlineResponse2004.md +9 -0
- data/docs/InlineResponse2005.md +9 -0
- data/docs/InlineResponse2006.md +9 -0
- data/docs/InlineResponse2007.md +9 -0
- data/docs/InlineResponse2008.md +9 -0
- data/docs/InlineResponse2009.md +9 -0
- data/docs/IntegrationApi.md +558 -0
- data/docs/IntegrationEntity.md +9 -0
- data/docs/IntegrationEvent.md +10 -0
- data/docs/IntegrationProfileEntity.md +8 -0
- data/docs/IntegrationState.md +11 -0
- data/docs/LedgerEntry.md +17 -0
- data/docs/LibraryAttribute.md +14 -0
- data/docs/LimitConfig.md +10 -0
- data/docs/LoginParams.md +9 -0
- data/docs/Loyalty.md +8 -0
- data/docs/LoyaltyLedger.md +9 -0
- data/docs/LoyaltyLedgerEntry.md +17 -0
- data/docs/LoyaltyMembership.md +9 -0
- data/docs/LoyaltyPoints.md +11 -0
- data/docs/LoyaltyProgram.md +15 -0
- data/docs/LoyaltyProgramBalance.md +8 -0
- data/docs/LoyaltyProgramLedgers.md +11 -0
- data/docs/LoyaltySubLedger.md +10 -0
- data/docs/ManagementApi.md +5067 -0
- data/docs/ManagerConfig.md +8 -0
- data/docs/Meta.md +11 -0
- data/docs/MiscUpdateUserLatestFeature.md +8 -0
- data/docs/MultiApplicationEntity.md +8 -0
- data/docs/MutableEntity.md +8 -0
- data/docs/NewAccount.md +8 -0
- data/docs/NewAccountSignUp.md +10 -0
- data/docs/NewApplication.md +15 -0
- data/docs/NewApplicationAPIKey.md +15 -0
- data/docs/NewAttribute.md +15 -0
- data/docs/NewCampaign.md +19 -0
- data/docs/NewCampaignSet.md +9 -0
- data/docs/NewCoupons.md +16 -0
- data/docs/NewCustomerProfile.md +8 -0
- data/docs/NewCustomerSession.md +15 -0
- data/docs/NewEvent.md +11 -0
- data/docs/NewEventType.md +17 -0
- data/docs/NewFeatureFlags.md +10 -0
- data/docs/NewImport.md +8 -0
- data/docs/NewInvitation.md +11 -0
- data/docs/NewInviteEmail.md +9 -0
- data/docs/NewLoyaltyProgram.md +13 -0
- data/docs/NewPassword.md +9 -0
- data/docs/NewPasswordEmail.md +8 -0
- data/docs/NewReferral.md +12 -0
- data/docs/NewRole.md +11 -0
- data/docs/NewRuleset.md +11 -0
- data/docs/NewTemplateDef.md +14 -0
- data/docs/NewUser.md +11 -0
- data/docs/NewWebhook.md +15 -0
- data/docs/Referral.md +17 -0
- data/docs/Role.md +13 -0
- data/docs/RoleAssign.md +9 -0
- data/docs/RoleMembership.md +9 -0
- data/docs/Rule.md +12 -0
- data/docs/Ruleset.md +16 -0
- data/docs/Session.md +10 -0
- data/docs/SlotDef.md +13 -0
- data/docs/TemplateArgDef.md +11 -0
- data/docs/TemplateDef.md +18 -0
- data/docs/UpdateAccount.md +10 -0
- data/docs/UpdateCampaign.md +19 -0
- data/docs/UpdateCoupon.md +12 -0
- data/docs/UpdateCouponBatch.md +12 -0
- data/docs/UpdateLoyaltyProgram.md +12 -0
- data/docs/UpdateRole.md +11 -0
- data/docs/UpdateUser.md +16 -0
- data/docs/User.md +19 -0
- data/docs/UserEntity.md +8 -0
- data/docs/Webhook.md +19 -0
- data/docs/WebhookActivationLogEntry.md +12 -0
- data/docs/WebhookLogEntry.md +17 -0
- data/git_push.sh +55 -0
- data/lib/talon_one.rb +195 -4
- data/lib/talon_one/api/integration_api.rb +531 -0
- data/lib/talon_one/api/management_api.rb +5520 -0
- data/lib/talon_one/api_client.rb +389 -0
- data/lib/talon_one/api_error.rb +38 -0
- data/lib/talon_one/configuration.rb +223 -0
- data/lib/talon_one/models/access_log_entry.rb +280 -0
- data/lib/talon_one/models/account.rb +462 -0
- data/lib/talon_one/models/account_analytics.rb +384 -0
- data/lib/talon_one/models/account_entity.rb +189 -0
- data/lib/talon_one/models/account_limits.rb +341 -0
- data/lib/talon_one/models/api_error.rb +213 -0
- data/lib/talon_one/models/application.rb +482 -0
- data/lib/talon_one/models/application_api_health.rb +239 -0
- data/lib/talon_one/models/application_api_key.rb +279 -0
- data/lib/talon_one/models/application_customer.rb +307 -0
- data/lib/talon_one/models/application_customer_entity.rb +184 -0
- data/lib/talon_one/models/application_customer_search.rb +206 -0
- data/lib/talon_one/models/application_entity.rb +189 -0
- data/lib/talon_one/models/application_event.rb +287 -0
- data/lib/talon_one/models/application_session.rb +368 -0
- data/lib/talon_one/models/application_session_entity.rb +189 -0
- data/lib/talon_one/models/attribute.rb +416 -0
- data/lib/talon_one/models/attribute_query.rb +174 -0
- data/lib/talon_one/models/binding.rb +206 -0
- data/lib/talon_one/models/campaign.rb +514 -0
- data/lib/talon_one/models/campaign_analytics.rb +399 -0
- data/lib/talon_one/models/campaign_copy.rb +201 -0
- data/lib/talon_one/models/campaign_entity.rb +189 -0
- data/lib/talon_one/models/campaign_search.rb +189 -0
- data/lib/talon_one/models/campaign_set.rb +234 -0
- data/lib/talon_one/models/campaign_set_branch_node.rb +282 -0
- data/lib/talon_one/models/campaign_set_leaf_node.rb +238 -0
- data/lib/talon_one/models/campaign_set_node.rb +188 -0
- data/lib/talon_one/models/cart_item.rb +365 -0
- data/lib/talon_one/models/cart_item_adjustment.rb +248 -0
- data/lib/talon_one/models/change.rb +255 -0
- data/lib/talon_one/models/code_generator_settings.rb +225 -0
- data/lib/talon_one/models/coupon.rb +392 -0
- data/lib/talon_one/models/coupon_constraints.rb +228 -0
- data/lib/talon_one/models/coupon_rejection_reason.rb +251 -0
- data/lib/talon_one/models/coupon_reservations.rb +191 -0
- data/lib/talon_one/models/coupon_search.rb +189 -0
- data/lib/talon_one/models/coupon_value.rb +199 -0
- data/lib/talon_one/models/create_application_api_key.rb +204 -0
- data/lib/talon_one/models/customer_activity_report.rb +365 -0
- data/lib/talon_one/models/customer_analytics.rb +280 -0
- data/lib/talon_one/models/customer_profile.rb +292 -0
- data/lib/talon_one/models/customer_profile_search_query.rb +206 -0
- data/lib/talon_one/models/customer_session.rb +407 -0
- data/lib/talon_one/models/email_entity.rb +189 -0
- data/lib/talon_one/models/entity.rb +204 -0
- data/lib/talon_one/models/environment.rb +285 -0
- data/lib/talon_one/models/error_response.rb +201 -0
- data/lib/talon_one/models/error_source.rb +205 -0
- data/lib/talon_one/models/event.rb +332 -0
- data/lib/talon_one/models/event_type.rb +426 -0
- data/lib/talon_one/models/export.rb +299 -0
- data/lib/talon_one/models/feature_flag.rb +224 -0
- data/lib/talon_one/models/feature_flags.rb +220 -0
- data/lib/talon_one/models/features_feed.rb +193 -0
- data/lib/talon_one/models/func_arg_def.rb +243 -0
- data/lib/talon_one/models/function_def.rb +260 -0
- data/lib/talon_one/models/import.rb +318 -0
- data/lib/talon_one/models/import_coupons.rb +188 -0
- data/lib/talon_one/models/inline_response_200.rb +204 -0
- data/lib/talon_one/models/inline_response_200_1.rb +204 -0
- data/lib/talon_one/models/inline_response_200_10.rb +204 -0
- data/lib/talon_one/models/inline_response_200_11.rb +204 -0
- data/lib/talon_one/models/inline_response_200_12.rb +204 -0
- data/lib/talon_one/models/inline_response_200_13.rb +204 -0
- data/lib/talon_one/models/inline_response_200_14.rb +204 -0
- data/lib/talon_one/models/inline_response_200_15.rb +204 -0
- data/lib/talon_one/models/inline_response_200_16.rb +204 -0
- data/lib/talon_one/models/inline_response_200_17.rb +204 -0
- data/lib/talon_one/models/inline_response_200_18.rb +204 -0
- data/lib/talon_one/models/inline_response_200_19.rb +204 -0
- data/lib/talon_one/models/inline_response_200_2.rb +204 -0
- data/lib/talon_one/models/inline_response_200_20.rb +204 -0
- data/lib/talon_one/models/inline_response_200_21.rb +204 -0
- data/lib/talon_one/models/inline_response_200_22.rb +204 -0
- data/lib/talon_one/models/inline_response_200_23.rb +204 -0
- data/lib/talon_one/models/inline_response_200_24.rb +204 -0
- data/lib/talon_one/models/inline_response_200_25.rb +204 -0
- data/lib/talon_one/models/inline_response_200_26.rb +204 -0
- data/lib/talon_one/models/inline_response_200_27.rb +204 -0
- data/lib/talon_one/models/inline_response_200_28.rb +204 -0
- data/lib/talon_one/models/inline_response_200_3.rb +204 -0
- data/lib/talon_one/models/inline_response_200_4.rb +204 -0
- data/lib/talon_one/models/inline_response_200_5.rb +204 -0
- data/lib/talon_one/models/inline_response_200_6.rb +204 -0
- data/lib/talon_one/models/inline_response_200_7.rb +204 -0
- data/lib/talon_one/models/inline_response_200_8.rb +204 -0
- data/lib/talon_one/models/inline_response_200_9.rb +204 -0
- data/lib/talon_one/models/integration_entity.rb +204 -0
- data/lib/talon_one/models/integration_event.rb +234 -0
- data/lib/talon_one/models/integration_profile_entity.rb +184 -0
- data/lib/talon_one/models/integration_state.rb +226 -0
- data/lib/talon_one/models/ledger_entry.rb +320 -0
- data/lib/talon_one/models/library_attribute.rb +330 -0
- data/lib/talon_one/models/limit_config.rb +274 -0
- data/lib/talon_one/models/login_params.rb +205 -0
- data/lib/talon_one/models/loyalty.rb +192 -0
- data/lib/talon_one/models/loyalty_ledger.rb +202 -0
- data/lib/talon_one/models/loyalty_ledger_entry.rb +336 -0
- data/lib/talon_one/models/loyalty_membership.rb +199 -0
- data/lib/talon_one/models/loyalty_points.rb +220 -0
- data/lib/talon_one/models/loyalty_program.rb +297 -0
- data/lib/talon_one/models/loyalty_program_balance.rb +189 -0
- data/lib/talon_one/models/loyalty_program_ledgers.rb +232 -0
- data/lib/talon_one/models/loyalty_sub_ledger.rb +213 -0
- data/lib/talon_one/models/manager_config.rb +188 -0
- data/lib/talon_one/models/meta.rb +212 -0
- data/lib/talon_one/models/misc_update_user_latest_feature.rb +183 -0
- data/lib/talon_one/models/multi_application_entity.rb +191 -0
- data/lib/talon_one/models/mutable_entity.rb +189 -0
- data/lib/talon_one/models/new_account.rb +207 -0
- data/lib/talon_one/models/new_account_sign_up.rb +238 -0
- data/lib/talon_one/models/new_application.rb +404 -0
- data/lib/talon_one/models/new_application_api_key.rb +295 -0
- data/lib/talon_one/models/new_attribute.rb +337 -0
- data/lib/talon_one/models/new_campaign.rb +378 -0
- data/lib/talon_one/models/new_campaign_set.rb +204 -0
- data/lib/talon_one/models/new_coupons.rb +334 -0
- data/lib/talon_one/models/new_customer_profile.rb +184 -0
- data/lib/talon_one/models/new_customer_session.rb +295 -0
- data/lib/talon_one/models/new_event.rb +268 -0
- data/lib/talon_one/models/new_event_type.rb +396 -0
- data/lib/talon_one/models/new_feature_flags.rb +204 -0
- data/lib/talon_one/models/new_import.rb +224 -0
- data/lib/talon_one/models/new_invitation.rb +226 -0
- data/lib/talon_one/models/new_invite_email.rb +240 -0
- data/lib/talon_one/models/new_loyalty_program.rb +257 -0
- data/lib/talon_one/models/new_password.rb +222 -0
- data/lib/talon_one/models/new_password_email.rb +207 -0
- data/lib/talon_one/models/new_referral.rb +234 -0
- data/lib/talon_one/models/new_role.rb +232 -0
- data/lib/talon_one/models/new_ruleset.rb +228 -0
- data/lib/talon_one/models/new_template_def.rb +308 -0
- data/lib/talon_one/models/new_user.rb +248 -0
- data/lib/talon_one/models/new_webhook.rb +330 -0
- data/lib/talon_one/models/referral.rb +348 -0
- data/lib/talon_one/models/role.rb +247 -0
- data/lib/talon_one/models/role_assign.rb +209 -0
- data/lib/talon_one/models/role_membership.rb +204 -0
- data/lib/talon_one/models/rule.rb +245 -0
- data/lib/talon_one/models/ruleset.rb +299 -0
- data/lib/talon_one/models/session.rb +219 -0
- data/lib/talon_one/models/slot_def.rb +254 -0
- data/lib/talon_one/models/template_arg_def.rb +293 -0
- data/lib/talon_one/models/template_def.rb +398 -0
- data/lib/talon_one/models/update_account.rb +233 -0
- data/lib/talon_one/models/update_campaign.rb +373 -0
- data/lib/talon_one/models/update_coupon.rb +249 -0
- data/lib/talon_one/models/update_coupon_batch.rb +254 -0
- data/lib/talon_one/models/update_loyalty_program.rb +227 -0
- data/lib/talon_one/models/update_role.rb +216 -0
- data/lib/talon_one/models/update_user.rb +306 -0
- data/lib/talon_one/models/user.rb +381 -0
- data/lib/talon_one/models/user_entity.rb +189 -0
- data/lib/talon_one/models/webhook.rb +392 -0
- data/lib/talon_one/models/webhook_activation_log_entry.rb +250 -0
- data/lib/talon_one/models/webhook_log_entry.rb +305 -0
- data/lib/talon_one/version.rb +15 -0
- data/spec/api/integration_api_spec.rb +147 -0
- data/spec/api/management_api_spec.rb +1299 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_log_entry_spec.rb +77 -0
- data/spec/models/account_analytics_spec.rb +119 -0
- data/spec/models/account_entity_spec.rb +41 -0
- data/spec/models/account_limits_spec.rb +101 -0
- data/spec/models/account_spec.rb +147 -0
- data/spec/models/api_error_spec.rb +53 -0
- data/spec/models/application_api_health_spec.rb +51 -0
- data/spec/models/application_api_key_spec.rb +77 -0
- data/spec/models/application_customer_entity_spec.rb +41 -0
- data/spec/models/application_customer_search_spec.rb +53 -0
- data/spec/models/application_customer_spec.rb +89 -0
- data/spec/models/application_entity_spec.rb +41 -0
- data/spec/models/application_event_spec.rb +83 -0
- data/spec/models/application_session_entity_spec.rb +41 -0
- data/spec/models/application_session_spec.rb +105 -0
- data/spec/models/application_spec.rb +117 -0
- data/spec/models/attribute_query_spec.rb +35 -0
- data/spec/models/attribute_spec.rb +121 -0
- data/spec/models/binding_spec.rb +47 -0
- data/spec/models/campaign_analytics_spec.rb +125 -0
- data/spec/models/campaign_copy_spec.rb +47 -0
- data/spec/models/campaign_entity_spec.rb +41 -0
- data/spec/models/campaign_search_spec.rb +41 -0
- data/spec/models/campaign_set_branch_node_spec.rb +67 -0
- data/spec/models/campaign_set_leaf_node_spec.rb +51 -0
- data/spec/models/campaign_set_node_spec.rb +41 -0
- data/spec/models/campaign_set_spec.rb +59 -0
- data/spec/models/campaign_spec.rb +181 -0
- data/spec/models/cart_item_adjustment_spec.rb +53 -0
- data/spec/models/cart_item_spec.rb +107 -0
- data/spec/models/change_spec.rb +71 -0
- data/spec/models/code_generator_settings_spec.rb +47 -0
- data/spec/models/coupon_constraints_spec.rb +53 -0
- data/spec/models/coupon_rejection_reason_spec.rb +57 -0
- data/spec/models/coupon_reservations_spec.rb +41 -0
- data/spec/models/coupon_search_spec.rb +41 -0
- data/spec/models/coupon_spec.rb +119 -0
- data/spec/models/coupon_value_spec.rb +41 -0
- data/spec/models/create_application_api_key_spec.rb +47 -0
- data/spec/models/customer_activity_report_spec.rb +113 -0
- data/spec/models/customer_analytics_spec.rb +77 -0
- data/spec/models/customer_profile_search_query_spec.rb +53 -0
- data/spec/models/customer_profile_spec.rb +83 -0
- data/spec/models/customer_session_spec.rb +117 -0
- data/spec/models/email_entity_spec.rb +41 -0
- data/spec/models/entity_spec.rb +47 -0
- data/spec/models/environment_spec.rb +77 -0
- data/spec/models/error_response_spec.rb +47 -0
- data/spec/models/error_source_spec.rb +53 -0
- data/spec/models/event_spec.rb +95 -0
- data/spec/models/event_type_spec.rb +115 -0
- data/spec/models/export_spec.rb +75 -0
- data/spec/models/feature_flag_spec.rb +59 -0
- data/spec/models/feature_flags_spec.rb +59 -0
- data/spec/models/features_feed_spec.rb +47 -0
- data/spec/models/func_arg_def_spec.rb +51 -0
- data/spec/models/function_def_spec.rb +65 -0
- data/spec/models/import_coupons_spec.rb +41 -0
- data/spec/models/import_spec.rb +75 -0
- data/spec/models/inline_response_200_10_spec.rb +47 -0
- data/spec/models/inline_response_200_11_spec.rb +47 -0
- data/spec/models/inline_response_200_12_spec.rb +47 -0
- data/spec/models/inline_response_200_13_spec.rb +47 -0
- data/spec/models/inline_response_200_14_spec.rb +47 -0
- data/spec/models/inline_response_200_15_spec.rb +47 -0
- data/spec/models/inline_response_200_16_spec.rb +47 -0
- data/spec/models/inline_response_200_17_spec.rb +47 -0
- data/spec/models/inline_response_200_18_spec.rb +47 -0
- data/spec/models/inline_response_200_19_spec.rb +47 -0
- data/spec/models/inline_response_200_1_spec.rb +47 -0
- data/spec/models/inline_response_200_20_spec.rb +47 -0
- data/spec/models/inline_response_200_21_spec.rb +47 -0
- data/spec/models/inline_response_200_22_spec.rb +47 -0
- data/spec/models/inline_response_200_23_spec.rb +47 -0
- data/spec/models/inline_response_200_24_spec.rb +47 -0
- data/spec/models/inline_response_200_25_spec.rb +47 -0
- data/spec/models/inline_response_200_26_spec.rb +47 -0
- data/spec/models/inline_response_200_27_spec.rb +47 -0
- data/spec/models/inline_response_200_28_spec.rb +47 -0
- data/spec/models/inline_response_200_2_spec.rb +47 -0
- data/spec/models/inline_response_200_3_spec.rb +47 -0
- data/spec/models/inline_response_200_4_spec.rb +47 -0
- data/spec/models/inline_response_200_5_spec.rb +47 -0
- data/spec/models/inline_response_200_6_spec.rb +47 -0
- data/spec/models/inline_response_200_7_spec.rb +47 -0
- data/spec/models/inline_response_200_8_spec.rb +47 -0
- data/spec/models/inline_response_200_9_spec.rb +47 -0
- data/spec/models/inline_response_200_spec.rb +47 -0
- data/spec/models/integration_entity_spec.rb +47 -0
- data/spec/models/integration_event_spec.rb +53 -0
- data/spec/models/integration_profile_entity_spec.rb +41 -0
- data/spec/models/integration_state_spec.rb +59 -0
- data/spec/models/ledger_entry_spec.rb +95 -0
- data/spec/models/library_attribute_spec.rb +85 -0
- data/spec/models/limit_config_spec.rb +61 -0
- data/spec/models/login_params_spec.rb +47 -0
- data/spec/models/loyalty_ledger_entry_spec.rb +99 -0
- data/spec/models/loyalty_ledger_spec.rb +47 -0
- data/spec/models/loyalty_membership_spec.rb +47 -0
- data/spec/models/loyalty_points_spec.rb +59 -0
- data/spec/models/loyalty_program_balance_spec.rb +41 -0
- data/spec/models/loyalty_program_ledgers_spec.rb +59 -0
- data/spec/models/loyalty_program_spec.rb +83 -0
- data/spec/models/loyalty_spec.rb +41 -0
- data/spec/models/loyalty_sub_ledger_spec.rb +53 -0
- data/spec/models/manager_config_spec.rb +41 -0
- data/spec/models/meta_spec.rb +59 -0
- data/spec/models/misc_update_user_latest_feature_spec.rb +41 -0
- data/spec/models/multi_application_entity_spec.rb +41 -0
- data/spec/models/mutable_entity_spec.rb +41 -0
- data/spec/models/new_account_sign_up_spec.rb +53 -0
- data/spec/models/new_account_spec.rb +41 -0
- data/spec/models/new_application_api_key_spec.rb +83 -0
- data/spec/models/new_application_spec.rb +87 -0
- data/spec/models/new_attribute_spec.rb +91 -0
- data/spec/models/new_campaign_set_spec.rb +47 -0
- data/spec/models/new_campaign_spec.rb +115 -0
- data/spec/models/new_coupons_spec.rb +89 -0
- data/spec/models/new_customer_profile_spec.rb +41 -0
- data/spec/models/new_customer_session_spec.rb +87 -0
- data/spec/models/new_event_spec.rb +59 -0
- data/spec/models/new_event_type_spec.rb +103 -0
- data/spec/models/new_feature_flags_spec.rb +53 -0
- data/spec/models/new_import_spec.rb +45 -0
- data/spec/models/new_invitation_spec.rb +59 -0
- data/spec/models/new_invite_email_spec.rb +47 -0
- data/spec/models/new_loyalty_program_spec.rb +71 -0
- data/spec/models/new_password_email_spec.rb +41 -0
- data/spec/models/new_password_spec.rb +47 -0
- data/spec/models/new_referral_spec.rb +65 -0
- data/spec/models/new_role_spec.rb +59 -0
- data/spec/models/new_ruleset_spec.rb +59 -0
- data/spec/models/new_template_def_spec.rb +77 -0
- data/spec/models/new_user_spec.rb +59 -0
- data/spec/models/new_webhook_spec.rb +87 -0
- data/spec/models/referral_spec.rb +95 -0
- data/spec/models/role_assign_spec.rb +47 -0
- data/spec/models/role_membership_spec.rb +47 -0
- data/spec/models/role_spec.rb +71 -0
- data/spec/models/rule_spec.rb +65 -0
- data/spec/models/ruleset_spec.rb +89 -0
- data/spec/models/session_spec.rb +53 -0
- data/spec/models/slot_def_spec.rb +71 -0
- data/spec/models/template_arg_def_spec.rb +63 -0
- data/spec/models/template_def_spec.rb +101 -0
- data/spec/models/update_account_spec.rb +53 -0
- data/spec/models/update_campaign_spec.rb +115 -0
- data/spec/models/update_coupon_batch_spec.rb +65 -0
- data/spec/models/update_coupon_spec.rb +65 -0
- data/spec/models/update_loyalty_program_spec.rb +65 -0
- data/spec/models/update_role_spec.rb +59 -0
- data/spec/models/update_user_spec.rb +93 -0
- data/spec/models/user_entity_spec.rb +41 -0
- data/spec/models/user_spec.rb +111 -0
- data/spec/models/webhook_activation_log_entry_spec.rb +65 -0
- data/spec/models/webhook_log_entry_spec.rb +95 -0
- data/spec/models/webhook_spec.rb +111 -0
- data/spec/spec_helper.rb +111 -0
- data/talon_one-1.0.0.gem +0 -0
- data/talon_one-1.1.0.gem +0 -0
- data/talon_one-1.1.1.gem +0 -0
- data/talon_one.gemspec +43 -15
- metadata +808 -32
- data/.gitignore +0 -3
- data/.travis.yml +0 -5
- data/lib/integration/client.rb +0 -89
- data/lib/integration/client_error.rb +0 -9
- data/lib/integration/customer_profile.rb +0 -21
- data/lib/integration/effect.rb +0 -24
- data/lib/integration/event.rb +0 -45
- data/lib/integration/referral_code.rb +0 -49
- data/lib/integration/rule_engine_result.rb +0 -23
- data/lib/integration/search_profiles_result.rb +0 -17
- data/lib/management/client.rb +0 -112
- data/test/test_helper.rb +0 -20
- data/test/test_integration_api_live.rb +0 -86
- data/test/test_integration_params.rb +0 -23
@@ -0,0 +1,280 @@
|
|
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
|
+
# Log of application accesses
|
17
|
+
class AccessLogEntry
|
18
|
+
# UUID reference of request
|
19
|
+
attr_accessor :uuid
|
20
|
+
|
21
|
+
# HTTP status code of response
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
# HTTP method of request
|
25
|
+
attr_accessor :method
|
26
|
+
|
27
|
+
# target URI of request
|
28
|
+
attr_accessor :request_uri
|
29
|
+
|
30
|
+
# timestamp of request
|
31
|
+
attr_accessor :time
|
32
|
+
|
33
|
+
# payload of request
|
34
|
+
attr_accessor :request_payload
|
35
|
+
|
36
|
+
# payload of response
|
37
|
+
attr_accessor :response_payload
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'uuid' => :'uuid',
|
43
|
+
:'status' => :'status',
|
44
|
+
:'method' => :'method',
|
45
|
+
:'request_uri' => :'requestUri',
|
46
|
+
:'time' => :'time',
|
47
|
+
:'request_payload' => :'requestPayload',
|
48
|
+
:'response_payload' => :'responsePayload'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
:'uuid' => :'String',
|
56
|
+
:'status' => :'Integer',
|
57
|
+
:'method' => :'String',
|
58
|
+
:'request_uri' => :'String',
|
59
|
+
:'time' => :'DateTime',
|
60
|
+
:'request_payload' => :'String',
|
61
|
+
:'response_payload' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
return unless attributes.is_a?(Hash)
|
69
|
+
|
70
|
+
# convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
72
|
+
|
73
|
+
if attributes.has_key?(:'uuid')
|
74
|
+
self.uuid = attributes[:'uuid']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'status')
|
78
|
+
self.status = attributes[:'status']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'method')
|
82
|
+
self.method = attributes[:'method']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'requestUri')
|
86
|
+
self.request_uri = attributes[:'requestUri']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'time')
|
90
|
+
self.time = attributes[:'time']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'requestPayload')
|
94
|
+
self.request_payload = attributes[:'requestPayload']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'responsePayload')
|
98
|
+
self.response_payload = attributes[:'responsePayload']
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
103
|
+
# @return Array for valid properties with the reasons
|
104
|
+
def list_invalid_properties
|
105
|
+
invalid_properties = Array.new
|
106
|
+
if @uuid.nil?
|
107
|
+
invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
|
108
|
+
end
|
109
|
+
|
110
|
+
if @status.nil?
|
111
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if @method.nil?
|
115
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if @request_uri.nil?
|
119
|
+
invalid_properties.push('invalid value for "request_uri", request_uri cannot be nil.')
|
120
|
+
end
|
121
|
+
|
122
|
+
if @time.nil?
|
123
|
+
invalid_properties.push('invalid value for "time", time cannot be nil.')
|
124
|
+
end
|
125
|
+
|
126
|
+
if @request_payload.nil?
|
127
|
+
invalid_properties.push('invalid value for "request_payload", request_payload cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
|
+
if @response_payload.nil?
|
131
|
+
invalid_properties.push('invalid value for "response_payload", response_payload cannot be nil.')
|
132
|
+
end
|
133
|
+
|
134
|
+
invalid_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Check to see if the all the properties in the model are valid
|
138
|
+
# @return true if the model is valid
|
139
|
+
def valid?
|
140
|
+
return false if @uuid.nil?
|
141
|
+
return false if @status.nil?
|
142
|
+
return false if @method.nil?
|
143
|
+
return false if @request_uri.nil?
|
144
|
+
return false if @time.nil?
|
145
|
+
return false if @request_payload.nil?
|
146
|
+
return false if @response_payload.nil?
|
147
|
+
true
|
148
|
+
end
|
149
|
+
|
150
|
+
# Checks equality by comparing each attribute.
|
151
|
+
# @param [Object] Object to be compared
|
152
|
+
def ==(o)
|
153
|
+
return true if self.equal?(o)
|
154
|
+
self.class == o.class &&
|
155
|
+
uuid == o.uuid &&
|
156
|
+
status == o.status &&
|
157
|
+
method == o.method &&
|
158
|
+
request_uri == o.request_uri &&
|
159
|
+
time == o.time &&
|
160
|
+
request_payload == o.request_payload &&
|
161
|
+
response_payload == o.response_payload
|
162
|
+
end
|
163
|
+
|
164
|
+
# @see the `==` method
|
165
|
+
# @param [Object] Object to be compared
|
166
|
+
def eql?(o)
|
167
|
+
self == o
|
168
|
+
end
|
169
|
+
|
170
|
+
# Calculates hash code according to all attributes.
|
171
|
+
# @return [Fixnum] Hash code
|
172
|
+
def hash
|
173
|
+
[uuid, status, method, request_uri, time, request_payload, response_payload].hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Builds the object from hash
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
178
|
+
# @return [Object] Returns the model itself
|
179
|
+
def build_from_hash(attributes)
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
181
|
+
self.class.swagger_types.each_pair do |key, type|
|
182
|
+
if type =~ /\AArray<(.*)>/i
|
183
|
+
# check to ensure the input is an array given that the the attribute
|
184
|
+
# is documented as an array but the input is not
|
185
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
186
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
187
|
+
end
|
188
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
190
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
# Deserializes the data based on type
|
197
|
+
# @param string type Data type
|
198
|
+
# @param string value Value to be deserialized
|
199
|
+
# @return [Object] Deserialized data
|
200
|
+
def _deserialize(type, value)
|
201
|
+
case type.to_sym
|
202
|
+
when :DateTime
|
203
|
+
DateTime.parse(value)
|
204
|
+
when :Date
|
205
|
+
Date.parse(value)
|
206
|
+
when :String
|
207
|
+
value.to_s
|
208
|
+
when :Integer
|
209
|
+
value.to_i
|
210
|
+
when :Float
|
211
|
+
value.to_f
|
212
|
+
when :BOOLEAN
|
213
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
214
|
+
true
|
215
|
+
else
|
216
|
+
false
|
217
|
+
end
|
218
|
+
when :Object
|
219
|
+
# generic object (usually a Hash), return directly
|
220
|
+
value
|
221
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
222
|
+
inner_type = Regexp.last_match[:inner_type]
|
223
|
+
value.map { |v| _deserialize(inner_type, v) }
|
224
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
225
|
+
k_type = Regexp.last_match[:k_type]
|
226
|
+
v_type = Regexp.last_match[:v_type]
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each do |k, v|
|
229
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
else # model
|
233
|
+
temp_model = TalonOne.const_get(type).new
|
234
|
+
temp_model.build_from_hash(value)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string representation of the object
|
239
|
+
# @return [String] String presentation of the object
|
240
|
+
def to_s
|
241
|
+
to_hash.to_s
|
242
|
+
end
|
243
|
+
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_body
|
247
|
+
to_hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the object in the form of hash
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_hash
|
253
|
+
hash = {}
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
255
|
+
value = self.send(attr)
|
256
|
+
next if value.nil?
|
257
|
+
hash[param] = _to_hash(value)
|
258
|
+
end
|
259
|
+
hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Outputs non-array value in the form of hash
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
264
|
+
# @param [Object] value Any valid value
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
266
|
+
def _to_hash(value)
|
267
|
+
if value.is_a?(Array)
|
268
|
+
value.compact.map { |v| _to_hash(v) }
|
269
|
+
elsif value.is_a?(Hash)
|
270
|
+
{}.tap do |hash|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
272
|
+
end
|
273
|
+
elsif value.respond_to? :to_hash
|
274
|
+
value.to_hash
|
275
|
+
else
|
276
|
+
value
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
@@ -0,0 +1,462 @@
|
|
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 Account
|
18
|
+
# Unique ID for this entity.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The exact moment this entity was created.
|
22
|
+
attr_accessor :created
|
23
|
+
|
24
|
+
# The exact moment this entity was last modified.
|
25
|
+
attr_accessor :modified
|
26
|
+
|
27
|
+
attr_accessor :company_name
|
28
|
+
|
29
|
+
# Subdomain Name for yourcompany.talon.one
|
30
|
+
attr_accessor :domain_name
|
31
|
+
|
32
|
+
# State of the account (trial, active, trial_expired)
|
33
|
+
attr_accessor :state
|
34
|
+
|
35
|
+
# The billing email address associated with your company account.
|
36
|
+
attr_accessor :billing_email
|
37
|
+
|
38
|
+
# The name of your booked plan.
|
39
|
+
attr_accessor :plan_name
|
40
|
+
|
41
|
+
# The point in time at which your current plan expires.
|
42
|
+
attr_accessor :plan_expires
|
43
|
+
|
44
|
+
# The maximum number of Applications covered by your plan.
|
45
|
+
attr_accessor :application_limit
|
46
|
+
|
47
|
+
# The maximum number of Campaign Manager Users covered by your plan.
|
48
|
+
attr_accessor :user_limit
|
49
|
+
|
50
|
+
# The maximum number of Campaigns covered by your plan.
|
51
|
+
attr_accessor :campaign_limit
|
52
|
+
|
53
|
+
# The maximum number of Integration API calls covered by your plan per billing period.
|
54
|
+
attr_accessor :api_limit
|
55
|
+
|
56
|
+
# The current number of Applications in your account.
|
57
|
+
attr_accessor :application_count
|
58
|
+
|
59
|
+
# The current number of Campaign Manager Users in your account.
|
60
|
+
attr_accessor :user_count
|
61
|
+
|
62
|
+
# The current number of active Campaigns in your account.
|
63
|
+
attr_accessor :campaigns_active_count
|
64
|
+
|
65
|
+
# The current number of inactive Campaigns in your account.
|
66
|
+
attr_accessor :campaigns_inactive_count
|
67
|
+
|
68
|
+
# Arbitrary properties associated with this campaign
|
69
|
+
attr_accessor :attributes
|
70
|
+
|
71
|
+
class EnumAttributeValidator
|
72
|
+
attr_reader :datatype
|
73
|
+
attr_reader :allowable_values
|
74
|
+
|
75
|
+
def initialize(datatype, allowable_values)
|
76
|
+
@allowable_values = allowable_values.map do |value|
|
77
|
+
case datatype.to_s
|
78
|
+
when /Integer/i
|
79
|
+
value.to_i
|
80
|
+
when /Float/i
|
81
|
+
value.to_f
|
82
|
+
else
|
83
|
+
value
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def valid?(value)
|
89
|
+
!value || allowable_values.include?(value)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
94
|
+
def self.attribute_map
|
95
|
+
{
|
96
|
+
:'id' => :'id',
|
97
|
+
:'created' => :'created',
|
98
|
+
:'modified' => :'modified',
|
99
|
+
:'company_name' => :'companyName',
|
100
|
+
:'domain_name' => :'domainName',
|
101
|
+
:'state' => :'state',
|
102
|
+
:'billing_email' => :'billingEmail',
|
103
|
+
:'plan_name' => :'planName',
|
104
|
+
:'plan_expires' => :'planExpires',
|
105
|
+
:'application_limit' => :'applicationLimit',
|
106
|
+
:'user_limit' => :'userLimit',
|
107
|
+
:'campaign_limit' => :'campaignLimit',
|
108
|
+
:'api_limit' => :'apiLimit',
|
109
|
+
:'application_count' => :'applicationCount',
|
110
|
+
:'user_count' => :'userCount',
|
111
|
+
:'campaigns_active_count' => :'campaignsActiveCount',
|
112
|
+
:'campaigns_inactive_count' => :'campaignsInactiveCount',
|
113
|
+
:'attributes' => :'attributes'
|
114
|
+
}
|
115
|
+
end
|
116
|
+
|
117
|
+
# Attribute type mapping.
|
118
|
+
def self.swagger_types
|
119
|
+
{
|
120
|
+
:'id' => :'Integer',
|
121
|
+
:'created' => :'DateTime',
|
122
|
+
:'modified' => :'DateTime',
|
123
|
+
:'company_name' => :'String',
|
124
|
+
:'domain_name' => :'String',
|
125
|
+
:'state' => :'String',
|
126
|
+
:'billing_email' => :'String',
|
127
|
+
:'plan_name' => :'String',
|
128
|
+
:'plan_expires' => :'DateTime',
|
129
|
+
:'application_limit' => :'Integer',
|
130
|
+
:'user_limit' => :'Integer',
|
131
|
+
:'campaign_limit' => :'Integer',
|
132
|
+
:'api_limit' => :'Integer',
|
133
|
+
:'application_count' => :'Integer',
|
134
|
+
:'user_count' => :'Integer',
|
135
|
+
:'campaigns_active_count' => :'Integer',
|
136
|
+
:'campaigns_inactive_count' => :'Integer',
|
137
|
+
:'attributes' => :'Object'
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
141
|
+
# Initializes the object
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
def initialize(attributes = {})
|
144
|
+
return unless attributes.is_a?(Hash)
|
145
|
+
|
146
|
+
# convert string to symbol for hash key
|
147
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
148
|
+
|
149
|
+
if attributes.has_key?(:'id')
|
150
|
+
self.id = attributes[:'id']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'created')
|
154
|
+
self.created = attributes[:'created']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'modified')
|
158
|
+
self.modified = attributes[:'modified']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'companyName')
|
162
|
+
self.company_name = attributes[:'companyName']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'domainName')
|
166
|
+
self.domain_name = attributes[:'domainName']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.has_key?(:'state')
|
170
|
+
self.state = attributes[:'state']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.has_key?(:'billingEmail')
|
174
|
+
self.billing_email = attributes[:'billingEmail']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.has_key?(:'planName')
|
178
|
+
self.plan_name = attributes[:'planName']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.has_key?(:'planExpires')
|
182
|
+
self.plan_expires = attributes[:'planExpires']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.has_key?(:'applicationLimit')
|
186
|
+
self.application_limit = attributes[:'applicationLimit']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.has_key?(:'userLimit')
|
190
|
+
self.user_limit = attributes[:'userLimit']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.has_key?(:'campaignLimit')
|
194
|
+
self.campaign_limit = attributes[:'campaignLimit']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.has_key?(:'apiLimit')
|
198
|
+
self.api_limit = attributes[:'apiLimit']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.has_key?(:'applicationCount')
|
202
|
+
self.application_count = attributes[:'applicationCount']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.has_key?(:'userCount')
|
206
|
+
self.user_count = attributes[:'userCount']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.has_key?(:'campaignsActiveCount')
|
210
|
+
self.campaigns_active_count = attributes[:'campaignsActiveCount']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.has_key?(:'campaignsInactiveCount')
|
214
|
+
self.campaigns_inactive_count = attributes[:'campaignsInactiveCount']
|
215
|
+
end
|
216
|
+
|
217
|
+
if attributes.has_key?(:'attributes')
|
218
|
+
self.attributes = attributes[:'attributes']
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
223
|
+
# @return Array for valid properties with the reasons
|
224
|
+
def list_invalid_properties
|
225
|
+
invalid_properties = Array.new
|
226
|
+
if @id.nil?
|
227
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
228
|
+
end
|
229
|
+
|
230
|
+
if @created.nil?
|
231
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
232
|
+
end
|
233
|
+
|
234
|
+
if @modified.nil?
|
235
|
+
invalid_properties.push('invalid value for "modified", modified cannot be nil.')
|
236
|
+
end
|
237
|
+
|
238
|
+
if @company_name.nil?
|
239
|
+
invalid_properties.push('invalid value for "company_name", company_name cannot be nil.')
|
240
|
+
end
|
241
|
+
|
242
|
+
if @company_name.to_s.length < 1
|
243
|
+
invalid_properties.push('invalid value for "company_name", the character length must be great than or equal to 1.')
|
244
|
+
end
|
245
|
+
|
246
|
+
if @domain_name.nil?
|
247
|
+
invalid_properties.push('invalid value for "domain_name", domain_name cannot be nil.')
|
248
|
+
end
|
249
|
+
|
250
|
+
if @state.nil?
|
251
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
252
|
+
end
|
253
|
+
|
254
|
+
if @billing_email.nil?
|
255
|
+
invalid_properties.push('invalid value for "billing_email", billing_email cannot be nil.')
|
256
|
+
end
|
257
|
+
|
258
|
+
if @application_count.nil?
|
259
|
+
invalid_properties.push('invalid value for "application_count", application_count cannot be nil.')
|
260
|
+
end
|
261
|
+
|
262
|
+
if @user_count.nil?
|
263
|
+
invalid_properties.push('invalid value for "user_count", user_count cannot be nil.')
|
264
|
+
end
|
265
|
+
|
266
|
+
if @campaigns_active_count.nil?
|
267
|
+
invalid_properties.push('invalid value for "campaigns_active_count", campaigns_active_count cannot be nil.')
|
268
|
+
end
|
269
|
+
|
270
|
+
if @campaigns_inactive_count.nil?
|
271
|
+
invalid_properties.push('invalid value for "campaigns_inactive_count", campaigns_inactive_count cannot be nil.')
|
272
|
+
end
|
273
|
+
|
274
|
+
invalid_properties
|
275
|
+
end
|
276
|
+
|
277
|
+
# Check to see if the all the properties in the model are valid
|
278
|
+
# @return true if the model is valid
|
279
|
+
def valid?
|
280
|
+
return false if @id.nil?
|
281
|
+
return false if @created.nil?
|
282
|
+
return false if @modified.nil?
|
283
|
+
return false if @company_name.nil?
|
284
|
+
return false if @company_name.to_s.length < 1
|
285
|
+
return false if @domain_name.nil?
|
286
|
+
return false if @state.nil?
|
287
|
+
state_validator = EnumAttributeValidator.new('String', ['trial', 'active', 'trial_expired'])
|
288
|
+
return false unless state_validator.valid?(@state)
|
289
|
+
return false if @billing_email.nil?
|
290
|
+
return false if @application_count.nil?
|
291
|
+
return false if @user_count.nil?
|
292
|
+
return false if @campaigns_active_count.nil?
|
293
|
+
return false if @campaigns_inactive_count.nil?
|
294
|
+
true
|
295
|
+
end
|
296
|
+
|
297
|
+
# Custom attribute writer method with validation
|
298
|
+
# @param [Object] company_name Value to be assigned
|
299
|
+
def company_name=(company_name)
|
300
|
+
if company_name.nil?
|
301
|
+
fail ArgumentError, 'company_name cannot be nil'
|
302
|
+
end
|
303
|
+
|
304
|
+
if company_name.to_s.length < 1
|
305
|
+
fail ArgumentError, 'invalid value for "company_name", the character length must be great than or equal to 1.'
|
306
|
+
end
|
307
|
+
|
308
|
+
@company_name = company_name
|
309
|
+
end
|
310
|
+
|
311
|
+
# Custom attribute writer method checking allowed values (enum).
|
312
|
+
# @param [Object] state Object to be assigned
|
313
|
+
def state=(state)
|
314
|
+
validator = EnumAttributeValidator.new('String', ['trial', 'active', 'trial_expired'])
|
315
|
+
unless validator.valid?(state)
|
316
|
+
fail ArgumentError, 'invalid value for "state", must be one of #{validator.allowable_values}.'
|
317
|
+
end
|
318
|
+
@state = state
|
319
|
+
end
|
320
|
+
|
321
|
+
# Checks equality by comparing each attribute.
|
322
|
+
# @param [Object] Object to be compared
|
323
|
+
def ==(o)
|
324
|
+
return true if self.equal?(o)
|
325
|
+
self.class == o.class &&
|
326
|
+
id == o.id &&
|
327
|
+
created == o.created &&
|
328
|
+
modified == o.modified &&
|
329
|
+
company_name == o.company_name &&
|
330
|
+
domain_name == o.domain_name &&
|
331
|
+
state == o.state &&
|
332
|
+
billing_email == o.billing_email &&
|
333
|
+
plan_name == o.plan_name &&
|
334
|
+
plan_expires == o.plan_expires &&
|
335
|
+
application_limit == o.application_limit &&
|
336
|
+
user_limit == o.user_limit &&
|
337
|
+
campaign_limit == o.campaign_limit &&
|
338
|
+
api_limit == o.api_limit &&
|
339
|
+
application_count == o.application_count &&
|
340
|
+
user_count == o.user_count &&
|
341
|
+
campaigns_active_count == o.campaigns_active_count &&
|
342
|
+
campaigns_inactive_count == o.campaigns_inactive_count &&
|
343
|
+
attributes == o.attributes
|
344
|
+
end
|
345
|
+
|
346
|
+
# @see the `==` method
|
347
|
+
# @param [Object] Object to be compared
|
348
|
+
def eql?(o)
|
349
|
+
self == o
|
350
|
+
end
|
351
|
+
|
352
|
+
# Calculates hash code according to all attributes.
|
353
|
+
# @return [Fixnum] Hash code
|
354
|
+
def hash
|
355
|
+
[id, created, modified, company_name, domain_name, state, billing_email, plan_name, plan_expires, application_limit, user_limit, campaign_limit, api_limit, application_count, user_count, campaigns_active_count, campaigns_inactive_count, attributes].hash
|
356
|
+
end
|
357
|
+
|
358
|
+
# Builds the object from hash
|
359
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
360
|
+
# @return [Object] Returns the model itself
|
361
|
+
def build_from_hash(attributes)
|
362
|
+
return nil unless attributes.is_a?(Hash)
|
363
|
+
self.class.swagger_types.each_pair do |key, type|
|
364
|
+
if type =~ /\AArray<(.*)>/i
|
365
|
+
# check to ensure the input is an array given that the the attribute
|
366
|
+
# is documented as an array but the input is not
|
367
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
368
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
369
|
+
end
|
370
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
371
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
372
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
373
|
+
end
|
374
|
+
|
375
|
+
self
|
376
|
+
end
|
377
|
+
|
378
|
+
# Deserializes the data based on type
|
379
|
+
# @param string type Data type
|
380
|
+
# @param string value Value to be deserialized
|
381
|
+
# @return [Object] Deserialized data
|
382
|
+
def _deserialize(type, value)
|
383
|
+
case type.to_sym
|
384
|
+
when :DateTime
|
385
|
+
DateTime.parse(value)
|
386
|
+
when :Date
|
387
|
+
Date.parse(value)
|
388
|
+
when :String
|
389
|
+
value.to_s
|
390
|
+
when :Integer
|
391
|
+
value.to_i
|
392
|
+
when :Float
|
393
|
+
value.to_f
|
394
|
+
when :BOOLEAN
|
395
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
396
|
+
true
|
397
|
+
else
|
398
|
+
false
|
399
|
+
end
|
400
|
+
when :Object
|
401
|
+
# generic object (usually a Hash), return directly
|
402
|
+
value
|
403
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
404
|
+
inner_type = Regexp.last_match[:inner_type]
|
405
|
+
value.map { |v| _deserialize(inner_type, v) }
|
406
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
407
|
+
k_type = Regexp.last_match[:k_type]
|
408
|
+
v_type = Regexp.last_match[:v_type]
|
409
|
+
{}.tap do |hash|
|
410
|
+
value.each do |k, v|
|
411
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
412
|
+
end
|
413
|
+
end
|
414
|
+
else # model
|
415
|
+
temp_model = TalonOne.const_get(type).new
|
416
|
+
temp_model.build_from_hash(value)
|
417
|
+
end
|
418
|
+
end
|
419
|
+
|
420
|
+
# Returns the string representation of the object
|
421
|
+
# @return [String] String presentation of the object
|
422
|
+
def to_s
|
423
|
+
to_hash.to_s
|
424
|
+
end
|
425
|
+
|
426
|
+
# to_body is an alias to to_hash (backward compatibility)
|
427
|
+
# @return [Hash] Returns the object in the form of hash
|
428
|
+
def to_body
|
429
|
+
to_hash
|
430
|
+
end
|
431
|
+
|
432
|
+
# Returns the object in the form of hash
|
433
|
+
# @return [Hash] Returns the object in the form of hash
|
434
|
+
def to_hash
|
435
|
+
hash = {}
|
436
|
+
self.class.attribute_map.each_pair do |attr, param|
|
437
|
+
value = self.send(attr)
|
438
|
+
next if value.nil?
|
439
|
+
hash[param] = _to_hash(value)
|
440
|
+
end
|
441
|
+
hash
|
442
|
+
end
|
443
|
+
|
444
|
+
# Outputs non-array value in the form of hash
|
445
|
+
# For object, use to_hash. Otherwise, just return the value
|
446
|
+
# @param [Object] value Any valid value
|
447
|
+
# @return [Hash] Returns the value in the form of hash
|
448
|
+
def _to_hash(value)
|
449
|
+
if value.is_a?(Array)
|
450
|
+
value.compact.map { |v| _to_hash(v) }
|
451
|
+
elsif value.is_a?(Hash)
|
452
|
+
{}.tap do |hash|
|
453
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
454
|
+
end
|
455
|
+
elsif value.respond_to? :to_hash
|
456
|
+
value.to_hash
|
457
|
+
else
|
458
|
+
value
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|
462
|
+
end
|