talon_one 8.0.0 → 10.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 (293) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -8
  3. data/docs/Account.md +1 -1
  4. data/docs/AccountAdditionalCost.md +1 -1
  5. data/docs/Achievement.md +2 -2
  6. data/docs/AchievementBase.md +35 -0
  7. data/docs/AchievementProgressWithDefinition.md +45 -0
  8. data/docs/AchievementStatusEntry.md +45 -0
  9. data/docs/AddPriceAdjustmentCatalogAction.md +19 -0
  10. data/docs/AddedDeductedPointsBalancesNotificationPolicy.md +19 -0
  11. data/docs/AnalyticsSKU.md +23 -0
  12. data/docs/Application.md +1 -1
  13. data/docs/ApplicationCIF.md +1 -1
  14. data/docs/ApplicationCIFExpression.md +1 -1
  15. data/docs/ApplicationCIFReferences.md +19 -0
  16. data/docs/ApplicationCustomer.md +2 -2
  17. data/docs/ApplicationEvent.md +1 -1
  18. data/docs/ApplicationSession.md +1 -1
  19. data/docs/Attribute.md +1 -1
  20. data/docs/Audience.md +1 -1
  21. data/docs/AudienceCustomer.md +2 -2
  22. data/docs/BaseNotificationWebhook.md +1 -1
  23. data/docs/Binding.md +9 -1
  24. data/docs/CampaignCollection.md +1 -1
  25. data/docs/CampaignCollectionWithoutPayload.md +1 -1
  26. data/docs/CampaignDeactivationRequest.md +17 -0
  27. data/docs/CampaignDetail.md +19 -0
  28. data/docs/CampaignGroup.md +1 -1
  29. data/docs/CampaignSet.md +1 -1
  30. data/docs/CampaignStoreBudget.md +1 -1
  31. data/docs/CampaignStoreBudgetLimitConfig.md +25 -0
  32. data/docs/CampaignTemplate.md +4 -2
  33. data/docs/CardAddedDeductedPointsBalancesNotificationPolicy.md +19 -0
  34. data/docs/CartItem.md +12 -2
  35. data/docs/Catalog.md +1 -1
  36. data/docs/CatalogItem.md +1 -1
  37. data/docs/Change.md +1 -1
  38. data/docs/Collection.md +1 -1
  39. data/docs/CollectionWithoutPayload.md +1 -1
  40. data/docs/Coupon.md +2 -2
  41. data/docs/CouponCreationJob.md +1 -1
  42. data/docs/CouponDeletionJob.md +1 -1
  43. data/docs/CouponEntity.md +19 -0
  44. data/docs/CreateAchievement.md +1 -1
  45. data/docs/CustomEffect.md +1 -1
  46. data/docs/CustomerProfile.md +2 -2
  47. data/docs/CustomerProfileEntity.md +19 -0
  48. data/docs/CustomerSessionV2.md +1 -1
  49. data/docs/Effect.md +6 -0
  50. data/docs/EffectEntity.md +7 -1
  51. data/docs/Entity.md +1 -1
  52. data/docs/Environment.md +4 -2
  53. data/docs/Event.md +1 -1
  54. data/docs/EventType.md +1 -1
  55. data/docs/Export.md +1 -1
  56. data/docs/ExtendLoyaltyPointsExpiryDateEffectProps.md +25 -0
  57. data/docs/Giveaway.md +1 -1
  58. data/docs/GiveawaysPool.md +1 -1
  59. data/docs/HiddenConditionsEffects.md +23 -0
  60. data/docs/Import.md +1 -1
  61. data/docs/InlineResponse20048.md +17 -0
  62. data/docs/InlineResponse20049.md +17 -0
  63. data/docs/InlineResponse20050.md +19 -0
  64. data/docs/InlineResponse20051.md +19 -0
  65. data/docs/IntegrationApi.md +6 -4
  66. data/docs/IntegrationCoupon.md +2 -2
  67. data/docs/IntegrationCustomerProfileAudienceRequest.md +17 -0
  68. data/docs/IntegrationCustomerProfileAudienceRequestItem.md +21 -0
  69. data/docs/IntegrationEventV2Request.md +2 -0
  70. data/docs/InventoryCoupon.md +2 -2
  71. data/docs/InventoryReferral.md +1 -1
  72. data/docs/LedgerEntry.md +1 -1
  73. data/docs/LedgerInfo.md +2 -2
  74. data/docs/LedgerTransactionLogEntryIntegrationAPI.md +3 -1
  75. data/docs/LoyaltyCard.md +1 -1
  76. data/docs/LoyaltyLedgerEntryFlags.md +17 -0
  77. data/docs/LoyaltyProgramBalance.md +2 -2
  78. data/docs/LoyaltyProgramTransaction.md +3 -1
  79. data/docs/LoyaltyTier.md +1 -1
  80. data/docs/ManagementApi.md +824 -220
  81. data/docs/MessageTest.md +27 -0
  82. data/docs/ModelReturn.md +1 -1
  83. data/docs/MultipleAudiencesItem.md +1 -1
  84. data/docs/NewMessageTest.md +29 -0
  85. data/docs/NewPriceAdjustment.md +27 -0
  86. data/docs/NewPriceType.md +23 -0
  87. data/docs/NewWebhook.md +2 -0
  88. data/docs/Picklist.md +1 -1
  89. data/docs/PriceDetail.md +23 -0
  90. data/docs/PriceType.md +33 -0
  91. data/docs/ProductUnitAnalyticsDataPoint.md +25 -0
  92. data/docs/ProductUnitAnalyticsTotals.md +17 -0
  93. data/docs/Referral.md +1 -1
  94. data/docs/RevisionActivationRequest.md +19 -0
  95. data/docs/Role.md +1 -1
  96. data/docs/RoleV2.md +1 -1
  97. data/docs/Ruleset.md +1 -1
  98. data/docs/SamlConnection.md +1 -1
  99. data/docs/ScimBaseGroup.md +19 -0
  100. data/docs/ScimGroup.md +21 -0
  101. data/docs/ScimGroupMember.md +19 -0
  102. data/docs/ScimGroupsListResponse.md +21 -0
  103. data/docs/SkuUnitAnalytics.md +19 -0
  104. data/docs/SkuUnitAnalyticsDataPoint.md +23 -0
  105. data/docs/Store.md +1 -1
  106. data/docs/StrikethroughLabelingNotification.md +2 -0
  107. data/docs/TemplateDef.md +1 -1
  108. data/docs/UpdateAchievement.md +1 -1
  109. data/docs/User.md +1 -1
  110. data/docs/Webhook.md +3 -1
  111. data/docs/WebhookAuthentication.md +33 -0
  112. data/docs/WebhookAuthenticationBase.md +21 -0
  113. data/docs/WebhookAuthenticationDataBasic.md +19 -0
  114. data/docs/WebhookAuthenticationDataCustom.md +17 -0
  115. data/docs/WebhookAuthenticationWebhookRef.md +21 -0
  116. data/docs/WebhookWithOutgoingIntegrationDetails.md +3 -1
  117. data/lib/talon_one/api/integration_api.rb +9 -6
  118. data/lib/talon_one/api/management_api.rb +1009 -304
  119. data/lib/talon_one/models/account.rb +1 -1
  120. data/lib/talon_one/models/account_additional_cost.rb +1 -1
  121. data/lib/talon_one/models/achievement.rb +4 -4
  122. data/lib/talon_one/models/achievement_base.rb +377 -0
  123. data/lib/talon_one/models/achievement_progress_with_definition.rb +490 -0
  124. data/lib/talon_one/models/achievement_status_entry.rb +472 -0
  125. data/lib/talon_one/models/add_price_adjustment_catalog_action.rb +230 -0
  126. data/lib/talon_one/models/added_deducted_points_balances_notification_policy.rb +269 -0
  127. data/lib/talon_one/models/analytics_sku.rb +246 -0
  128. data/lib/talon_one/models/application.rb +1 -1
  129. data/lib/talon_one/models/application_cif.rb +1 -1
  130. data/lib/talon_one/models/application_cif_expression.rb +1 -1
  131. data/lib/talon_one/models/application_cif_references.rb +219 -0
  132. data/lib/talon_one/models/application_customer.rb +2 -2
  133. data/lib/talon_one/models/application_event.rb +1 -1
  134. data/lib/talon_one/models/application_session.rb +1 -1
  135. data/lib/talon_one/models/attribute.rb +1 -1
  136. data/lib/talon_one/models/audience.rb +1 -1
  137. data/lib/talon_one/models/audience_customer.rb +2 -2
  138. data/lib/talon_one/models/base_notification.rb +2 -2
  139. data/lib/talon_one/models/base_notification_webhook.rb +1 -1
  140. data/lib/talon_one/models/binding.rb +44 -4
  141. data/lib/talon_one/models/campaign_collection.rb +1 -1
  142. data/lib/talon_one/models/campaign_collection_without_payload.rb +1 -1
  143. data/lib/talon_one/models/campaign_deactivation_request.rb +214 -0
  144. data/lib/talon_one/models/campaign_detail.rb +232 -0
  145. data/lib/talon_one/models/campaign_group.rb +1 -1
  146. data/lib/talon_one/models/campaign_set.rb +1 -1
  147. data/lib/talon_one/models/campaign_store_budget.rb +1 -1
  148. data/lib/talon_one/models/campaign_store_budget_limit_config.rb +322 -0
  149. data/lib/talon_one/models/campaign_template.rb +17 -5
  150. data/lib/talon_one/models/card_added_deducted_points_balances_notification_policy.rb +269 -0
  151. data/lib/talon_one/models/cart_item.rb +57 -5
  152. data/lib/talon_one/models/catalog.rb +1 -1
  153. data/lib/talon_one/models/catalog_action.rb +2 -2
  154. data/lib/talon_one/models/catalog_item.rb +1 -1
  155. data/lib/talon_one/models/change.rb +1 -1
  156. data/lib/talon_one/models/collection.rb +1 -1
  157. data/lib/talon_one/models/collection_without_payload.rb +1 -1
  158. data/lib/talon_one/models/coupon.rb +7 -7
  159. data/lib/talon_one/models/coupon_constraints.rb +5 -5
  160. data/lib/talon_one/models/coupon_creation_job.rb +6 -6
  161. data/lib/talon_one/models/coupon_deletion_job.rb +1 -1
  162. data/lib/talon_one/models/coupon_entity.rb +227 -0
  163. data/lib/talon_one/models/create_achievement.rb +3 -3
  164. data/lib/talon_one/models/custom_effect.rb +1 -1
  165. data/lib/talon_one/models/customer_profile.rb +2 -2
  166. data/lib/talon_one/models/customer_profile_entity.rb +227 -0
  167. data/lib/talon_one/models/customer_session_v2.rb +1 -1
  168. data/lib/talon_one/models/delete_user_request.rb +0 -1
  169. data/lib/talon_one/models/effect.rb +31 -1
  170. data/lib/talon_one/models/effect_entity.rb +34 -4
  171. data/lib/talon_one/models/entity.rb +1 -1
  172. data/lib/talon_one/models/environment.rb +17 -5
  173. data/lib/talon_one/models/event.rb +1 -1
  174. data/lib/talon_one/models/event_type.rb +1 -1
  175. data/lib/talon_one/models/export.rb +1 -1
  176. data/lib/talon_one/models/extend_loyalty_points_expiry_date_effect_props.rb +270 -0
  177. data/lib/talon_one/models/giveaway.rb +1 -1
  178. data/lib/talon_one/models/giveaways_pool.rb +1 -1
  179. data/lib/talon_one/models/hidden_conditions_effects.rb +246 -0
  180. data/lib/talon_one/models/import.rb +1 -1
  181. data/lib/talon_one/models/inline_response20048.rb +208 -0
  182. data/lib/talon_one/models/inline_response20049.rb +208 -0
  183. data/lib/talon_one/models/inline_response20050.rb +222 -0
  184. data/lib/talon_one/models/inline_response20051.rb +227 -0
  185. data/lib/talon_one/models/integration_coupon.rb +7 -7
  186. data/lib/talon_one/models/integration_customer_profile_audience_request.rb +208 -0
  187. data/lib/talon_one/models/integration_customer_profile_audience_request_item.rb +295 -0
  188. data/lib/talon_one/models/integration_event_v2_request.rb +13 -1
  189. data/lib/talon_one/models/inventory_coupon.rb +7 -7
  190. data/lib/talon_one/models/inventory_referral.rb +1 -1
  191. data/lib/talon_one/models/ledger_entry.rb +1 -1
  192. data/lib/talon_one/models/ledger_info.rb +0 -10
  193. data/lib/talon_one/models/ledger_transaction_log_entry_integration_api.rb +13 -4
  194. data/lib/talon_one/models/loyalty_card.rb +1 -1
  195. data/lib/talon_one/models/loyalty_ledger_entry_flags.rb +208 -0
  196. data/lib/talon_one/models/loyalty_program_balance.rb +0 -10
  197. data/lib/talon_one/models/loyalty_program_transaction.rb +13 -4
  198. data/lib/talon_one/models/loyalty_tier.rb +1 -1
  199. data/lib/talon_one/models/message_test.rb +227 -0
  200. data/lib/talon_one/models/model_return.rb +1 -1
  201. data/lib/talon_one/models/multiple_audiences_item.rb +1 -1
  202. data/lib/talon_one/models/new_coupon_creation_job.rb +5 -5
  203. data/lib/talon_one/models/new_coupons.rb +5 -5
  204. data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +5 -5
  205. data/lib/talon_one/models/new_message_test.rb +322 -0
  206. data/lib/talon_one/models/new_price_adjustment.rb +268 -0
  207. data/lib/talon_one/models/new_price_type.rb +270 -0
  208. data/lib/talon_one/models/new_webhook.rb +16 -1
  209. data/lib/talon_one/models/picklist.rb +1 -1
  210. data/lib/talon_one/models/price_detail.rb +237 -0
  211. data/lib/talon_one/models/price_type.rb +347 -0
  212. data/lib/talon_one/models/product_unit_analytics_data_point.rb +271 -0
  213. data/lib/talon_one/models/product_unit_analytics_totals.rb +206 -0
  214. data/lib/talon_one/models/referral.rb +1 -1
  215. data/lib/talon_one/models/revision_activation_request.rb +224 -0
  216. data/lib/talon_one/models/role.rb +1 -1
  217. data/lib/talon_one/models/role_v2.rb +1 -1
  218. data/lib/talon_one/models/ruleset.rb +1 -1
  219. data/lib/talon_one/models/saml_connection.rb +1 -1
  220. data/lib/talon_one/models/scim_base_group.rb +220 -0
  221. data/lib/talon_one/models/scim_group.rb +235 -0
  222. data/lib/talon_one/models/scim_group_member.rb +218 -0
  223. data/lib/talon_one/models/scim_groups_list_response.rb +236 -0
  224. data/lib/talon_one/models/sku_unit_analytics.rb +227 -0
  225. data/lib/talon_one/models/sku_unit_analytics_data_point.rb +256 -0
  226. data/lib/talon_one/models/store.rb +1 -1
  227. data/lib/talon_one/models/strikethrough_labeling_notification.rb +11 -1
  228. data/lib/talon_one/models/template_def.rb +1 -1
  229. data/lib/talon_one/models/update_achievement.rb +3 -3
  230. data/lib/talon_one/models/update_coupon.rb +5 -5
  231. data/lib/talon_one/models/update_coupon_batch.rb +5 -5
  232. data/lib/talon_one/models/user.rb +1 -1
  233. data/lib/talon_one/models/webhook.rb +17 -2
  234. data/lib/talon_one/models/webhook_authentication.rb +365 -0
  235. data/lib/talon_one/models/webhook_authentication_base.rb +274 -0
  236. data/lib/talon_one/models/webhook_authentication_data_basic.rb +227 -0
  237. data/lib/talon_one/models/webhook_authentication_data_custom.rb +213 -0
  238. data/lib/talon_one/models/webhook_authentication_webhook_ref.rb +258 -0
  239. data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +17 -2
  240. data/lib/talon_one/version.rb +1 -1
  241. data/lib/talon_one.rb +26 -1
  242. data/spec/api/integration_api_spec.rb +4 -3
  243. data/spec/api/management_api_spec.rb +227 -90
  244. data/spec/models/achievement_base_spec.rb +1 -1
  245. data/spec/models/achievement_progress_with_definition_spec.rb +1 -1
  246. data/spec/models/achievement_spec.rb +1 -1
  247. data/spec/models/achievement_status_entry_spec.rb +1 -1
  248. data/spec/models/add_price_adjustment_catalog_action_spec.rb +47 -0
  249. data/spec/models/added_deducted_points_balances_notification_policy_spec.rb +51 -0
  250. data/spec/models/base_notification_spec.rb +1 -1
  251. data/spec/models/binding_spec.rb +24 -0
  252. data/spec/models/campaign_deactivation_request_spec.rb +41 -0
  253. data/spec/models/campaign_template_spec.rb +6 -0
  254. data/spec/models/card_added_deducted_points_balances_notification_policy_spec.rb +51 -0
  255. data/spec/models/cart_item_spec.rb +30 -0
  256. data/spec/models/catalog_action_spec.rb +1 -1
  257. data/spec/models/coupon_entity_spec.rb +47 -0
  258. data/spec/models/create_achievement_spec.rb +1 -1
  259. data/spec/models/customer_profile_entity_spec.rb +47 -0
  260. data/spec/models/effect_entity_spec.rb +18 -0
  261. data/spec/models/effect_spec.rb +18 -0
  262. data/spec/models/environment_spec.rb +6 -0
  263. data/spec/models/extend_loyalty_points_expiry_date_effect_props_spec.rb +65 -0
  264. data/spec/models/inline_response20048_spec.rb +0 -6
  265. data/spec/models/inline_response20049_spec.rb +0 -6
  266. data/spec/models/inline_response20050_spec.rb +47 -0
  267. data/spec/models/inline_response20051_spec.rb +47 -0
  268. data/spec/models/integration_customer_profile_audience_request_item_spec.rb +57 -0
  269. data/spec/models/integration_customer_profile_audience_request_spec.rb +41 -0
  270. data/spec/models/integration_event_v2_request_spec.rb +6 -0
  271. data/spec/models/ledger_transaction_log_entry_integration_api_spec.rb +6 -0
  272. data/spec/models/loyalty_program_transaction_spec.rb +6 -0
  273. data/spec/models/new_message_test_spec.rb +1 -1
  274. data/spec/models/new_price_adjustment_spec.rb +71 -0
  275. data/spec/models/new_price_type_spec.rb +59 -0
  276. data/spec/models/new_webhook_spec.rb +6 -0
  277. data/spec/models/price_detail_spec.rb +59 -0
  278. data/spec/models/price_type_spec.rb +89 -0
  279. data/spec/models/revision_activation_request_spec.rb +47 -0
  280. data/spec/models/scim_base_group_spec.rb +47 -0
  281. data/spec/models/scim_group_member_spec.rb +47 -0
  282. data/spec/models/scim_group_spec.rb +53 -0
  283. data/spec/models/scim_groups_list_response_spec.rb +53 -0
  284. data/spec/models/strikethrough_labeling_notification_spec.rb +6 -0
  285. data/spec/models/update_achievement_spec.rb +1 -1
  286. data/spec/models/webhook_authentication_base_spec.rb +57 -0
  287. data/spec/models/webhook_authentication_data_basic_spec.rb +47 -0
  288. data/spec/models/webhook_authentication_data_custom_spec.rb +41 -0
  289. data/spec/models/webhook_authentication_spec.rb +93 -0
  290. data/spec/models/webhook_authentication_webhook_ref_spec.rb +53 -0
  291. data/spec/models/webhook_spec.rb +6 -0
  292. data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
  293. metadata +661 -527
