talon_one 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +29 -9
- data/docs/AccountAnalytics.md +25 -19
- data/docs/AccountLimits.md +13 -13
- data/docs/AddLoyaltyPointsEffectProps.md +4 -2
- data/docs/Application.md +9 -1
- data/docs/ApplicationAPIKey.md +8 -6
- data/docs/ApplicationCustomer.md +3 -1
- data/docs/ApplicationSession.md +1 -1
- data/docs/Audience.md +27 -0
- data/docs/AudienceMembership.md +19 -0
- data/docs/Campaign.md +2 -0
- data/docs/CampaignAnalytics.md +9 -1
- data/docs/CampaignCopy.md +1 -1
- data/docs/CampaignGroup.md +31 -0
- data/docs/CampaignGroupEntity.md +17 -0
- data/docs/CreateApplicationAPIKey.md +3 -1
- data/docs/CustomerActivityReport.md +1 -1
- data/docs/CustomerInventory.md +2 -0
- data/docs/CustomerProfile.md +3 -1
- data/docs/CustomerProfileAudienceRequest.md +17 -0
- data/docs/CustomerProfileAudienceRequestItem.md +21 -0
- data/docs/CustomerProfileIntegrationRequestV2.md +19 -0
- data/docs/CustomerSession.md +1 -1
- data/docs/CustomerSessionV2.md +1 -1
- data/docs/EntityWithTalangVisibleID.md +19 -0
- data/docs/FeedNotification.md +27 -0
- data/docs/InlineResponse20012.md +3 -1
- data/docs/IntegrationApi.md +139 -18
- data/docs/IntegrationEntity.md +1 -1
- data/docs/LoyaltyLedgerEntry.md +2 -0
- data/docs/LoyaltyPoints.md +4 -2
- data/docs/LoyaltyProgram.md +3 -1
- data/docs/LoyaltyStatistics.md +23 -0
- data/docs/LoyaltySubLedger.md +18 -4
- data/docs/ManagementApi.md +75 -10
- data/docs/Meta.md +1 -1
- data/docs/MultipleCustomerProfileIntegrationRequest.md +17 -0
- data/docs/MultipleCustomerProfileIntegrationRequestItem.md +19 -0
- data/docs/MultipleCustomerProfileIntegrationResponseV2.md +17 -0
- data/docs/NewApplication.md +9 -1
- data/docs/NewApplicationAPIKey.md +7 -5
- data/docs/NewAudience.md +21 -0
- data/docs/NewCampaign.md +3 -1
- data/docs/NewCampaignGroup.md +23 -0
- data/docs/NewLoyaltyProgram.md +3 -1
- data/docs/Role.md +3 -1
- data/docs/SetDiscountEffectProps.md +3 -1
- data/docs/SetDiscountPerItemEffectProps.md +3 -1
- data/docs/UpdateApplication.md +10 -2
- data/docs/UpdateAudience.md +17 -0
- data/docs/UpdateCampaign.md +3 -1
- data/docs/UpdateCampaignGroup.md +23 -0
- data/docs/UpdateLoyaltyProgram.md +3 -1
- data/docs/UpdateUser.md +0 -4
- data/docs/UpdateUserLatestFeedTimestamp.md +17 -0
- data/docs/User.md +3 -5
- data/docs/UserFeedNotifications.md +19 -0
- data/lib/talon_one.rb +20 -3
- data/lib/talon_one/api/integration_api.rb +163 -25
- data/lib/talon_one/api/management_api.rb +86 -14
- data/lib/talon_one/api_client.rb +8 -6
- data/lib/talon_one/api_error.rb +1 -1
- data/lib/talon_one/configuration.rb +1 -1
- data/lib/talon_one/models/accept_coupon_effect_props.rb +1 -1
- data/lib/talon_one/models/accept_referral_effect_props.rb +1 -1
- data/lib/talon_one/models/access_log_entry.rb +1 -1
- data/lib/talon_one/models/account.rb +1 -1
- data/lib/talon_one/models/account_additional_cost.rb +1 -1
- data/lib/talon_one/models/account_analytics.rb +102 -57
- data/lib/talon_one/models/account_entity.rb +1 -1
- data/lib/talon_one/models/account_limits.rb +28 -23
- data/lib/talon_one/models/add_free_item_effect_props.rb +1 -1
- data/lib/talon_one/models/add_loyalty_points_effect_props.rb +19 -14
- data/lib/talon_one/models/additional_cost.rb +1 -1
- data/lib/talon_one/models/api_error.rb +1 -1
- data/lib/talon_one/models/application.rb +55 -3
- data/lib/talon_one/models/application_api_health.rb +1 -1
- data/lib/talon_one/models/application_api_key.rb +79 -34
- data/lib/talon_one/models/application_customer.rb +15 -3
- data/lib/talon_one/models/application_customer_entity.rb +1 -1
- data/lib/talon_one/models/application_customer_search.rb +1 -1
- data/lib/talon_one/models/application_entity.rb +1 -1
- data/lib/talon_one/models/application_event.rb +1 -1
- data/lib/talon_one/models/application_session.rb +2 -2
- data/lib/talon_one/models/application_session_entity.rb +1 -1
- data/lib/talon_one/models/attribute.rb +1 -1
- data/lib/talon_one/models/attributes_mandatory.rb +1 -1
- data/lib/talon_one/models/attributes_settings.rb +1 -1
- data/lib/talon_one/models/audience.rb +360 -0
- data/lib/talon_one/models/audience_membership.rb +227 -0
- data/lib/talon_one/models/base_saml_connection.rb +1 -1
- data/lib/talon_one/models/binding.rb +1 -1
- data/lib/talon_one/models/campaign.rb +14 -2
- data/lib/talon_one/models/campaign_analytics.rb +65 -5
- data/lib/talon_one/models/campaign_copy.rb +2 -2
- data/lib/talon_one/models/campaign_entity.rb +1 -1
- data/lib/talon_one/models/campaign_group.rb +326 -0
- data/lib/talon_one/models/campaign_group_entity.rb +209 -0
- data/lib/talon_one/models/campaign_search.rb +1 -1
- data/lib/talon_one/models/campaign_set.rb +1 -1
- data/lib/talon_one/models/campaign_set_branch_node.rb +1 -1
- data/lib/talon_one/models/campaign_set_leaf_node.rb +1 -1
- data/lib/talon_one/models/campaign_set_node.rb +1 -1
- data/lib/talon_one/models/cart_item.rb +1 -1
- data/lib/talon_one/models/cart_item_adjustment.rb +1 -1
- data/lib/talon_one/models/change.rb +1 -1
- data/lib/talon_one/models/change_profile_password.rb +1 -1
- data/lib/talon_one/models/code_generator_settings.rb +1 -1
- data/lib/talon_one/models/coupon.rb +1 -1
- data/lib/talon_one/models/coupon_constraints.rb +1 -1
- data/lib/talon_one/models/coupon_created_effect_props.rb +1 -1
- data/lib/talon_one/models/coupon_rejection_reason.rb +3 -3
- data/lib/talon_one/models/coupon_reservations.rb +1 -1
- data/lib/talon_one/models/coupon_search.rb +1 -1
- data/lib/talon_one/models/coupon_value.rb +1 -1
- data/lib/talon_one/models/create_application_api_key.rb +49 -5
- data/lib/talon_one/models/customer_activity_report.rb +2 -2
- data/lib/talon_one/models/customer_analytics.rb +1 -1
- data/lib/talon_one/models/customer_inventory.rb +11 -2
- data/lib/talon_one/models/customer_profile.rb +15 -3
- data/lib/talon_one/models/{misc_update_user_latest_feature.rb → customer_profile_audience_request.rb} +13 -11
- data/lib/talon_one/models/customer_profile_audience_request_item.rb +273 -0
- data/lib/talon_one/models/customer_profile_integration_request_v2.rb +242 -0
- data/lib/talon_one/models/customer_profile_search_query.rb +1 -1
- data/lib/talon_one/models/customer_session.rb +2 -2
- data/lib/talon_one/models/customer_session_v2.rb +2 -2
- data/lib/talon_one/models/deduct_loyalty_points_effect_props.rb +1 -1
- data/lib/talon_one/models/effect.rb +1 -1
- data/lib/talon_one/models/effect_entity.rb +1 -1
- data/lib/talon_one/models/email_entity.rb +1 -1
- data/lib/talon_one/models/entity.rb +1 -1
- data/lib/talon_one/models/entity_with_talang_visible_id.rb +227 -0
- data/lib/talon_one/models/environment.rb +1 -1
- data/lib/talon_one/models/error_effect_props.rb +1 -1
- data/lib/talon_one/models/error_response.rb +1 -1
- data/lib/talon_one/models/error_source.rb +1 -1
- data/lib/talon_one/models/event.rb +1 -1
- data/lib/talon_one/models/event_type.rb +1 -1
- data/lib/talon_one/models/export.rb +1 -1
- data/lib/talon_one/models/feature_flag.rb +1 -1
- data/lib/talon_one/models/feature_flags.rb +1 -1
- data/lib/talon_one/models/features_feed.rb +1 -1
- data/lib/talon_one/models/feed_notification.rb +322 -0
- data/lib/talon_one/models/func_arg_def.rb +1 -1
- data/lib/talon_one/models/function_def.rb +1 -1
- data/lib/talon_one/models/import.rb +1 -1
- data/lib/talon_one/models/import_coupons.rb +1 -1
- data/lib/talon_one/models/inline_response200.rb +1 -1
- data/lib/talon_one/models/inline_response2001.rb +1 -1
- data/lib/talon_one/models/inline_response20010.rb +1 -1
- data/lib/talon_one/models/inline_response20011.rb +1 -1
- data/lib/talon_one/models/inline_response20012.rb +11 -7
- data/lib/talon_one/models/inline_response20013.rb +1 -1
- data/lib/talon_one/models/inline_response20014.rb +1 -1
- data/lib/talon_one/models/inline_response20015.rb +1 -1
- data/lib/talon_one/models/inline_response20016.rb +1 -1
- data/lib/talon_one/models/inline_response20017.rb +1 -1
- data/lib/talon_one/models/inline_response20018.rb +1 -1
- data/lib/talon_one/models/inline_response20019.rb +1 -1
- data/lib/talon_one/models/inline_response2002.rb +1 -1
- data/lib/talon_one/models/inline_response20020.rb +1 -1
- data/lib/talon_one/models/inline_response20021.rb +1 -1
- data/lib/talon_one/models/inline_response20022.rb +1 -1
- data/lib/talon_one/models/inline_response20023.rb +1 -1
- data/lib/talon_one/models/inline_response20024.rb +1 -1
- data/lib/talon_one/models/inline_response20025.rb +1 -1
- data/lib/talon_one/models/inline_response20026.rb +1 -1
- data/lib/talon_one/models/inline_response20027.rb +1 -1
- data/lib/talon_one/models/inline_response20028.rb +1 -1
- data/lib/talon_one/models/inline_response20029.rb +1 -1
- data/lib/talon_one/models/inline_response2003.rb +1 -1
- data/lib/talon_one/models/inline_response20030.rb +1 -1
- data/lib/talon_one/models/inline_response2004.rb +1 -1
- data/lib/talon_one/models/inline_response2005.rb +1 -1
- data/lib/talon_one/models/inline_response2006.rb +1 -1
- data/lib/talon_one/models/inline_response2007.rb +1 -1
- data/lib/talon_one/models/inline_response2008.rb +1 -1
- data/lib/talon_one/models/inline_response2009.rb +1 -1
- data/lib/talon_one/models/integration_entity.rb +2 -2
- data/lib/talon_one/models/integration_event.rb +1 -1
- data/lib/talon_one/models/integration_profile_entity.rb +1 -1
- data/lib/talon_one/models/integration_request.rb +1 -1
- data/lib/talon_one/models/integration_state.rb +1 -1
- data/lib/talon_one/models/integration_state_v2.rb +1 -1
- data/lib/talon_one/models/ledger_entry.rb +1 -1
- data/lib/talon_one/models/library_attribute.rb +1 -1
- data/lib/talon_one/models/limit_config.rb +1 -1
- data/lib/talon_one/models/login_params.rb +1 -1
- data/lib/talon_one/models/loyalty.rb +1 -1
- data/lib/talon_one/models/loyalty_ledger.rb +1 -1
- data/lib/talon_one/models/loyalty_ledger_entry.rb +11 -2
- data/lib/talon_one/models/loyalty_membership.rb +1 -1
- data/lib/talon_one/models/loyalty_points.rb +19 -9
- data/lib/talon_one/models/loyalty_program.rb +18 -3
- data/lib/talon_one/models/loyalty_program_balance.rb +1 -1
- data/lib/talon_one/models/loyalty_program_ledgers.rb +1 -1
- data/lib/talon_one/models/loyalty_statistics.rb +258 -0
- data/lib/talon_one/models/loyalty_sub_ledger.rb +104 -7
- data/lib/talon_one/models/manager_config.rb +1 -1
- data/lib/talon_one/models/meta.rb +2 -1
- data/lib/talon_one/models/multi_application_entity.rb +1 -1
- data/lib/talon_one/models/multiple_customer_profile_integration_request.rb +208 -0
- data/lib/talon_one/models/multiple_customer_profile_integration_request_item.rb +223 -0
- data/lib/talon_one/models/{customer_profile_update.rb → multiple_customer_profile_integration_response_v2.rb} +13 -16
- data/lib/talon_one/models/mutable_entity.rb +1 -1
- data/lib/talon_one/models/new_account.rb +1 -1
- data/lib/talon_one/models/new_account_sign_up.rb +1 -1
- data/lib/talon_one/models/new_additional_cost.rb +1 -1
- data/lib/talon_one/models/new_application.rb +55 -3
- data/lib/talon_one/models/new_application_api_key.rb +76 -32
- data/lib/talon_one/models/new_attribute.rb +1 -1
- data/lib/talon_one/models/new_audience.rb +314 -0
- data/lib/talon_one/models/new_campaign.rb +17 -5
- data/lib/talon_one/models/new_campaign_group.rb +265 -0
- data/lib/talon_one/models/new_campaign_set.rb +1 -1
- data/lib/talon_one/models/new_coupons.rb +1 -1
- data/lib/talon_one/models/new_customer_profile.rb +1 -1
- data/lib/talon_one/models/new_customer_session.rb +1 -1
- data/lib/talon_one/models/new_customer_session_v2.rb +1 -1
- data/lib/talon_one/models/new_event.rb +1 -1
- data/lib/talon_one/models/new_event_type.rb +1 -1
- data/lib/talon_one/models/new_feature_flags.rb +1 -1
- data/lib/talon_one/models/new_import.rb +1 -1
- data/lib/talon_one/models/new_invitation.rb +1 -1
- data/lib/talon_one/models/new_invite_email.rb +1 -1
- data/lib/talon_one/models/new_loyalty_program.rb +18 -3
- data/lib/talon_one/models/new_password.rb +1 -1
- data/lib/talon_one/models/new_password_email.rb +1 -1
- data/lib/talon_one/models/new_referral.rb +1 -1
- data/lib/talon_one/models/new_role.rb +1 -1
- data/lib/talon_one/models/new_ruleset.rb +1 -1
- data/lib/talon_one/models/new_saml_connection.rb +1 -1
- data/lib/talon_one/models/new_template_def.rb +1 -1
- data/lib/talon_one/models/new_user.rb +1 -1
- data/lib/talon_one/models/new_webhook.rb +1 -1
- data/lib/talon_one/models/notification.rb +1 -1
- data/lib/talon_one/models/redeem_referral_effect_props.rb +1 -1
- data/lib/talon_one/models/referral.rb +1 -1
- data/lib/talon_one/models/referral_created_effect_props.rb +1 -1
- data/lib/talon_one/models/referral_rejection_reason.rb +3 -3
- data/lib/talon_one/models/reject_coupon_effect_props.rb +1 -1
- data/lib/talon_one/models/reject_referral_effect_props.rb +1 -1
- data/lib/talon_one/models/role.rb +14 -4
- data/lib/talon_one/models/role_assign.rb +1 -1
- data/lib/talon_one/models/role_membership.rb +1 -1
- data/lib/talon_one/models/rollback_coupon_effect_props.rb +1 -1
- data/lib/talon_one/models/rollback_discount_effect_props.rb +1 -1
- data/lib/talon_one/models/rule.rb +1 -1
- data/lib/talon_one/models/ruleset.rb +1 -1
- data/lib/talon_one/models/saml_connection.rb +1 -1
- data/lib/talon_one/models/saml_connection_metadata.rb +1 -1
- data/lib/talon_one/models/saml_login_endpoint.rb +1 -1
- data/lib/talon_one/models/session.rb +1 -1
- data/lib/talon_one/models/set_discount_effect_props.rb +16 -6
- data/lib/talon_one/models/set_discount_per_item_effect_props.rb +15 -5
- data/lib/talon_one/models/show_bundle_metadata_effect_props.rb +1 -1
- data/lib/talon_one/models/show_notification_effect_props.rb +1 -1
- data/lib/talon_one/models/slot_def.rb +1 -1
- data/lib/talon_one/models/template_arg_def.rb +1 -1
- data/lib/talon_one/models/template_def.rb +1 -1
- data/lib/talon_one/models/trigger_webhook_effect_props.rb +1 -1
- data/lib/talon_one/models/update_account.rb +1 -1
- data/lib/talon_one/models/update_application.rb +58 -6
- data/lib/talon_one/models/update_attribute_effect_props.rb +1 -1
- data/lib/talon_one/models/update_audience.rb +231 -0
- data/lib/talon_one/models/update_campaign.rb +17 -5
- data/lib/talon_one/models/update_campaign_group.rb +266 -0
- data/lib/talon_one/models/update_coupon.rb +1 -1
- data/lib/talon_one/models/update_coupon_batch.rb +1 -1
- data/lib/talon_one/models/update_loyalty_program.rb +13 -3
- data/lib/talon_one/models/update_role.rb +1 -1
- data/lib/talon_one/models/update_user.rb +2 -22
- data/lib/talon_one/models/update_user_latest_feed_timestamp.rb +213 -0
- data/lib/talon_one/models/user.rb +11 -26
- data/lib/talon_one/models/user_entity.rb +1 -1
- data/lib/talon_one/models/user_feed_notifications.rb +230 -0
- data/lib/talon_one/models/webhook.rb +1 -1
- data/lib/talon_one/models/webhook_activation_log_entry.rb +1 -1
- data/lib/talon_one/models/webhook_log_entry.rb +1 -1
- data/lib/talon_one/version.rb +2 -2
- data/spec/api/integration_api_spec.rb +36 -8
- data/spec/api/management_api_spec.rb +19 -3
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/accept_coupon_effect_props_spec.rb +1 -1
- data/spec/models/accept_referral_effect_props_spec.rb +1 -1
- data/spec/models/access_log_entry_spec.rb +1 -1
- data/spec/models/account_additional_cost_spec.rb +1 -1
- data/spec/models/account_analytics_spec.rb +27 -9
- data/spec/models/account_entity_spec.rb +1 -1
- data/spec/models/account_limits_spec.rb +7 -7
- data/spec/models/account_spec.rb +1 -1
- data/spec/models/add_free_item_effect_props_spec.rb +1 -1
- data/spec/models/add_loyalty_points_effect_props_spec.rb +8 -2
- data/spec/models/additional_cost_spec.rb +1 -1
- data/spec/models/api_error_spec.rb +1 -1
- data/spec/models/application_api_health_spec.rb +1 -1
- data/spec/models/application_api_key_spec.rb +18 -8
- data/spec/models/application_customer_entity_spec.rb +1 -1
- data/spec/models/application_customer_search_spec.rb +1 -1
- data/spec/models/application_customer_spec.rb +7 -1
- data/spec/models/application_entity_spec.rb +1 -1
- data/spec/models/application_event_spec.rb +1 -1
- data/spec/models/application_session_entity_spec.rb +1 -1
- data/spec/models/application_session_spec.rb +1 -1
- data/spec/models/application_spec.rb +29 -1
- data/spec/models/attribute_spec.rb +1 -1
- data/spec/models/attributes_mandatory_spec.rb +1 -1
- data/spec/models/attributes_settings_spec.rb +1 -1
- data/spec/models/audience_membership_spec.rb +47 -0
- data/spec/models/audience_spec.rb +75 -0
- data/spec/models/base_saml_connection_spec.rb +1 -1
- data/spec/models/binding_spec.rb +1 -1
- data/spec/models/campaign_analytics_spec.rb +25 -1
- data/spec/models/campaign_copy_spec.rb +1 -1
- data/spec/models/campaign_entity_spec.rb +1 -1
- data/spec/models/{misc_update_user_latest_feature_spec.rb → campaign_group_entity_spec.rb} +8 -8
- data/spec/models/campaign_group_spec.rb +83 -0
- data/spec/models/campaign_search_spec.rb +1 -1
- data/spec/models/campaign_set_branch_node_spec.rb +1 -1
- data/spec/models/campaign_set_leaf_node_spec.rb +1 -1
- data/spec/models/campaign_set_node_spec.rb +1 -1
- data/spec/models/campaign_set_spec.rb +1 -1
- data/spec/models/campaign_spec.rb +7 -1
- data/spec/models/cart_item_adjustment_spec.rb +1 -1
- data/spec/models/cart_item_spec.rb +1 -1
- data/spec/models/change_profile_password_spec.rb +1 -1
- data/spec/models/change_spec.rb +1 -1
- data/spec/models/code_generator_settings_spec.rb +1 -1
- data/spec/models/coupon_constraints_spec.rb +1 -1
- data/spec/models/coupon_created_effect_props_spec.rb +1 -1
- data/spec/models/coupon_rejection_reason_spec.rb +2 -2
- data/spec/models/coupon_reservations_spec.rb +1 -1
- data/spec/models/coupon_search_spec.rb +1 -1
- data/spec/models/coupon_spec.rb +1 -1
- data/spec/models/coupon_value_spec.rb +1 -1
- data/spec/models/create_application_api_key_spec.rb +11 -1
- data/spec/models/customer_activity_report_spec.rb +1 -1
- data/spec/models/customer_analytics_spec.rb +1 -1
- data/spec/models/customer_inventory_spec.rb +7 -1
- data/spec/models/customer_profile_audience_request_item_spec.rb +57 -0
- data/spec/models/{customer_profile_update_spec.rb → customer_profile_audience_request_spec.rb} +8 -8
- data/spec/models/customer_profile_integration_request_v2_spec.rb +51 -0
- data/spec/models/customer_profile_search_query_spec.rb +1 -1
- data/spec/models/customer_profile_spec.rb +7 -1
- data/spec/models/customer_session_spec.rb +1 -1
- data/spec/models/customer_session_v2_spec.rb +1 -1
- data/spec/models/deduct_loyalty_points_effect_props_spec.rb +1 -1
- data/spec/models/effect_entity_spec.rb +1 -1
- data/spec/models/effect_spec.rb +1 -1
- data/spec/models/email_entity_spec.rb +1 -1
- data/spec/models/entity_spec.rb +1 -1
- data/spec/models/entity_with_talang_visible_id_spec.rb +47 -0
- data/spec/models/environment_spec.rb +1 -1
- data/spec/models/error_effect_props_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/error_source_spec.rb +1 -1
- data/spec/models/event_spec.rb +1 -1
- data/spec/models/event_type_spec.rb +1 -1
- data/spec/models/export_spec.rb +1 -1
- data/spec/models/feature_flag_spec.rb +1 -1
- data/spec/models/feature_flags_spec.rb +1 -1
- data/spec/models/features_feed_spec.rb +1 -1
- data/spec/models/feed_notification_spec.rb +75 -0
- data/spec/models/func_arg_def_spec.rb +1 -1
- data/spec/models/function_def_spec.rb +1 -1
- data/spec/models/import_coupons_spec.rb +1 -1
- data/spec/models/import_spec.rb +1 -1
- data/spec/models/inline_response20010_spec.rb +1 -1
- data/spec/models/inline_response20011_spec.rb +1 -1
- data/spec/models/inline_response20012_spec.rb +7 -1
- data/spec/models/inline_response20013_spec.rb +1 -1
- data/spec/models/inline_response20014_spec.rb +1 -1
- data/spec/models/inline_response20015_spec.rb +1 -1
- data/spec/models/inline_response20016_spec.rb +1 -1
- data/spec/models/inline_response20017_spec.rb +1 -1
- data/spec/models/inline_response20018_spec.rb +1 -1
- data/spec/models/inline_response20019_spec.rb +1 -1
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response20020_spec.rb +1 -1
- data/spec/models/inline_response20021_spec.rb +1 -1
- data/spec/models/inline_response20022_spec.rb +1 -1
- data/spec/models/inline_response20023_spec.rb +1 -1
- data/spec/models/inline_response20024_spec.rb +1 -1
- data/spec/models/inline_response20025_spec.rb +1 -1
- data/spec/models/inline_response20026_spec.rb +1 -1
- data/spec/models/inline_response20027_spec.rb +1 -1
- data/spec/models/inline_response20028_spec.rb +1 -1
- data/spec/models/inline_response20029_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response20030_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response2006_spec.rb +1 -1
- data/spec/models/inline_response2007_spec.rb +1 -1
- data/spec/models/inline_response2008_spec.rb +1 -1
- data/spec/models/inline_response2009_spec.rb +1 -1
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/integration_entity_spec.rb +1 -1
- data/spec/models/integration_event_spec.rb +1 -1
- data/spec/models/integration_profile_entity_spec.rb +1 -1
- data/spec/models/integration_request_spec.rb +1 -1
- data/spec/models/integration_state_spec.rb +1 -1
- data/spec/models/integration_state_v2_spec.rb +1 -1
- data/spec/models/ledger_entry_spec.rb +1 -1
- data/spec/models/library_attribute_spec.rb +1 -1
- data/spec/models/limit_config_spec.rb +1 -1
- data/spec/models/login_params_spec.rb +1 -1
- data/spec/models/loyalty_ledger_entry_spec.rb +7 -1
- data/spec/models/loyalty_ledger_spec.rb +1 -1
- data/spec/models/loyalty_membership_spec.rb +1 -1
- data/spec/models/loyalty_points_spec.rb +8 -2
- data/spec/models/loyalty_program_balance_spec.rb +1 -1
- data/spec/models/loyalty_program_ledgers_spec.rb +1 -1
- data/spec/models/loyalty_program_spec.rb +7 -1
- data/spec/models/loyalty_spec.rb +1 -1
- data/spec/models/loyalty_statistics_spec.rb +59 -0
- data/spec/models/loyalty_sub_ledger_spec.rb +43 -1
- data/spec/models/manager_config_spec.rb +1 -1
- data/spec/models/meta_spec.rb +1 -1
- data/spec/models/multi_application_entity_spec.rb +1 -1
- data/spec/models/multiple_customer_profile_integration_request_item_spec.rb +47 -0
- data/spec/models/multiple_customer_profile_integration_request_spec.rb +41 -0
- data/spec/models/multiple_customer_profile_integration_response_v2_spec.rb +41 -0
- data/spec/models/mutable_entity_spec.rb +1 -1
- data/spec/models/new_account_sign_up_spec.rb +1 -1
- data/spec/models/new_account_spec.rb +1 -1
- data/spec/models/new_additional_cost_spec.rb +1 -1
- data/spec/models/new_application_api_key_spec.rb +18 -8
- data/spec/models/new_application_spec.rb +29 -1
- data/spec/models/new_attribute_spec.rb +1 -1
- data/spec/models/new_audience_spec.rb +57 -0
- data/spec/models/new_campaign_group_spec.rb +59 -0
- data/spec/models/new_campaign_set_spec.rb +1 -1
- data/spec/models/new_campaign_spec.rb +7 -1
- data/spec/models/new_coupons_spec.rb +1 -1
- data/spec/models/new_customer_profile_spec.rb +1 -1
- data/spec/models/new_customer_session_spec.rb +1 -1
- data/spec/models/new_customer_session_v2_spec.rb +1 -1
- data/spec/models/new_event_spec.rb +1 -1
- data/spec/models/new_event_type_spec.rb +1 -1
- data/spec/models/new_feature_flags_spec.rb +1 -1
- data/spec/models/new_import_spec.rb +1 -1
- data/spec/models/new_invitation_spec.rb +1 -1
- data/spec/models/new_invite_email_spec.rb +1 -1
- data/spec/models/new_loyalty_program_spec.rb +7 -1
- data/spec/models/new_password_email_spec.rb +1 -1
- data/spec/models/new_password_spec.rb +1 -1
- data/spec/models/new_referral_spec.rb +1 -1
- data/spec/models/new_role_spec.rb +1 -1
- data/spec/models/new_ruleset_spec.rb +1 -1
- data/spec/models/new_saml_connection_spec.rb +1 -1
- data/spec/models/new_template_def_spec.rb +1 -1
- data/spec/models/new_user_spec.rb +1 -1
- data/spec/models/new_webhook_spec.rb +1 -1
- data/spec/models/notification_spec.rb +1 -1
- data/spec/models/redeem_referral_effect_props_spec.rb +1 -1
- data/spec/models/referral_created_effect_props_spec.rb +1 -1
- data/spec/models/referral_rejection_reason_spec.rb +2 -2
- data/spec/models/referral_spec.rb +1 -1
- data/spec/models/reject_coupon_effect_props_spec.rb +1 -1
- data/spec/models/reject_referral_effect_props_spec.rb +1 -1
- data/spec/models/role_assign_spec.rb +1 -1
- data/spec/models/role_membership_spec.rb +1 -1
- data/spec/models/role_spec.rb +7 -1
- data/spec/models/rollback_coupon_effect_props_spec.rb +1 -1
- data/spec/models/rollback_discount_effect_props_spec.rb +1 -1
- data/spec/models/rule_spec.rb +1 -1
- data/spec/models/ruleset_spec.rb +1 -1
- data/spec/models/saml_connection_metadata_spec.rb +1 -1
- data/spec/models/saml_connection_spec.rb +1 -1
- data/spec/models/saml_login_endpoint_spec.rb +1 -1
- data/spec/models/session_spec.rb +1 -1
- data/spec/models/set_discount_effect_props_spec.rb +7 -1
- data/spec/models/set_discount_per_item_effect_props_spec.rb +7 -1
- data/spec/models/show_bundle_metadata_effect_props_spec.rb +1 -1
- data/spec/models/show_notification_effect_props_spec.rb +1 -1
- data/spec/models/slot_def_spec.rb +1 -1
- data/spec/models/template_arg_def_spec.rb +1 -1
- data/spec/models/template_def_spec.rb +1 -1
- data/spec/models/trigger_webhook_effect_props_spec.rb +1 -1
- data/spec/models/update_account_spec.rb +1 -1
- data/spec/models/update_application_spec.rb +29 -1
- data/spec/models/update_attribute_effect_props_spec.rb +1 -1
- data/spec/models/update_audience_spec.rb +41 -0
- data/spec/models/update_campaign_group_spec.rb +59 -0
- data/spec/models/update_campaign_spec.rb +7 -1
- data/spec/models/update_coupon_batch_spec.rb +1 -1
- data/spec/models/update_coupon_spec.rb +1 -1
- data/spec/models/update_loyalty_program_spec.rb +7 -1
- data/spec/models/update_role_spec.rb +1 -1
- data/spec/models/update_user_latest_feed_timestamp_spec.rb +41 -0
- data/spec/models/update_user_spec.rb +1 -13
- data/spec/models/user_entity_spec.rb +1 -1
- data/spec/models/user_feed_notifications_spec.rb +47 -0
- data/spec/models/user_spec.rb +2 -8
- data/spec/models/webhook_activation_log_entry_spec.rb +1 -1
- data/spec/models/webhook_log_entry_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/talon_one.gemspec +1 -1
- metadata +78 -10
- data/docs/CustomerProfileUpdate.md +0 -17
- data/docs/MiscUpdateUserLatestFeature.md +0 -17
@@ -6,14 +6,14 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TalonOne
|
16
|
-
# The properties specific to the \"setDiscount\" effect. This gets triggered whenever a validated rule contained a \"set discount\" effect. This is a discount that should be applied
|
16
|
+
# The properties specific to the \"setDiscount\" effect. This gets triggered whenever a validated rule contained a \"set discount\" effect. This is a discount that should be applied on the scope of defined with it.
|
17
17
|
class SetDiscountEffectProps
|
18
18
|
# The name/description of this discount
|
19
19
|
attr_accessor :name
|
@@ -21,11 +21,15 @@ module TalonOne
|
|
21
21
|
# The total monetary value of the discount
|
22
22
|
attr_accessor :value
|
23
23
|
|
24
|
+
# The scope which the discount was applied on, can be one of (cartItems,additionalCosts,sessionTotal)
|
25
|
+
attr_accessor :scope
|
26
|
+
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
30
|
:'name' => :'name',
|
28
|
-
:'value' => :'value'
|
31
|
+
:'value' => :'value',
|
32
|
+
:'scope' => :'scope'
|
29
33
|
}
|
30
34
|
end
|
31
35
|
|
@@ -33,7 +37,8 @@ module TalonOne
|
|
33
37
|
def self.openapi_types
|
34
38
|
{
|
35
39
|
:'name' => :'String',
|
36
|
-
:'value' => :'Float'
|
40
|
+
:'value' => :'Float',
|
41
|
+
:'scope' => :'String'
|
37
42
|
}
|
38
43
|
end
|
39
44
|
|
@@ -65,6 +70,10 @@ module TalonOne
|
|
65
70
|
if attributes.key?(:'value')
|
66
71
|
self.value = attributes[:'value']
|
67
72
|
end
|
73
|
+
|
74
|
+
if attributes.key?(:'scope')
|
75
|
+
self.scope = attributes[:'scope']
|
76
|
+
end
|
68
77
|
end
|
69
78
|
|
70
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -96,7 +105,8 @@ module TalonOne
|
|
96
105
|
return true if self.equal?(o)
|
97
106
|
self.class == o.class &&
|
98
107
|
name == o.name &&
|
99
|
-
value == o.value
|
108
|
+
value == o.value &&
|
109
|
+
scope == o.scope
|
100
110
|
end
|
101
111
|
|
102
112
|
# @see the `==` method
|
@@ -108,7 +118,7 @@ module TalonOne
|
|
108
118
|
# Calculates hash code according to all attributes.
|
109
119
|
# @return [Integer] Hash code
|
110
120
|
def hash
|
111
|
-
[name, value].hash
|
121
|
+
[name, value, scope].hash
|
112
122
|
end
|
113
123
|
|
114
124
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,12 +24,16 @@ module TalonOne
|
|
24
24
|
# The index of the item in the cart items list on which this discount should be applied
|
25
25
|
attr_accessor :position
|
26
26
|
|
27
|
+
# The sub-index of the item in an item stack on which this discount should be applied
|
28
|
+
attr_accessor :sub_position
|
29
|
+
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
31
|
def self.attribute_map
|
29
32
|
{
|
30
33
|
:'name' => :'name',
|
31
34
|
:'value' => :'value',
|
32
|
-
:'position' => :'position'
|
35
|
+
:'position' => :'position',
|
36
|
+
:'sub_position' => :'subPosition'
|
33
37
|
}
|
34
38
|
end
|
35
39
|
|
@@ -38,7 +42,8 @@ module TalonOne
|
|
38
42
|
{
|
39
43
|
:'name' => :'String',
|
40
44
|
:'value' => :'Float',
|
41
|
-
:'position' => :'Float'
|
45
|
+
:'position' => :'Float',
|
46
|
+
:'sub_position' => :'Float'
|
42
47
|
}
|
43
48
|
end
|
44
49
|
|
@@ -74,6 +79,10 @@ module TalonOne
|
|
74
79
|
if attributes.key?(:'position')
|
75
80
|
self.position = attributes[:'position']
|
76
81
|
end
|
82
|
+
|
83
|
+
if attributes.key?(:'sub_position')
|
84
|
+
self.sub_position = attributes[:'sub_position']
|
85
|
+
end
|
77
86
|
end
|
78
87
|
|
79
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -111,7 +120,8 @@ module TalonOne
|
|
111
120
|
self.class == o.class &&
|
112
121
|
name == o.name &&
|
113
122
|
value == o.value &&
|
114
|
-
position == o.position
|
123
|
+
position == o.position &&
|
124
|
+
sub_position == o.sub_position
|
115
125
|
end
|
116
126
|
|
117
127
|
# @see the `==` method
|
@@ -123,7 +133,7 @@ module TalonOne
|
|
123
133
|
# Calculates hash code according to all attributes.
|
124
134
|
# @return [Integer] Hash code
|
125
135
|
def hash
|
126
|
-
[name, value, position].hash
|
136
|
+
[name, value, position, sub_position].hash
|
127
137
|
end
|
128
138
|
|
129
139
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -35,11 +35,23 @@ module TalonOne
|
|
35
35
|
# Default limits for campaigns created in this application
|
36
36
|
attr_accessor :limits
|
37
37
|
|
38
|
-
# Default priority for campaigns created in this application, can be one of (universal, stackable, exclusive)
|
38
|
+
# Default priority for campaigns created in this application, can be one of (universal, stackable, exclusive). If no value is provided, this is set to \"universal\"
|
39
39
|
attr_accessor :campaign_priority
|
40
40
|
|
41
|
+
# The strategy used when choosing exclusive campaigns for evaluation, can be one of (listOrder, lowestDiscount, highestDiscount). If no value is provided, this is set to \"listOrder\"
|
42
|
+
attr_accessor :exclusive_campaigns_strategy
|
43
|
+
|
44
|
+
# Flag indicating if discounts should cascade for this application
|
45
|
+
attr_accessor :enable_cascading_discounts
|
46
|
+
|
47
|
+
# Flag indicating if cart items of quantity larger than one should be separated into different items of quantity one
|
48
|
+
attr_accessor :enable_flattened_cart_items
|
49
|
+
|
41
50
|
attr_accessor :attributes_settings
|
42
51
|
|
52
|
+
# Flag indicating if this is a live or sandbox application
|
53
|
+
attr_accessor :sandbox
|
54
|
+
|
43
55
|
class EnumAttributeValidator
|
44
56
|
attr_reader :datatype
|
45
57
|
attr_reader :allowable_values
|
@@ -73,7 +85,11 @@ module TalonOne
|
|
73
85
|
:'attributes' => :'attributes',
|
74
86
|
:'limits' => :'limits',
|
75
87
|
:'campaign_priority' => :'campaignPriority',
|
76
|
-
:'
|
88
|
+
:'exclusive_campaigns_strategy' => :'exclusiveCampaignsStrategy',
|
89
|
+
:'enable_cascading_discounts' => :'enableCascadingDiscounts',
|
90
|
+
:'enable_flattened_cart_items' => :'enableFlattenedCartItems',
|
91
|
+
:'attributes_settings' => :'attributesSettings',
|
92
|
+
:'sandbox' => :'sandbox'
|
77
93
|
}
|
78
94
|
end
|
79
95
|
|
@@ -88,7 +104,11 @@ module TalonOne
|
|
88
104
|
:'attributes' => :'Object',
|
89
105
|
:'limits' => :'Array<LimitConfig>',
|
90
106
|
:'campaign_priority' => :'String',
|
91
|
-
:'
|
107
|
+
:'exclusive_campaigns_strategy' => :'String',
|
108
|
+
:'enable_cascading_discounts' => :'Boolean',
|
109
|
+
:'enable_flattened_cart_items' => :'Boolean',
|
110
|
+
:'attributes_settings' => :'AttributesSettings',
|
111
|
+
:'sandbox' => :'Boolean'
|
92
112
|
}
|
93
113
|
end
|
94
114
|
|
@@ -147,9 +167,25 @@ module TalonOne
|
|
147
167
|
self.campaign_priority = attributes[:'campaign_priority']
|
148
168
|
end
|
149
169
|
|
170
|
+
if attributes.key?(:'exclusive_campaigns_strategy')
|
171
|
+
self.exclusive_campaigns_strategy = attributes[:'exclusive_campaigns_strategy']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'enable_cascading_discounts')
|
175
|
+
self.enable_cascading_discounts = attributes[:'enable_cascading_discounts']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'enable_flattened_cart_items')
|
179
|
+
self.enable_flattened_cart_items = attributes[:'enable_flattened_cart_items']
|
180
|
+
end
|
181
|
+
|
150
182
|
if attributes.key?(:'attributes_settings')
|
151
183
|
self.attributes_settings = attributes[:'attributes_settings']
|
152
184
|
end
|
185
|
+
|
186
|
+
if attributes.key?(:'sandbox')
|
187
|
+
self.sandbox = attributes[:'sandbox']
|
188
|
+
end
|
153
189
|
end
|
154
190
|
|
155
191
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -196,6 +232,8 @@ module TalonOne
|
|
196
232
|
return false unless case_sensitivity_validator.valid?(@case_sensitivity)
|
197
233
|
campaign_priority_validator = EnumAttributeValidator.new('String', ["universal", "stackable", "exclusive"])
|
198
234
|
return false unless campaign_priority_validator.valid?(@campaign_priority)
|
235
|
+
exclusive_campaigns_strategy_validator = EnumAttributeValidator.new('String', ["listOrder", "lowestDiscount", "highestDiscount"])
|
236
|
+
return false unless exclusive_campaigns_strategy_validator.valid?(@exclusive_campaigns_strategy)
|
199
237
|
true
|
200
238
|
end
|
201
239
|
|
@@ -261,6 +299,16 @@ module TalonOne
|
|
261
299
|
@campaign_priority = campaign_priority
|
262
300
|
end
|
263
301
|
|
302
|
+
# Custom attribute writer method checking allowed values (enum).
|
303
|
+
# @param [Object] exclusive_campaigns_strategy Object to be assigned
|
304
|
+
def exclusive_campaigns_strategy=(exclusive_campaigns_strategy)
|
305
|
+
validator = EnumAttributeValidator.new('String', ["listOrder", "lowestDiscount", "highestDiscount"])
|
306
|
+
unless validator.valid?(exclusive_campaigns_strategy)
|
307
|
+
fail ArgumentError, "invalid value for \"exclusive_campaigns_strategy\", must be one of #{validator.allowable_values}."
|
308
|
+
end
|
309
|
+
@exclusive_campaigns_strategy = exclusive_campaigns_strategy
|
310
|
+
end
|
311
|
+
|
264
312
|
# Checks equality by comparing each attribute.
|
265
313
|
# @param [Object] Object to be compared
|
266
314
|
def ==(o)
|
@@ -274,7 +322,11 @@ module TalonOne
|
|
274
322
|
attributes == o.attributes &&
|
275
323
|
limits == o.limits &&
|
276
324
|
campaign_priority == o.campaign_priority &&
|
277
|
-
|
325
|
+
exclusive_campaigns_strategy == o.exclusive_campaigns_strategy &&
|
326
|
+
enable_cascading_discounts == o.enable_cascading_discounts &&
|
327
|
+
enable_flattened_cart_items == o.enable_flattened_cart_items &&
|
328
|
+
attributes_settings == o.attributes_settings &&
|
329
|
+
sandbox == o.sandbox
|
278
330
|
end
|
279
331
|
|
280
332
|
# @see the `==` method
|
@@ -286,7 +338,7 @@ module TalonOne
|
|
286
338
|
# Calculates hash code according to all attributes.
|
287
339
|
# @return [Integer] Hash code
|
288
340
|
def hash
|
289
|
-
[name, description, timezone, currency, case_sensitivity, attributes, limits, campaign_priority, attributes_settings].hash
|
341
|
+
[name, description, timezone, currency, case_sensitivity, attributes, limits, campaign_priority, exclusive_campaigns_strategy, enable_cascading_discounts, enable_flattened_cart_items, attributes_settings, sandbox].hash
|
290
342
|
end
|
291
343
|
|
292
344
|
# Builds the object from hash
|
@@ -0,0 +1,231 @@
|
|
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
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TalonOne
|
16
|
+
class UpdateAudience
|
17
|
+
# The human-friendly display name for this Audience.
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'name' => :'name'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.openapi_types
|
29
|
+
{
|
30
|
+
:'name' => :'String'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
if (!attributes.is_a?(Hash))
|
44
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::UpdateAudience` initialize method"
|
45
|
+
end
|
46
|
+
|
47
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
50
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::UpdateAudience`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
51
|
+
end
|
52
|
+
h[k.to_sym] = v
|
53
|
+
}
|
54
|
+
|
55
|
+
if attributes.key?(:'name')
|
56
|
+
self.name = attributes[:'name']
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
+
# @return Array for valid properties with the reasons
|
62
|
+
def list_invalid_properties
|
63
|
+
invalid_properties = Array.new
|
64
|
+
if @name.nil?
|
65
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
66
|
+
end
|
67
|
+
|
68
|
+
if @name.to_s.length < 1
|
69
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
70
|
+
end
|
71
|
+
|
72
|
+
invalid_properties
|
73
|
+
end
|
74
|
+
|
75
|
+
# Check to see if the all the properties in the model are valid
|
76
|
+
# @return true if the model is valid
|
77
|
+
def valid?
|
78
|
+
return false if @name.nil?
|
79
|
+
return false if @name.to_s.length < 1
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Custom attribute writer method with validation
|
84
|
+
# @param [Object] name Value to be assigned
|
85
|
+
def name=(name)
|
86
|
+
if name.nil?
|
87
|
+
fail ArgumentError, 'name cannot be nil'
|
88
|
+
end
|
89
|
+
|
90
|
+
if name.to_s.length < 1
|
91
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
92
|
+
end
|
93
|
+
|
94
|
+
@name = name
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
name == o.name
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Integer] Hash code
|
113
|
+
def hash
|
114
|
+
[name].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def self.build_from_hash(attributes)
|
121
|
+
new.build_from_hash(attributes)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :Boolean
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
TalonOne.const_get(type).build_from_hash(value)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_hash
|
200
|
+
hash = {}
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
202
|
+
value = self.send(attr)
|
203
|
+
if value.nil?
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
206
|
+
end
|
207
|
+
|
208
|
+
hash[param] = _to_hash(value)
|
209
|
+
end
|
210
|
+
hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Outputs non-array value in the form of hash
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
215
|
+
# @param [Object] value Any valid value
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|