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.
Files changed (315) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -7
  3. data/docs/Achievement.md +6 -4
  4. data/docs/AchievementAdditionalProperties.md +5 -3
  5. data/docs/AchievementProgress.md +3 -15
  6. data/docs/AddFreeItemEffectProps.md +3 -1
  7. data/docs/AdditionalCampaignProperties.md +4 -2
  8. data/docs/AnalyticsProduct.md +6 -6
  9. data/docs/ApplicationCIF.md +1 -1
  10. data/docs/ApplicationCIFExpression.md +1 -1
  11. data/docs/ApplicationEntity.md +1 -1
  12. data/docs/ApplicationEvent.md +1 -1
  13. data/docs/ApplicationReferee.md +1 -1
  14. data/docs/ApplicationSession.md +2 -2
  15. data/docs/Audience.md +1 -1
  16. data/docs/BaseLoyaltyProgram.md +1 -1
  17. data/docs/Binding.md +1 -1
  18. data/docs/Campaign.md +4 -2
  19. data/docs/CampaignEvaluationGroup.md +1 -1
  20. data/docs/CampaignNotificationPolicy.md +3 -1
  21. data/docs/CampaignSet.md +1 -1
  22. data/docs/CampaignStoreBudget.md +1 -1
  23. data/docs/CardExpiringPointsNotificationPolicy.md +3 -1
  24. data/docs/CatalogsStrikethroughNotificationPolicy.md +3 -1
  25. data/docs/CouponCreationJob.md +1 -1
  26. data/docs/CouponDeletionJob.md +1 -1
  27. data/docs/CouponsNotificationPolicy.md +5 -1
  28. data/docs/CreateAchievement.md +1 -1
  29. data/docs/CustomerInventory.md +1 -1
  30. data/docs/CustomerSession.md +1 -1
  31. data/docs/CustomerSessionV2.md +2 -4
  32. data/docs/Environment.md +1 -1
  33. data/docs/Event.md +1 -1
  34. data/docs/ExpiringCouponsNotificationPolicy.md +3 -1
  35. data/docs/ExpiringPointsNotificationPolicy.md +3 -1
  36. data/docs/InlineResponse2001.md +3 -3
  37. data/docs/InlineResponse20010.md +3 -3
  38. data/docs/InlineResponse20011.md +3 -3
  39. data/docs/InlineResponse20012.md +1 -1
  40. data/docs/InlineResponse20013.md +1 -1
  41. data/docs/InlineResponse20014.md +1 -1
  42. data/docs/InlineResponse20015.md +3 -3
  43. data/docs/InlineResponse20016.md +3 -3
  44. data/docs/InlineResponse20017.md +3 -5
  45. data/docs/InlineResponse20018.md +2 -2
  46. data/docs/InlineResponse20019.md +3 -3
  47. data/docs/InlineResponse2002.md +3 -3
  48. data/docs/InlineResponse20020.md +5 -3
  49. data/docs/InlineResponse20021.md +3 -5
  50. data/docs/InlineResponse20022.md +2 -4
  51. data/docs/InlineResponse20023.md +3 -5
  52. data/docs/InlineResponse20024.md +5 -3
  53. data/docs/InlineResponse20025.md +4 -2
  54. data/docs/InlineResponse20026.md +3 -1
  55. data/docs/InlineResponse20027.md +1 -1
  56. data/docs/InlineResponse20028.md +3 -3
  57. data/docs/InlineResponse20029.md +1 -3
  58. data/docs/InlineResponse2003.md +1 -1
  59. data/docs/InlineResponse20030.md +2 -2
  60. data/docs/InlineResponse20031.md +3 -3
  61. data/docs/InlineResponse20032.md +1 -1
  62. data/docs/InlineResponse20033.md +3 -3
  63. data/docs/InlineResponse20034.md +1 -3
  64. data/docs/InlineResponse20035.md +5 -3
  65. data/docs/InlineResponse20036.md +1 -1
  66. data/docs/InlineResponse20037.md +5 -3
  67. data/docs/InlineResponse20038.md +1 -1
  68. data/docs/InlineResponse20039.md +1 -1
  69. data/docs/InlineResponse2004.md +1 -1
  70. data/docs/InlineResponse20040.md +1 -1
  71. data/docs/InlineResponse20041.md +2 -4
  72. data/docs/InlineResponse20042.md +1 -1
  73. data/docs/InlineResponse20043.md +1 -1
  74. data/docs/InlineResponse20044.md +4 -4
  75. data/docs/InlineResponse20045.md +3 -3
  76. data/docs/InlineResponse20046.md +3 -3
  77. data/docs/InlineResponse20047.md +5 -3
  78. data/docs/InlineResponse2005.md +3 -3
  79. data/docs/InlineResponse2006.md +3 -3
  80. data/docs/InlineResponse2007.md +1 -1
  81. data/docs/InlineResponse2008.md +1 -1
  82. data/docs/InlineResponse2009.md +3 -3
  83. data/docs/IntegrationApi.md +156 -18
  84. data/docs/LedgerInfo.md +4 -0
  85. data/docs/LimitCounter.md +1 -1
  86. data/docs/LoyaltyBalance.md +3 -1
  87. data/docs/LoyaltyBalanceWithTier.md +2 -0
  88. data/docs/LoyaltyBalances.md +1 -1
  89. data/docs/LoyaltyBalancesWithTiers.md +1 -1
  90. data/docs/LoyaltyCardBalances.md +1 -1
  91. data/docs/LoyaltyLedger.md +1 -1
  92. data/docs/LoyaltyLedgerEntry.md +3 -1
  93. data/docs/LoyaltyProgram.md +1 -1
  94. data/docs/LoyaltyProgramBalance.md +5 -1
  95. data/docs/LoyaltySubLedger.md +2 -0
  96. data/docs/ManagementApi.md +184 -116
  97. data/docs/ManagementKey.md +3 -1
  98. data/docs/ModelReturn.md +1 -1
  99. data/docs/NewAudience.md +1 -1
  100. data/docs/NewCampaignSet.md +1 -1
  101. data/docs/NewLoyaltyProgram.md +1 -1
  102. data/docs/NewManagementKey.md +2 -0
  103. data/docs/PendingPointsNotificationPolicy.md +3 -1
  104. data/docs/ProductSearchMatch.md +2 -2
  105. data/docs/ProductUnitAnalytics.md +4 -10
  106. data/docs/Store.md +1 -1
  107. data/docs/StrikethroughEffect.md +5 -1
  108. data/docs/StrikethroughLabelingNotification.md +4 -2
  109. data/docs/SummaryCampaignStoreBudget.md +3 -1
  110. data/docs/TemplateDef.md +1 -1
  111. data/docs/TierDowngradeNotificationPolicy.md +3 -1
  112. data/docs/TierUpgradeNotificationPolicy.md +3 -1
  113. data/docs/TierWillDowngradeNotificationPolicy.md +2 -0
  114. data/docs/UpdateAchievement.md +2 -2
  115. data/docs/UpdateLoyaltyProgram.md +1 -1
  116. data/lib/talon_one/api/integration_api.rb +220 -29
  117. data/lib/talon_one/api/management_api.rb +248 -169
  118. data/lib/talon_one/models/achievement.rb +27 -15
  119. data/lib/talon_one/models/achievement_additional_properties.rb +49 -10
  120. data/lib/talon_one/models/achievement_progress.rb +4 -137
  121. data/lib/talon_one/models/add_free_item_effect_props.rb +14 -4
  122. data/lib/talon_one/models/additional_campaign_properties.rb +16 -9
  123. data/lib/talon_one/models/analytics_product.rb +20 -21
  124. data/lib/talon_one/models/application_api_key.rb +2 -2
  125. data/lib/talon_one/models/application_cif.rb +1 -1
  126. data/lib/talon_one/models/application_cif_expression.rb +1 -1
  127. data/lib/talon_one/models/application_entity.rb +1 -1
  128. data/lib/talon_one/models/application_event.rb +1 -1
  129. data/lib/talon_one/models/application_referee.rb +1 -1
  130. data/lib/talon_one/models/application_session.rb +2 -2
  131. data/lib/talon_one/models/audience.rb +1 -1
  132. data/lib/talon_one/models/base_loyalty_program.rb +3 -3
  133. data/lib/talon_one/models/campaign.rb +14 -7
  134. data/lib/talon_one/models/campaign_evaluation_group.rb +1 -1
  135. data/lib/talon_one/models/campaign_notification_policy.rb +14 -4
  136. data/lib/talon_one/models/campaign_set.rb +1 -1
  137. data/lib/talon_one/models/campaign_store_budget.rb +1 -1
  138. data/lib/talon_one/models/card_expiring_points_notification_policy.rb +14 -4
  139. data/lib/talon_one/models/catalogs_strikethrough_notification_policy.rb +38 -4
  140. data/lib/talon_one/models/coupon_creation_job.rb +1 -1
  141. data/lib/talon_one/models/coupon_deletion_job.rb +1 -1
  142. data/lib/talon_one/models/coupons_notification_policy.rb +24 -4
  143. data/lib/talon_one/models/create_achievement.rb +0 -5
  144. data/lib/talon_one/models/create_application_api_key.rb +2 -2
  145. data/lib/talon_one/models/customer_inventory.rb +1 -1
  146. data/lib/talon_one/models/customer_session.rb +1 -1
  147. data/lib/talon_one/models/customer_session_v2.rb +5 -15
  148. data/lib/talon_one/models/environment.rb +1 -1
  149. data/lib/talon_one/models/event.rb +1 -1
  150. data/lib/talon_one/models/expiring_coupons_notification_policy.rb +14 -4
  151. data/lib/talon_one/models/expiring_points_notification_policy.rb +14 -4
  152. data/lib/talon_one/models/inline_response2001.rb +11 -11
  153. data/lib/talon_one/models/inline_response20010.rb +11 -11
  154. data/lib/talon_one/models/inline_response20011.rb +11 -11
  155. data/lib/talon_one/models/inline_response20012.rb +1 -1
  156. data/lib/talon_one/models/inline_response20013.rb +1 -1
  157. data/lib/talon_one/models/inline_response20014.rb +1 -1
  158. data/lib/talon_one/models/inline_response20015.rb +11 -11
  159. data/lib/talon_one/models/inline_response20016.rb +11 -13
  160. data/lib/talon_one/models/inline_response20017.rb +7 -11
  161. data/lib/talon_one/models/inline_response20018.rb +1 -1
  162. data/lib/talon_one/models/inline_response20019.rb +3 -1
  163. data/lib/talon_one/models/inline_response2002.rb +11 -11
  164. data/lib/talon_one/models/inline_response20020.rb +11 -7
  165. data/lib/talon_one/models/inline_response20021.rb +7 -11
  166. data/lib/talon_one/models/inline_response20022.rb +7 -11
  167. data/lib/talon_one/models/inline_response20023.rb +7 -11
  168. data/lib/talon_one/models/inline_response20024.rb +11 -7
  169. data/lib/talon_one/models/inline_response20025.rb +11 -7
  170. data/lib/talon_one/models/inline_response20026.rb +11 -2
  171. data/lib/talon_one/models/inline_response20027.rb +1 -1
  172. data/lib/talon_one/models/inline_response20028.rb +11 -11
  173. data/lib/talon_one/models/inline_response20029.rb +2 -11
  174. data/lib/talon_one/models/inline_response2003.rb +1 -1
  175. data/lib/talon_one/models/inline_response20030.rb +6 -1
  176. data/lib/talon_one/models/inline_response20031.rb +13 -8
  177. data/lib/talon_one/models/inline_response20032.rb +1 -1
  178. data/lib/talon_one/models/inline_response20033.rb +8 -13
  179. data/lib/talon_one/models/inline_response20034.rb +2 -11
  180. data/lib/talon_one/models/inline_response20035.rb +11 -7
  181. data/lib/talon_one/models/inline_response20036.rb +1 -1
  182. data/lib/talon_one/models/inline_response20037.rb +11 -7
  183. data/lib/talon_one/models/inline_response20038.rb +1 -1
  184. data/lib/talon_one/models/inline_response20039.rb +1 -1
  185. data/lib/talon_one/models/inline_response2004.rb +1 -1
  186. data/lib/talon_one/models/inline_response20040.rb +1 -1
  187. data/lib/talon_one/models/inline_response20041.rb +7 -11
  188. data/lib/talon_one/models/inline_response20042.rb +1 -1
  189. data/lib/talon_one/models/inline_response20043.rb +1 -1
  190. data/lib/talon_one/models/inline_response20044.rb +11 -11
  191. data/lib/talon_one/models/inline_response20045.rb +13 -8
  192. data/lib/talon_one/models/inline_response20046.rb +11 -11
  193. data/lib/talon_one/models/inline_response20047.rb +11 -7
  194. data/lib/talon_one/models/inline_response2005.rb +11 -11
  195. data/lib/talon_one/models/inline_response2006.rb +11 -11
  196. data/lib/talon_one/models/inline_response2007.rb +1 -1
  197. data/lib/talon_one/models/inline_response2008.rb +1 -1
  198. data/lib/talon_one/models/inline_response2009.rb +11 -11
  199. data/lib/talon_one/models/ledger_info.rb +31 -1
  200. data/lib/talon_one/models/limit_counter.rb +1 -1
  201. data/lib/talon_one/models/loyalty_balance.rb +14 -4
  202. data/lib/talon_one/models/loyalty_balance_with_tier.rb +11 -1
  203. data/lib/talon_one/models/loyalty_ledger_entry.rb +13 -4
  204. data/lib/talon_one/models/loyalty_program.rb +3 -3
  205. data/lib/talon_one/models/loyalty_program_balance.rb +34 -4
  206. data/lib/talon_one/models/loyalty_sub_ledger.rb +16 -1
  207. data/lib/talon_one/models/management_key.rb +14 -4
  208. data/lib/talon_one/models/model_return.rb +1 -1
  209. data/lib/talon_one/models/new_application_api_key.rb +2 -2
  210. data/lib/talon_one/models/new_audience.rb +1 -1
  211. data/lib/talon_one/models/new_campaign_set.rb +1 -1
  212. data/lib/talon_one/models/new_loyalty_program.rb +3 -3
  213. data/lib/talon_one/models/new_management_key.rb +11 -1
  214. data/lib/talon_one/models/pending_points_notification_policy.rb +14 -4
  215. data/lib/talon_one/models/product.rb +0 -19
  216. data/lib/talon_one/models/product_search_match.rb +1 -6
  217. data/lib/talon_one/models/product_unit_analytics.rb +21 -65
  218. data/lib/talon_one/models/store.rb +1 -1
  219. data/lib/talon_one/models/strikethrough_effect.rb +24 -4
  220. data/lib/talon_one/models/strikethrough_labeling_notification.rb +46 -2
  221. data/lib/talon_one/models/summary_campaign_store_budget.rb +18 -4
  222. data/lib/talon_one/models/template_def.rb +1 -1
  223. data/lib/talon_one/models/tier_downgrade_notification_policy.rb +14 -4
  224. data/lib/talon_one/models/tier_upgrade_notification_policy.rb +14 -4
  225. data/lib/talon_one/models/tier_will_downgrade_notification_policy.rb +11 -1
  226. data/lib/talon_one/models/update_achievement.rb +2 -2
  227. data/lib/talon_one/models/update_loyalty_program.rb +3 -3
  228. data/lib/talon_one/version.rb +1 -1
  229. data/lib/talon_one.rb +18 -4
  230. data/spec/api/integration_api_spec.rb +45 -9
  231. data/spec/api/management_api_spec.rb +75 -60
  232. data/spec/models/achievement_additional_properties_spec.rb +10 -0
  233. data/spec/models/achievement_base_spec.rb +103 -0
  234. data/spec/models/achievement_progress_spec.rb +1 -37
  235. data/spec/models/achievement_progress_with_definition_spec.rb +137 -0
  236. data/spec/models/achievement_spec.rb +10 -0
  237. data/spec/models/achievement_status_entry_spec.rb +137 -0
  238. data/spec/models/add_free_item_effect_props_spec.rb +6 -0
  239. data/spec/models/additional_campaign_properties_spec.rb +6 -0
  240. data/spec/models/analytics_product_spec.rb +3 -3
  241. data/spec/models/analytics_sku_spec.rb +59 -0
  242. data/spec/models/application_api_key_spec.rb +1 -1
  243. data/spec/models/application_cif_references_spec.rb +47 -0
  244. data/spec/models/base_loyalty_program_spec.rb +1 -1
  245. data/spec/models/campaign_detail_spec.rb +47 -0
  246. data/spec/models/campaign_notification_policy_spec.rb +6 -0
  247. data/spec/models/campaign_spec.rb +6 -0
  248. data/spec/models/campaign_store_budget_limit_config_spec.rb +73 -0
  249. data/spec/models/card_expiring_points_notification_policy_spec.rb +6 -0
  250. data/spec/models/catalogs_strikethrough_notification_policy_spec.rb +6 -0
  251. data/spec/models/coupons_notification_policy_spec.rb +12 -0
  252. data/spec/models/create_application_api_key_spec.rb +1 -1
  253. data/spec/models/customer_session_v2_spec.rb +0 -6
  254. data/spec/models/expiring_coupons_notification_policy_spec.rb +6 -0
  255. data/spec/models/expiring_points_notification_policy_spec.rb +6 -0
  256. data/spec/models/hidden_conditions_effects_spec.rb +59 -0
  257. data/spec/models/inline_response20010_spec.rb +1 -1
  258. data/spec/models/inline_response20011_spec.rb +1 -1
  259. data/spec/models/inline_response20015_spec.rb +1 -1
  260. data/spec/models/inline_response20016_spec.rb +1 -1
  261. data/spec/models/inline_response20017_spec.rb +0 -6
  262. data/spec/models/inline_response2001_spec.rb +1 -1
  263. data/spec/models/inline_response20020_spec.rb +6 -0
  264. data/spec/models/inline_response20021_spec.rb +0 -6
  265. data/spec/models/inline_response20022_spec.rb +0 -6
  266. data/spec/models/inline_response20023_spec.rb +0 -6
  267. data/spec/models/inline_response20024_spec.rb +6 -0
  268. data/spec/models/inline_response20025_spec.rb +6 -0
  269. data/spec/models/inline_response20026_spec.rb +6 -0
  270. data/spec/models/inline_response20028_spec.rb +1 -1
  271. data/spec/models/inline_response20029_spec.rb +0 -6
  272. data/spec/models/inline_response2002_spec.rb +1 -1
  273. data/spec/models/inline_response20031_spec.rb +1 -1
  274. data/spec/models/inline_response20033_spec.rb +1 -1
  275. data/spec/models/inline_response20034_spec.rb +0 -6
  276. data/spec/models/inline_response20035_spec.rb +6 -0
  277. data/spec/models/inline_response20037_spec.rb +6 -0
  278. data/spec/models/inline_response20041_spec.rb +0 -6
  279. data/spec/models/inline_response20044_spec.rb +2 -2
  280. data/spec/models/inline_response20045_spec.rb +1 -1
  281. data/spec/models/inline_response20046_spec.rb +1 -1
  282. data/spec/models/inline_response20047_spec.rb +6 -0
  283. data/spec/models/inline_response20048_spec.rb +47 -0
  284. data/spec/models/inline_response20049_spec.rb +47 -0
  285. data/spec/models/inline_response2005_spec.rb +1 -1
  286. data/spec/models/inline_response2006_spec.rb +1 -1
  287. data/spec/models/inline_response2009_spec.rb +1 -1
  288. data/spec/models/ledger_info_spec.rb +12 -0
  289. data/spec/models/loyalty_balance_spec.rb +6 -0
  290. data/spec/models/loyalty_balance_with_tier_spec.rb +6 -0
  291. data/spec/models/loyalty_ledger_entry_flags_spec.rb +41 -0
  292. data/spec/models/loyalty_ledger_entry_spec.rb +6 -0
  293. data/spec/models/loyalty_program_balance_spec.rb +12 -0
  294. data/spec/models/loyalty_program_spec.rb +1 -1
  295. data/spec/models/loyalty_sub_ledger_spec.rb +6 -0
  296. data/spec/models/management_key_spec.rb +6 -0
  297. data/spec/models/message_test_spec.rb +47 -0
  298. data/spec/models/new_application_api_key_spec.rb +1 -1
  299. data/spec/models/new_loyalty_program_spec.rb +1 -1
  300. data/spec/models/new_management_key_spec.rb +6 -0
  301. data/spec/models/new_message_test_spec.rb +79 -0
  302. data/spec/models/pending_points_notification_policy_spec.rb +6 -0
  303. data/spec/models/product_unit_analytics_data_point_spec.rb +65 -0
  304. data/spec/models/product_unit_analytics_spec.rb +2 -20
  305. data/spec/models/product_unit_analytics_totals_spec.rb +41 -0
  306. data/spec/models/sku_unit_analytics_data_point_spec.rb +59 -0
  307. data/spec/models/sku_unit_analytics_spec.rb +47 -0
  308. data/spec/models/strikethrough_effect_spec.rb +12 -0
  309. data/spec/models/strikethrough_labeling_notification_spec.rb +10 -0
  310. data/spec/models/summary_campaign_store_budget_spec.rb +6 -0
  311. data/spec/models/tier_downgrade_notification_policy_spec.rb +6 -0
  312. data/spec/models/tier_upgrade_notification_policy_spec.rb +6 -0
  313. data/spec/models/tier_will_downgrade_notification_policy_spec.rb +6 -0
  314. data/spec/models/update_loyalty_program_spec.rb +1 -1
  315. metadata +37 -3