@@ -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 SkuUnitAnalytics
17
+ attr_accessor :data
18
+
19
+ attr_accessor :totals
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'data' => :'data',
25
+ :'totals' => :'totals'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'data' => :'Array<SkuUnitAnalyticsDataPoint>',
33
+ :'totals' => :'ProductUnitAnalyticsTotals'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::SkuUnitAnalytics` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::SkuUnitAnalytics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'data')
59
+ if (value = attributes[:'data']).is_a?(Array)
60
+ self.data = value
61
+ end
62
+ end
63
+
64
+ if attributes.key?(:'totals')
65
+ self.totals = attributes[:'totals']
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 @data.nil?
74
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
75
+ end
76
+
77
+ if @totals.nil?
78
+ invalid_properties.push('invalid value for "totals", totals 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 @data.nil?
88
+ return false if @totals.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
+ data == o.data &&
98
+ totals == o.totals
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
+ [data, totals].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
@@ -0,0 +1,256 @@
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 SkuUnitAnalyticsDataPoint
17
+ # The start of the aggregation time frame in UTC.
18
+ attr_accessor :start_time
19
+
20
+ # The end of the aggregation time frame in UTC.
21
+ attr_accessor :end_time
22
+
23
+ attr_accessor :units_sold
24
+
25
+ # The SKU linked to the application.
26
+ attr_accessor :sku
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'start_time' => :'startTime',
32
+ :'end_time' => :'endTime',
33
+ :'units_sold' => :'unitsSold',
34
+ :'sku' => :'sku'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'start_time' => :'DateTime',
42
+ :'end_time' => :'DateTime',
43
+ :'units_sold' => :'AnalyticsDataPointWithTrend',
44
+ :'sku' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::SkuUnitAnalyticsDataPoint` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::SkuUnitAnalyticsDataPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'start_time')
70
+ self.start_time = attributes[:'start_time']
71
+ end
72
+
73
+ if attributes.key?(:'end_time')
74
+ self.end_time = attributes[:'end_time']
75
+ end
76
+
77
+ if attributes.key?(:'units_sold')
78
+ self.units_sold = attributes[:'units_sold']
79
+ end
80
+
81
+ if attributes.key?(:'sku')
82
+ self.sku = attributes[:'sku']
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ if @start_time.nil?
91
+ invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
92
+ end
93
+
94
+ if @end_time.nil?
95
+ invalid_properties.push('invalid value for "end_time", end_time cannot be nil.')
96
+ end
97
+
98
+ if @units_sold.nil?
99
+ invalid_properties.push('invalid value for "units_sold", units_sold cannot be nil.')
100
+ end
101
+
102
+ if @sku.nil?
103
+ invalid_properties.push('invalid value for "sku", sku cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ return false if @start_time.nil?
113
+ return false if @end_time.nil?
114
+ return false if @units_sold.nil?
115
+ return false if @sku.nil?
116
+ true
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ start_time == o.start_time &&
125
+ end_time == o.end_time &&
126
+ units_sold == o.units_sold &&
127
+ sku == o.sku
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [start_time, end_time, units_sold, sku].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ new.build_from_hash(attributes)
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ self.class.openapi_types.each_pair do |key, type|
155
+ if type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :DateTime
176
+ DateTime.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ TalonOne.const_get(type).build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+ end
256
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module TalonOne
16
16
  class Store
17
- # Internal ID of this entity.
17
+ # The internal ID of this entity.
18
18
  attr_accessor :id
19
19
 
20
20
  # The time this entity was created.
@@ -18,6 +18,9 @@ module TalonOne
18
18
  # The version of the strikethrough pricing notification.
19
19
  attr_accessor :version
20
20
 
21
+ # Timestamp at which the strikethrough pricing update becomes valid. Set for **scheduled** strikethrough pricing updates (version: v2) only.
22
+ attr_accessor :valid_from
23
+
21
24
  # The ID of the Application to which the catalog items labels belongs.
22
25
  attr_accessor :application_id
23
26
 
@@ -57,6 +60,7 @@ module TalonOne
57
60
  def self.attribute_map
58
61
  {
59
62
  :'version' => :'version',
63
+ :'valid_from' => :'validFrom',
60
64
  :'application_id' => :'applicationId',
61
65
  :'current_batch' => :'currentBatch',
62
66
  :'total_batches' => :'totalBatches',
@@ -69,6 +73,7 @@ module TalonOne
69
73
  def self.openapi_types
70
74
  {
71
75
  :'version' => :'String',
76
+ :'valid_from' => :'DateTime',
72
77
  :'application_id' => :'Integer',
73
78
  :'current_batch' => :'Integer',
74
79
  :'total_batches' => :'Integer',
@@ -102,6 +107,10 @@ module TalonOne
102
107
  self.version = attributes[:'version']
103
108
  end
104
109
 
110
+ if attributes.key?(:'valid_from')
111
+ self.valid_from = attributes[:'valid_from']
112
+ end
113
+
105
114
  if attributes.key?(:'application_id')
106
115
  self.application_id = attributes[:'application_id']
107
116
  end
@@ -181,6 +190,7 @@ module TalonOne
181
190
  return true if self.equal?(o)
182
191
  self.class == o.class &&
183
192
  version == o.version &&
193
+ valid_from == o.valid_from &&
184
194
  application_id == o.application_id &&
185
195
  current_batch == o.current_batch &&
186
196
  total_batches == o.total_batches &&
@@ -197,7 +207,7 @@ module TalonOne
197
207
  # Calculates hash code according to all attributes.
198
208
  # @return [Integer] Hash code
199
209
  def hash
200
- [version, application_id, current_batch, total_batches, trigger, changed_items].hash
210
+ [version, valid_from, application_id, current_batch, total_batches, trigger, changed_items].hash
201
211
  end
202
212
 
203
213
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module TalonOne
16
16
  class TemplateDef
17
- # Internal ID of this entity.
17
+ # The internal ID of this entity.
18
18
  attr_accessor :id
19
19
 
20
20
  # The time this entity was created.
@@ -31,7 +31,7 @@ module TalonOne
31
31
 
32
32
  attr_accessor :period_end_override
33
33
 
34
- # The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again.
34
+ # The policy that determines if and how the achievement recurs. - `no_recurrence`: The achievement can be completed only once. - `on_expiration`: The achievement resets after it expires and becomes available again. - `on_completion`: When the customer progress status reaches `completed`, the achievement resets and becomes available again.
35
35
  attr_accessor :recurrence_policy
36
36
 
37
37
  # The policy that determines how the achievement starts, ends, or resets. - `user_action`: The achievement ends or resets relative to when the customer started the achievement. - `fixed_schedule`: The achievement starts, ends, or resets for all customers following a fixed schedule.
@@ -185,7 +185,7 @@ module TalonOne
185
185
  return false if !@name.nil? && @name.to_s.length > 1000
186
186
  return false if !@name.nil? && @name.to_s.length < 1
187
187
  return false if !@name.nil? && @name !~ Regexp.new(/^[a-zA-Z]\w+$/)
188
- recurrence_policy_validator = EnumAttributeValidator.new('String', ["no_recurrence", "on_expiration"])
188
+ recurrence_policy_validator = EnumAttributeValidator.new('String', ["no_recurrence", "on_expiration", "on_completion"])
189
189
  return false unless recurrence_policy_validator.valid?(@recurrence_policy)
190
190
  activation_policy_validator = EnumAttributeValidator.new('String', ["user_action", "fixed_schedule"])
191
191
  return false unless activation_policy_validator.valid?(@activation_policy)
@@ -214,7 +214,7 @@ module TalonOne
214
214
  # Custom attribute writer method checking allowed values (enum).
215
215
  # @param [Object] recurrence_policy Object to be assigned
216
216
  def recurrence_policy=(recurrence_policy)
217
- validator = EnumAttributeValidator.new('String', ["no_recurrence", "on_expiration"])
217
+ validator = EnumAttributeValidator.new('String', ["no_recurrence", "on_expiration", "on_completion"])
218
218
  unless validator.valid?(recurrence_policy)
219
219
  fail ArgumentError, "invalid value for \"recurrence_policy\", must be one of #{validator.allowable_values}."
220
220
  end
@@ -154,8 +154,8 @@ module TalonOne
154
154
  invalid_properties.push('invalid value for "usage_limit", must be greater than or equal to 0.')
155
155
  end
156
156
 
157
- if !@discount_limit.nil? && @discount_limit > 999999
158
- invalid_properties.push('invalid value for "discount_limit", must be smaller than or equal to 999999.')
157
+ if !@discount_limit.nil? && @discount_limit > 1E+15
158
+ invalid_properties.push('invalid value for "discount_limit", must be smaller than or equal to 1E+15.')
159
159
  end
160
160
 
161
161
  if !@discount_limit.nil? && @discount_limit < 0
@@ -182,7 +182,7 @@ module TalonOne
182
182
  def valid?
183
183
  return false if !@usage_limit.nil? && @usage_limit > 999999
184
184
  return false if !@usage_limit.nil? && @usage_limit < 0
185
- return false if !@discount_limit.nil? && @discount_limit > 999999
185
+ return false if !@discount_limit.nil? && @discount_limit > 1E+15
186
186
  return false if !@discount_limit.nil? && @discount_limit < 0
187
187
  return false if !@reservation_limit.nil? && @reservation_limit > 999999
188
188
  return false if !@reservation_limit.nil? && @reservation_limit < 0
@@ -207,8 +207,8 @@ module TalonOne
207
207
  # Custom attribute writer method with validation
208
208
  # @param [Object] discount_limit Value to be assigned
209
209
  def discount_limit=(discount_limit)
210
- if !discount_limit.nil? && discount_limit > 999999
211
- fail ArgumentError, 'invalid value for "discount_limit", must be smaller than or equal to 999999.'
210
+ if !discount_limit.nil? && discount_limit > 1E+15
211
+ fail ArgumentError, 'invalid value for "discount_limit", must be smaller than or equal to 1E+15.'
212
212
  end
213
213
 
214
214
  if !discount_limit.nil? && discount_limit < 0
@@ -123,8 +123,8 @@ module TalonOne
123
123
  invalid_properties.push('invalid value for "usage_limit", must be greater than or equal to 0.')
124
124
  end
125
125
 
126
- if !@discount_limit.nil? && @discount_limit > 999999
127
- invalid_properties.push('invalid value for "discount_limit", must be smaller than or equal to 999999.')
126
+ if !@discount_limit.nil? && @discount_limit > 1E+15
127
+ invalid_properties.push('invalid value for "discount_limit", must be smaller than or equal to 1E+15.')
128
128
  end
129
129
 
130
130
  if !@discount_limit.nil? && @discount_limit < 0
@@ -147,7 +147,7 @@ module TalonOne
147
147
  def valid?
148
148
  return false if !@usage_limit.nil? && @usage_limit > 999999
149
149
  return false if !@usage_limit.nil? && @usage_limit < 0
150
- return false if !@discount_limit.nil? && @discount_limit > 999999
150
+ return false if !@discount_limit.nil? && @discount_limit > 1E+15
151
151
  return false if !@discount_limit.nil? && @discount_limit < 0
152
152
  return false if !@reservation_limit.nil? && @reservation_limit > 999999
153
153
  return false if !@reservation_limit.nil? && @reservation_limit < 0
@@ -171,8 +171,8 @@ module TalonOne
171
171
  # Custom attribute writer method with validation
172
172
  # @param [Object] discount_limit Value to be assigned
173
173
  def discount_limit=(discount_limit)
174
- if !discount_limit.nil? && discount_limit > 999999
175
- fail ArgumentError, 'invalid value for "discount_limit", must be smaller than or equal to 999999.'
174
+ if !discount_limit.nil? && discount_limit > 1E+15
175
+ fail ArgumentError, 'invalid value for "discount_limit", must be smaller than or equal to 1E+15.'
176
176
  end
177
177
 
178
178
  if !discount_limit.nil? && discount_limit < 0
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module TalonOne
16
16
  class User
17
- # Internal ID of this entity.
17
+ # The internal ID of this entity.
18
18
  attr_accessor :id
19
19
 
20
20
  # The time this entity was created.