talon_one 9.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 (258) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -3
  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 +1 -1
  7. data/docs/AchievementProgressWithDefinition.md +1 -1
  8. data/docs/AchievementStatusEntry.md +2 -2
  9. data/docs/AddPriceAdjustmentCatalogAction.md +19 -0
  10. data/docs/AddedDeductedPointsBalancesNotificationPolicy.md +19 -0
  11. data/docs/Application.md +1 -1
  12. data/docs/ApplicationCIF.md +1 -1
  13. data/docs/ApplicationCIFExpression.md +1 -1
  14. data/docs/ApplicationCustomer.md +2 -2
  15. data/docs/ApplicationEvent.md +1 -1
  16. data/docs/ApplicationSession.md +1 -1
  17. data/docs/Attribute.md +1 -1
  18. data/docs/Audience.md +1 -1
  19. data/docs/AudienceCustomer.md +2 -2
  20. data/docs/BaseNotificationWebhook.md +1 -1
  21. data/docs/Binding.md +9 -1
  22. data/docs/CampaignCollection.md +1 -1
  23. data/docs/CampaignCollectionWithoutPayload.md +1 -1
  24. data/docs/CampaignDeactivationRequest.md +17 -0
  25. data/docs/CampaignGroup.md +1 -1
  26. data/docs/CampaignSet.md +1 -1
  27. data/docs/CampaignStoreBudget.md +1 -1
  28. data/docs/CampaignTemplate.md +1 -1
  29. data/docs/CardAddedDeductedPointsBalancesNotificationPolicy.md +19 -0
  30. data/docs/CartItem.md +12 -2
  31. data/docs/Catalog.md +1 -1
  32. data/docs/CatalogItem.md +1 -1
  33. data/docs/Change.md +1 -1
  34. data/docs/Collection.md +1 -1
  35. data/docs/CollectionWithoutPayload.md +1 -1
  36. data/docs/Coupon.md +2 -2
  37. data/docs/CouponCreationJob.md +1 -1
  38. data/docs/CouponDeletionJob.md +1 -1
  39. data/docs/CouponEntity.md +19 -0
  40. data/docs/CreateAchievement.md +1 -1
  41. data/docs/CustomEffect.md +1 -1
  42. data/docs/CustomerProfile.md +2 -2
  43. data/docs/CustomerProfileEntity.md +19 -0
  44. data/docs/CustomerSessionV2.md +1 -1
  45. data/docs/Effect.md +6 -0
  46. data/docs/EffectEntity.md +7 -1
  47. data/docs/Entity.md +1 -1
  48. data/docs/Environment.md +4 -2
  49. data/docs/Event.md +1 -1
  50. data/docs/EventType.md +1 -1
  51. data/docs/Export.md +1 -1
  52. data/docs/ExtendLoyaltyPointsExpiryDateEffectProps.md +25 -0
  53. data/docs/Giveaway.md +1 -1
  54. data/docs/GiveawaysPool.md +1 -1
  55. data/docs/Import.md +1 -1
  56. data/docs/InlineResponse20048.md +2 -4
  57. data/docs/InlineResponse20049.md +2 -4
  58. data/docs/InlineResponse20050.md +19 -0
  59. data/docs/InlineResponse20051.md +19 -0
  60. data/docs/IntegrationApi.md +3 -3
  61. data/docs/IntegrationCoupon.md +2 -2
  62. data/docs/IntegrationCustomerProfileAudienceRequest.md +17 -0
  63. data/docs/IntegrationCustomerProfileAudienceRequestItem.md +21 -0
  64. data/docs/IntegrationEventV2Request.md +2 -0
  65. data/docs/InventoryCoupon.md +2 -2
  66. data/docs/InventoryReferral.md +1 -1
  67. data/docs/LedgerEntry.md +1 -1
  68. data/docs/LedgerInfo.md +2 -2
  69. data/docs/LoyaltyCard.md +1 -1
  70. data/docs/LoyaltyProgramBalance.md +2 -2
  71. data/docs/LoyaltyTier.md +1 -1
  72. data/docs/ManagementApi.md +792 -29
  73. data/docs/ModelReturn.md +1 -1
  74. data/docs/MultipleAudiencesItem.md +1 -1
  75. data/docs/NewPriceAdjustment.md +27 -0
  76. data/docs/NewPriceType.md +23 -0
  77. data/docs/NewWebhook.md +2 -0
  78. data/docs/Picklist.md +1 -1
  79. data/docs/PriceDetail.md +23 -0
  80. data/docs/PriceType.md +33 -0
  81. data/docs/Referral.md +1 -1
  82. data/docs/RevisionActivationRequest.md +19 -0
  83. data/docs/Role.md +1 -1
  84. data/docs/RoleV2.md +1 -1
  85. data/docs/Ruleset.md +1 -1
  86. data/docs/SamlConnection.md +1 -1
  87. data/docs/ScimBaseGroup.md +19 -0
  88. data/docs/ScimGroup.md +21 -0
  89. data/docs/ScimGroupMember.md +19 -0
  90. data/docs/ScimGroupsListResponse.md +21 -0
  91. data/docs/Store.md +1 -1
  92. data/docs/TemplateDef.md +1 -1
  93. data/docs/UpdateAchievement.md +1 -1
  94. data/docs/User.md +1 -1
  95. data/docs/Webhook.md +3 -1
  96. data/docs/WebhookAuthentication.md +33 -0
  97. data/docs/WebhookAuthenticationBase.md +21 -0
  98. data/docs/WebhookAuthenticationDataBasic.md +19 -0
  99. data/docs/WebhookAuthenticationDataCustom.md +17 -0
  100. data/docs/WebhookAuthenticationWebhookRef.md +21 -0
  101. data/docs/WebhookWithOutgoingIntegrationDetails.md +3 -1
  102. data/lib/talon_one/api/integration_api.rb +6 -6
  103. data/lib/talon_one/api/management_api.rb +879 -11
  104. data/lib/talon_one/models/account.rb +1 -1
  105. data/lib/talon_one/models/account_additional_cost.rb +1 -1
  106. data/lib/talon_one/models/achievement.rb +4 -4
  107. data/lib/talon_one/models/achievement_base.rb +3 -3
  108. data/lib/talon_one/models/achievement_progress_with_definition.rb +3 -3
  109. data/lib/talon_one/models/achievement_status_entry.rb +4 -4
  110. data/lib/talon_one/models/add_price_adjustment_catalog_action.rb +230 -0
  111. data/lib/talon_one/models/added_deducted_points_balances_notification_policy.rb +269 -0
  112. data/lib/talon_one/models/application.rb +1 -1
  113. data/lib/talon_one/models/application_cif.rb +1 -1
  114. data/lib/talon_one/models/application_cif_expression.rb +1 -1
  115. data/lib/talon_one/models/application_customer.rb +2 -2
  116. data/lib/talon_one/models/application_event.rb +1 -1
  117. data/lib/talon_one/models/application_session.rb +1 -1
  118. data/lib/talon_one/models/attribute.rb +1 -1
  119. data/lib/talon_one/models/audience.rb +1 -1
  120. data/lib/talon_one/models/audience_customer.rb +2 -2
  121. data/lib/talon_one/models/base_notification.rb +2 -2
  122. data/lib/talon_one/models/base_notification_webhook.rb +1 -1
  123. data/lib/talon_one/models/binding.rb +44 -4
  124. data/lib/talon_one/models/campaign_collection.rb +1 -1
  125. data/lib/talon_one/models/campaign_collection_without_payload.rb +1 -1
  126. data/lib/talon_one/models/campaign_deactivation_request.rb +214 -0
  127. data/lib/talon_one/models/campaign_group.rb +1 -1
  128. data/lib/talon_one/models/campaign_set.rb +1 -1
  129. data/lib/talon_one/models/campaign_store_budget.rb +1 -1
  130. data/lib/talon_one/models/campaign_template.rb +1 -1
  131. data/lib/talon_one/models/card_added_deducted_points_balances_notification_policy.rb +269 -0
  132. data/lib/talon_one/models/cart_item.rb +57 -5
  133. data/lib/talon_one/models/catalog.rb +1 -1
  134. data/lib/talon_one/models/catalog_action.rb +2 -2
  135. data/lib/talon_one/models/catalog_item.rb +1 -1
  136. data/lib/talon_one/models/change.rb +1 -1
  137. data/lib/talon_one/models/collection.rb +1 -1
  138. data/lib/talon_one/models/collection_without_payload.rb +1 -1
  139. data/lib/talon_one/models/coupon.rb +7 -7
  140. data/lib/talon_one/models/coupon_constraints.rb +5 -5
  141. data/lib/talon_one/models/coupon_creation_job.rb +6 -6
  142. data/lib/talon_one/models/coupon_deletion_job.rb +1 -1
  143. data/lib/talon_one/models/coupon_entity.rb +227 -0
  144. data/lib/talon_one/models/create_achievement.rb +3 -3
  145. data/lib/talon_one/models/custom_effect.rb +1 -1
  146. data/lib/talon_one/models/customer_profile.rb +2 -2
  147. data/lib/talon_one/models/customer_profile_entity.rb +227 -0
  148. data/lib/talon_one/models/customer_session_v2.rb +1 -1
  149. data/lib/talon_one/models/effect.rb +31 -1
  150. data/lib/talon_one/models/effect_entity.rb +34 -4
  151. data/lib/talon_one/models/entity.rb +1 -1
  152. data/lib/talon_one/models/environment.rb +17 -5
  153. data/lib/talon_one/models/event.rb +1 -1
  154. data/lib/talon_one/models/event_type.rb +1 -1
  155. data/lib/talon_one/models/export.rb +1 -1
  156. data/lib/talon_one/models/extend_loyalty_points_expiry_date_effect_props.rb +270 -0
  157. data/lib/talon_one/models/giveaway.rb +1 -1
  158. data/lib/talon_one/models/giveaways_pool.rb +1 -1
  159. data/lib/talon_one/models/import.rb +1 -1
  160. data/lib/talon_one/models/inline_response20048.rb +2 -16
  161. data/lib/talon_one/models/inline_response20049.rb +2 -21
  162. data/lib/talon_one/models/inline_response20050.rb +222 -0
  163. data/lib/talon_one/models/inline_response20051.rb +227 -0
  164. data/lib/talon_one/models/integration_coupon.rb +7 -7
  165. data/lib/talon_one/models/integration_customer_profile_audience_request.rb +208 -0
  166. data/lib/talon_one/models/integration_customer_profile_audience_request_item.rb +295 -0
  167. data/lib/talon_one/models/integration_event_v2_request.rb +13 -1
  168. data/lib/talon_one/models/inventory_coupon.rb +7 -7
  169. data/lib/talon_one/models/inventory_referral.rb +1 -1
  170. data/lib/talon_one/models/ledger_entry.rb +1 -1
  171. data/lib/talon_one/models/ledger_info.rb +0 -10
  172. data/lib/talon_one/models/loyalty_card.rb +1 -1
  173. data/lib/talon_one/models/loyalty_program_balance.rb +0 -10
  174. data/lib/talon_one/models/loyalty_tier.rb +1 -1
  175. data/lib/talon_one/models/model_return.rb +1 -1
  176. data/lib/talon_one/models/multiple_audiences_item.rb +1 -1
  177. data/lib/talon_one/models/new_coupon_creation_job.rb +5 -5
  178. data/lib/talon_one/models/new_coupons.rb +5 -5
  179. data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +5 -5
  180. data/lib/talon_one/models/new_message_test.rb +2 -2
  181. data/lib/talon_one/models/new_price_adjustment.rb +268 -0
  182. data/lib/talon_one/models/new_price_type.rb +270 -0
  183. data/lib/talon_one/models/new_webhook.rb +16 -1
  184. data/lib/talon_one/models/picklist.rb +1 -1
  185. data/lib/talon_one/models/price_detail.rb +237 -0
  186. data/lib/talon_one/models/price_type.rb +347 -0
  187. data/lib/talon_one/models/referral.rb +1 -1
  188. data/lib/talon_one/models/revision_activation_request.rb +224 -0
  189. data/lib/talon_one/models/role.rb +1 -1
  190. data/lib/talon_one/models/role_v2.rb +1 -1
  191. data/lib/talon_one/models/ruleset.rb +1 -1
  192. data/lib/talon_one/models/saml_connection.rb +1 -1
  193. data/lib/talon_one/models/scim_base_group.rb +220 -0
  194. data/lib/talon_one/models/scim_group.rb +235 -0
  195. data/lib/talon_one/models/scim_group_member.rb +218 -0
  196. data/lib/talon_one/models/scim_groups_list_response.rb +236 -0
  197. data/lib/talon_one/models/store.rb +1 -1
  198. data/lib/talon_one/models/template_def.rb +1 -1
  199. data/lib/talon_one/models/update_achievement.rb +3 -3
  200. data/lib/talon_one/models/update_coupon.rb +5 -5
  201. data/lib/talon_one/models/update_coupon_batch.rb +5 -5
  202. data/lib/talon_one/models/user.rb +1 -1
  203. data/lib/talon_one/models/webhook.rb +17 -2
  204. data/lib/talon_one/models/webhook_authentication.rb +365 -0
  205. data/lib/talon_one/models/webhook_authentication_base.rb +274 -0
  206. data/lib/talon_one/models/webhook_authentication_data_basic.rb +227 -0
  207. data/lib/talon_one/models/webhook_authentication_data_custom.rb +213 -0
  208. data/lib/talon_one/models/webhook_authentication_webhook_ref.rb +258 -0
  209. data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +17 -2
  210. data/lib/talon_one/version.rb +1 -1
  211. data/lib/talon_one.rb +24 -0
  212. data/spec/api/integration_api_spec.rb +3 -3
  213. data/spec/api/management_api_spec.rb +167 -3
  214. data/spec/models/achievement_base_spec.rb +1 -1
  215. data/spec/models/achievement_progress_with_definition_spec.rb +1 -1
  216. data/spec/models/achievement_spec.rb +1 -1
  217. data/spec/models/achievement_status_entry_spec.rb +1 -1
  218. data/spec/models/add_price_adjustment_catalog_action_spec.rb +47 -0
  219. data/spec/models/added_deducted_points_balances_notification_policy_spec.rb +51 -0
  220. data/spec/models/base_notification_spec.rb +1 -1
  221. data/spec/models/binding_spec.rb +24 -0
  222. data/spec/models/campaign_deactivation_request_spec.rb +41 -0
  223. data/spec/models/card_added_deducted_points_balances_notification_policy_spec.rb +51 -0
  224. data/spec/models/cart_item_spec.rb +30 -0
  225. data/spec/models/catalog_action_spec.rb +1 -1
  226. data/spec/models/coupon_entity_spec.rb +47 -0
  227. data/spec/models/create_achievement_spec.rb +1 -1
  228. data/spec/models/customer_profile_entity_spec.rb +47 -0
  229. data/spec/models/effect_entity_spec.rb +18 -0
  230. data/spec/models/effect_spec.rb +18 -0
  231. data/spec/models/environment_spec.rb +6 -0
  232. data/spec/models/extend_loyalty_points_expiry_date_effect_props_spec.rb +65 -0
  233. data/spec/models/inline_response20048_spec.rb +0 -6
  234. data/spec/models/inline_response20049_spec.rb +0 -6
  235. data/spec/models/inline_response20050_spec.rb +47 -0
  236. data/spec/models/inline_response20051_spec.rb +47 -0
  237. data/spec/models/integration_customer_profile_audience_request_item_spec.rb +57 -0
  238. data/spec/models/integration_customer_profile_audience_request_spec.rb +41 -0
  239. data/spec/models/integration_event_v2_request_spec.rb +6 -0
  240. data/spec/models/new_message_test_spec.rb +1 -1
  241. data/spec/models/new_price_adjustment_spec.rb +71 -0
  242. data/spec/models/new_price_type_spec.rb +59 -0
  243. data/spec/models/new_webhook_spec.rb +6 -0
  244. data/spec/models/price_detail_spec.rb +59 -0
  245. data/spec/models/price_type_spec.rb +89 -0
  246. data/spec/models/scim_base_group_spec.rb +47 -0
  247. data/spec/models/scim_group_member_spec.rb +47 -0
  248. data/spec/models/scim_group_spec.rb +53 -0
  249. data/spec/models/scim_groups_list_response_spec.rb +53 -0
  250. data/spec/models/update_achievement_spec.rb +1 -1
  251. data/spec/models/webhook_authentication_base_spec.rb +57 -0
  252. data/spec/models/webhook_authentication_data_basic_spec.rb +47 -0
  253. data/spec/models/webhook_authentication_data_custom_spec.rb +41 -0
  254. data/spec/models/webhook_authentication_spec.rb +93 -0
  255. data/spec/models/webhook_authentication_webhook_ref_spec.rb +53 -0
  256. data/spec/models/webhook_spec.rb +6 -0
  257. data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
  258. metadata +100 -2