@@ -66,10 +66,6 @@ module TalonOne
66
66
  invalid_properties.push('invalid value for "name", name cannot be nil.')
67
67
  end
68
68
 
69
- if @name.to_s.length > 50
70
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -77,24 +73,9 @@ module TalonOne
77
73
  # @return true if the model is valid
78
74
  def valid?
79
75
  return false if @name.nil?
80
- return false if @name.to_s.length > 50
81
76
  true
82
77
  end
83
78
 
84
- # Custom attribute writer method with validation
85
- # @param [Object] name Value to be assigned
86
- def name=(name)
87
- if name.nil?
88
- fail ArgumentError, 'name cannot be nil'
89
- end
90
-
91
- if name.to_s.length > 50
92
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 50.'
93
- end
94
-
95
- @name = name
96
- end
97
-
98
79
  # Checks equality by comparing each attribute.
99
80
  # @param [Object] Object to be compared
100
81
  def ==(o)
@@ -20,7 +20,7 @@ module TalonOne
20
20
  # The string matching the given value. Either a product name or SKU.
21
21
  attr_accessor :value
22
22
 
23
- # The ID of the SKU linked to a product. If empty, this is an analytics-level product.
23
+ # The ID of the SKU linked to a product. If empty, this is an product.
24
24
  attr_accessor :product_sku_id
