talon_one 7.0.0 → 8.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 +24 -7
- data/docs/Achievement.md +6 -4
- data/docs/AchievementAdditionalProperties.md +5 -3
- data/docs/AchievementProgress.md +3 -15
- data/docs/AddFreeItemEffectProps.md +3 -1
- data/docs/AdditionalCampaignProperties.md +4 -2
- data/docs/AnalyticsProduct.md +6 -6
- data/docs/ApplicationCIF.md +1 -1
- data/docs/ApplicationCIFExpression.md +1 -1
- 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/CampaignEvaluationGroup.md +1 -1
- data/docs/CampaignNotificationPolicy.md +3 -1
- data/docs/CampaignSet.md +1 -1
- data/docs/CampaignStoreBudget.md +1 -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/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/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 +156 -18
- data/docs/LedgerInfo.md +4 -0
- 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/LoyaltyProgram.md +1 -1
- data/docs/LoyaltyProgramBalance.md +5 -1
- data/docs/LoyaltySubLedger.md +2 -0
- data/docs/ManagementApi.md +184 -116
- data/docs/ManagementKey.md +3 -1
- 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/PendingPointsNotificationPolicy.md +3 -1
- data/docs/ProductSearchMatch.md +2 -2
- data/docs/ProductUnitAnalytics.md +4 -10
- data/docs/Store.md +1 -1
- data/docs/StrikethroughEffect.md +5 -1
- data/docs/StrikethroughLabelingNotification.md +4 -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 +220 -29
- data/lib/talon_one/api/management_api.rb +248 -169
- 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_progress.rb +4 -137
- 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/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_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_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/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/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/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_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/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_program.rb +3 -3
- data/lib/talon_one/models/loyalty_program_balance.rb +34 -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/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/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/store.rb +1 -1
- data/lib/talon_one/models/strikethrough_effect.rb +24 -4
- data/lib/talon_one/models/strikethrough_labeling_notification.rb +46 -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 +18 -4
- data/spec/api/integration_api_spec.rb +45 -9
- data/spec/api/management_api_spec.rb +75 -60
- 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/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/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_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/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 +10 -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 +37 -3
@@ -49,7 +49,7 @@ module TalonOne
|
|
49
49
|
# The achievement's end date. If defined, customers cannot participate in the achievement after this date. **Note:** It must be an RFC3339 timestamp string.
|
50
50
|
attr_accessor :end_date
|
51
51
|
|
52
|
-
# ID of the campaign
|
52
|
+
# The ID of the campaign the achievement belongs to.
|
53
53
|
attr_accessor :campaign_id
|
54
54
|
|
55
55
|
# ID of the user that created this achievement.
|
@@ -61,6 +61,9 @@ module TalonOne
|
|
61
61
|
# Indicates if a customer has made progress in the achievement.
|
62
62
|
attr_accessor :has_progress
|
63
63
|
|
64
|
+
# The status of the achievement.
|
65
|
+
attr_accessor :status
|
66
|
+
|
64
67
|
class EnumAttributeValidator
|
65
68
|
attr_reader :datatype
|
66
69
|
attr_reader :allowable_values
|
@@ -101,7 +104,8 @@ module TalonOne
|
|
101
104
|
:'campaign_id' => :'campaignId',
|
102
105
|
:'user_id' => :'userId',
|
103
106
|
:'created_by' => :'createdBy',
|
104
|
-
:'has_progress' => :'hasProgress'
|
107
|
+
:'has_progress' => :'hasProgress',
|
108
|
+
:'status' => :'status'
|
105
109
|
}
|
106
110
|
end
|
107
111
|
|
@@ -123,7 +127,8 @@ module TalonOne
|
|
123
127
|
:'campaign_id' => :'Integer',
|
124
128
|
:'user_id' => :'Integer',
|
125
129
|
:'created_by' => :'String',
|
126
|
-
:'has_progress' => :'Boolean'
|
130
|
+
:'has_progress' => :'Boolean',
|
131
|
+
:'status' => :'String'
|
127
132
|
}
|
128
133
|
end
|
129
134
|
|
@@ -211,6 +216,10 @@ module TalonOne
|
|
211
216
|
if attributes.key?(:'has_progress')
|
212
217
|
self.has_progress = attributes[:'has_progress']
|
213
218
|
end
|
219
|
+
|
220
|
+
if attributes.key?(:'status')
|
221
|
+
self.status = attributes[:'status']
|
222
|
+
end
|
214
223
|
end
|
215
224
|
|
216
225
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -254,10 +263,6 @@ module TalonOne
|
|
254
263
|
invalid_properties.push('invalid value for "target", target cannot be nil.')
|
255
264
|
end
|
256
265
|
|
257
|
-
if @period.nil?
|
258
|
-
invalid_properties.push('invalid value for "period", period cannot be nil.')
|
259
|
-
end
|
260
|
-
|
261
266
|
if @campaign_id.nil?
|
262
267
|
invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
|
263
268
|
end
|
@@ -266,10 +271,6 @@ module TalonOne
|
|
266
271
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
267
272
|
end
|
268
273
|
|
269
|
-
if @created_by.nil?
|
270
|
-
invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
|
271
|
-
end
|
272
|
-
|
273
274
|
invalid_properties
|
274
275
|
end
|
275
276
|
|
@@ -285,14 +286,14 @@ module TalonOne
|
|
285
286
|
return false if @title.nil?
|
286
287
|
return false if @description.nil?
|
287
288
|
return false if @target.nil?
|
288
|
-
return false if @period.nil?
|
289
289
|
recurrence_policy_validator = EnumAttributeValidator.new('String', ["no_recurrence", "on_expiration"])
|
290
290
|
return false unless recurrence_policy_validator.valid?(@recurrence_policy)
|
291
291
|
activation_policy_validator = EnumAttributeValidator.new('String', ["user_action", "fixed_schedule"])
|
292
292
|
return false unless activation_policy_validator.valid?(@activation_policy)
|
293
293
|
return false if @campaign_id.nil?
|
294
294
|
return false if @user_id.nil?
|
295
|
-
|
295
|
+
status_validator = EnumAttributeValidator.new('String', ["inprogress", "expired", "not_started", "completed"])
|
296
|
+
return false unless status_validator.valid?(@status)
|
296
297
|
true
|
297
298
|
end
|
298
299
|
|
@@ -339,6 +340,16 @@ module TalonOne
|
|
339
340
|
@activation_policy = activation_policy
|
340
341
|
end
|
341
342
|
|
343
|
+
# Custom attribute writer method checking allowed values (enum).
|
344
|
+
# @param [Object] status Object to be assigned
|
345
|
+
def status=(status)
|
346
|
+
validator = EnumAttributeValidator.new('String', ["inprogress", "expired", "not_started", "completed"])
|
347
|
+
unless validator.valid?(status)
|
348
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
349
|
+
end
|
350
|
+
@status = status
|
351
|
+
end
|
352
|
+
|
342
353
|
# Checks equality by comparing each attribute.
|
343
354
|
# @param [Object] Object to be compared
|
344
355
|
def ==(o)
|
@@ -359,7 +370,8 @@ module TalonOne
|
|
359
370
|
campaign_id == o.campaign_id &&
|
360
371
|
user_id == o.user_id &&
|
361
372
|
created_by == o.created_by &&
|
362
|
-
has_progress == o.has_progress
|
373
|
+
has_progress == o.has_progress &&
|
374
|
+
status == o.status
|
363
375
|
end
|
364
376
|
|
365
377
|
# @see the `==` method
|
@@ -371,7 +383,7 @@ module TalonOne
|
|
371
383
|
# Calculates hash code according to all attributes.
|
372
384
|
# @return [Integer] Hash code
|
373
385
|
def hash
|
374
|
-
[id, created, name, title, description, target, period, period_end_override, recurrence_policy, activation_policy, fixed_start_date, end_date, campaign_id, user_id, created_by, has_progress].hash
|
386
|
+
[id, created, name, title, description, target, period, period_end_override, recurrence_policy, activation_policy, fixed_start_date, end_date, campaign_id, user_id, created_by, has_progress, status].hash
|
375
387
|
end
|
376
388
|
|
377
389
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module TalonOne
|
16
16
|
class AchievementAdditionalProperties
|
17
|
-
# ID of the campaign
|
17
|
+
# The ID of the campaign the achievement belongs to.
|
18
18
|
attr_accessor :campaign_id
|
19
19
|
|
20
20
|
# ID of the user that created this achievement.
|
@@ -26,13 +26,39 @@ module TalonOne
|
|
26
26
|
# Indicates if a customer has made progress in the achievement.
|
27
27
|
attr_accessor :has_progress
|
28
28
|
|
29
|
+
# The status of the achievement.
|
30
|
+
attr_accessor :status
|
31
|
+
|
32
|
+
class EnumAttributeValidator
|
33
|
+
attr_reader :datatype
|
34
|
+
attr_reader :allowable_values
|
35
|
+
|
36
|
+
def initialize(datatype, allowable_values)
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
38
|
+
case datatype.to_s
|
39
|
+
when /Integer/i
|
40
|
+
value.to_i
|
41
|
+
when /Float/i
|
42
|
+
value.to_f
|
43
|
+
else
|
44
|
+
value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def valid?(value)
|
50
|
+
!value || allowable_values.include?(value)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
29
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
55
|
def self.attribute_map
|
31
56
|
{
|
32
57
|
:'campaign_id' => :'campaignId',
|
33
58
|
:'user_id' => :'userId',
|
34
59
|
:'created_by' => :'createdBy',
|
35
|
-
:'has_progress' => :'hasProgress'
|
60
|
+
:'has_progress' => :'hasProgress',
|
61
|
+
:'status' => :'status'
|
36
62
|
}
|
37
63
|
end
|
38
64
|
|
@@ -42,7 +68,8 @@ module TalonOne
|
|
42
68
|
:'campaign_id' => :'Integer',
|
43
69
|
:'user_id' => :'Integer',
|
44
70
|
:'created_by' => :'String',
|
45
|
-
:'has_progress' => :'Boolean'
|
71
|
+
:'has_progress' => :'Boolean',
|
72
|
+
:'status' => :'String'
|
46
73
|
}
|
47
74
|
end
|
48
75
|
|
@@ -82,6 +109,10 @@ module TalonOne
|
|
82
109
|
if attributes.key?(:'has_progress')
|
83
110
|
self.has_progress = attributes[:'has_progress']
|
84
111
|
end
|
112
|
+
|
113
|
+
if attributes.key?(:'status')
|
114
|
+
self.status = attributes[:'status']
|
115
|
+
end
|
85
116
|
end
|
86
117
|
|
87
118
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -96,10 +127,6 @@ module TalonOne
|
|
96
127
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
97
128
|
end
|
98
129
|
|
99
|
-
if @created_by.nil?
|
100
|
-
invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
|
101
|
-
end
|
102
|
-
|
103
130
|
invalid_properties
|
104
131
|
end
|
105
132
|
|
@@ -108,10 +135,21 @@ module TalonOne
|
|
108
135
|
def valid?
|
109
136
|
return false if @campaign_id.nil?
|
110
137
|
return false if @user_id.nil?
|
111
|
-
|
138
|
+
status_validator = EnumAttributeValidator.new('String', ["inprogress", "expired", "not_started", "completed"])
|
139
|
+
return false unless status_validator.valid?(@status)
|
112
140
|
true
|
113
141
|
end
|
114
142
|
|
143
|
+
# Custom attribute writer method checking allowed values (enum).
|
144
|
+
# @param [Object] status Object to be assigned
|
145
|
+
def status=(status)
|
146
|
+
validator = EnumAttributeValidator.new('String', ["inprogress", "expired", "not_started", "completed"])
|
147
|
+
unless validator.valid?(status)
|
148
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
149
|
+
end
|
150
|
+
@status = status
|
151
|
+
end
|
152
|
+
|
115
153
|
# Checks equality by comparing each attribute.
|
116
154
|
# @param [Object] Object to be compared
|
117
155
|
def ==(o)
|
@@ -120,7 +158,8 @@ module TalonOne
|
|
120
158
|
campaign_id == o.campaign_id &&
|
121
159
|
user_id == o.user_id &&
|
122
160
|
created_by == o.created_by &&
|
123
|
-
has_progress == o.has_progress
|
161
|
+
has_progress == o.has_progress &&
|
162
|
+
status == o.status
|
124
163
|
end
|
125
164
|
|
126
165
|
# @see the `==` method
|
@@ -132,7 +171,7 @@ module TalonOne
|
|
132
171
|
# Calculates hash code according to all attributes.
|
133
172
|
# @return [Integer] Hash code
|
134
173
|
def hash
|
135
|
-
[campaign_id, user_id, created_by, has_progress].hash
|
174
|
+
[campaign_id, user_id, created_by, has_progress, status].hash
|
136
175
|
end
|
137
176
|
|
138
177
|
# Builds the object from hash
|
@@ -13,28 +13,11 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module TalonOne
|
16
|
+
# The current progress of the customer in the achievement.
|
16
17
|
class AchievementProgress
|
17
|
-
# The internal ID of the achievement.
|
18
|
-
attr_accessor :achievement_id
|
19
|
-
|
20
|
-
# The internal name of the achievement used in API requests.
|
21
|
-
attr_accessor :name
|
22
|
-
|
23
|
-
# The display name of the achievement in the Campaign Manager.
|
24
|
-
attr_accessor :title
|
25
|
-
|
26
|
-
# The description of the achievement in the Campaign Manager.
|
27
|
-
attr_accessor :description
|
28
|
-
|
29
|
-
# The ID of the campaign the achievement belongs to.
|
30
|
-
attr_accessor :campaign_id
|
31
|
-
|
32
18
|
# The status of the achievement.
|
33
19
|
attr_accessor :status
|
34
20
|
|
35
|
-
# The required number of actions or the transactional milestone to complete the achievement.
|
36
|
-
attr_accessor :target
|
37
|
-
|
38
21
|
# The current progress of the customer in the achievement.
|
39
22
|
attr_accessor :progress
|
40
23
|
|
@@ -72,13 +55,7 @@ module TalonOne
|
|
72
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
73
56
|
def self.attribute_map
|
74
57
|
{
|
75
|
-
:'achievement_id' => :'achievementId',
|
76
|
-
:'name' => :'name',
|
77
|
-
:'title' => :'title',
|
78
|
-
:'description' => :'description',
|
79
|
-
:'campaign_id' => :'campaignId',
|
80
58
|
:'status' => :'status',
|
81
|
-
:'target' => :'target',
|
82
59
|
:'progress' => :'progress',
|
83
60
|
:'start_date' => :'startDate',
|
84
61
|
:'completion_date' => :'completionDate',
|
@@ -89,13 +66,7 @@ module TalonOne
|
|
89
66
|
# Attribute type mapping.
|
90
67
|
def self.openapi_types
|
91
68
|
{
|
92
|
-
:'achievement_id' => :'Integer',
|
93
|
-
:'name' => :'String',
|
94
|
-
:'title' => :'String',
|
95
|
-
:'description' => :'String',
|
96
|
-
:'campaign_id' => :'Integer',
|
97
69
|
:'status' => :'String',
|
98
|
-
:'target' => :'Float',
|
99
70
|
:'progress' => :'Float',
|
100
71
|
:'start_date' => :'DateTime',
|
101
72
|
:'completion_date' => :'DateTime',
|
@@ -124,34 +95,10 @@ module TalonOne
|
|
124
95
|
h[k.to_sym] = v
|
125
96
|
}
|
126
97
|
|
127
|
-
if attributes.key?(:'achievement_id')
|
128
|
-
self.achievement_id = attributes[:'achievement_id']
|
129
|
-
end
|
130
|
-
|
131
|
-
if attributes.key?(:'name')
|
132
|
-
self.name = attributes[:'name']
|
133
|
-
end
|
134
|
-
|
135
|
-
if attributes.key?(:'title')
|
136
|
-
self.title = attributes[:'title']
|
137
|
-
end
|
138
|
-
|
139
|
-
if attributes.key?(:'description')
|
140
|
-
self.description = attributes[:'description']
|
141
|
-
end
|
142
|
-
|
143
|
-
if attributes.key?(:'campaign_id')
|
144
|
-
self.campaign_id = attributes[:'campaign_id']
|
145
|
-
end
|
146
|
-
|
147
98
|
if attributes.key?(:'status')
|
148
99
|
self.status = attributes[:'status']
|
149
100
|
end
|
150
101
|
|
151
|
-
if attributes.key?(:'target')
|
152
|
-
self.target = attributes[:'target']
|
153
|
-
end
|
154
|
-
|
155
102
|
if attributes.key?(:'progress')
|
156
103
|
self.progress = attributes[:'progress']
|
157
104
|
end
|
@@ -173,39 +120,6 @@ module TalonOne
|
|
173
120
|
# @return Array for valid properties with the reasons
|
174
121
|
def list_invalid_properties
|
175
122
|
invalid_properties = Array.new
|
176
|
-
if @achievement_id.nil?
|
177
|
-
invalid_properties.push('invalid value for "achievement_id", achievement_id cannot be nil.')
|
178
|
-
end
|
179
|
-
|
180
|
-
if @name.nil?
|
181
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
182
|
-
end
|
183
|
-
|
184
|
-
if @name.to_s.length > 1000
|
185
|
-
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 1000.')
|
186
|
-
end
|
187
|
-
|
188
|
-
if @name.to_s.length < 1
|
189
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
190
|
-
end
|
191
|
-
|
192
|
-
pattern = Regexp.new(/^[a-zA-Z]\w+$/)
|
193
|
-
if @name !~ pattern
|
194
|
-
invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
|
195
|
-
end
|
196
|
-
|
197
|
-
if @title.nil?
|
198
|
-
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
199
|
-
end
|
200
|
-
|
201
|
-
if @description.nil?
|
202
|
-
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
203
|
-
end
|
204
|
-
|
205
|
-
if @campaign_id.nil?
|
206
|
-
invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
|
207
|
-
end
|
208
|
-
|
209
123
|
if @status.nil?
|
210
124
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
211
125
|
end
|
@@ -214,64 +128,23 @@ module TalonOne
|
|
214
128
|
invalid_properties.push('invalid value for "progress", progress cannot be nil.')
|
215
129
|
end
|
216
130
|
|
217
|
-
if @start_date.nil?
|
218
|
-
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
|
219
|
-
end
|
220
|
-
|
221
|
-
if @end_date.nil?
|
222
|
-
invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
|
223
|
-
end
|
224
|
-
|
225
131
|
invalid_properties
|
226
132
|
end
|
227
133
|
|
228
134
|
# Check to see if the all the properties in the model are valid
|
229
135
|
# @return true if the model is valid
|
230
136
|
def valid?
|
231
|
-
return false if @achievement_id.nil?
|
232
|
-
return false if @name.nil?
|
233
|
-
return false if @name.to_s.length > 1000
|
234
|
-
return false if @name.to_s.length < 1
|
235
|
-
return false if @name !~ Regexp.new(/^[a-zA-Z]\w+$/)
|
236
|
-
return false if @title.nil?
|
237
|
-
return false if @description.nil?
|
238
|
-
return false if @campaign_id.nil?
|
239
137
|
return false if @status.nil?
|
240
|
-
status_validator = EnumAttributeValidator.new('String', ["inprogress", "completed", "expired"])
|
138
|
+
status_validator = EnumAttributeValidator.new('String', ["inprogress", "completed", "expired", "not_started"])
|
241
139
|
return false unless status_validator.valid?(@status)
|
242
140
|
return false if @progress.nil?
|
243
|
-
return false if @start_date.nil?
|
244
|
-
return false if @end_date.nil?
|
245
141
|
true
|
246
142
|
end
|
247
143
|
|
248
|
-
# Custom attribute writer method with validation
|
249
|
-
# @param [Object] name Value to be assigned
|
250
|
-
def name=(name)
|
251
|
-
if name.nil?
|
252
|
-
fail ArgumentError, 'name cannot be nil'
|
253
|
-
end
|
254
|
-
|
255
|
-
if name.to_s.length > 1000
|
256
|
-
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 1000.'
|
257
|
-
end
|
258
|
-
|
259
|
-
if name.to_s.length < 1
|
260
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
261
|
-
end
|
262
|
-
|
263
|
-
pattern = Regexp.new(/^[a-zA-Z]\w+$/)
|
264
|
-
if name !~ pattern
|
265
|
-
fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}."
|
266
|
-
end
|
267
|
-
|
268
|
-
@name = name
|
269
|
-
end
|
270
|
-
|
271
144
|
# Custom attribute writer method checking allowed values (enum).
|
272
145
|
# @param [Object] status Object to be assigned
|
273
146
|
def status=(status)
|
274
|
-
validator = EnumAttributeValidator.new('String', ["inprogress", "completed", "expired"])
|
147
|
+
validator = EnumAttributeValidator.new('String', ["inprogress", "completed", "expired", "not_started"])
|
275
148
|
unless validator.valid?(status)
|
276
149
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
277
150
|
end
|
@@ -283,13 +156,7 @@ module TalonOne
|
|
283
156
|
def ==(o)
|
284
157
|
return true if self.equal?(o)
|
285
158
|
self.class == o.class &&
|
286
|
-
achievement_id == o.achievement_id &&
|
287
|
-
name == o.name &&
|
288
|
-
title == o.title &&
|
289
|
-
description == o.description &&
|
290
|
-
campaign_id == o.campaign_id &&
|
291
159
|
status == o.status &&
|
292
|
-
target == o.target &&
|
293
160
|
progress == o.progress &&
|
294
161
|
start_date == o.start_date &&
|
295
162
|
completion_date == o.completion_date &&
|
@@ -305,7 +172,7 @@ module TalonOne
|
|
305
172
|
# Calculates hash code according to all attributes.
|
306
173
|
# @return [Integer] Hash code
|
307
174
|
def hash
|
308
|
-
[
|
175
|
+
[status, progress, start_date, completion_date, end_date].hash
|
309
176
|
end
|
310
177
|
|
311
178
|
# Builds the object from hash
|
@@ -21,11 +21,15 @@ module TalonOne
|
|
21
21
|
# The name / description of the effect
|
22
22
|
attr_accessor :name
|
23
23
|
|
24
|
+
# The original quantity in case a partial reward was applied.
|
25
|
+
attr_accessor :desired_quantity
|
26
|
+
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
30
|
:'sku' => :'sku',
|
28
|
-
:'name' => :'name'
|
31
|
+
:'name' => :'name',
|
32
|
+
:'desired_quantity' => :'desiredQuantity'
|
29
33
|
}
|
30
34
|
end
|
31
35
|
|
@@ -33,7 +37,8 @@ module TalonOne
|
|
33
37
|
def self.openapi_types
|
34
38
|
{
|
35
39
|
:'sku' => :'String',
|
36
|
-
:'name' => :'String'
|
40
|
+
:'name' => :'String',
|
41
|
+
:'desired_quantity' => :'Integer'
|
37
42
|
}
|
38
43
|
end
|
39
44
|
|
@@ -65,6 +70,10 @@ module TalonOne
|
|
65
70
|
if attributes.key?(:'name')
|
66
71
|
self.name = attributes[:'name']
|
67
72
|
end
|
73
|
+
|
74
|
+
if attributes.key?(:'desired_quantity')
|
75
|
+
self.desired_quantity = attributes[:'desired_quantity']
|
76
|
+
end
|
68
77
|
end
|
69
78
|
|
70
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -96,7 +105,8 @@ module TalonOne
|
|
96
105
|
return true if self.equal?(o)
|
97
106
|
self.class == o.class &&
|
98
107
|
sku == o.sku &&
|
99
|
-
name == o.name
|
108
|
+
name == o.name &&
|
109
|
+
desired_quantity == o.desired_quantity
|
100
110
|
end
|
101
111
|
|
102
112
|
# @see the `==` method
|
@@ -108,7 +118,7 @@ module TalonOne
|
|
108
118
|
# Calculates hash code according to all attributes.
|
109
119
|
# @return [Integer] Hash code
|
110
120
|
def hash
|
111
|
-
[sku, name].hash
|
121
|
+
[sku, name, desired_quantity].hash
|
112
122
|
end
|
113
123
|
|
114
124
|
# Builds the object from hash
|
@@ -83,6 +83,9 @@ module TalonOne
|
|
83
83
|
# Indicates whether the linked stores were imported via a CSV file.
|
84
84
|
attr_accessor :stores_imported
|
85
85
|
|
86
|
+
# A list of value map IDs for the campaign.
|
87
|
+
attr_accessor :value_maps_ids
|
88
|
+
|
86
89
|
class EnumAttributeValidator
|
87
90
|
attr_reader :datatype
|
88
91
|
attr_reader :allowable_values
|
@@ -130,7 +133,8 @@ module TalonOne
|
|
130
133
|
:'updated_by' => :'updatedBy',
|
131
134
|
:'template_id' => :'templateId',
|
132
135
|
:'frontend_state' => :'frontendState',
|
133
|
-
:'stores_imported' => :'storesImported'
|
136
|
+
:'stores_imported' => :'storesImported',
|
137
|
+
:'value_maps_ids' => :'valueMapsIds'
|
134
138
|
}
|
135
139
|
end
|
136
140
|
|
@@ -159,7 +163,8 @@ module TalonOne
|
|
159
163
|
:'updated_by' => :'String',
|
160
164
|
:'template_id' => :'Integer',
|
161
165
|
:'frontend_state' => :'String',
|
162
|
-
:'stores_imported' => :'Boolean'
|
166
|
+
:'stores_imported' => :'Boolean',
|
167
|
+
:'value_maps_ids' => :'Array<Integer>'
|
163
168
|
}
|
164
169
|
end
|
165
170
|
|
@@ -277,16 +282,18 @@ module TalonOne
|
|
277
282
|
if attributes.key?(:'stores_imported')
|
278
283
|
self.stores_imported = attributes[:'stores_imported']
|
279
284
|
end
|
285
|
+
|
286
|
+
if attributes.key?(:'value_maps_ids')
|
287
|
+
if (value = attributes[:'value_maps_ids']).is_a?(Array)
|
288
|
+
self.value_maps_ids = value
|
289
|
+
end
|
290
|
+
end
|
280
291
|
end
|
281
292
|
|
282
293
|
# Show invalid properties with the reasons. Usually used together with valid?
|
283
294
|
# @return Array for valid properties with the reasons
|
284
295
|
def list_invalid_properties
|
285
296
|
invalid_properties = Array.new
|
286
|
-
if @budgets.nil?
|
287
|
-
invalid_properties.push('invalid value for "budgets", budgets cannot be nil.')
|
288
|
-
end
|
289
|
-
|
290
297
|
if @frontend_state.nil?
|
291
298
|
invalid_properties.push('invalid value for "frontend_state", frontend_state cannot be nil.')
|
292
299
|
end
|
@@ -301,7 +308,6 @@ module TalonOne
|
|
301
308
|
# Check to see if the all the properties in the model are valid
|
302
309
|
# @return true if the model is valid
|
303
310
|
def valid?
|
304
|
-
return false if @budgets.nil?
|
305
311
|
return false if @frontend_state.nil?
|
306
312
|
frontend_state_validator = EnumAttributeValidator.new('String', ["expired", "scheduled", "running", "disabled", "archived", "staged"])
|
307
313
|
return false unless frontend_state_validator.valid?(@frontend_state)
|
@@ -346,7 +352,8 @@ module TalonOne
|
|
346
352
|
updated_by == o.updated_by &&
|
347
353
|
template_id == o.template_id &&
|
348
354
|
frontend_state == o.frontend_state &&
|
349
|
-
stores_imported == o.stores_imported
|
355
|
+
stores_imported == o.stores_imported &&
|
356
|
+
value_maps_ids == o.value_maps_ids
|
350
357
|
end
|
351
358
|
|
352
359
|
# @see the `==` method
|
@@ -358,7 +365,7 @@ module TalonOne
|
|
358
365
|
# Calculates hash code according to all attributes.
|
359
366
|
# @return [Integer] Hash code
|
360
367
|
def hash
|
361
|
-
[budgets, coupon_redemption_count, referral_redemption_count, discount_count, discount_effect_count, coupon_creation_count, custom_effect_count, referral_creation_count, add_free_item_effect_count, awarded_giveaways_count, created_loyalty_points_count, created_loyalty_points_effect_count, redeemed_loyalty_points_count, redeemed_loyalty_points_effect_count, call_api_effect_count, reservecoupon_effect_count, last_activity, updated, created_by, updated_by, template_id, frontend_state, stores_imported].hash
|
368
|
+
[budgets, coupon_redemption_count, referral_redemption_count, discount_count, discount_effect_count, coupon_creation_count, custom_effect_count, referral_creation_count, add_free_item_effect_count, awarded_giveaways_count, created_loyalty_points_count, created_loyalty_points_effect_count, redeemed_loyalty_points_count, redeemed_loyalty_points_effect_count, call_api_effect_count, reservecoupon_effect_count, last_activity, updated, created_by, updated_by, template_id, frontend_state, stores_imported, value_maps_ids].hash
|
362
369
|
end
|
363
370
|
|
364
371
|
# Builds the object from hash
|