@@ -0,0 +1,258 @@
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 WebhookAuthenticationWebhookRef
17
+ # The internal ID of this entity.
18
+ attr_accessor :id
19
+
20
+ # The title of the webhook authentication.
21
+ attr_accessor :title
22
+
23
+ # A description of the webhook authentication.
24
+ attr_accessor :description
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'title' => :'title',
31
+ :'description' => :'description'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'id' => :'Integer',
39
+ :'title' => :'String',
40
+ :'description' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::WebhookAuthenticationWebhookRef` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::WebhookAuthenticationWebhookRef`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'id')
66
+ self.id = attributes[:'id']
67
+ end
68
+
69
+ if attributes.key?(:'title')
70
+ self.title = attributes[:'title']
71
+ end
72
+
73
+ if attributes.key?(:'description')
74
+ self.description = attributes[:'description']
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ if @id.nil?
83
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
84
+ end
85
+
86
+ if @title.nil?
87
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
88
+ end
89
+
90
+ pattern = Regexp.new(/^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/)
91
+ if @title !~ pattern
92
+ invalid_properties.push("invalid value for \"title\", must conform to the pattern #{pattern}.")
93
+ end
94
+
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ return false if @id.nil?
102
+ return false if @title.nil?
103
+ return false if @title !~ Regexp.new(/^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/)
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] title Value to be assigned
109
+ def title=(title)
110
+ if title.nil?
111
+ fail ArgumentError, 'title cannot be nil'
112
+ end
113
+
114
+ pattern = Regexp.new(/^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/)
115
+ if title !~ pattern
116
+ fail ArgumentError, "invalid value for \"title\", must conform to the pattern #{pattern}."
117
+ end
118
+
119
+ @title = title
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ id == o.id &&
128
+ title == o.title &&
129
+ description == o.description
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [id, title, description].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ new.build_from_hash(attributes)
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ self.class.openapi_types.each_pair do |key, type|
157
+ if type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the attribute
159
+ # is documented as an array but the input is not
160
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
161
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
162
+ end
163
+ elsif !attributes[self.class.attribute_map[key]].nil?
164
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
165
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
166
+ end
167
+
168
+ self
169
+ end
170
+
171
+ # Deserializes the data based on type
172
+ # @param string type Data type
173
+ # @param string value Value to be deserialized
174
+ # @return [Object] Deserialized data
175
+ def _deserialize(type, value)
176
+ case type.to_sym
177
+ when :DateTime
178
+ DateTime.parse(value)
179
+ when :Date
180
+ Date.parse(value)
181
+ when :String
182
+ value.to_s
183
+ when :Integer
184
+ value.to_i
185
+ when :Float
186
+ value.to_f
187
+ when :Boolean
188
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
189
+ true
190
+ else
191
+ false
192
+ end
193
+ when :Object
194
+ # generic object (usually a Hash), return directly
195
+ value
196
+ when /\AArray<(?<inner_type>.+)>\z/
197
+ inner_type = Regexp.last_match[:inner_type]
198
+ value.map { |v| _deserialize(inner_type, v) }
199
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
200
+ k_type = Regexp.last_match[:k_type]
201
+ v_type = Regexp.last_match[:v_type]
202
+ {}.tap do |hash|
203
+ value.each do |k, v|
204
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
205
+ end
206
+ end
207
+ else # model
208
+ TalonOne.const_get(type).build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+ end
258
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module TalonOne
16
16
  class WebhookWithOutgoingIntegrationDetails
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.
@@ -32,6 +32,9 @@ module TalonOne
32
32
  # A description of the webhook.
