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,15 +36,20 @@ 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
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
43
|
def self.attribute_map
|
38
44
|
{
|
39
45
|
:'current_balance' => :'currentBalance',
|
40
46
|
:'pending_balance' => :'pendingBalance',
|
47
|
+
:'negative_balance' => :'negativeBalance',
|
41
48
|
:'expired_balance' => :'expiredBalance',
|
42
49
|
:'spent_balance' => :'spentBalance',
|
43
50
|
:'tentative_current_balance' => :'tentativeCurrentBalance',
|
44
|
-
:'tentative_pending_balance' => :'tentativePendingBalance'
|
51
|
+
:'tentative_pending_balance' => :'tentativePendingBalance',
|
52
|
+
:'tentative_negative_balance' => :'tentativeNegativeBalance'
|
45
53
|
}
|
46
54
|
end
|
47
55
|
|
@@ -50,10 +58,12 @@ module TalonOne
|
|
50
58
|
{
|
51
59
|
:'current_balance' => :'Float',
|
52
60
|
:'pending_balance' => :'Float',
|
61
|
+
:'negative_balance' => :'Float',
|
53
62
|
:'expired_balance' => :'Float',
|
54
63
|
:'spent_balance' => :'Float',
|
55
64
|
:'tentative_current_balance' => :'Float',
|
56
|
-
:'tentative_pending_balance' => :'Float'
|
65
|
+
:'tentative_pending_balance' => :'Float',
|
66
|
+
:'tentative_negative_balance' => :'Float'
|
57
67
|
}
|
58
68
|
end
|
59
69
|
|
@@ -86,6 +96,10 @@ module TalonOne
|
|
86
96
|
self.pending_balance = attributes[:'pending_balance']
|
87
97
|
end
|
88
98
|
|
99
|
+
if attributes.key?(:'negative_balance')
|
100
|
+
self.negative_balance = attributes[:'negative_balance']
|
101
|
+
end
|
102
|
+
|
89
103
|
if attributes.key?(:'expired_balance')
|
90
104
|
self.expired_balance = attributes[:'expired_balance']
|
91
105
|
end
|
@@ -101,6 +115,10 @@ module TalonOne
|
|
101
115
|
if attributes.key?(:'tentative_pending_balance')
|
102
116
|
self.tentative_pending_balance = attributes[:'tentative_pending_balance']
|
103
117
|
end
|
118
|
+
|
119
|
+
if attributes.key?(:'tentative_negative_balance')
|
120
|
+
self.tentative_negative_balance = attributes[:'tentative_negative_balance']
|
121
|
+
end
|
104
122
|
end
|
105
123
|
|
106
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -115,6 +133,10 @@ module TalonOne
|
|
115
133
|
invalid_properties.push('invalid value for "pending_balance", pending_balance cannot be nil.')
|
116
134
|
end
|
117
135
|
|
136
|
+
if @negative_balance.nil?
|
137
|
+
invalid_properties.push('invalid value for "negative_balance", negative_balance cannot be nil.')
|
138
|
+
end
|
139
|
+
|
118
140
|
if @expired_balance.nil?
|
119
141
|
invalid_properties.push('invalid value for "expired_balance", expired_balance cannot be nil.')
|
120
142
|
end
|
@@ -127,6 +149,10 @@ module TalonOne
|
|
127
149
|
invalid_properties.push('invalid value for "tentative_current_balance", tentative_current_balance cannot be nil.')
|
128
150
|
end
|
129
151
|
|
152
|
+
if @tentative_negative_balance.nil?
|
153
|
+
invalid_properties.push('invalid value for "tentative_negative_balance", tentative_negative_balance cannot be nil.')
|
154
|
+
end
|
155
|
+
|
130
156
|
invalid_properties
|
131
157
|
end
|
132
158
|
|
@@ -135,9 +161,11 @@ module TalonOne
|
|
135
161
|
def valid?
|
136
162
|
return false if @current_balance.nil?
|
137
163
|
return false if @pending_balance.nil?
|
164
|
+
return false if @negative_balance.nil?
|
138
165
|
return false if @expired_balance.nil?
|
139
166
|
return false if @spent_balance.nil?
|
140
167
|
return false if @tentative_current_balance.nil?
|
168
|
+
return false if @tentative_negative_balance.nil?
|
141
169
|
true
|
142
170
|
end
|
143
171
|
|
@@ -148,10 +176,12 @@ module TalonOne
|
|
148
176
|
self.class == o.class &&
|
149
177
|
current_balance == o.current_balance &&
|
150
178
|
pending_balance == o.pending_balance &&
|
179
|
+
negative_balance == o.negative_balance &&
|
151
180
|
expired_balance == o.expired_balance &&
|
152
181
|
spent_balance == o.spent_balance &&
|
153
182
|
tentative_current_balance == o.tentative_current_balance &&
|
154
|
-
tentative_pending_balance == o.tentative_pending_balance
|
183
|
+
tentative_pending_balance == o.tentative_pending_balance &&
|
184
|
+
tentative_negative_balance == o.tentative_negative_balance
|
155
185
|
end
|
156
186
|
|
157
187
|
# @see the `==` method
|
@@ -163,7 +193,7 @@ module TalonOne
|
|
163
193
|
# Calculates hash code according to all attributes.
|
164
194
|
# @return [Integer] Hash code
|
165
195
|
def hash
|
166
|
-
[current_balance, pending_balance, expired_balance, spent_balance, tentative_current_balance, tentative_pending_balance].hash
|
196
|
+
[current_balance, pending_balance, negative_balance, expired_balance, spent_balance, tentative_current_balance, tentative_pending_balance, tentative_negative_balance].hash
|
167
197
|
end
|
168
198
|
|
169
199
|
# Builds the object from hash
|
@@ -68,6 +68,8 @@ module TalonOne
|
|
68
68
|
# Name of the rule that triggered the effect. Applies only for transactions that resulted from a customer session.
|
69
69
|
attr_accessor :rule_name
|
70
70
|
|
71
|
+
attr_accessor :flags
|
72
|
+
|
71
73
|
class EnumAttributeValidator
|
72
74
|
attr_reader :datatype
|
73
75
|
attr_reader :allowable_values
|
@@ -110,7 +112,8 @@ module TalonOne
|
|
110
112
|
:'user_id' => :'userId',
|
111
113
|
:'user_email' => :'userEmail',
|
112
114
|
:'ruleset_id' => :'rulesetId',
|
113
|
-
:'rule_name' => :'ruleName'
|
115
|
+
:'rule_name' => :'ruleName',
|
116
|
+
:'flags' => :'flags'
|
114
117
|
}
|
115
118
|
end
|
116
119
|
|
@@ -134,7 +137,8 @@ module TalonOne
|
|
134
137
|
:'user_id' => :'Integer',
|
135
138
|
:'user_email' => :'String',
|
136
139
|
:'ruleset_id' => :'Integer',
|
137
|
-
:'rule_name' => :'String'
|
140
|
+
:'rule_name' => :'String',
|
141
|
+
:'flags' => :'LoyaltyLedgerEntryFlags'
|
138
142
|
}
|
139
143
|
end
|
140
144
|
|
@@ -230,6 +234,10 @@ module TalonOne
|
|
230
234
|
if attributes.key?(:'rule_name')
|
231
235
|
self.rule_name = attributes[:'rule_name']
|
232
236
|
end
|
237
|
+
|
238
|
+
if attributes.key?(:'flags')
|
239
|
+
self.flags = attributes[:'flags']
|
240
|
+
end
|
233
241
|
end
|
234
242
|
|
235
243
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -442,7 +450,8 @@ module TalonOne
|
|
442
450
|
user_id == o.user_id &&
|
443
451
|
user_email == o.user_email &&
|
444
452
|
ruleset_id == o.ruleset_id &&
|
445
|
-
rule_name == o.rule_name
|
453
|
+
rule_name == o.rule_name &&
|
454
|
+
flags == o.flags
|
446
455
|
end
|
447
456
|
|
448
457
|
# @see the `==` method
|
@@ -454,7 +463,7 @@ module TalonOne
|
|
454
463
|
# Calculates hash code according to all attributes.
|
455
464
|
# @return [Integer] Hash code
|
456
465
|
def hash
|
457
|
-
[id, program_id, campaign_id, created, type, amount, name, start_date, expiry_date, customer_profile_id, card_identifier, subledger_id, customer_session_id, import_id, user_id, user_email, ruleset_id, rule_name].hash
|
466
|
+
[id, program_id, campaign_id, created, type, amount, name, start_date, expiry_date, customer_profile_id, card_identifier, subledger_id, customer_session_id, import_id, user_id, user_email, ruleset_id, rule_name, flags].hash
|
458
467
|
end
|
459
468
|
|
460
469
|
# Builds the object from hash
|
@@ -30,6 +30,9 @@ module TalonOne
|
|
30
30
|
# Total amount of points, that expired without ever being spent.
|
31
31
|
attr_accessor :total_expired_points
|
32
32
|
|
33
|
+
# Total amount of negative points. This implies that `totalActivePoints` is `0`.
|
34
|
+
attr_accessor :total_negative_points
|
35
|
+
|
33
36
|
# List of all events that have happened such as additions, subtractions and expiries.
|
34
37
|
attr_accessor :transactions
|
35
38
|
|
@@ -55,6 +58,7 @@ module TalonOne
|
|
55
58
|
:'total_pending_points' => :'totalPendingPoints',
|
56
59
|
:'total_spent_points' => :'totalSpentPoints',
|
57
60
|
:'total_expired_points' => :'totalExpiredPoints',
|
61
|
+
:'total_negative_points' => :'totalNegativePoints',
|
58
62
|
:'transactions' => :'transactions',
|
59
63
|
:'expiring_points' => :'expiringPoints',
|
60
64
|
:'active_points' => :'activePoints',
|
@@ -72,6 +76,7 @@ module TalonOne
|
|
72
76
|
:'total_pending_points' => :'Float',
|
73
77
|
:'total_spent_points' => :'Float',
|
74
78
|
:'total_expired_points' => :'Float',
|
79
|
+
:'total_negative_points' => :'Float',
|
75
80
|
:'transactions' => :'Array<LoyaltyLedgerEntry>',
|
76
81
|
:'expiring_points' => :'Array<LoyaltyLedgerEntry>',
|
77
82
|
:'active_points' => :'Array<LoyaltyLedgerEntry>',
|
@@ -122,6 +127,10 @@ module TalonOne
|
|
122
127
|
self.total_expired_points = attributes[:'total_expired_points']
|
123
128
|
end
|
124
129
|
|
130
|
+
if attributes.key?(:'total_negative_points')
|
131
|
+
self.total_negative_points = attributes[:'total_negative_points']
|
132
|
+
end
|
133
|
+
|
125
134
|
if attributes.key?(:'transactions')
|
126
135
|
if (value = attributes[:'transactions']).is_a?(Array)
|
127
136
|
self.transactions = value
|
@@ -181,6 +190,10 @@ module TalonOne
|
|
181
190
|
invalid_properties.push('invalid value for "total_expired_points", total_expired_points cannot be nil.')
|
182
191
|
end
|
183
192
|
|
193
|
+
if @total_negative_points.nil?
|
194
|
+
invalid_properties.push('invalid value for "total_negative_points", total_negative_points cannot be nil.')
|
195
|
+
end
|
196
|
+
|
184
197
|
invalid_properties
|
185
198
|
end
|
186
199
|
|
@@ -192,6 +205,7 @@ module TalonOne
|
|
192
205
|
return false if @total_pending_points.nil?
|
193
206
|
return false if @total_spent_points.nil?
|
194
207
|
return false if @total_expired_points.nil?
|
208
|
+
return false if @total_negative_points.nil?
|
195
209
|
true
|
196
210
|
end
|
197
211
|
|
@@ -205,6 +219,7 @@ module TalonOne
|
|
205
219
|
total_pending_points == o.total_pending_points &&
|
206
220
|
total_spent_points == o.total_spent_points &&
|
207
221
|
total_expired_points == o.total_expired_points &&
|
222
|
+
total_negative_points == o.total_negative_points &&
|
208
223
|
transactions == o.transactions &&
|
209
224
|
expiring_points == o.expiring_points &&
|
210
225
|
active_points == o.active_points &&
|
@@ -222,7 +237,7 @@ module TalonOne
|
|
222
237
|
# Calculates hash code according to all attributes.
|
223
238
|
# @return [Integer] Hash code
|
224
239
|
def hash
|
225
|
-
[total, total_active_points, total_pending_points, total_spent_points, total_expired_points, transactions, expiring_points, active_points, pending_points, expired_points, current_tier].hash
|
240
|
+
[total, total_active_points, total_pending_points, total_spent_points, total_expired_points, total_negative_points, transactions, expiring_points, active_points, pending_points, expired_points, current_tier].hash
|
226
241
|
end
|
227
242
|
|
228
243
|
# Builds the object from hash
|
@@ -38,6 +38,9 @@ module TalonOne
|
|
38
38
|
# The date the management key was created.
|
39
39
|
attr_accessor :created
|
40
40
|
|
41
|
+
# The management key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted.
|
42
|
+
attr_accessor :disabled
|
43
|
+
|
41
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
45
|
def self.attribute_map
|
43
46
|
{
|
@@ -48,7 +51,8 @@ module TalonOne
|
|
48
51
|
:'id' => :'id',
|
49
52
|
:'created_by' => :'createdBy',
|
50
53
|
:'account_id' => :'accountID',
|
51
|
-
:'created' => :'created'
|
54
|
+
:'created' => :'created',
|
55
|
+
:'disabled' => :'disabled'
|
52
56
|
}
|
53
57
|
end
|
54
58
|
|
@@ -62,7 +66,8 @@ module TalonOne
|
|
62
66
|
:'id' => :'Integer',
|
63
67
|
:'created_by' => :'Integer',
|
64
68
|
:'account_id' => :'Integer',
|
65
|
-
:'created' => :'DateTime'
|
69
|
+
:'created' => :'DateTime',
|
70
|
+
:'disabled' => :'Boolean'
|
66
71
|
}
|
67
72
|
end
|
68
73
|
|
@@ -122,6 +127,10 @@ module TalonOne
|
|
122
127
|
if attributes.key?(:'created')
|
123
128
|
self.created = attributes[:'created']
|
124
129
|
end
|
130
|
+
|
131
|
+
if attributes.key?(:'disabled')
|
132
|
+
self.disabled = attributes[:'disabled']
|
133
|
+
end
|
125
134
|
end
|
126
135
|
|
127
136
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -184,7 +193,8 @@ module TalonOne
|
|
184
193
|
id == o.id &&
|
185
194
|
created_by == o.created_by &&
|
186
195
|
account_id == o.account_id &&
|
187
|
-
created == o.created
|
196
|
+
created == o.created &&
|
197
|
+
disabled == o.disabled
|
188
198
|
end
|
189
199
|
|
190
200
|
# @see the `==` method
|
@@ -196,7 +206,7 @@ module TalonOne
|
|
196
206
|
# Calculates hash code according to all attributes.
|
197
207
|
# @return [Integer] Hash code
|
198
208
|
def hash
|
199
|
-
[name, expiry_date, endpoints, allowed_application_ids, id, created_by, account_id, created].hash
|
209
|
+
[name, expiry_date, endpoints, allowed_application_ids, id, created_by, account_id, created, disabled].hash
|
200
210
|
end
|
201
211
|
|
202
212
|
# Builds the object from hash
|
@@ -0,0 +1,227 @@
|
|
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
|
+
class MessageTest
|
17
|
+
# The returned http response.
|
18
|
+
attr_accessor :http_response
|
19
|
+
|
20
|
+
# The returned http status code.
|
21
|
+
attr_accessor :http_status
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'http_response' => :'httpResponse',
|
27
|
+
:'http_status' => :'httpStatus'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'http_response' => :'String',
|
35
|
+
:'http_status' => :'Integer'
|
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::MessageTest` 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::MessageTest`. 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?(:'http_response')
|
61
|
+
self.http_response = attributes[:'http_response']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.key?(:'http_status')
|
65
|
+
self.http_status = attributes[:'http_status']
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
if @http_response.nil?
|
74
|
+
invalid_properties.push('invalid value for "http_response", http_response cannot be nil.')
|
75
|
+
end
|
76
|
+
|
77
|
+
if @http_status.nil?
|
78
|
+
invalid_properties.push('invalid value for "http_status", http_status cannot be nil.')
|
79
|
+
end
|
80
|
+
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
return false if @http_response.nil?
|
88
|
+
return false if @http_status.nil?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
http_response == o.http_response &&
|
98
|
+
http_status == o.http_status
|
99
|
+
end
|
100
|
+
|
101
|
+
# @see the `==` method
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def eql?(o)
|
104
|
+
self == o
|
105
|
+
end
|
106
|
+
|
107
|
+
# Calculates hash code according to all attributes.
|
108
|
+
# @return [Integer] Hash code
|
109
|
+
def hash
|
110
|
+
[http_response, http_status].hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def self.build_from_hash(attributes)
|
117
|
+
new.build_from_hash(attributes)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.openapi_types.each_pair do |key, type|
|
126
|
+
if type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :Boolean
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
TalonOne.const_get(type).build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
if value.nil?
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
|
+
end
|
203
|
+
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -20,7 +20,7 @@ module TalonOne
|
|
20
20
|
# The time this entity was created.
|
21
21
|
attr_accessor :created
|
22
22
|
|
23
|
-
# The ID of the
|
23
|
+
# The ID of the Application that owns this entity.
|
24
24
|
attr_accessor :application_id
|
25
25
|
|
26
26
|
# The ID of the account that owns this entity.
|
@@ -213,7 +213,7 @@ module TalonOne
|
|
213
213
|
def valid?
|
214
214
|
return false if @title.nil?
|
215
215
|
return false if @expires.nil?
|
216
|
-
platform_validator = EnumAttributeValidator.new('String', ["none", "segment", "braze", "mparticle", "
|
216
|
+
platform_validator = EnumAttributeValidator.new('String', ["none", "segment", "braze", "mparticle", "shopify", "iterable", "customer_engagement", "customer_data", "salesforce", "emarsys"])
|
217
217
|
return false unless platform_validator.valid?(@platform)
|
218
218
|
type_validator = EnumAttributeValidator.new('String', ["staging"])
|
219
219
|
return false unless type_validator.valid?(@type)
|
@@ -229,7 +229,7 @@ module TalonOne
|
|
229
229
|
# Custom attribute writer method checking allowed values (enum).
|
230
230
|
# @param [Object] platform Object to be assigned
|
231
231
|
def platform=(platform)
|
232
|
-
validator = EnumAttributeValidator.new('String', ["none", "segment", "braze", "mparticle", "
|
232
|
+
validator = EnumAttributeValidator.new('String', ["none", "segment", "braze", "mparticle", "shopify", "iterable", "customer_engagement", "customer_data", "salesforce", "emarsys"])
|
233
233
|
unless validator.valid?(platform)
|
234
234
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
235
235
|
end
|
@@ -23,7 +23,7 @@ module TalonOne
|
|
23
23
|
# A description of the audience.
|
24
24
|
attr_accessor :description
|
25
25
|
|
26
|
-
# The Talon.One-supported [3rd-party platform](https://docs.talon.one/docs/dev/technology-partners/overview) that this audience was created in. For example, `mParticle`, `Segment`, `
|
26
|
+
# The Talon.One-supported [3rd-party platform](https://docs.talon.one/docs/dev/technology-partners/overview) that this audience was created in. For example, `mParticle`, `Segment`, `Shopify`, `Braze`, or `Iterable`. **Note:** If you do not integrate with any of these platforms, do not use this property.
|
27
27
|
attr_accessor :integration
|
28
28
|
|
29
29
|
# The ID of this audience in the third-party integration. **Note:** To create an audience that doesn't come from a 3rd party platform, do not use this property.
|
@@ -56,7 +56,7 @@ module TalonOne
|
|
56
56
|
|
57
57
|
attr_accessor :card_code_settings
|
58
58
|
|
59
|
-
# 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.
|
59
|
+
# 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.
|
60
60
|
attr_accessor :return_policy
|
61
61
|
|
62
62
|
# The internal name for the Loyalty Program. This is an immutable value.
|
@@ -309,7 +309,7 @@ module TalonOne
|
|
309
309
|
return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy)
|
310
310
|
tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"])
|
311
311
|
return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy)
|
312
|
-
return_policy_validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance"])
|
312
|
+
return_policy_validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance", "unlimited"])
|
313
313
|
return false unless return_policy_validator.valid?(@return_policy)
|
314
314
|
return false if @name.nil?
|
315
315
|
return false if @timezone.nil?
|
@@ -361,7 +361,7 @@ module TalonOne
|
|
361
361
|
# Custom attribute writer method checking allowed values (enum).
|
362
362
|
# @param [Object] return_policy Object to be assigned
|
363
363
|
def return_policy=(return_policy)
|
364
|
-
validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance"])
|
364
|
+
validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance", "unlimited"])
|
365
365
|
unless validator.valid?(return_policy)
|
366
366
|
fail ArgumentError, "invalid value for \"return_policy\", must be one of #{validator.allowable_values}."
|
367
367
|
end
|
@@ -38,6 +38,9 @@ module TalonOne
|
|
38
38
|
# The date the management key was created.
|
39
39
|
attr_accessor :created
|
40
40
|
|
41
|
+
# The management key is disabled (this property is set to `true`) when the user who created the key is disabled or deleted.
|
42
|
+
attr_accessor :disabled
|
43
|
+
|
41
44
|
# The management key.
|
42
45
|
attr_accessor :key
|
43
46
|
|
@@ -52,6 +55,7 @@ module TalonOne
|
|
52
55
|
:'created_by' => :'createdBy',
|
53
56
|
:'account_id' => :'accountID',
|
54
57
|
:'created' => :'created',
|
58
|
+
:'disabled' => :'disabled',
|
55
59
|
:'key' => :'key'
|
56
60
|
}
|
57
61
|
end
|
@@ -67,6 +71,7 @@ module TalonOne
|
|
67
71
|
:'created_by' => :'Integer',
|
68
72
|
:'account_id' => :'Integer',
|
69
73
|
:'created' => :'DateTime',
|
74
|
+
:'disabled' => :'Boolean',
|
70
75
|
:'key' => :'String'
|
71
76
|
}
|
72
77
|
end
|
@@ -128,6 +133,10 @@ module TalonOne
|
|
128
133
|
self.created = attributes[:'created']
|
129
134
|
end
|
130
135
|
|
136
|
+
if attributes.key?(:'disabled')
|
137
|
+
self.disabled = attributes[:'disabled']
|
138
|
+
end
|
139
|
+
|
131
140
|
if attributes.key?(:'key')
|
132
141
|
self.key = attributes[:'key']
|
133
142
|
end
|
@@ -199,6 +208,7 @@ module TalonOne
|
|
199
208
|
created_by == o.created_by &&
|
200
209
|
account_id == o.account_id &&
|
201
210
|
created == o.created &&
|
211
|
+
disabled == o.disabled &&
|
202
212
|
key == o.key
|
203
213
|
end
|
204
214
|
|
@@ -211,7 +221,7 @@ module TalonOne
|
|
211
221
|
# Calculates hash code according to all attributes.
|
212
222
|
# @return [Integer] Hash code
|
213
223
|
def hash
|
214
|
-
[name, expiry_date, endpoints, allowed_application_ids, id, created_by, account_id, created, key].hash
|
224
|
+
[name, expiry_date, endpoints, allowed_application_ids, id, created_by, account_id, created, disabled, key].hash
|
215
225
|
end
|
216
226
|
|
217
227
|
# Builds the object from hash
|