25
25
 
26
26
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -79,10 +79,6 @@ module TalonOne
79
79
  # @return Array for valid properties with the reasons
80
80
  def list_invalid_properties
81
81
  invalid_properties = Array.new
82
- if @product_id.nil?
83
- invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
84
- end
85
-
86
82
  if @value.nil?
87
83
  invalid_properties.push('invalid value for "value", value cannot be nil.')
88
84
  end
@@ -93,7 +89,6 @@ module TalonOne
93
89
  # Check to see if the all the properties in the model are valid
94
90
  # @return true if the model is valid
95
91
  def valid?
96
- return false if @product_id.nil?
97
92
  return false if @value.nil?
98
93
  true
99
94
  end
@@ -14,39 +14,23 @@ require 'date'
14
14
 
15
15
  module TalonOne
16
16
  class ProductUnitAnalytics
17
- # The start of the aggregation time frame in UTC.
18
- attr_accessor :start_time
17
+ attr_accessor :data
19
18
 
20
- # The end of the aggregation time frame in UTC.
21
- attr_accessor :end_time
22
-
23
- attr_accessor :purchased_units
24
-
25
- # The ID of the analytics-level product.
26
- attr_accessor :product_id
27
-
28
- # The name of the analytics-level product.
29
- attr_accessor :product_name
19
+ attr_accessor :totals
30
20
 