33
33
  attr_accessor :description
34
34
 
35
+ # Indicates if the webhook is a draft.
36
+ attr_accessor :draft
37
+
35
38
  # API method for this webhook.
36
39
  attr_accessor :verb
37
40
 
@@ -90,6 +93,7 @@ module TalonOne
90
93
  :'application_ids' => :'applicationIds',
91
94
  :'title' => :'title',
92
95
  :'description' => :'description',
96
+ :'draft' => :'draft',
93
97
  :'verb' => :'verb',
94
98
  :'url' => :'url',
95
99
  :'headers' => :'headers',
@@ -111,6 +115,7 @@ module TalonOne
111
115
  :'application_ids' => :'Array<Integer>',
112
116
  :'title' => :'String',
113
117
  :'description' => :'String',
118
+ :'draft' => :'Boolean',
114
119
  :'verb' => :'String',
115
120
  :'url' => :'String',
116
121
  :'headers' => :'Array<String>',
@@ -170,6 +175,10 @@ module TalonOne
170
175
  self.description = attributes[:'description']
171
176
  end
172
177
 
178
+ if attributes.key?(:'draft')
179
+ self.draft = attributes[:'draft']
180
+ end
181
+
173
182
  if attributes.key?(:'verb')
174
183
  self.verb = attributes[:'verb']
