talon_one 4.0.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +83 -18
- data/docs/AchievementProgress.md +2 -0
- data/docs/ActivateUserRequest.md +17 -0
- data/docs/AdditionalCampaignProperties.md +3 -1
- data/docs/AnalyticsDataPoint.md +19 -0
- data/docs/AnalyticsDataPointWithTrend.md +19 -0
- data/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md +21 -0
- data/docs/AnalyticsDataPointWithTrendAndUplift.md +21 -0
- data/docs/Application.md +4 -0
- data/docs/ApplicationAnalyticsDataPoint.md +6 -6
- data/docs/ApplicationCIF.md +33 -0
- data/docs/ApplicationCIFExpression.md +27 -0
- data/docs/ApplicationCampaignAnalytics.md +13 -19
- data/docs/ApplicationCampaignStats.md +1 -3
- data/docs/AsyncCouponDeletionJobResponse.md +17 -0
- data/docs/BaseLoyaltyProgram.md +8 -4
- data/docs/BaseNotification.md +1 -1
- data/docs/BaseNotificationEntity.md +1 -1
- data/docs/Campaign.md +15 -1
- data/docs/CampaignCollectionEditedNotification.md +21 -0
- data/docs/CampaignNotificationPolicy.md +3 -1
- data/docs/CampaignStateChangedNotification.md +2 -2
- data/docs/CampaignStoreBudget.md +25 -0
- data/docs/CampaignVersions.md +27 -0
- data/docs/CardAddedDeductedPointsNotificationPolicy.md +19 -0
- data/docs/CartItem.md +1 -1
- data/docs/CodeGeneratorSettings.md +1 -1
- data/docs/Coupon.md +3 -3
- data/docs/CouponConstraints.md +1 -1
- data/docs/CouponCreationJob.md +1 -1
- data/docs/CouponDeletionFilters.md +43 -0
- data/docs/CouponDeletionJob.md +39 -0
- data/docs/CustomerInventory.md +1 -1
- data/docs/CustomerSessionV2.md +2 -2
- data/docs/Effect.md +8 -0
- data/docs/EffectEntity.md +9 -1
- data/docs/Environment.md +3 -1
- data/docs/Event.md +1 -1
- data/docs/GenerateCampaignDescription.md +19 -0
- data/docs/GenerateCampaignTags.md +17 -0
- data/docs/GenerateItemFilterDescription.md +17 -0
- data/docs/GenerateLoyaltyCard.md +19 -0
- data/docs/GenerateRuleTitle.md +19 -0
- data/docs/GenerateRuleTitleRule.md +19 -0
- data/docs/IncreaseAchievementProgressEffectProps.md +1 -1
- data/docs/InlineResponse20044.md +1 -1
- data/docs/IntegrationApi.md +77 -16
- data/docs/IntegrationCoupon.md +3 -3
- data/docs/InventoryCoupon.md +3 -3
- data/docs/InventoryReferral.md +1 -1
- data/docs/LoyaltyBalanceWithTier.md +31 -0
- data/docs/LoyaltyBalancesWithTiers.md +19 -0
- data/docs/LoyaltyCard.md +6 -2
- data/docs/LoyaltyCardBalances.md +21 -0
- data/docs/LoyaltyCardBatch.md +21 -0
- data/docs/LoyaltyCardBatchResponse.md +19 -0
- data/docs/LoyaltyCardProfileRegistration.md +1 -1
- data/docs/LoyaltyProgram.md +14 -6
- data/docs/ManagementApi.md +1269 -176
- data/docs/MessageLogEntry.md +1 -3
- data/docs/MessageLogResponse.md +3 -3
- data/docs/NewAppWideCouponDeletionJob.md +19 -0
- data/docs/NewApplication.md +3 -1
- data/docs/NewApplicationCIF.md +27 -0
- data/docs/NewApplicationCIFExpression.md +21 -0
- data/docs/NewBaseNotification.md +1 -1
- data/docs/NewCouponCreationJob.md +1 -1
- data/docs/NewCouponDeletionJob.md +17 -0
- data/docs/NewCoupons.md +2 -2
- data/docs/NewCouponsForMultipleRecipients.md +1 -1
- data/docs/NewCustomerSessionV2.md +2 -2
- data/docs/NewExternalInvitation.md +21 -0
- data/docs/NewLoyaltyProgram.md +8 -4
- data/docs/NewOutgoingIntegrationWebhook.md +2 -0
- data/docs/NewReferral.md +1 -1
- data/docs/NewReferralsForMultipleAdvocates.md +1 -1
- data/docs/NewRevisionVersion.md +37 -0
- data/docs/NewWebhook.md +2 -0
- data/docs/OktaEvent.md +19 -0
- data/docs/OktaEventPayload.md +17 -0
- data/docs/OktaEventPayloadData.md +17 -0
- data/docs/OktaEventTarget.md +21 -0
- data/docs/ProjectedTier.md +21 -0
- data/docs/Referral.md +1 -1
- data/docs/ReferralConstraints.md +1 -1
- data/docs/RejectCouponEffectProps.md +3 -1
- data/docs/RejectReferralEffectProps.md +3 -1
- data/docs/Revision.md +35 -0
- data/docs/RevisionActivation.md +17 -0
- data/docs/RevisionVersion.md +53 -0
- data/docs/RollbackIncreasedAchievementProgressEffectProps.md +27 -0
- data/docs/RuleFailureReason.md +5 -1
- data/docs/SSOConfig.md +3 -1
- data/docs/ScimBaseUser.md +23 -0
- data/docs/ScimBaseUserName.md +17 -0
- data/docs/ScimNewUser.md +23 -0
- data/docs/ScimPatchOperation.md +21 -0
- data/docs/ScimPatchRequest.md +19 -0
- data/docs/ScimResource.md +21 -0
- data/docs/ScimResourceTypesListResponse.md +17 -0
- data/docs/ScimSchemaResource.md +23 -0
- data/docs/ScimSchemasListResponse.md +21 -0
- data/docs/ScimServiceProviderConfigResponse.md +27 -0
- data/docs/ScimServiceProviderConfigResponseBulk.md +21 -0
- data/docs/ScimServiceProviderConfigResponseChangePassword.md +17 -0
- data/docs/ScimServiceProviderConfigResponseFilter.md +19 -0
- data/docs/ScimServiceProviderConfigResponsePatch.md +17 -0
- data/docs/ScimUser.md +25 -0
- data/docs/ScimUsersListResponse.md +21 -0
- data/docs/Tier.md +3 -1
- data/docs/TransferLoyaltyCard.md +3 -1
- data/docs/UpdateApplication.md +5 -1
- data/docs/UpdateApplicationCIF.md +23 -0
- data/docs/UpdateCampaign.md +1 -1
- data/docs/UpdateCoupon.md +2 -2
- data/docs/UpdateCouponBatch.md +1 -1
- data/docs/UpdateLoyaltyCard.md +4 -2
- data/docs/UpdateLoyaltyProgram.md +8 -4
- data/docs/UpdateReferral.md +1 -1
- data/docs/UpdateReferralBatch.md +1 -1
- data/docs/UpdateUser.md +1 -1
- data/docs/User.md +3 -1
- data/docs/Webhook.md +2 -0
- data/docs/WebhookWithOutgoingIntegrationDetails.md +2 -0
- data/lib/talon_one/api/integration_api.rb +101 -25
- data/lib/talon_one/api/management_api.rb +1362 -189
- data/lib/talon_one/models/achievement_progress.rb +16 -1
- data/lib/talon_one/models/activate_user_request.rb +213 -0
- data/lib/talon_one/models/additional_campaign_properties.rb +21 -6
- data/lib/talon_one/models/analytics_data_point.rb +225 -0
- data/lib/talon_one/models/analytics_data_point_with_trend.rb +225 -0
- data/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb +239 -0
- data/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb +239 -0
- data/lib/talon_one/models/application.rb +21 -1
- data/lib/talon_one/models/application_analytics_data_point.rb +14 -4
- data/lib/talon_one/models/application_campaign_analytics.rb +39 -41
- data/lib/talon_one/models/application_campaign_stats.rb +1 -16
- data/lib/talon_one/models/application_cif.rb +308 -0
- data/lib/talon_one/models/application_cif_expression.rb +275 -0
- data/lib/talon_one/models/async_coupon_deletion_job_response.rb +213 -0
- data/lib/talon_one/models/attribute.rb +2 -2
- data/lib/talon_one/models/base_loyalty_program.rb +44 -25
- data/lib/talon_one/models/base_notification.rb +3 -2
- data/lib/talon_one/models/base_notification_entity.rb +1 -0
- data/lib/talon_one/models/campaign.rb +83 -6
- data/lib/talon_one/models/campaign_collection_edited_notification.rb +235 -0
- data/lib/talon_one/models/campaign_notification_policy.rb +16 -4
- data/lib/talon_one/models/campaign_state_changed_notification.rb +2 -2
- data/lib/talon_one/models/campaign_store_budget.rb +275 -0
- data/lib/talon_one/models/campaign_versions.rb +259 -0
- data/lib/talon_one/models/card_added_deducted_points_notification_policy.rb +269 -0
- data/lib/talon_one/models/cart_item.rb +1 -1
- data/lib/talon_one/models/code_generator_settings.rb +1 -1
- data/lib/talon_one/models/coupon.rb +3 -3
- data/lib/talon_one/models/coupon_constraints.rb +1 -1
- data/lib/talon_one/models/coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/coupon_deletion_filters.rb +375 -0
- data/lib/talon_one/models/coupon_deletion_job.rb +370 -0
- data/lib/talon_one/models/customer_inventory.rb +1 -1
- data/lib/talon_one/models/customer_session_v2.rb +2 -2
- data/lib/talon_one/models/effect.rb +41 -1
- data/lib/talon_one/models/effect_entity.rb +44 -4
- data/lib/talon_one/models/environment.rb +16 -4
- data/lib/talon_one/models/event.rb +0 -5
- data/lib/talon_one/models/generate_campaign_description.rb +227 -0
- data/lib/talon_one/models/generate_campaign_tags.rb +212 -0
- data/lib/talon_one/models/generate_item_filter_description.rb +214 -0
- data/lib/talon_one/models/generate_loyalty_card.rb +256 -0
- data/lib/talon_one/models/generate_rule_title.rb +226 -0
- data/lib/talon_one/models/generate_rule_title_rule.rb +221 -0
- data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +1 -1
- data/lib/talon_one/models/inline_response20044.rb +1 -1
- data/lib/talon_one/models/integration_coupon.rb +3 -3
- data/lib/talon_one/models/inventory_coupon.rb +3 -3
- data/lib/talon_one/models/inventory_referral.rb +1 -1
- data/lib/talon_one/models/loyalty_balance_with_tier.rb +276 -0
- data/lib/talon_one/models/loyalty_balances_with_tiers.rb +219 -0
- data/lib/talon_one/models/loyalty_card.rb +25 -5
- data/lib/talon_one/models/loyalty_card_balances.rb +231 -0
- data/lib/talon_one/models/loyalty_card_batch.rb +304 -0
- data/lib/talon_one/models/loyalty_card_batch_response.rb +227 -0
- data/lib/talon_one/models/loyalty_card_profile_registration.rb +1 -1
- data/lib/talon_one/models/loyalty_program.rb +70 -29
- data/lib/talon_one/models/message_log_entry.rb +4 -14
- data/lib/talon_one/models/message_log_response.rb +3 -22
- data/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb +227 -0
- data/lib/talon_one/models/new_application.rb +14 -4
- data/lib/talon_one/models/new_application_cif.rb +262 -0
- data/lib/talon_one/models/new_application_cif_expression.rb +229 -0
- data/lib/talon_one/models/new_attribute.rb +2 -2
- data/lib/talon_one/models/new_base_notification.rb +1 -0
- data/lib/talon_one/models/new_coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/new_coupon_deletion_job.rb +211 -0
- data/lib/talon_one/models/new_coupons.rb +2 -2
- data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +1 -1
- data/lib/talon_one/models/new_customer_session_v2.rb +2 -2
- data/lib/talon_one/models/new_external_invitation.rb +235 -0
- data/lib/talon_one/models/new_loyalty_program.rb +44 -25
- data/lib/talon_one/models/new_notification_test.rb +2 -2
- data/lib/talon_one/models/new_outgoing_integration_webhook.rb +11 -1
- data/lib/talon_one/models/new_referral.rb +1 -1
- data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +1 -1
- data/lib/talon_one/models/new_revision_version.rb +352 -0
- data/lib/talon_one/models/new_webhook.rb +11 -1
- data/lib/talon_one/models/okta_event.rb +229 -0
- data/lib/talon_one/models/okta_event_payload.rb +212 -0
- data/lib/talon_one/models/okta_event_payload_data.rb +214 -0
- data/lib/talon_one/models/okta_event_target.rb +243 -0
- data/lib/talon_one/models/projected_tier.rb +232 -0
- data/lib/talon_one/models/referral.rb +1 -1
- data/lib/talon_one/models/referral_constraints.rb +1 -1
- data/lib/talon_one/models/reject_coupon_effect_props.rb +14 -4
- data/lib/talon_one/models/reject_referral_effect_props.rb +14 -4
- data/lib/talon_one/models/revision.rb +319 -0
- data/lib/talon_one/models/revision_activation.rb +206 -0
- data/lib/talon_one/models/revision_version.rb +466 -0
- data/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb +288 -0
- data/lib/talon_one/models/rule_failure_reason.rb +24 -4
- data/lib/talon_one/models/scim_base_user.rb +237 -0
- data/lib/talon_one/models/scim_base_user_name.rb +208 -0
- data/lib/talon_one/models/scim_new_user.rb +237 -0
- data/lib/talon_one/models/scim_patch_operation.rb +267 -0
- data/lib/talon_one/models/scim_patch_request.rb +226 -0
- data/lib/talon_one/models/scim_resource.rb +228 -0
- data/lib/talon_one/models/scim_resource_types_list_response.rb +214 -0
- data/lib/talon_one/models/scim_schema_resource.rb +239 -0
- data/lib/talon_one/models/scim_schemas_list_response.rb +236 -0
- data/lib/talon_one/models/scim_service_provider_config_response.rb +256 -0
- data/lib/talon_one/models/scim_service_provider_config_response_bulk.rb +228 -0
- data/lib/talon_one/models/scim_service_provider_config_response_change_password.rb +208 -0
- data/lib/talon_one/models/scim_service_provider_config_response_filter.rb +218 -0
- data/lib/talon_one/models/scim_service_provider_config_response_patch.rb +208 -0
- data/lib/talon_one/models/scim_user.rb +252 -0
- data/lib/talon_one/models/scim_users_list_response.rb +236 -0
- data/lib/talon_one/models/sso_config.rb +14 -4
- data/lib/talon_one/models/tier.rb +12 -2
- data/lib/talon_one/models/transfer_loyalty_card.rb +14 -4
- data/lib/talon_one/models/update_application.rb +24 -4
- data/lib/talon_one/models/update_application_cif.rb +237 -0
- data/lib/talon_one/models/update_campaign.rb +1 -1
- data/lib/talon_one/models/update_coupon.rb +2 -2
- data/lib/talon_one/models/update_coupon_batch.rb +1 -1
- data/lib/talon_one/models/update_loyalty_card.rb +15 -5
- data/lib/talon_one/models/update_loyalty_program.rb +44 -25
- data/lib/talon_one/models/update_referral.rb +1 -1
- data/lib/talon_one/models/update_referral_batch.rb +1 -1
- data/lib/talon_one/models/update_user.rb +1 -1
- data/lib/talon_one/models/user.rb +14 -4
- data/lib/talon_one/models/webhook.rb +11 -1
- data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +11 -1
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +57 -11
- data/spec/api/integration_api_spec.rb +25 -10
- data/spec/api/management_api_spec.rb +267 -39
- data/spec/models/achievement_progress_spec.rb +6 -0
- data/spec/models/activate_user_request_spec.rb +41 -0
- data/spec/models/additional_campaign_properties_spec.rb +7 -1
- data/spec/models/analytics_data_point_spec.rb +47 -0
- data/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb +53 -0
- data/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb +53 -0
- data/spec/models/analytics_data_point_with_trend_spec.rb +47 -0
- data/spec/models/application_campaign_analytics_spec.rb +1 -19
- data/spec/models/application_campaign_stats_spec.rb +0 -6
- data/spec/models/application_cif_expression_spec.rb +71 -0
- data/spec/models/application_cif_spec.rb +89 -0
- data/spec/models/application_spec.rb +12 -0
- data/spec/models/async_coupon_deletion_job_response_spec.rb +41 -0
- data/spec/models/attribute_spec.rb +1 -1
- data/spec/models/base_loyalty_program_spec.rb +18 -6
- data/spec/models/base_notification_spec.rb +1 -1
- data/spec/models/campaign_collection_edited_notification_spec.rb +53 -0
- data/spec/models/campaign_notification_policy_spec.rb +6 -0
- data/spec/models/campaign_spec.rb +43 -1
- data/spec/models/campaign_store_budget_spec.rb +65 -0
- data/spec/models/campaign_versions_spec.rb +71 -0
- data/spec/models/card_added_deducted_points_notification_policy_spec.rb +51 -0
- data/spec/models/coupon_deletion_filters_spec.rb +123 -0
- data/spec/models/coupon_deletion_job_spec.rb +107 -0
- data/spec/models/effect_entity_spec.rb +24 -0
- data/spec/models/effect_spec.rb +24 -0
- data/spec/models/environment_spec.rb +6 -0
- data/spec/models/generate_campaign_description_spec.rb +47 -0
- data/spec/models/generate_campaign_tags_spec.rb +41 -0
- data/spec/models/generate_item_filter_description_spec.rb +41 -0
- data/spec/models/generate_loyalty_card_spec.rb +51 -0
- data/spec/models/generate_rule_title_rule_spec.rb +47 -0
- data/spec/models/generate_rule_title_spec.rb +47 -0
- data/spec/models/loyalty_balance_with_tier_spec.rb +83 -0
- data/spec/models/loyalty_balances_with_tiers_spec.rb +47 -0
- data/spec/models/loyalty_card_balances_spec.rb +53 -0
- data/spec/models/loyalty_card_batch_response_spec.rb +47 -0
- data/spec/models/loyalty_card_batch_spec.rb +57 -0
- data/spec/models/loyalty_card_spec.rb +12 -0
- data/spec/models/loyalty_program_spec.rb +30 -6
- data/spec/models/message_log_entry_spec.rb +1 -7
- data/spec/models/new_app_wide_coupon_deletion_job_spec.rb +47 -0
- data/spec/models/new_application_cif_expression_spec.rb +53 -0
- data/spec/models/new_application_cif_spec.rb +71 -0
- data/spec/models/new_application_spec.rb +6 -0
- data/spec/models/new_attribute_spec.rb +1 -1
- data/spec/models/new_coupon_deletion_job_spec.rb +41 -0
- data/spec/models/new_external_invitation_spec.rb +53 -0
- data/spec/models/new_loyalty_program_spec.rb +18 -6
- data/spec/models/new_notification_test_spec.rb +1 -1
- data/spec/models/new_outgoing_integration_webhook_spec.rb +6 -0
- data/spec/models/new_revision_version_spec.rb +105 -0
- data/spec/models/new_webhook_spec.rb +6 -0
- data/spec/models/okta_event_payload_data_spec.rb +41 -0
- data/spec/models/okta_event_payload_spec.rb +41 -0
- data/spec/models/okta_event_spec.rb +47 -0
- data/spec/models/okta_event_target_spec.rb +53 -0
- data/spec/models/projected_tier_spec.rb +53 -0
- data/spec/models/reject_coupon_effect_props_spec.rb +6 -0
- data/spec/models/reject_referral_effect_props_spec.rb +6 -0
- data/spec/models/revision_activation_spec.rb +41 -0
- data/spec/models/revision_spec.rb +95 -0
- data/spec/models/revision_version_spec.rb +153 -0
- data/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb +71 -0
- data/spec/models/rule_failure_reason_spec.rb +12 -0
- data/spec/models/scim_base_user_name_spec.rb +41 -0
- data/spec/models/scim_base_user_spec.rb +59 -0
- data/spec/models/scim_new_user_spec.rb +59 -0
- data/spec/models/scim_patch_operation_spec.rb +57 -0
- data/spec/models/scim_patch_request_spec.rb +47 -0
- data/spec/models/scim_resource_spec.rb +53 -0
- data/spec/models/scim_resource_types_list_response_spec.rb +41 -0
- data/spec/models/scim_schema_resource_spec.rb +59 -0
- data/spec/models/scim_schemas_list_response_spec.rb +53 -0
- data/spec/models/scim_service_provider_config_response_bulk_spec.rb +53 -0
- data/spec/models/scim_service_provider_config_response_change_password_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_filter_spec.rb +47 -0
- data/spec/models/scim_service_provider_config_response_patch_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_spec.rb +71 -0
- data/spec/models/scim_user_spec.rb +65 -0
- data/spec/models/scim_users_list_response_spec.rb +53 -0
- data/spec/models/sso_config_spec.rb +6 -0
- data/spec/models/tier_spec.rb +6 -0
- data/spec/models/transfer_loyalty_card_spec.rb +6 -0
- data/spec/models/update_application_cif_spec.rb +59 -0
- data/spec/models/update_application_spec.rb +12 -0
- data/spec/models/update_loyalty_card_spec.rb +6 -0
- data/spec/models/update_loyalty_program_spec.rb +18 -6
- data/spec/models/user_spec.rb +6 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
- metadata +246 -18
@@ -39,7 +39,7 @@ module TalonOne
|
|
39
39
|
# Timestamp at which point the coupon becomes valid.
|
40
40
|
attr_accessor :start_date
|
41
41
|
|
42
|
-
# Expiration date of the coupon. Coupon never expires if this is omitted
|
42
|
+
# Expiration date of the coupon. Coupon never expires if this is omitted.
|
43
43
|
attr_accessor :expiry_date
|
44
44
|
|
45
45
|
# Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured.
|
@@ -69,13 +69,13 @@ module TalonOne
|
|
69
69
|
# The ID of the Import which created this coupon.
|
70
70
|
attr_accessor :import_id
|
71
71
|
|
72
|
-
# Defines the type
|
72
|
+
# Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code.
|
73
73
|
attr_accessor :reservation
|
74
74
|
|
75
75
|
# The id of the batch the coupon belongs to.
|
76
76
|
attr_accessor :batch_id
|
77
77
|
|
78
|
-
#
|
78
|
+
# An indication of whether the code can be redeemed only if it has been reserved first.
|
79
79
|
attr_accessor :is_reservation_mandatory
|
80
80
|
|
81
81
|
# An indication of whether the coupon is implicitly reserved for all customers.
|
@@ -39,7 +39,7 @@ module TalonOne
|
|
39
39
|
# Timestamp at which point the coupon becomes valid.
|
40
40
|
attr_accessor :start_date
|
41
41
|
|
42
|
-
# Expiration date of the coupon. Coupon never expires if this is omitted
|
42
|
+
# Expiration date of the coupon. Coupon never expires if this is omitted.
|
43
43
|
attr_accessor :expiry_date
|
44
44
|
|
45
45
|
# Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured.
|
@@ -69,13 +69,13 @@ module TalonOne
|
|
69
69
|
# The ID of the Import which created this coupon.
|
70
70
|
attr_accessor :import_id
|
71
71
|
|
72
|
-
# Defines the type
|
72
|
+
# Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code.
|
73
73
|
attr_accessor :reservation
|
74
74
|
|
75
75
|
# The id of the batch the coupon belongs to.
|
76
76
|
attr_accessor :batch_id
|
77
77
|
|
78
|
-
#
|
78
|
+
# An indication of whether the code can be redeemed only if it has been reserved first.
|
79
79
|
attr_accessor :is_reservation_mandatory
|
80
80
|
|
81
81
|
# An indication of whether the coupon is implicitly reserved for all customers.
|
@@ -24,7 +24,7 @@ module TalonOne
|
|
24
24
|
# Timestamp at which point the referral code becomes valid.
|
25
25
|
attr_accessor :start_date
|
26
26
|
|
27
|
-
# Expiration date of the referral code. Referral never expires if this is omitted
|
27
|
+
# Expiration date of the referral code. Referral never expires if this is omitted.
|
28
28
|
attr_accessor :expiry_date
|
29
29
|
|
30
30
|
# The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply.
|
@@ -0,0 +1,276 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
|
5
|
+
|
6
|
+
The version of the OpenAPI document:
|
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
|
+
#
|
17
|
+
class LoyaltyBalanceWithTier
|
18
|
+
# Total amount of points awarded to this customer and available to spend.
|
19
|
+
attr_accessor :active_points
|
20
|
+
|
21
|
+
# Total amount of points awarded to this customer but not available until their start date.
|
22
|
+
attr_accessor :pending_points
|
23
|
+
|
24
|
+
# Total amount of points already spent by this customer.
|
25
|
+
attr_accessor :spent_points
|
26
|
+
|
27
|
+
# Total amount of points awarded but never redeemed. They cannot be used anymore.
|
28
|
+
attr_accessor :expired_points
|
29
|
+
|
30
|
+
attr_accessor :current_tier
|
31
|
+
|
32
|
+
attr_accessor :projected_tier
|
33
|
+
|
34
|
+
# The number of points required to move up a tier.
|
35
|
+
attr_accessor :points_to_next_tier
|
36
|
+
|
37
|
+
# The name of the tier consecutive to the current tier.
|
38
|
+
attr_accessor :next_tier_name
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'active_points' => :'activePoints',
|
44
|
+
:'pending_points' => :'pendingPoints',
|
45
|
+
:'spent_points' => :'spentPoints',
|
46
|
+
:'expired_points' => :'expiredPoints',
|
47
|
+
:'current_tier' => :'currentTier',
|
48
|
+
:'projected_tier' => :'projectedTier',
|
49
|
+
:'points_to_next_tier' => :'pointsToNextTier',
|
50
|
+
:'next_tier_name' => :'nextTierName'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'active_points' => :'Float',
|
58
|
+
:'pending_points' => :'Float',
|
59
|
+
:'spent_points' => :'Float',
|
60
|
+
:'expired_points' => :'Float',
|
61
|
+
:'current_tier' => :'Tier',
|
62
|
+
:'projected_tier' => :'ProjectedTier',
|
63
|
+
:'points_to_next_tier' => :'Float',
|
64
|
+
:'next_tier_name' => :'String'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# List of attributes with nullable: true
|
69
|
+
def self.openapi_nullable
|
70
|
+
Set.new([
|
71
|
+
])
|
72
|
+
end
|
73
|
+
|
74
|
+
# Initializes the object
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
+
def initialize(attributes = {})
|
77
|
+
if (!attributes.is_a?(Hash))
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyBalanceWithTier` initialize method"
|
79
|
+
end
|
80
|
+
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
83
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyBalanceWithTier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
85
|
+
end
|
86
|
+
h[k.to_sym] = v
|
87
|
+
}
|
88
|
+
|
89
|
+
if attributes.key?(:'active_points')
|
90
|
+
self.active_points = attributes[:'active_points']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'pending_points')
|
94
|
+
self.pending_points = attributes[:'pending_points']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'spent_points')
|
98
|
+
self.spent_points = attributes[:'spent_points']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'expired_points')
|
102
|
+
self.expired_points = attributes[:'expired_points']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'current_tier')
|
106
|
+
self.current_tier = attributes[:'current_tier']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'projected_tier')
|
110
|
+
self.projected_tier = attributes[:'projected_tier']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'points_to_next_tier')
|
114
|
+
self.points_to_next_tier = attributes[:'points_to_next_tier']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'next_tier_name')
|
118
|
+
self.next_tier_name = attributes[:'next_tier_name']
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
123
|
+
# @return Array for valid properties with the reasons
|
124
|
+
def list_invalid_properties
|
125
|
+
invalid_properties = Array.new
|
126
|
+
invalid_properties
|
127
|
+
end
|
128
|
+
|
129
|
+
# Check to see if the all the properties in the model are valid
|
130
|
+
# @return true if the model is valid
|
131
|
+
def valid?
|
132
|
+
true
|
133
|
+
end
|
134
|
+
|
135
|
+
# Checks equality by comparing each attribute.
|
136
|
+
# @param [Object] Object to be compared
|
137
|
+
def ==(o)
|
138
|
+
return true if self.equal?(o)
|
139
|
+
self.class == o.class &&
|
140
|
+
active_points == o.active_points &&
|
141
|
+
pending_points == o.pending_points &&
|
142
|
+
spent_points == o.spent_points &&
|
143
|
+
expired_points == o.expired_points &&
|
144
|
+
current_tier == o.current_tier &&
|
145
|
+
projected_tier == o.projected_tier &&
|
146
|
+
points_to_next_tier == o.points_to_next_tier &&
|
147
|
+
next_tier_name == o.next_tier_name
|
148
|
+
end
|
149
|
+
|
150
|
+
# @see the `==` method
|
151
|
+
# @param [Object] Object to be compared
|
152
|
+
def eql?(o)
|
153
|
+
self == o
|
154
|
+
end
|
155
|
+
|
156
|
+
# Calculates hash code according to all attributes.
|
157
|
+
# @return [Integer] Hash code
|
158
|
+
def hash
|
159
|
+
[active_points, pending_points, spent_points, expired_points, current_tier, projected_tier, points_to_next_tier, next_tier_name].hash
|
160
|
+
end
|
161
|
+
|
162
|
+
# Builds the object from hash
|
163
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
164
|
+
# @return [Object] Returns the model itself
|
165
|
+
def self.build_from_hash(attributes)
|
166
|
+
new.build_from_hash(attributes)
|
167
|
+
end
|
168
|
+
|
169
|
+
# Builds the object from hash
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
# @return [Object] Returns the model itself
|
172
|
+
def build_from_hash(attributes)
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
174
|
+
self.class.openapi_types.each_pair do |key, type|
|
175
|
+
if type =~ /\AArray<(.*)>/i
|
176
|
+
# check to ensure the input is an array given that the attribute
|
177
|
+
# is documented as an array but the input is not
|
178
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
179
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
180
|
+
end
|
181
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
182
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
183
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
184
|
+
end
|
185
|
+
|
186
|
+
self
|
187
|
+
end
|
188
|
+
|
189
|
+
# Deserializes the data based on type
|
190
|
+
# @param string type Data type
|
191
|
+
# @param string value Value to be deserialized
|
192
|
+
# @return [Object] Deserialized data
|
193
|
+
def _deserialize(type, value)
|
194
|
+
case type.to_sym
|
195
|
+
when :DateTime
|
196
|
+
DateTime.parse(value)
|
197
|
+
when :Date
|
198
|
+
Date.parse(value)
|
199
|
+
when :String
|
200
|
+
value.to_s
|
201
|
+
when :Integer
|
202
|
+
value.to_i
|
203
|
+
when :Float
|
204
|
+
value.to_f
|
205
|
+
when :Boolean
|
206
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
207
|
+
true
|
208
|
+
else
|
209
|
+
false
|
210
|
+
end
|
211
|
+
when :Object
|
212
|
+
# generic object (usually a Hash), return directly
|
213
|
+
value
|
214
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
215
|
+
inner_type = Regexp.last_match[:inner_type]
|
216
|
+
value.map { |v| _deserialize(inner_type, v) }
|
217
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
218
|
+
k_type = Regexp.last_match[:k_type]
|
219
|
+
v_type = Regexp.last_match[:v_type]
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each do |k, v|
|
222
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
else # model
|
226
|
+
TalonOne.const_get(type).build_from_hash(value)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
# Returns the string representation of the object
|
231
|
+
# @return [String] String presentation of the object
|
232
|
+
def to_s
|
233
|
+
to_hash.to_s
|
234
|
+
end
|
235
|
+
|
236
|
+
# to_body is an alias to to_hash (backward compatibility)
|
237
|
+
# @return [Hash] Returns the object in the form of hash
|
238
|
+
def to_body
|
239
|
+
to_hash
|
240
|
+
end
|
241
|
+
|
242
|
+
# Returns the object in the form of hash
|
243
|
+
# @return [Hash] Returns the object in the form of hash
|
244
|
+
def to_hash
|
245
|
+
hash = {}
|
246
|
+
self.class.attribute_map.each_pair do |attr, param|
|
247
|
+
value = self.send(attr)
|
248
|
+
if value.nil?
|
249
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
250
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
251
|
+
end
|
252
|
+
|
253
|
+
hash[param] = _to_hash(value)
|
254
|
+
end
|
255
|
+
hash
|
256
|
+
end
|
257
|
+
|
258
|
+
# Outputs non-array value in the form of hash
|
259
|
+
# For object, use to_hash. Otherwise, just return the value
|
260
|
+
# @param [Object] value Any valid value
|
261
|
+
# @return [Hash] Returns the value in the form of hash
|
262
|
+
def _to_hash(value)
|
263
|
+
if value.is_a?(Array)
|
264
|
+
value.compact.map { |v| _to_hash(v) }
|
265
|
+
elsif value.is_a?(Hash)
|
266
|
+
{}.tap do |hash|
|
267
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
268
|
+
end
|
269
|
+
elsif value.respond_to? :to_hash
|
270
|
+
value.to_hash
|
271
|
+
else
|
272
|
+
value
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
@@ -0,0 +1,219 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
|
5
|
+
|
6
|
+
The version of the OpenAPI document:
|
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
|
+
# List of loyalty balances for a ledger and its subledgers.
|
17
|
+
class LoyaltyBalancesWithTiers
|
18
|
+
attr_accessor :balance
|
19
|
+
|
20
|
+
# Map of the loyalty balances of the subledgers of a ledger.
|
21
|
+
attr_accessor :subledger_balances
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'balance' => :'balance',
|
27
|
+
:'subledger_balances' => :'subledgerBalances'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'balance' => :'LoyaltyBalanceWithTier',
|
35
|
+
:'subledger_balances' => :'Hash<String, LoyaltyBalanceWithTier>'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyBalancesWithTiers` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyBalancesWithTiers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'balance')
|
61
|
+
self.balance = attributes[:'balance']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.key?(:'subledger_balances')
|
65
|
+
if (value = attributes[:'subledger_balances']).is_a?(Hash)
|
66
|
+
self.subledger_balances = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
+
# @return Array for valid properties with the reasons
|
73
|
+
def list_invalid_properties
|
74
|
+
invalid_properties = Array.new
|
75
|
+
invalid_properties
|
76
|
+
end
|
77
|
+
|
78
|
+
# Check to see if the all the properties in the model are valid
|
79
|
+
# @return true if the model is valid
|
80
|
+
def valid?
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
balance == o.balance &&
|
90
|
+
subledger_balances == o.subledger_balances
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[balance, subledger_balances].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
new.build_from_hash(attributes)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
self.class.openapi_types.each_pair do |key, type|
|
118
|
+
if type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def _deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :DateTime
|
139
|
+
DateTime.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value.to_s
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :Boolean
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
TalonOne.const_get(type).build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
if value.nil?
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
|
+
end
|
195
|
+
|
196
|
+
hash[param] = _to_hash(value)
|
197
|
+
end
|
198
|
+
hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -24,9 +24,12 @@ module TalonOne
|
|
24
24
|
# The ID of the loyalty program that owns this entity.
|
25
25
|
attr_accessor :program_id
|
26
26
|
|
27
|
-
# Status of the loyalty card. Can be
|
27
|
+
# Status of the loyalty card. Can be `active` or `inactive`.
|
28
28
|
attr_accessor :status
|
29
29
|
|
30
|
+
# Reason for transferring and blocking the loyalty card.
|
31
|
+
attr_accessor :block_reason
|
32
|
+
|
30
33
|
# The alphanumeric identifier of the loyalty card.
|
31
34
|
attr_accessor :identifier
|
32
35
|
|
@@ -50,6 +53,9 @@ module TalonOne
|
|
50
53
|
# The alphanumeric identifier of the loyalty card.
|
51
54
|
attr_accessor :new_card_identifier
|
52
55
|
|
56
|
+
# The ID of the batch in which the loyalty card was created.
|
57
|
+
attr_accessor :batch_id
|
58
|
+
|
53
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
60
|
def self.attribute_map
|
55
61
|
{
|
@@ -57,6 +63,7 @@ module TalonOne
|
|
57
63
|
:'created' => :'created',
|
58
64
|
:'program_id' => :'programID',
|
59
65
|
:'status' => :'status',
|
66
|
+
:'block_reason' => :'blockReason',
|
60
67
|
:'identifier' => :'identifier',
|
61
68
|
:'users_per_card_limit' => :'usersPerCardLimit',
|
62
69
|
:'profiles' => :'profiles',
|
@@ -64,7 +71,8 @@ module TalonOne
|
|
64
71
|
:'subledgers' => :'subledgers',
|
65
72
|
:'modified' => :'modified',
|
66
73
|
:'old_card_identifier' => :'oldCardIdentifier',
|
67
|
-
:'new_card_identifier' => :'newCardIdentifier'
|
74
|
+
:'new_card_identifier' => :'newCardIdentifier',
|
75
|
+
:'batch_id' => :'batchId'
|
68
76
|
}
|
69
77
|
end
|
70
78
|
|
@@ -75,6 +83,7 @@ module TalonOne
|
|
75
83
|
:'created' => :'DateTime',
|
76
84
|
:'program_id' => :'Integer',
|
77
85
|
:'status' => :'String',
|
86
|
+
:'block_reason' => :'String',
|
78
87
|
:'identifier' => :'String',
|
79
88
|
:'users_per_card_limit' => :'Integer',
|
80
89
|
:'profiles' => :'Array<LoyaltyCardProfileRegistration>',
|
@@ -82,7 +91,8 @@ module TalonOne
|
|
82
91
|
:'subledgers' => :'Hash<String, LedgerInfo>',
|
83
92
|
:'modified' => :'DateTime',
|
84
93
|
:'old_card_identifier' => :'String',
|
85
|
-
:'new_card_identifier' => :'String'
|
94
|
+
:'new_card_identifier' => :'String',
|
95
|
+
:'batch_id' => :'String'
|
86
96
|
}
|
87
97
|
end
|
88
98
|
|
@@ -123,6 +133,10 @@ module TalonOne
|
|
123
133
|
self.status = attributes[:'status']
|
124
134
|
end
|
125
135
|
|
136
|
+
if attributes.key?(:'block_reason')
|
137
|
+
self.block_reason = attributes[:'block_reason']
|
138
|
+
end
|
139
|
+
|
126
140
|
if attributes.key?(:'identifier')
|
127
141
|
self.identifier = attributes[:'identifier']
|
128
142
|
end
|
@@ -158,6 +172,10 @@ module TalonOne
|
|
158
172
|
if attributes.key?(:'new_card_identifier')
|
159
173
|
self.new_card_identifier = attributes[:'new_card_identifier']
|
160
174
|
end
|
175
|
+
|
176
|
+
if attributes.key?(:'batch_id')
|
177
|
+
self.batch_id = attributes[:'batch_id']
|
178
|
+
end
|
161
179
|
end
|
162
180
|
|
163
181
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -280,6 +298,7 @@ module TalonOne
|
|
280
298
|
created == o.created &&
|
281
299
|
program_id == o.program_id &&
|
282
300
|
status == o.status &&
|
301
|
+
block_reason == o.block_reason &&
|
283
302
|
identifier == o.identifier &&
|
284
303
|
users_per_card_limit == o.users_per_card_limit &&
|
285
304
|
profiles == o.profiles &&
|
@@ -287,7 +306,8 @@ module TalonOne
|
|
287
306
|
subledgers == o.subledgers &&
|
288
307
|
modified == o.modified &&
|
289
308
|
old_card_identifier == o.old_card_identifier &&
|
290
|
-
new_card_identifier == o.new_card_identifier
|
309
|
+
new_card_identifier == o.new_card_identifier &&
|
310
|
+
batch_id == o.batch_id
|
291
311
|
end
|
292
312
|
|
293
313
|
# @see the `==` method
|
@@ -299,7 +319,7 @@ module TalonOne
|
|
299
319
|
# Calculates hash code according to all attributes.
|
300
320
|
# @return [Integer] Hash code
|
301
321
|
def hash
|
302
|
-
[id, created, program_id, status, identifier, users_per_card_limit, profiles, ledger, subledgers, modified, old_card_identifier, new_card_identifier].hash
|
322
|
+
[id, created, program_id, status, block_reason, identifier, users_per_card_limit, profiles, ledger, subledgers, modified, old_card_identifier, new_card_identifier, batch_id].hash
|
303
323
|
end
|
304
324
|
|
305
325
|
# Builds the object from hash
|