31
21
  # Attribute mapping from ruby-style variable name to JSON key.
32
22
  def self.attribute_map
33
23
  {
34
- :'start_time' => :'startTime',
35
- :'end_time' => :'endTime',
36
- :'purchased_units' => :'purchasedUnits',
37
- :'product_id' => :'productId',
38
- :'product_name' => :'productName'
24
+ :'data' => :'data',
25
+ :'totals' => :'totals'
39
26
  }
40
27
  end
41
28
 
42
29
  # Attribute type mapping.
43
30
  def self.openapi_types
44
31
  {
45
- :'start_time' => :'DateTime',
46
- :'end_time' => :'DateTime',
47
- :'purchased_units' => :'AnalyticsDataPointWithTrend',
48
- :'product_id' => :'Integer',
49
- :'product_name' => :'String'
32
+ :'data' => :'Array<ProductUnitAnalyticsDataPoint>',
33
+ :'totals' => :'ProductUnitAnalyticsTotals'
50
34
  }
51
35
  end
52
36
 
@@ -71,24 +55,14 @@ module TalonOne
71
55
  h[k.to_sym] = v
72
56
  }
73
57
 
74
- if attributes.key?(:'start_time')
75
- self.start_time = attributes[:'start_time']
76
- end
77
-
78
- if attributes.key?(:'end_time')
79
- self.end_time = attributes[:'end_time']
80
- end
81
-
82
- if attributes.key?(:'purchased_units')
83
- self.purchased_units = attributes[:'purchased_units']
84
- end
85
-
86
- if attributes.key?(:'product_id')
87
- self.product_id = attributes[:'product_id']
58
+ if attributes.key?(:'data')
59
+ if (value = attributes[:'data']).is_a?(Array)
60
+ self.data = value
61
+ end
88
62
  end