175
184
  end
@@ -240,6 +249,10 @@ module TalonOne
240
249
  invalid_properties.push("invalid value for \"title\", must conform to the pattern #{pattern}.")
241
250
  end
242
251
 
252
+ if @draft.nil?
253
+ invalid_properties.push('invalid value for "draft", draft cannot be nil.')
254
+ end
255
+
243
256
  if @verb.nil?
244
257
  invalid_properties.push('invalid value for "verb", verb cannot be nil.')
245
258
  end
@@ -272,6 +285,7 @@ module TalonOne
272
285
  return false if @application_ids.nil?
273
286
  return false if @title.nil?
274
287
  return false if @title !~ Regexp.new(/^[A-Za-z][A-Za-z0-9_.!~*'() -]*$/)
288
+ return false if @draft.nil?
275
289
  return false if @verb.nil?
276
290
  verb_validator = EnumAttributeValidator.new('String', ["POST", "PUT", "GET", "DELETE", "PATCH"])
277
291
  return false unless verb_validator.valid?(@verb)
@@ -318,6 +332,7 @@ module TalonOne
318
332
  application_ids == o.application_ids &&
319
333
  title == o.title &&
320
334
  description == o.description &&
335
+ draft == o.draft &&
321
336
  verb == o.verb &&
322
337
  url == o.url &&
323
338
  headers == o.headers &&
@@ -338,7 +353,7 @@ module TalonOne
338
353
  # Calculates hash code according to all attributes.
339
354
  # @return [Integer] Hash code
340
355
  def hash
341
- [id, created, modified, application_ids, title, description, verb, url, headers, payload, params, enabled, outgoing_integration_template_id, outgoing_integration_type_id, outgoing_integration_type_name].hash
356
+ [id, created, modified, application_ids, title, description, draft, verb, url, headers, payload, params, enabled, outgoing_integration_template_id, outgoing_integration_type_id, outgoing_integration_type_name].hash
342
357
  end
343
358
 
344
359
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module TalonOne
14
- VERSION = '9.0.0'
14
+ VERSION = '10.0.0'
15
15
  end
data/lib/talon_one.rb CHANGED
@@ -42,7 +42,9 @@ require 'talon_one/models/add_free_item_effect_props'
42
42
  require 'talon_one/models/add_item_catalog_action'
43
43
  require 'talon_one/models/add_loyalty_points'
44
44
  require 'talon_one/models/add_loyalty_points_effect_props'
45
+ require 'talon_one/models/add_price_adjustment_catalog_action'
45
46
  require 'talon_one/models/add_to_audience_effect_props'
47
+ require 'talon_one/models/added_deducted_points_balances_notification_policy'
46
48
  require 'talon_one/models/added_deducted_points_notification_policy'
47
49
  require 'talon_one/models/additional_campaign_properties'
48
50
  require 'talon_one/models/additional_cost'
@@ -101,6 +103,7 @@ require 'talon_one/models/campaign_collection_edited_notification'
101
103
  require 'talon_one/models/campaign_collection_without_payload'
102
104
  require 'talon_one/models/campaign_copy'
103
105
  require 'talon_one/models/campaign_created_notification'
106
+ require 'talon_one/models/campaign_deactivation_request'
104
107
  require 'talon_one/models/campaign_deleted_notification'
105
108
  require 'talon_one/models/campaign_detail'
106
109
  require 'talon_one/models/campaign_edited_notification'
@@ -126,6 +129,7 @@ require 'talon_one/models/campaign_template_collection'
126
129
  require 'talon_one/models/campaign_template_coupon_reservation_settings'
127
130
  require 'talon_one/models/campaign_template_params'
128
131
  require 'talon_one/models/campaign_versions'
132
+ require 'talon_one/models/card_added_deducted_points_balances_notification_policy'
129
133
  require 'talon_one/models/card_added_deducted_points_notification_policy'
130
134
  require 'talon_one/models/card_expiring_points_notification_policy'
131
135
  require 'talon_one/models/card_expiring_points_notification_trigger'
@@ -152,6 +156,7 @@ require 'talon_one/models/coupon_created_effect_props'
152
156
  require 'talon_one/models/coupon_creation_job'
153
157
  require 'talon_one/models/coupon_deletion_filters'
154
158
  require 'talon_one/models/coupon_deletion_job'
159
+ require 'talon_one/models/coupon_entity'
155
160
  require 'talon_one/models/coupon_limit_configs'
156
161
  require 'talon_one/models/coupon_rejection_reason'
157
162
  require 'talon_one/models/coupon_reservations'
@@ -171,6 +176,7 @@ require 'talon_one/models/customer_inventory'
171
176
  require 'talon_one/models/customer_profile'
172
177
  require 'talon_one/models/customer_profile_audience_request'
173
178
  require 'talon_one/models/customer_profile_audience_request_item'
179
+ require 'talon_one/models/customer_profile_entity'
174
180
  require 'talon_one/models/customer_profile_integration_request_v2'
175
181
  require 'talon_one/models/customer_profile_integration_response_v2'
176
182
  require 'talon_one/models/customer_profile_search_query'
@@ -200,6 +206,7 @@ require 'talon_one/models/expiring_coupons_notification_trigger'
200
206
  require 'talon_one/models/expiring_points_notification_policy'
201
207
  require 'talon_one/models/expiring_points_notification_trigger'
202
208
  require 'talon_one/models/export'
209
+ require 'talon_one/models/extend_loyalty_points_expiry_date_effect_props'
203
210
  require 'talon_one/models/feature_flag'
204
211
  require 'talon_one/models/features_feed'
205
212
  require 'talon_one/models/func_arg_def'
@@ -264,12 +271,16 @@ require 'talon_one/models/inline_response20047'
264
271
  require 'talon_one/models/inline_response20048'
265
272
  require 'talon_one/models/inline_response20049'
266
273
  require 'talon_one/models/inline_response2005'
274
+ require 'talon_one/models/inline_response20050'
275
+ require 'talon_one/models/inline_response20051'
267
276
  require 'talon_one/models/inline_response2006'
268
277
  require 'talon_one/models/inline_response2007'
269
278
  require 'talon_one/models/inline_response2008'
270
279
  require 'talon_one/models/inline_response2009'
271
280
  require 'talon_one/models/inline_response201'
272
281
  require 'talon_one/models/integration_coupon'
282
+ require 'talon_one/models/integration_customer_profile_audience_request'
283
+ require 'talon_one/models/integration_customer_profile_audience_request_item'
273
284
  require 'talon_one/models/integration_customer_session_response'
274
285
  require 'talon_one/models/integration_entity'
275
286
  require 'talon_one/models/integration_event'
@@ -382,6 +393,8 @@ require 'talon_one/models/new_outgoing_integration_webhook'
382
393
  require 'talon_one/models/new_password'
383
394
  require 'talon_one/models/new_password_email'
384
395
  require 'talon_one/models/new_picklist'
396
+ require 'talon_one/models/new_price_adjustment'
397
+ require 'talon_one/models/new_price_type'
385
398
  require 'talon_one/models/new_referral'
386
399
  require 'talon_one/models/new_referrals_for_multiple_advocates'
387
400
  require 'talon_one/models/new_return'
@@ -416,6 +429,8 @@ require 'talon_one/models/patch_item_catalog_action'
416
429
  require 'talon_one/models/patch_many_items_catalog_action'
417
430
  require 'talon_one/models/pending_points_notification_policy'
418
431
  require 'talon_one/models/picklist'
432
+ require 'talon_one/models/price_detail'
433
+ require 'talon_one/models/price_type'
419
434
  require 'talon_one/models/product'
420
435
  require 'talon_one/models/product_search_match'
421
436
  require 'talon_one/models/product_unit_analytics'
@@ -464,8 +479,12 @@ require 'talon_one/models/saml_connection'
464
479
  require 'talon_one/models/saml_connection_internal'
465
480
  require 'talon_one/models/saml_connection_metadata'
466
481
  require 'talon_one/models/saml_login_endpoint'
482
+ require 'talon_one/models/scim_base_group'
467
483
  require 'talon_one/models/scim_base_user'
468
484
  require 'talon_one/models/scim_base_user_name'
485
+ require 'talon_one/models/scim_group'
486
+ require 'talon_one/models/scim_group_member'
487
+ require 'talon_one/models/scim_groups_list_response'
469
488
  require 'talon_one/models/scim_new_user'
470
489
  require 'talon_one/models/scim_patch_operation'
471
490
  require 'talon_one/models/scim_patch_request'
@@ -545,6 +564,11 @@ require 'talon_one/models/user_entity'
545
564
  require 'talon_one/models/value_map'
546
565
  require 'talon_one/models/webhook'
547
566
  require 'talon_one/models/webhook_activation_log_entry'
567
+ require 'talon_one/models/webhook_authentication'
568
+ require 'talon_one/models/webhook_authentication_base'
569
+ require 'talon_one/models/webhook_authentication_data_basic'
570
+ require 'talon_one/models/webhook_authentication_data_custom'
571
+ require 'talon_one/models/webhook_authentication_webhook_ref'
548
572
  require 'talon_one/models/webhook_log_entry'
549
573
  require 'talon_one/models/webhook_with_outgoing_integration_details'
550
574
  require 'talon_one/models/will_award_giveaway_effect_props'
@@ -381,7 +381,7 @@ describe 'IntegrationApi' do
381
381
 
382
382
  # unit tests for track_event_v2
383
383
  # Track event
384
- # Triggers a custom event. To use this endpoint: 1. Define a [custom event](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the **Events** view in the Campaign Manager. Talon.One also offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/entities/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). &lt;div class&#x3D;\&quot;redoc-section\&quot;&gt; &lt;p class&#x3D;\&quot;title\&quot;&gt;Important&lt;/p&gt; 1. &#x60;profileId&#x60; is required even though the schema does not say it. 1. If the customer profile ID is new, a new profile is automatically created but the &#x60;customer_profile_created&#x60; [built-in event ](https://docs.talon.one/docs/dev/concepts/entities/events) is **not** triggered. 1. We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). &lt;/div&gt;
384
+ # Triggers a custom event. To use this endpoint: 1. Define a [custom event](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) in the Campaign Manager. 1. Update or create a rule to check for this event. 1. Trigger the event with this endpoint. After you have successfully sent an event to Talon.One, you can list the received events in the **Events** view in the Campaign Manager. Talon.One also offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/entities/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). &lt;div class&#x3D;\&quot;redoc-section\&quot;&gt; &lt;p class&#x3D;\&quot;title\&quot;&gt;Important&lt;/p&gt; 1. &#x60;profileId&#x60; is required even though the schema does not specify it. 1. If the customer profile ID is new, a new profile is automatically created but the &#x60;customer_profile_created&#x60; [built-in event ](https://docs.talon.one/docs/dev/concepts/entities/events) is **not** triggered. 1. We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). 1. [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered in rule evaluation. &lt;/div&gt;
385
385
  # @param body body
386
386
  # @param [Hash] opts the optional parameters
387
387
  # @option opts [String] :silent Possible values: &#x60;yes&#x60; or &#x60;no&#x60;. - &#x60;yes&#x60;: Increases the performance of the API call by returning a 204 response. - &#x60;no&#x60;: Returns a 200 response that contains the updated customer profiles.
@@ -434,7 +434,7 @@ describe 'IntegrationApi' do
434
434
 
435
435
  # unit tests for update_customer_profile_v2
436
436
  # Update customer profile
437
- # Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. &lt;div class&#x3D;\&quot;redoc-section\&quot;&gt; &lt;p class&#x3D;\&quot;title\&quot;&gt;Performance tips&lt;/p&gt; - Updating a customer profile returns a response with the requested integration state. - You can use the &#x60;responseContent&#x60; property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). &lt;/div&gt;
437
+ # Update or create a [Customer Profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of. **Note:** [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered in rule evaluation when &#x60;runRuleEngine&#x60; is &#x60;true&#x60;. &lt;div class&#x3D;\&quot;redoc-section\&quot;&gt; &lt;p class&#x3D;\&quot;title\&quot;&gt;Performance tips&lt;/p&gt; - Updating a customer profile returns a response with the requested integration state. - You can use the &#x60;responseContent&#x60; property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). &lt;/div&gt;
438
438
  # @param integration_id The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier.
439
439
  # @param body body
440
440
  # @param [Hash] opts the optional parameters
@@ -462,7 +462,7 @@ describe 'IntegrationApi' do
462
462
 
463
463
  # unit tests for update_customer_session_v2
464
464
  # Update customer session
465
- # Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer&#39;s cart with Talon.One. **Note:** The currency for the session and the cart items in the session is the currency set for the Application that owns this session. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the &#x60;state&#x60; parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the &#x60;profileId&#x60; parameter in the request body to a customer profile&#39;s &#x60;integrationId&#x60;. - While you can create an anonymous session with &#x60;profileId&#x3D;\&quot;\&quot;&#x60;, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). &lt;div class&#x3D;\&quot;redoc-section\&quot;&gt; &lt;p class&#x3D;\&quot;title\&quot;&gt;Performance tips&lt;/p&gt; - Updating a customer session returns a response with the new integration state. Use the &#x60;responseContent&#x60; property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). &lt;/div&gt; For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
465
+ # Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). The endpoint responds with the potential promotion rule [effects](https://docs.talon.one/docs/dev/integration-api/api-effects) that match the current cart. For example, use this endpoint to share the contents of a customer&#39;s cart with Talon.One. **Note:** - The currency for the session and the cart items in it is the currency set for the Application linked to this session. - [Archived campaigns](https://docs.talon.one/docs/product/campaigns/managing-campaigns#archiving-a-campaign) are not considered for rule evaluation. ### Session management To use this endpoint, start by learning about [customer sessions](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions) and their states and refer to the &#x60;state&#x60; parameter documentation the request body schema docs below. ### Sessions and customer profiles - To link a session to a customer profile, set the &#x60;profileId&#x60; parameter in the request body to a customer profile&#39;s &#x60;integrationId&#x60;. - While you can create an anonymous session with &#x60;profileId&#x3D;\&quot;\&quot;&#x60;, we recommend you use a guest ID instead. - A profile can be linked to simultaneous sessions in different Applications. Either: - Use unique session integration IDs or, - Use the same session integration ID across all of the Applications. **Note:** If the specified profile does not exist, an empty profile is **created automatically**. You can update it with [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2). &lt;div class&#x3D;\&quot;redoc-section\&quot;&gt; &lt;p class&#x3D;\&quot;title\&quot;&gt;Performance tips&lt;/p&gt; - Updating a customer session returns a response with the new integration state. Use the &#x60;responseContent&#x60; property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests. - We recommend sending requests sequentially. See [Managing parallel requests](https://docs.talon.one/docs/dev/getting-started/integration-tutorial#managing-parallel-requests). &lt;/div&gt; For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one).
466
466
  # @param customer_session_id The &#x60;integration ID&#x60; of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager&#39;s **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
467
467
  # @param body body
468
468
  # @param [Hash] opts the optional parameters