talon_one 7.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +27 -12
- data/docs/Achievement.md +6 -4
- data/docs/AchievementAdditionalProperties.md +5 -3
- data/docs/AchievementBase.md +35 -0
- data/docs/AchievementProgress.md +3 -15
- data/docs/AchievementProgressWithDefinition.md +45 -0
- data/docs/AchievementStatusEntry.md +45 -0
- data/docs/AddFreeItemEffectProps.md +3 -1
- data/docs/AdditionalCampaignProperties.md +4 -2
- data/docs/AnalyticsProduct.md +6 -6
- data/docs/AnalyticsSKU.md +23 -0
- data/docs/ApplicationCIF.md +1 -1
- data/docs/ApplicationCIFExpression.md +1 -1
- data/docs/ApplicationCIFReferences.md +19 -0
- data/docs/ApplicationEntity.md +1 -1
- data/docs/ApplicationEvent.md +1 -1
- data/docs/ApplicationReferee.md +1 -1
- data/docs/ApplicationSession.md +2 -2
- data/docs/Audience.md +1 -1
- data/docs/BaseLoyaltyProgram.md +1 -1
- data/docs/Binding.md +1 -1
- data/docs/Campaign.md +4 -2
- data/docs/CampaignDetail.md +19 -0
- data/docs/CampaignEvaluationGroup.md +1 -1
- data/docs/CampaignNotificationPolicy.md +3 -1
- data/docs/CampaignSet.md +1 -1
- data/docs/CampaignStoreBudget.md +1 -1
- data/docs/CampaignStoreBudgetLimitConfig.md +25 -0
- data/docs/CampaignTemplate.md +3 -1
- data/docs/CardExpiringPointsNotificationPolicy.md +3 -1
- data/docs/CatalogsStrikethroughNotificationPolicy.md +3 -1
- data/docs/CouponCreationJob.md +1 -1
- data/docs/CouponDeletionJob.md +1 -1
- data/docs/CouponsNotificationPolicy.md +5 -1
- data/docs/CreateAchievement.md +1 -1
- data/docs/CustomerInventory.md +1 -1
- data/docs/CustomerSession.md +1 -1
- data/docs/CustomerSessionV2.md +2 -4
- data/docs/Environment.md +1 -1
- data/docs/Event.md +1 -1
- data/docs/ExpiringCouponsNotificationPolicy.md +3 -1
- data/docs/ExpiringPointsNotificationPolicy.md +3 -1
- data/docs/HiddenConditionsEffects.md +23 -0
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse20010.md +3 -3
- data/docs/InlineResponse20011.md +3 -3
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +1 -1
- data/docs/InlineResponse20014.md +1 -1
- data/docs/InlineResponse20015.md +3 -3
- data/docs/InlineResponse20016.md +3 -3
- data/docs/InlineResponse20017.md +3 -5
- data/docs/InlineResponse20018.md +2 -2
- data/docs/InlineResponse20019.md +3 -3
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse20020.md +5 -3
- data/docs/InlineResponse20021.md +3 -5
- data/docs/InlineResponse20022.md +2 -4
- data/docs/InlineResponse20023.md +3 -5
- data/docs/InlineResponse20024.md +5 -3
- data/docs/InlineResponse20025.md +4 -2
- data/docs/InlineResponse20026.md +3 -1
- data/docs/InlineResponse20027.md +1 -1
- data/docs/InlineResponse20028.md +3 -3
- data/docs/InlineResponse20029.md +1 -3
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse20030.md +2 -2
- data/docs/InlineResponse20031.md +3 -3
- data/docs/InlineResponse20032.md +1 -1
- data/docs/InlineResponse20033.md +3 -3
- data/docs/InlineResponse20034.md +1 -3
- data/docs/InlineResponse20035.md +5 -3
- data/docs/InlineResponse20036.md +1 -1
- data/docs/InlineResponse20037.md +5 -3
- data/docs/InlineResponse20038.md +1 -1
- data/docs/InlineResponse20039.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse20040.md +1 -1
- data/docs/InlineResponse20041.md +2 -4
- data/docs/InlineResponse20042.md +1 -1
- data/docs/InlineResponse20043.md +1 -1
- data/docs/InlineResponse20044.md +4 -4
- data/docs/InlineResponse20045.md +3 -3
- data/docs/InlineResponse20046.md +3 -3
- data/docs/InlineResponse20047.md +5 -3
- data/docs/InlineResponse20048.md +19 -0
- data/docs/InlineResponse20049.md +19 -0
- data/docs/InlineResponse2005.md +3 -3
- data/docs/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +3 -3
- data/docs/IntegrationApi.md +159 -19
- data/docs/LedgerInfo.md +4 -0
- data/docs/LedgerTransactionLogEntryIntegrationAPI.md +3 -1
- data/docs/LimitCounter.md +1 -1
- data/docs/LoyaltyBalance.md +3 -1
- data/docs/LoyaltyBalanceWithTier.md +2 -0
- data/docs/LoyaltyBalances.md +1 -1
- data/docs/LoyaltyBalancesWithTiers.md +1 -1
- data/docs/LoyaltyCardBalances.md +1 -1
- data/docs/LoyaltyLedger.md +1 -1
- data/docs/LoyaltyLedgerEntry.md +3 -1
- data/docs/LoyaltyLedgerEntryFlags.md +17 -0
- data/docs/LoyaltyProgram.md +1 -1
- data/docs/LoyaltyProgramBalance.md +5 -1
- data/docs/LoyaltyProgramTransaction.md +3 -1
- data/docs/LoyaltySubLedger.md +2 -0
- data/docs/ManagementApi.md +345 -436
- data/docs/ManagementKey.md +3 -1
- data/docs/MessageTest.md +27 -0
- data/docs/ModelReturn.md +1 -1
- data/docs/NewAudience.md +1 -1
- data/docs/NewCampaignSet.md +1 -1
- data/docs/NewLoyaltyProgram.md +1 -1
- data/docs/NewManagementKey.md +2 -0
- data/docs/NewMessageTest.md +29 -0
- data/docs/PendingPointsNotificationPolicy.md +3 -1
- data/docs/ProductSearchMatch.md +2 -2
- data/docs/ProductUnitAnalytics.md +4 -10
- data/docs/ProductUnitAnalyticsDataPoint.md +25 -0
- data/docs/ProductUnitAnalyticsTotals.md +17 -0
- data/docs/SkuUnitAnalytics.md +19 -0
- data/docs/SkuUnitAnalyticsDataPoint.md +23 -0
- data/docs/Store.md +1 -1
- data/docs/StrikethroughEffect.md +5 -1
- data/docs/StrikethroughLabelingNotification.md +6 -2
- data/docs/SummaryCampaignStoreBudget.md +3 -1
- data/docs/TemplateDef.md +1 -1
- data/docs/TierDowngradeNotificationPolicy.md +3 -1
- data/docs/TierUpgradeNotificationPolicy.md +3 -1
- data/docs/TierWillDowngradeNotificationPolicy.md +2 -0
- data/docs/UpdateAchievement.md +2 -2
- data/docs/UpdateLoyaltyProgram.md +1 -1
- data/lib/talon_one/api/integration_api.rb +223 -29
- data/lib/talon_one/api/management_api.rb +434 -518
- data/lib/talon_one/models/achievement.rb +27 -15
- data/lib/talon_one/models/achievement_additional_properties.rb +49 -10
- data/lib/talon_one/models/achievement_base.rb +377 -0
- data/lib/talon_one/models/achievement_progress.rb +4 -137
- data/lib/talon_one/models/achievement_progress_with_definition.rb +490 -0
- data/lib/talon_one/models/achievement_status_entry.rb +472 -0
- data/lib/talon_one/models/add_free_item_effect_props.rb +14 -4
- data/lib/talon_one/models/additional_campaign_properties.rb +16 -9
- data/lib/talon_one/models/analytics_product.rb +20 -21
- data/lib/talon_one/models/analytics_sku.rb +246 -0
- data/lib/talon_one/models/application_api_key.rb +2 -2
- data/lib/talon_one/models/application_cif.rb +1 -1
- data/lib/talon_one/models/application_cif_expression.rb +1 -1
- data/lib/talon_one/models/application_cif_references.rb +219 -0
- 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_referee.rb +1 -1
- data/lib/talon_one/models/application_session.rb +2 -2
- data/lib/talon_one/models/audience.rb +1 -1
- data/lib/talon_one/models/base_loyalty_program.rb +3 -3
- data/lib/talon_one/models/campaign.rb +14 -7
- data/lib/talon_one/models/campaign_detail.rb +232 -0
- data/lib/talon_one/models/campaign_evaluation_group.rb +1 -1
- data/lib/talon_one/models/campaign_notification_policy.rb +14 -4
- data/lib/talon_one/models/campaign_set.rb +1 -1
- data/lib/talon_one/models/campaign_store_budget.rb +1 -1
- data/lib/talon_one/models/campaign_store_budget_limit_config.rb +322 -0
- data/lib/talon_one/models/campaign_template.rb +16 -4
- data/lib/talon_one/models/card_expiring_points_notification_policy.rb +14 -4
- data/lib/talon_one/models/catalogs_strikethrough_notification_policy.rb +38 -4
- data/lib/talon_one/models/coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/coupon_deletion_job.rb +1 -1
- data/lib/talon_one/models/coupons_notification_policy.rb +24 -4
- data/lib/talon_one/models/create_achievement.rb +0 -5
- data/lib/talon_one/models/create_application_api_key.rb +2 -2
- data/lib/talon_one/models/customer_inventory.rb +1 -1
- data/lib/talon_one/models/customer_session.rb +1 -1
- data/lib/talon_one/models/customer_session_v2.rb +5 -15
- data/lib/talon_one/models/delete_user_request.rb +0 -1
- data/lib/talon_one/models/environment.rb +1 -1
- data/lib/talon_one/models/event.rb +1 -1
- data/lib/talon_one/models/expiring_coupons_notification_policy.rb +14 -4
- data/lib/talon_one/models/expiring_points_notification_policy.rb +14 -4
- data/lib/talon_one/models/hidden_conditions_effects.rb +246 -0
- data/lib/talon_one/models/inline_response2001.rb +11 -11
- data/lib/talon_one/models/inline_response20010.rb +11 -11
- data/lib/talon_one/models/inline_response20011.rb +11 -11
- data/lib/talon_one/models/inline_response20012.rb +1 -1
- 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 +11 -11
- data/lib/talon_one/models/inline_response20016.rb +11 -13
- data/lib/talon_one/models/inline_response20017.rb +7 -11
- data/lib/talon_one/models/inline_response20018.rb +1 -1
- data/lib/talon_one/models/inline_response20019.rb +3 -1
- data/lib/talon_one/models/inline_response2002.rb +11 -11
- data/lib/talon_one/models/inline_response20020.rb +11 -7
- data/lib/talon_one/models/inline_response20021.rb +7 -11
- data/lib/talon_one/models/inline_response20022.rb +7 -11
- data/lib/talon_one/models/inline_response20023.rb +7 -11
- data/lib/talon_one/models/inline_response20024.rb +11 -7
- data/lib/talon_one/models/inline_response20025.rb +11 -7
- data/lib/talon_one/models/inline_response20026.rb +11 -2
- data/lib/talon_one/models/inline_response20027.rb +1 -1
- data/lib/talon_one/models/inline_response20028.rb +11 -11
- data/lib/talon_one/models/inline_response20029.rb +2 -11
- data/lib/talon_one/models/inline_response2003.rb +1 -1
- data/lib/talon_one/models/inline_response20030.rb +6 -1
- data/lib/talon_one/models/inline_response20031.rb +13 -8
- data/lib/talon_one/models/inline_response20032.rb +1 -1
- data/lib/talon_one/models/inline_response20033.rb +8 -13
- data/lib/talon_one/models/inline_response20034.rb +2 -11
- data/lib/talon_one/models/inline_response20035.rb +11 -7
- data/lib/talon_one/models/inline_response20036.rb +1 -1
- data/lib/talon_one/models/inline_response20037.rb +11 -7
- data/lib/talon_one/models/inline_response20038.rb +1 -1
- data/lib/talon_one/models/inline_response20039.rb +1 -1
- data/lib/talon_one/models/inline_response2004.rb +1 -1
- data/lib/talon_one/models/inline_response20040.rb +1 -1
- data/lib/talon_one/models/inline_response20041.rb +7 -11
- data/lib/talon_one/models/inline_response20042.rb +1 -1
- data/lib/talon_one/models/inline_response20043.rb +1 -1
- data/lib/talon_one/models/inline_response20044.rb +11 -11
- data/lib/talon_one/models/inline_response20045.rb +13 -8
- data/lib/talon_one/models/inline_response20046.rb +11 -11
- data/lib/talon_one/models/inline_response20047.rb +11 -7
- data/lib/talon_one/models/inline_response20048.rb +222 -0
- data/lib/talon_one/models/inline_response20049.rb +227 -0
- data/lib/talon_one/models/inline_response2005.rb +11 -11
- data/lib/talon_one/models/inline_response2006.rb +11 -11
- 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 +11 -11
- data/lib/talon_one/models/ledger_info.rb +31 -1
- data/lib/talon_one/models/ledger_transaction_log_entry_integration_api.rb +13 -4
- data/lib/talon_one/models/limit_counter.rb +1 -1
- data/lib/talon_one/models/loyalty_balance.rb +14 -4
- data/lib/talon_one/models/loyalty_balance_with_tier.rb +11 -1
- data/lib/talon_one/models/loyalty_ledger_entry.rb +13 -4
- data/lib/talon_one/models/loyalty_ledger_entry_flags.rb +208 -0
- data/lib/talon_one/models/loyalty_program.rb +3 -3
- data/lib/talon_one/models/loyalty_program_balance.rb +34 -4
- data/lib/talon_one/models/loyalty_program_transaction.rb +13 -4
- data/lib/talon_one/models/loyalty_sub_ledger.rb +16 -1
- data/lib/talon_one/models/management_key.rb +14 -4
- data/lib/talon_one/models/message_test.rb +227 -0
- data/lib/talon_one/models/model_return.rb +1 -1
- data/lib/talon_one/models/new_application_api_key.rb +2 -2
- data/lib/talon_one/models/new_audience.rb +1 -1
- data/lib/talon_one/models/new_campaign_set.rb +1 -1
- data/lib/talon_one/models/new_loyalty_program.rb +3 -3
- data/lib/talon_one/models/new_management_key.rb +11 -1
- data/lib/talon_one/models/new_message_test.rb +322 -0
- data/lib/talon_one/models/pending_points_notification_policy.rb +14 -4
- data/lib/talon_one/models/product.rb +0 -19
- data/lib/talon_one/models/product_search_match.rb +1 -6
- data/lib/talon_one/models/product_unit_analytics.rb +21 -65
- data/lib/talon_one/models/product_unit_analytics_data_point.rb +271 -0
- data/lib/talon_one/models/product_unit_analytics_totals.rb +206 -0
- data/lib/talon_one/models/sku_unit_analytics.rb +227 -0
- data/lib/talon_one/models/sku_unit_analytics_data_point.rb +256 -0
- data/lib/talon_one/models/store.rb +1 -1
- data/lib/talon_one/models/strikethrough_effect.rb +24 -4
- data/lib/talon_one/models/strikethrough_labeling_notification.rb +56 -2
- data/lib/talon_one/models/summary_campaign_store_budget.rb +18 -4
- data/lib/talon_one/models/template_def.rb +1 -1
- data/lib/talon_one/models/tier_downgrade_notification_policy.rb +14 -4
- data/lib/talon_one/models/tier_upgrade_notification_policy.rb +14 -4
- data/lib/talon_one/models/tier_will_downgrade_notification_policy.rb +11 -1
- data/lib/talon_one/models/update_achievement.rb +2 -2
- data/lib/talon_one/models/update_loyalty_program.rb +3 -3
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +20 -5
- data/spec/api/integration_api_spec.rb +46 -9
- data/spec/api/management_api_spec.rb +132 -144
- data/spec/models/achievement_additional_properties_spec.rb +10 -0
- data/spec/models/achievement_base_spec.rb +103 -0
- data/spec/models/achievement_progress_spec.rb +1 -37
- data/spec/models/achievement_progress_with_definition_spec.rb +137 -0
- data/spec/models/achievement_spec.rb +10 -0
- data/spec/models/achievement_status_entry_spec.rb +137 -0
- data/spec/models/add_free_item_effect_props_spec.rb +6 -0
- data/spec/models/additional_campaign_properties_spec.rb +6 -0
- data/spec/models/analytics_product_spec.rb +3 -3
- data/spec/models/analytics_sku_spec.rb +59 -0
- data/spec/models/application_api_key_spec.rb +1 -1
- data/spec/models/application_cif_references_spec.rb +47 -0
- data/spec/models/base_loyalty_program_spec.rb +1 -1
- data/spec/models/campaign_detail_spec.rb +47 -0
- data/spec/models/campaign_notification_policy_spec.rb +6 -0
- data/spec/models/campaign_spec.rb +6 -0
- data/spec/models/campaign_store_budget_limit_config_spec.rb +73 -0
- data/spec/models/campaign_template_spec.rb +6 -0
- data/spec/models/card_expiring_points_notification_policy_spec.rb +6 -0
- data/spec/models/catalogs_strikethrough_notification_policy_spec.rb +6 -0
- data/spec/models/coupons_notification_policy_spec.rb +12 -0
- data/spec/models/create_application_api_key_spec.rb +1 -1
- data/spec/models/customer_session_v2_spec.rb +0 -6
- data/spec/models/expiring_coupons_notification_policy_spec.rb +6 -0
- data/spec/models/expiring_points_notification_policy_spec.rb +6 -0
- data/spec/models/hidden_conditions_effects_spec.rb +59 -0
- data/spec/models/inline_response20010_spec.rb +1 -1
- data/spec/models/inline_response20011_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 +0 -6
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response20020_spec.rb +6 -0
- data/spec/models/inline_response20021_spec.rb +0 -6
- data/spec/models/inline_response20022_spec.rb +0 -6
- data/spec/models/inline_response20023_spec.rb +0 -6
- data/spec/models/inline_response20024_spec.rb +6 -0
- data/spec/models/inline_response20025_spec.rb +6 -0
- data/spec/models/inline_response20026_spec.rb +6 -0
- data/spec/models/inline_response20028_spec.rb +1 -1
- data/spec/models/inline_response20029_spec.rb +0 -6
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response20031_spec.rb +1 -1
- data/spec/models/inline_response20033_spec.rb +1 -1
- data/spec/models/inline_response20034_spec.rb +0 -6
- data/spec/models/inline_response20035_spec.rb +6 -0
- data/spec/models/inline_response20037_spec.rb +6 -0
- data/spec/models/inline_response20041_spec.rb +0 -6
- data/spec/models/inline_response20044_spec.rb +2 -2
- data/spec/models/inline_response20045_spec.rb +1 -1
- data/spec/models/inline_response20046_spec.rb +1 -1
- data/spec/models/inline_response20047_spec.rb +6 -0
- data/spec/models/inline_response20048_spec.rb +47 -0
- data/spec/models/inline_response20049_spec.rb +47 -0
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response2006_spec.rb +1 -1
- data/spec/models/inline_response2009_spec.rb +1 -1
- data/spec/models/ledger_info_spec.rb +12 -0
- data/spec/models/ledger_transaction_log_entry_integration_api_spec.rb +6 -0
- data/spec/models/loyalty_balance_spec.rb +6 -0
- data/spec/models/loyalty_balance_with_tier_spec.rb +6 -0
- data/spec/models/loyalty_ledger_entry_flags_spec.rb +41 -0
- data/spec/models/loyalty_ledger_entry_spec.rb +6 -0
- data/spec/models/loyalty_program_balance_spec.rb +12 -0
- data/spec/models/loyalty_program_spec.rb +1 -1
- data/spec/models/loyalty_program_transaction_spec.rb +6 -0
- data/spec/models/loyalty_sub_ledger_spec.rb +6 -0
- data/spec/models/management_key_spec.rb +6 -0
- data/spec/models/message_test_spec.rb +47 -0
- data/spec/models/new_application_api_key_spec.rb +1 -1
- data/spec/models/new_loyalty_program_spec.rb +1 -1
- data/spec/models/new_management_key_spec.rb +6 -0
- data/spec/models/new_message_test_spec.rb +79 -0
- data/spec/models/pending_points_notification_policy_spec.rb +6 -0
- data/spec/models/product_unit_analytics_data_point_spec.rb +65 -0
- data/spec/models/product_unit_analytics_spec.rb +2 -20
- data/spec/models/product_unit_analytics_totals_spec.rb +41 -0
- data/spec/models/revision_activation_request_spec.rb +47 -0
- data/spec/models/sku_unit_analytics_data_point_spec.rb +59 -0
- data/spec/models/sku_unit_analytics_spec.rb +47 -0
- data/spec/models/strikethrough_effect_spec.rb +12 -0
- data/spec/models/strikethrough_labeling_notification_spec.rb +16 -0
- data/spec/models/summary_campaign_store_budget_spec.rb +6 -0
- data/spec/models/tier_downgrade_notification_policy_spec.rb +6 -0
- data/spec/models/tier_upgrade_notification_policy_spec.rb +6 -0
- data/spec/models/tier_will_downgrade_notification_policy_spec.rb +6 -0
- data/spec/models/update_loyalty_program_spec.rb +1 -1
- metadata +578 -508
@@ -21,6 +21,9 @@ module TalonOne
|
|
21
21
|
# Sum of pending points.
|
22
22
|
attr_accessor :pending_balance
|
23
23
|
|
24
|
+
# Sum of negative points. This implies that `currentBalance` is `0`.
|
25
|
+
attr_accessor :negative_balance
|
26
|
+
|
24
27
|
# **DEPRECATED** Value is shown as 0.
|
25
28
|
attr_accessor :expired_balance
|
26
29
|
|
@@ -33,6 +36,9 @@ module TalonOne
|
|
33
36
|
# The tentative points balance, reflecting the `pendingBalance` and all point additions with a future activation date within the current open customer session. When the session is closed, the effects are applied and the `pendingBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
|
34
37
|
attr_accessor :tentative_pending_balance
|
35
38
|
|
39
|
+
# The tentative negative balance after all additions and deductions from the current customer session are applied to `negativeBalance`. When the session is closed, the tentative effects are applied and `negativeBalance` is updated to this value. **Note:** Tentative balances are specific to the current session and do not take into account other open sessions for the given customer.
|
40
|
+
attr_accessor :tentative_negative_balance
|
41
|
+
|
36
42
|
attr_accessor :current_tier
|
37
43
|
|
38
44
|
# Points required to move up a tier.
|
@@ -43,10 +49,12 @@ module TalonOne
|
|
43
49
|
{
|
44
50
|
:'current_balance' => :'currentBalance',
|
45
51
|
:'pending_balance' => :'pendingBalance',
|
52
|
+
:'negative_balance' => :'negativeBalance',
|
46
53
|
:'expired_balance' => :'expiredBalance',
|
47
54
|
:'spent_balance' => :'spentBalance',
|
48
55
|
:'tentative_current_balance' => :'tentativeCurrentBalance',
|
49
56
|
:'tentative_pending_balance' => :'tentativePendingBalance',
|
57
|
+
:'tentative_negative_balance' => :'tentativeNegativeBalance',
|
50
58
|
:'current_tier' => :'currentTier',
|
51
59
|
:'points_to_next_tier' => :'pointsToNextTier'
|
52
60
|
}
|
@@ -57,10 +65,12 @@ module TalonOne
|
|
57
65
|
{
|
58
66
|
:'current_balance' => :'Float',
|
59
67
|
:'pending_balance' => :'Float',
|
68
|
+
:'negative_balance' => :'Float',
|
60
69
|
:'expired_balance' => :'Float',
|
61
70
|
:'spent_balance' => :'Float',
|
62
71
|
:'tentative_current_balance' => :'Float',
|
63
72
|
:'tentative_pending_balance' => :'Float',
|
73
|
+
:'tentative_negative_balance' => :'Float',
|
64
74
|
:'current_tier' => :'Tier',
|
65
75
|
:'points_to_next_tier' => :'Float'
|
66
76
|
}
|
@@ -95,6 +105,10 @@ module TalonOne
|
|
95
105
|
self.pending_balance = attributes[:'pending_balance']
|
96
106
|
end
|
97
107
|
|
108
|
+
if attributes.key?(:'negative_balance')
|
109
|
+
self.negative_balance = attributes[:'negative_balance']
|
110
|
+
end
|
111
|
+
|
98
112
|
if attributes.key?(:'expired_balance')
|
99
113
|
self.expired_balance = attributes[:'expired_balance']
|
100
114
|
end
|
@@ -111,6 +125,10 @@ module TalonOne
|
|
111
125
|
self.tentative_pending_balance = attributes[:'tentative_pending_balance']
|
112
126
|
end
|
113
127
|
|
128
|
+
if attributes.key?(:'tentative_negative_balance')
|
129
|
+
self.tentative_negative_balance = attributes[:'tentative_negative_balance']
|
130
|
+
end
|
131
|
+
|
114
132
|
if attributes.key?(:'current_tier')
|
115
133
|
self.current_tier = attributes[:'current_tier']
|
116
134
|
end
|
@@ -132,6 +150,10 @@ module TalonOne
|
|
132
150
|
invalid_properties.push('invalid value for "pending_balance", pending_balance cannot be nil.')
|
133
151
|
end
|
134
152
|
|
153
|
+
if @negative_balance.nil?
|
154
|
+
invalid_properties.push('invalid value for "negative_balance", negative_balance cannot be nil.')
|
155
|
+
end
|
156
|
+
|
135
157
|
if @expired_balance.nil?
|
136
158
|
invalid_properties.push('invalid value for "expired_balance", expired_balance cannot be nil.')
|
137
159
|
end
|
@@ -144,6 +166,10 @@ module TalonOne
|
|
144
166
|
invalid_properties.push('invalid value for "tentative_current_balance", tentative_current_balance cannot be nil.')
|
145
167
|
end
|
146
168
|
|
169
|
+
if @tentative_negative_balance.nil?
|
170
|
+
invalid_properties.push('invalid value for "tentative_negative_balance", tentative_negative_balance cannot be nil.')
|
171
|
+
end
|
172
|
+
|
147
173
|
invalid_properties
|
148
174
|
end
|
149
175
|
|
@@ -152,9 +178,11 @@ module TalonOne
|
|
152
178
|
def valid?
|
153
179
|
return false if @current_balance.nil?
|
154
180
|
return false if @pending_balance.nil?
|
181
|
+
return false if @negative_balance.nil?
|
155
182
|
return false if @expired_balance.nil?
|
156
183
|
return false if @spent_balance.nil?
|
157
184
|
return false if @tentative_current_balance.nil?
|
185
|
+
return false if @tentative_negative_balance.nil?
|
158
186
|
true
|
159
187
|
end
|
160
188
|
|
@@ -165,10 +193,12 @@ module TalonOne
|
|
165
193
|
self.class == o.class &&
|
166
194
|
current_balance == o.current_balance &&
|
167
195
|
pending_balance == o.pending_balance &&
|
196
|
+
negative_balance == o.negative_balance &&
|
168
197
|
expired_balance == o.expired_balance &&
|
169
198
|
spent_balance == o.spent_balance &&
|
170
199
|
tentative_current_balance == o.tentative_current_balance &&
|
171
200
|
tentative_pending_balance == o.tentative_pending_balance &&
|
201
|
+
tentative_negative_balance == o.tentative_negative_balance &&
|
172
202
|
current_tier == o.current_tier &&
|
173
203
|
points_to_next_tier == o.points_to_next_tier
|
174
204
|
end
|
@@ -182,7 +212,7 @@ module TalonOne
|
|
182
212
|
# Calculates hash code according to all attributes.
|
183
213
|
# @return [Integer] Hash code
|
184
214
|
def hash
|
185
|
-
[current_balance, pending_balance, expired_balance, spent_balance, tentative_current_balance, tentative_pending_balance, current_tier, points_to_next_tier].hash
|
215
|
+
[current_balance, pending_balance, negative_balance, expired_balance, spent_balance, tentative_current_balance, tentative_pending_balance, tentative_negative_balance, current_tier, points_to_next_tier].hash
|
186
216
|
end
|
187
217
|
|
188
218
|
# Builds the object from hash
|
@@ -51,6 +51,8 @@ module TalonOne
|
|
51
51
|
# The name of the rule that triggered this effect.
|
52
52
|
attr_accessor :rule_name
|
53
53
|
|
54
|
+
attr_accessor :flags
|
55
|
+
|
54
56
|
class EnumAttributeValidator
|
55
57
|
attr_reader :datatype
|
56
58
|
attr_reader :allowable_values
|
@@ -87,7 +89,8 @@ module TalonOne
|
|
87
89
|
:'amount' => :'amount',
|
88
90
|
:'id' => :'id',
|
89
91
|
:'ruleset_id' => :'rulesetId',
|
90
|
-
:'rule_name' => :'ruleName'
|
92
|
+
:'rule_name' => :'ruleName',
|
93
|
+
:'flags' => :'flags'
|
91
94
|
}
|
92
95
|
end
|
93
96
|
|
@@ -105,7 +108,8 @@ module TalonOne
|
|
105
108
|
:'amount' => :'Float',
|
106
109
|
:'id' => :'Integer',
|
107
110
|
:'ruleset_id' => :'Integer',
|
108
|
-
:'rule_name' => :'String'
|
111
|
+
:'rule_name' => :'String',
|
112
|
+
:'flags' => :'LoyaltyLedgerEntryFlags'
|
109
113
|
}
|
110
114
|
end
|
111
115
|
|
@@ -177,6 +181,10 @@ module TalonOne
|
|
177
181
|
if attributes.key?(:'rule_name')
|
178
182
|
self.rule_name = attributes[:'rule_name']
|
179
183
|
end
|
184
|
+
|
185
|
+
if attributes.key?(:'flags')
|
186
|
+
self.flags = attributes[:'flags']
|
187
|
+
end
|
180
188
|
end
|
181
189
|
|
182
190
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -342,7 +350,8 @@ module TalonOne
|
|
342
350
|
amount == o.amount &&
|
343
351
|
id == o.id &&
|
344
352
|
ruleset_id == o.ruleset_id &&
|
345
|
-
rule_name == o.rule_name
|
353
|
+
rule_name == o.rule_name &&
|
354
|
+
flags == o.flags
|
346
355
|
end
|
347
356
|
|
348
357
|
# @see the `==` method
|
@@ -354,7 +363,7 @@ module TalonOne
|
|
354
363
|
# Calculates hash code according to all attributes.
|
355
364
|
# @return [Integer] Hash code
|
356
365
|
def hash
|
357
|
-
[created, program_id, customer_session_id, type, name, start_date, expiry_date, subledger_id, amount, id, ruleset_id, rule_name].hash
|
366
|
+
[created, program_id, customer_session_id, type, name, start_date, expiry_date, subledger_id, amount, id, ruleset_id, rule_name, flags].hash
|
358
367
|
end
|
359
368
|
|
360
369
|
# Builds the object from hash
|
@@ -17,7 +17,7 @@ module TalonOne
|
|
17
17
|
# The ID of the campaign that owns this entity.
|
18
18
|
attr_accessor :campaign_id
|
19
19
|
|
20
|
-
# The ID of the
|
20
|
+
# The ID of the Application that owns this entity.
|
21
21
|
attr_accessor :application_id
|
22
22
|
|
23
23
|
# The ID of the account that owns this entity.
|
@@ -27,13 +27,17 @@ module TalonOne
|
|
27
27
|
# Total amount of points awarded but never redeemed. They cannot be used anymore.
|
28
28
|
attr_accessor :expired_points
|
29
29
|
|
30
|
+
# Total amount of negative points. This implies that `activePoints` is `0`.
|
31
|
+
attr_accessor :negative_points
|
32
|
+
|
30
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
34
|
def self.attribute_map
|
32
35
|
{
|
33
36
|
:'active_points' => :'activePoints',
|
34
37
|
:'pending_points' => :'pendingPoints',
|
35
38
|
:'spent_points' => :'spentPoints',
|
36
|
-
:'expired_points' => :'expiredPoints'
|
39
|
+
:'expired_points' => :'expiredPoints',
|
40
|
+
:'negative_points' => :'negativePoints'
|
37
41
|
}
|
38
42
|
end
|
39
43
|
|
@@ -43,7 +47,8 @@ module TalonOne
|
|
43
47
|
:'active_points' => :'Float',
|
44
48
|
:'pending_points' => :'Float',
|
45
49
|
:'spent_points' => :'Float',
|
46
|
-
:'expired_points' => :'Float'
|
50
|
+
:'expired_points' => :'Float',
|
51
|
+
:'negative_points' => :'Float'
|
47
52
|
}
|
48
53
|
end
|
49
54
|
|
@@ -83,6 +88,10 @@ module TalonOne
|
|
83
88
|
if attributes.key?(:'expired_points')
|
84
89
|
self.expired_points = attributes[:'expired_points']
|
85
90
|
end
|
91
|
+
|
92
|
+
if attributes.key?(:'negative_points')
|
93
|
+
self.negative_points = attributes[:'negative_points']
|
94
|
+
end
|
86
95
|
end
|
87
96
|
|
88
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -106,7 +115,8 @@ module TalonOne
|
|
106
115
|
active_points == o.active_points &&
|
107
116
|
pending_points == o.pending_points &&
|
108
117
|
spent_points == o.spent_points &&
|
109
|
-
expired_points == o.expired_points
|
118
|
+
expired_points == o.expired_points &&
|
119
|
+
negative_points == o.negative_points
|
110
120
|
end
|
111
121
|
|
112
122
|
# @see the `==` method
|
@@ -118,7 +128,7 @@ module TalonOne
|
|
118
128
|
# Calculates hash code according to all attributes.
|
119
129
|
# @return [Integer] Hash code
|
120
130
|
def hash
|
121
|
-
[active_points, pending_points, spent_points, expired_points].hash
|
131
|
+
[active_points, pending_points, spent_points, expired_points, negative_points].hash
|
122
132
|
end
|
123
133
|
|
124
134
|
# Builds the object from hash
|
@@ -27,6 +27,9 @@ module TalonOne
|
|
27
27
|
# Total amount of points awarded but never redeemed. They cannot be used anymore.
|
28
28
|
attr_accessor :expired_points
|
29
29
|
|
30
|
+
# Total amount of negative points. This implies that `activePoints` is `0`.
|
31
|
+
attr_accessor :negative_points
|
32
|
+
|
30
33
|
attr_accessor :current_tier
|
31
34
|
|
32
35
|
attr_accessor :projected_tier
|
@@ -44,6 +47,7 @@ module TalonOne
|
|
44
47
|
:'pending_points' => :'pendingPoints',
|
45
48
|
:'spent_points' => :'spentPoints',
|
46
49
|
:'expired_points' => :'expiredPoints',
|
50
|
+
:'negative_points' => :'negativePoints',
|
47
51
|
:'current_tier' => :'currentTier',
|
48
52
|
:'projected_tier' => :'projectedTier',
|
49
53
|
:'points_to_next_tier' => :'pointsToNextTier',
|
@@ -58,6 +62,7 @@ module TalonOne
|
|
58
62
|
:'pending_points' => :'Float',
|
59
63
|
:'spent_points' => :'Float',
|
60
64
|
:'expired_points' => :'Float',
|
65
|
+
:'negative_points' => :'Float',
|
61
66
|
:'current_tier' => :'Tier',
|
62
67
|
:'projected_tier' => :'ProjectedTier',
|
63
68
|
:'points_to_next_tier' => :'Float',
|
@@ -102,6 +107,10 @@ module TalonOne
|
|
102
107
|
self.expired_points = attributes[:'expired_points']
|
103
108
|
end
|
104
109
|
|
110
|
+
if attributes.key?(:'negative_points')
|
111
|
+
self.negative_points = attributes[:'negative_points']
|
112
|
+
end
|
113
|
+
|
105
114
|
if attributes.key?(:'current_tier')
|
106
115
|
self.current_tier = attributes[:'current_tier']
|
107
116
|
end
|
@@ -141,6 +150,7 @@ module TalonOne
|
|
141
150
|
pending_points == o.pending_points &&
|
142
151
|
spent_points == o.spent_points &&
|
143
152
|
expired_points == o.expired_points &&
|
153
|
+
negative_points == o.negative_points &&
|
144
154
|
current_tier == o.current_tier &&
|
145
155
|
projected_tier == o.projected_tier &&
|
146
156
|
points_to_next_tier == o.points_to_next_tier &&
|
@@ -156,7 +166,7 @@ module TalonOne
|
|
156
166
|
# Calculates hash code according to all attributes.
|
157
167
|
# @return [Integer] Hash code
|
158
168
|
def hash
|
159
|
-
[active_points, pending_points, spent_points, expired_points, current_tier, projected_tier, points_to_next_tier, next_tier_name].hash
|
169
|
+
[active_points, pending_points, spent_points, expired_points, negative_points, current_tier, projected_tier, points_to_next_tier, next_tier_name].hash
|
160
170
|
end
|
161
171
|
|
162
172
|
# Builds the object from hash
|
@@ -48,6 +48,8 @@ module TalonOne
|
|
48
48
|
# Indicates if the entry belongs to the archived session.
|
49
49
|
attr_accessor :archived
|
50
50
|
|
51
|
+
attr_accessor :flags
|
52
|
+
|
51
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
54
|
def self.attribute_map
|
53
55
|
{
|
@@ -64,7 +66,8 @@ module TalonOne
|
|
64
66
|
:'name' => :'name',
|
65
67
|
:'sub_ledger_id' => :'subLedgerID',
|
66
68
|
:'user_id' => :'userID',
|
67
|
-
:'archived' => :'archived'
|
69
|
+
:'archived' => :'archived',
|
70
|
+
:'flags' => :'flags'
|
68
71
|
}
|
69
72
|
end
|
70
73
|
|
@@ -84,7 +87,8 @@ module TalonOne
|
|
84
87
|
:'name' => :'String',
|
85
88
|
:'sub_ledger_id' => :'String',
|
86
89
|
:'user_id' => :'Integer',
|
87
|
-
:'archived' => :'Boolean'
|
90
|
+
:'archived' => :'Boolean',
|
91
|
+
:'flags' => :'LoyaltyLedgerEntryFlags'
|
88
92
|
}
|
89
93
|
end
|
90
94
|
|
@@ -164,6 +168,10 @@ module TalonOne
|
|
164
168
|
if attributes.key?(:'archived')
|
165
169
|
self.archived = attributes[:'archived']
|
166
170
|
end
|
171
|
+
|
172
|
+
if attributes.key?(:'flags')
|
173
|
+
self.flags = attributes[:'flags']
|
174
|
+
end
|
167
175
|
end
|
168
176
|
|
169
177
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -227,7 +235,8 @@ module TalonOne
|
|
227
235
|
name == o.name &&
|
228
236
|
sub_ledger_id == o.sub_ledger_id &&
|
229
237
|
user_id == o.user_id &&
|
230
|
-
archived == o.archived
|
238
|
+
archived == o.archived &&
|
239
|
+
flags == o.flags
|
231
240
|
end
|
232
241
|
|
233
242
|
# @see the `==` method
|
@@ -239,7 +248,7 @@ module TalonOne
|
|
239
248
|
# Calculates hash code according to all attributes.
|
240
249
|
# @return [Integer] Hash code
|
241
250
|
def hash
|
242
|
-
[created, program_id, customer_profile_id, card_id, customer_session_id, event_id, type, amount, start_date, expiry_date, name, sub_ledger_id, user_id, archived].hash
|
251
|
+
[created, program_id, customer_profile_id, card_id, customer_session_id, event_id, type, amount, start_date, expiry_date, name, sub_ledger_id, user_id, archived, flags].hash
|
243
252
|
end
|
244
253
|
|
245
254
|
# Builds the object from hash
|
@@ -0,0 +1,208 @@
|
|
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
|
+
# A map of flags providing additional details about the entry.
|
17
|
+
class LoyaltyLedgerEntryFlags
|
18
|
+
# Set to true if the entry creates negative balance.
|
19
|
+
attr_accessor :creates_negative_balance
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'creates_negative_balance' => :'createsNegativeBalance'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'creates_negative_balance' => :'Boolean'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
if (!attributes.is_a?(Hash))
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::LoyaltyLedgerEntryFlags` initialize method"
|
46
|
+
end
|
47
|
+
|
48
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
50
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::LoyaltyLedgerEntryFlags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'creates_negative_balance')
|
57
|
+
self.creates_negative_balance = attributes[:'creates_negative_balance']
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
true
|
72
|
+
end
|
73
|
+
|
74
|
+
# Checks equality by comparing each attribute.
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
creates_negative_balance == o.creates_negative_balance
|
80
|
+
end
|
81
|
+
|
82
|
+
# @see the `==` method
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def eql?(o)
|
85
|
+
self == o
|
86
|
+
end
|
87
|
+
|
88
|
+
# Calculates hash code according to all attributes.
|
89
|
+
# @return [Integer] Hash code
|
90
|
+
def hash
|
91
|
+
[creates_negative_balance].hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# Builds the object from hash
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
# @return [Object] Returns the model itself
|
97
|
+
def self.build_from_hash(attributes)
|
98
|
+
new.build_from_hash(attributes)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def build_from_hash(attributes)
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
106
|
+
self.class.openapi_types.each_pair do |key, type|
|
107
|
+
if type =~ /\AArray<(.*)>/i
|
108
|
+
# check to ensure the input is an array given that the attribute
|
109
|
+
# is documented as an array but the input is not
|
110
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
111
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
112
|
+
end
|
113
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
114
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
115
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
116
|
+
end
|
117
|
+
|
118
|
+
self
|
119
|
+
end
|
120
|
+
|
121
|
+
# Deserializes the data based on type
|
122
|
+
# @param string type Data type
|
123
|
+
# @param string value Value to be deserialized
|
124
|
+
# @return [Object] Deserialized data
|
125
|
+
def _deserialize(type, value)
|
126
|
+
case type.to_sym
|
127
|
+
when :DateTime
|
128
|
+
DateTime.parse(value)
|
129
|
+
when :Date
|
130
|
+
Date.parse(value)
|
131
|
+
when :String
|
132
|
+
value.to_s
|
133
|
+
when :Integer
|
134
|
+
value.to_i
|
135
|
+
when :Float
|
136
|
+
value.to_f
|
137
|
+
when :Boolean
|
138
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
139
|
+
true
|
140
|
+
else
|
141
|
+
false
|
142
|
+
end
|
143
|
+
when :Object
|
144
|
+
# generic object (usually a Hash), return directly
|
145
|
+
value
|
146
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
147
|
+
inner_type = Regexp.last_match[:inner_type]
|
148
|
+
value.map { |v| _deserialize(inner_type, v) }
|
149
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
150
|
+
k_type = Regexp.last_match[:k_type]
|
151
|
+
v_type = Regexp.last_match[:v_type]
|
152
|
+
{}.tap do |hash|
|
153
|
+
value.each do |k, v|
|
154
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
else # model
|
158
|
+
TalonOne.const_get(type).build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
if value.nil?
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
183
|
+
end
|
184
|
+
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map { |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
@@ -62,7 +62,7 @@ module TalonOne
|
|
62
62
|
|
63
63
|
attr_accessor :card_code_settings
|
64
64
|
|
65
|
-
# The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative.
|
65
|
+
# The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative. - `unlimited`: Allows negative balance without any limit.
|
66
66
|
attr_accessor :return_policy
|
67
67
|
|
68
68
|
# The ID of the Talon.One account that owns this program.
|
@@ -411,7 +411,7 @@ module TalonOne
|
|
411
411
|
return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy)
|
412
412
|
tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"])
|
413
413
|
return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy)
|
414
|
-
return_policy_validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance"])
|
414
|
+
return_policy_validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance", "unlimited"])
|
415
415
|
return false unless return_policy_validator.valid?(@return_policy)
|
416
416
|
return false if @account_id.nil?
|
417
417
|
return false if @name.nil?
|
@@ -464,7 +464,7 @@ module TalonOne
|
|
464
464
|
# Custom attribute writer method checking allowed values (enum).
|
465
465
|
# @param [Object] return_policy Object to be assigned
|
466
466
|
def return_policy=(return_policy)
|
467
|
-
validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance"])
|
467
|
+
validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance", "unlimited"])
|
468
468
|
unless validator.valid?(return_policy)
|
469
469
|
fail ArgumentError, "invalid value for \"return_policy\", must be one of #{validator.allowable_values}."
|
470
470
|
end
|