89
63
 
90
- if attributes.key?(:'product_name')
91
- self.product_name = attributes[:'product_name']
64
+ if attributes.key?(:'totals')
65
+ self.totals = attributes[:'totals']
92
66
  end
93
67
  end
94
68
 
@@ -96,24 +70,12 @@ module TalonOne
96
70
  # @return Array for valid properties with the reasons
97
71
  def list_invalid_properties
98
72
  invalid_properties = Array.new
99
- if @start_time.nil?
100
- invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
101
- end
102
-
103
- if @end_time.nil?
104
- invalid_properties.push('invalid value for "end_time", end_time cannot be nil.')
105
- end
106
-
107
- if @purchased_units.nil?
108
- invalid_properties.push('invalid value for "purchased_units", purchased_units cannot be nil.')
109
- end
110
-
111
- if @product_id.nil?
112
- invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
73
+ if @data.nil?
74
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
113
75
  end
114
76
 
115
- if @product_name.nil?
116
- invalid_properties.push('invalid value for "product_name", product_name cannot be nil.')
77
+ if @totals.nil?
78
+ invalid_properties.push('invalid value for "totals", totals cannot be nil.')
117
79
  end
118
80
 
119
81
  invalid_properties
@@ -122,11 +84,8 @@ module TalonOne
122
84
  # Check to see if the all the properties in the model are valid
123
85
  # @return true if the model is valid
124
86
  def valid?
125
- return false if @start_time.nil?
126
- return false if @end_time.nil?
127
- return false if @purchased_units.nil?
128
- return false if @product_id.nil?
129
- return false if @product_name.nil?
87
+ return false if @data.nil?
88
+ return false if @totals.nil?
130
89
  true
131
90
  end
132
91
 
@@ -135,11 +94,8 @@ module TalonOne
135
94
  def ==(o)
136
95
  return true if self.equal?(o)
137
96
  self.class == o.class &&
138
- start_time == o.start_time &&
139
- end_time == o.end_time &&
140
- purchased_units == o.purchased_units &&
141
- product_id == o.product_id &&
142
- product_name == o.product_name
97
+ data == o.data &&
98
+ totals == o.totals
143
99
  end
144
100
 
145
101
  # @see the `==` method
@@ -151,7 +107,7 @@ module TalonOne
151
107
  # Calculates hash code according to all attributes.
152
108
  # @return [Integer] Hash code
153
109
  def hash
154
- [start_time, end_time, purchased_units, product_id, product_name].hash
110
+ [data, totals].hash
155
111
  end
156
112
 
157
113
  # Builds the object from hash
@@ -32,7 +32,7 @@ module TalonOne
32
32
  # The integration ID of the store. You choose this ID when you create a store. **Note**: You cannot edit the `integrationId` after the store has been created.
33
33
  attr_accessor :integration_id
34
34
 
35
- # The ID of the application that owns this entity.
35
+ # The ID of the Application that owns this entity.
36
36
  attr_accessor :application_id
37
37
 
38
38
  # Timestamp of the most recent update on this entity.
@@ -32,6 +32,12 @@ module TalonOne
32
32
 
33
33
  attr_accessor :props
34
34
 
35
+ # The start of the time frame where the effect is active in UTC.
36
+ attr_accessor :start_time
37
+
38
+ # The end of the time frame where the effect is active in UTC.
39
+ attr_accessor :end_time
40
+
35
41
  # Attribute mapping from ruby-style variable name to JSON key.
36
42
  def self.attribute_map
37
43
  {
@@ -40,7 +46,9 @@ module TalonOne
40
46
  :'rule_index' => :'ruleIndex',
41
47
  :'rule_name' => :'ruleName',
42
48
  :'type' => :'type',
43
- :'props' => :'props'
49
+ :'props' => :'props',
50
+ :'start_time' => :'startTime',
51
+ :'end_time' => :'endTime'
44
52
  }
45
53
  end
46
54
 
@@ -52,7 +60,9 @@ module TalonOne
52
60
  :'rule_index' => :'Integer',
53
61
  :'rule_name' => :'String',
54
62
  :'type' => :'String',
55
- :'props' => :'Object'
63
+ :'props' => :'Object',
64
+ :'start_time' => :'DateTime',
65
+ :'end_time' => :'DateTime'
56
66
  }
57
67
  end
58
68
 
@@ -100,6 +110,14 @@ module TalonOne
100
110
  if attributes.key?(:'props')
101
111
  self.props = attributes[:'props']
102
112
  end
113
+
114
+ if attributes.key?(:'start_time')
115
+ self.start_time = attributes[:'start_time']
116
+ end
117
+
118
+ if attributes.key?(:'end_time')
119
+ self.end_time = attributes[:'end_time']
120
+ end
103
121
  end
104
122
 
105
123
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,7 +173,9 @@ module TalonOne
155
173
  rule_index == o.rule_index &&
156
174
  rule_name == o.rule_name &&
157
175
  type == o.type &&
158
- props == o.props
176
+ props == o.props &&
177
+ start_time == o.start_time &&
178
+ end_time == o.end_time
159
179
  end
160
180
 
161
181
  # @see the `==` method
@@ -167,7 +187,7 @@ module TalonOne
167
187
  # Calculates hash code according to all attributes.
168
188
  # @return [Integer] Hash code
169
189
  def hash
170
- [campaign_id, ruleset_id, rule_index, rule_name, type, props].hash
190
+ [campaign_id, ruleset_id, rule_index, rule_name, type, props, start_time, end_time].hash
171
191
  end
172
192
 
173
193
  # Builds the object from hash
@@ -15,7 +15,10 @@ require 'date'
15
15
  module TalonOne
16
16
  # The strikethrough labels notification for an application.
17
17
  class StrikethroughLabelingNotification
18
- # The ID of the application that catalog items labels belongs to.
18
+ # The version of the strikethrough pricing notification.
19
+ attr_accessor :version
20
+
21
+ # The ID of the Application to which the catalog items labels belongs.
19
22
  attr_accessor :application_id
20
23
 
21
24
  # The batch number of the notification. Notifications might be sent in different batches.
@@ -28,9 +31,32 @@ module TalonOne
28
31
 
29
32
  attr_accessor :changed_items
30
33
 
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
31
56
  # Attribute mapping from ruby-style variable name to JSON key.
32
57
  def self.attribute_map
33
58
  {
59
+ :'version' => :'version',
34
60
  :'application_id' => :'applicationId',
35
61
  :'current_batch' => :'currentBatch',
36
62
  :'total_batches' => :'totalBatches',
@@ -42,6 +68,7 @@ module TalonOne
42
68
  # Attribute type mapping.
43
69
  def self.openapi_types
44
70
  {
71
+ :'version' => :'String',
45
72
  :'application_id' => :'Integer',
46
73
  :'current_batch' => :'Integer',
47
74
  :'total_batches' => :'Integer',
@@ -71,6 +98,10 @@ module TalonOne
71
98
  h[k.to_sym] = v
72
99
  }
73
100
 
101
+ if attributes.key?(:'version')
102
+ self.version = attributes[:'version']
103
+ end
104
+
74
105
  if attributes.key?(:'application_id')
75
106
  self.application_id = attributes[:'application_id']
76
107
  end
@@ -124,6 +155,8 @@ module TalonOne
124
155
  # Check to see if the all the properties in the model are valid
125
156
  # @return true if the model is valid
126
157
  def valid?
158
+ version_validator = EnumAttributeValidator.new('String', ["v2"])
159
+ return false unless version_validator.valid?(@version)
127
160
  return false if @application_id.nil?
128
161
  return false if @current_batch.nil?
129
162
  return false if @total_batches.nil?
@@ -132,11 +165,22 @@ module TalonOne
132
165
  true
133
166
  end
134
167
 
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] version Object to be assigned
170
+ def version=(version)
171
+ validator = EnumAttributeValidator.new('String', ["v2"])
172
+ unless validator.valid?(version)
173
+ fail ArgumentError, "invalid value for \"version\", must be one of #{validator.allowable_values}."
174
+ end
175
+ @version = version
176
+ end
177
+
135
178
  # Checks equality by comparing each attribute.
136
179
  # @param [Object] Object to be compared
137
180
  def ==(o)
138
181
  return true if self.equal?(o)
139
182
  self.class == o.class &&
183
+ version == o.version &&
140
184
  application_id == o.application_id &&
141
185
  current_batch == o.current_batch &&
142
186
  total_batches == o.total_batches &&
@@ -153,7 +197,7 @@ module TalonOne
153
197
  # Calculates hash code according to all attributes.
154
198
  # @return [Integer] Hash code
155
199
  def hash
156
- [application_id, current_batch, total_batches, trigger, changed_items].hash
200
+ [version, application_id, current_batch, total_batches, trigger, changed_items].hash
157
201
  end
158
202
 
159
203
  # Builds the object from hash
@@ -20,6 +20,8 @@ module TalonOne
20
20
 
21
21
  attr_accessor :store_count
22
22
 
23
+ attr_accessor :imported
24
+
23
25
  class EnumAttributeValidator
24
26
  attr_reader :datatype
25
27
  attr_reader :allowable_values
@@ -47,7 +49,8 @@ module TalonOne
47
49
  {
48
50
  :'action' => :'action',
49
51
  :'period' => :'period',
50
- :'store_count' => :'storeCount'
52
+ :'store_count' => :'storeCount',
53
+ :'imported' => :'imported'
51
54
  }
52
55
  end
53
56
 
@@ -56,7 +59,8 @@ module TalonOne
56
59
  {
57
60
  :'action' => :'String',
58
61
  :'period' => :'String',
59
- :'store_count' => :'Integer'
62
+ :'store_count' => :'Integer',
63
+ :'imported' => :'Boolean'
60
64
  }
61
65
  end
62
66
 
@@ -92,6 +96,10 @@ module TalonOne
92
96
  if attributes.key?(:'store_count')
93
97
  self.store_count = attributes[:'store_count']
94
98
  end
99
+
100
+ if attributes.key?(:'imported')
101
+ self.imported = attributes[:'imported']
102
+ end
95
103
  end
96
104
 
97
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -106,6 +114,10 @@ module TalonOne
106
114
  invalid_properties.push('invalid value for "store_count", store_count cannot be nil.')
107
115
  end
108
116
 
117
+ if @imported.nil?
118
+ invalid_properties.push('invalid value for "imported", imported cannot be nil.')
119
+ end
120
+
109
121
  invalid_properties
110
122
  end
111
123
 
@@ -118,6 +130,7 @@ module TalonOne
118
130
  period_validator = EnumAttributeValidator.new('String', ["overall", "daily", "weekly", "monthly", "yearly"])
119
131
  return false unless period_validator.valid?(@period)
120
132
  return false if @store_count.nil?
133
+ return false if @imported.nil?
121
134
  true
122
135
  end
123
136
 
@@ -148,7 +161,8 @@ module TalonOne
148
161
  self.class == o.class &&
149
162
  action == o.action &&
150
163
  period == o.period &&
151
- store_count == o.store_count
164
+ store_count == o.store_count &&
165
+ imported == o.imported
152
166
  end
153
167
 
154
168
  # @see the `==` method
@@ -160,7 +174,7 @@ module TalonOne
160
174
  # Calculates hash code according to all attributes.
161
175
  # @return [Integer] Hash code
162
176
  def hash
163
- [action, period, store_count].hash
177
+ [action, period, store_count, imported].hash
164
178
  end
165
179
 
166
180
  # Builds the object from hash
@@ -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 application that owns this entity.
23
+ # The ID of the Application that owns this entity.
24
24
  attr_accessor :application_id
25
25
 
26
26
  # Campaigner-friendly name for the template that will be shown in the rule editor.
@@ -20,11 +20,15 @@ module TalonOne
20
20
  # Indicates whether batching is activated.
21
21
  attr_accessor :batching_enabled
22
22
 
23
+ # The required size of each batch of data. This value applies only when `batchingEnabled` is `true`.
24
+ attr_accessor :batch_size
25
+
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'name' => :'name',
27
- :'batching_enabled' => :'batchingEnabled'
30
+ :'batching_enabled' => :'batchingEnabled',
31
+ :'batch_size' => :'batchSize'
28
32
  }
29
33
  end
30
34
 
@@ -32,7 +36,8 @@ module TalonOne
32
36
  def self.openapi_types
33
37
  {
34
38
  :'name' => :'String',
35
- :'batching_enabled' => :'Boolean'
39
+ :'batching_enabled' => :'Boolean',
40
+ :'batch_size' => :'Integer'
36
41
  }
37
42
  end
38
43
 
@@ -66,6 +71,10 @@ module TalonOne
66
71
  else
67
72
  self.batching_enabled = true
68
73
  end
74
+
75
+ if attributes.key?(:'batch_size')
76
+ self.batch_size = attributes[:'batch_size']
77
+ end
69
78
  end
70
79
 
71
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,7 +120,8 @@ module TalonOne
111
120
  return true if self.equal?(o)
112
121
  self.class == o.class &&
113
122
  name == o.name &&
114
- batching_enabled == o.batching_enabled
123
+ batching_enabled == o.batching_enabled &&
124
+ batch_size == o.batch_size
115
125
  end
116
126
 
117
127
  # @see the `==` method
@@ -123,7 +133,7 @@ module TalonOne
123
133
  # Calculates hash code according to all attributes.
124
134
  # @return [Integer] Hash code
125
135
  def hash
126
- [name, batching_enabled].hash
136
+ [name, batching_enabled, batch_size].hash
127
137
  end
128
138
 
129
139
  # Builds the object from hash
@@ -20,11 +20,15 @@ module TalonOne
20
20
  # Indicates whether batching is activated.
21
21
  attr_accessor :batching_enabled
22
22
 
23
+ # The required size of each batch of data. This value applies only when `batchingEnabled` is `true`.
24
+ attr_accessor :batch_size
25
+
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'name' => :'name',
27
- :'batching_enabled' => :'batchingEnabled'
30
+ :'batching_enabled' => :'batchingEnabled',
31
+ :'batch_size' => :'batchSize'
28
32
  }
29
33
  end
30
34
 
@@ -32,7 +36,8 @@ module TalonOne
32
36
  def self.openapi_types
33
37
  {
34
38
  :'name' => :'String',
35
- :'batching_enabled' => :'Boolean'
39
+ :'batching_enabled' => :'Boolean',
40
+ :'batch_size' => :'Integer'
36
41
  }
37
42
  end
38
43
 
@@ -66,6 +71,10 @@ module TalonOne
66
71
  else
67
72
  self.batching_enabled = true
68
73
  end
74
+
75
+ if attributes.key?(:'batch_size')
76
+ self.batch_size = attributes[:'batch_size']
77
+ end
69
78
  end
70
79
 
71
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -111,7 +120,8 @@ module TalonOne
111
120
  return true if self.equal?(o)
112
121
  self.class == o.class &&
113
122
  name == o.name &&
114
- batching_enabled == o.batching_enabled
123
+ batching_enabled == o.batching_enabled &&
124
+ batch_size == o.batch_size
115
125
  end
116
126
 
117
127
  # @see the `==` method
@@ -123,7 +133,7 @@ module TalonOne
123
133
  # Calculates hash code according to all attributes.
124
134
  # @return [Integer] Hash code
125
135
  def hash
126
- [name, batching_enabled].hash
136
+ [name, batching_enabled, batch_size].hash
127
137
  end
128
138
 
129
139
  # Builds the object from hash
@@ -20,6 +20,9 @@ module TalonOne
20
20
  # Indicates whether batching is activated.
21
21
  attr_accessor :batching_enabled
22
22
 
23
+ # The required size of each batch of data. This value applies only when `batchingEnabled` is `true`.
24
+ attr_accessor :batch_size
25
+
23
26
  attr_accessor :triggers
24
27
 
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -27,6 +30,7 @@ module TalonOne
27
30
  {
28
31
  :'name' => :'name',
29
32
  :'batching_enabled' => :'batchingEnabled',
33
+ :'batch_size' => :'batchSize',
30
34
  :'triggers' => :'triggers'
31
35
  }
32
36
  end
@@ -36,6 +40,7 @@ module TalonOne
36
40
  {
37
41
  :'name' => :'String',
38
42
  :'batching_enabled' => :'Boolean',
43
+ :'batch_size' => :'Integer',
39
44
  :'triggers' => :'Array<TierWillDowngradeNotificationTrigger>'
40
45
  }
41
46
  end
@@ -71,6 +76,10 @@ module TalonOne
71
76
  self.batching_enabled = true
72
77
  end
73
78
 
79
+ if attributes.key?(:'batch_size')
80
+ self.batch_size = attributes[:'batch_size']
81
+ end
82
+
74
83
  if attributes.key?(:'triggers')
75
84
  if (value = attributes[:'triggers']).is_a?(Array)
76
85
  self.triggers = value
@@ -127,6 +136,7 @@ module TalonOne
127
136
  self.class == o.class &&
128
137
  name == o.name &&
129
138
  batching_enabled == o.batching_enabled &&
139
+ batch_size == o.batch_size &&
130
140
  triggers == o.triggers
131
141
  end
132
142
 
@@ -139,7 +149,7 @@ module TalonOne
139
149
  # Calculates hash code according to all attributes.
140
150
  # @return [Integer] Hash code
141
151
  def hash
142
- [name, batching_enabled, triggers].hash
152
+ [name, batching_enabled, batch_size, triggers].hash
143
153
  end
144
154
 
145
155
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module TalonOne
16
16
  class UpdateAchievement
17
- # The internal name of the achievement used in API requests.
17
+ # The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created.
18
18
  attr_accessor :name
19
19
 
20
20
  # The display name for the achievement in the Campaign Manager.
@@ -26,7 +26,7 @@ module TalonOne
26
26
  # The required number of actions or the transactional milestone to complete the achievement.
27
27
  attr_accessor :target
28
28
 
29
- # The relative duration after which the achievement ends and resets for a particular customer profile.
29
+ # The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period.
30
30
  attr_accessor :period
31
31
 
32
32
  attr_accessor :period_end_override
@@ -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 tiers in this loyalty program.
@@ -239,7 +239,7 @@ module TalonOne
239
239
  return false unless tiers_expiration_policy_validator.valid?(@tiers_expiration_policy)
240
240
  tiers_downgrade_policy_validator = EnumAttributeValidator.new('String', ["one_down", "balance_based"])
241
241
  return false unless tiers_downgrade_policy_validator.valid?(@tiers_downgrade_policy)
242
- return_policy_validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance"])
242
+ return_policy_validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance", "unlimited"])
243
243
  return false unless return_policy_validator.valid?(@return_policy)
244
244
  true
245
245
  end
@@ -287,7 +287,7 @@ module TalonOne
287
287
  # Custom attribute writer method checking allowed values (enum).
288
288
  # @param [Object] return_policy Object to be assigned
289
289
  def return_policy=(return_policy)
290
- validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance"])
290
+ validator = EnumAttributeValidator.new('String', ["only_pending", "within_balance", "unlimited"])
291
291
  unless validator.valid?(return_policy)
292
292
  fail ArgumentError, "invalid value for \"return_policy\", must be one of #{validator.allowable_values}."
293
293
  end