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,274 @@
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 WebhookAuthenticationBase
17
+ # The name of the webhook authentication.
18
+ attr_accessor :name
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :data
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'name' => :'name',
50
+ :'type' => :'type',
51
+ :'data' => :'data'
52
+ }
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'name' => :'String',
59
+ :'type' => :'String',
60
+ :'data' => :'Object'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::WebhookAuthenticationBase` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::WebhookAuthenticationBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'name')
86
+ self.name = attributes[:'name']
87
+ end
88
+
89
+ if attributes.key?(:'type')
90
+ self.type = attributes[:'type']
91
+ end
92
+
93
+ if attributes.key?(:'data')
94
+ self.data = attributes[:'data']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ if @name.nil?
103
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
104
+ end
105
+
106
+ if @type.nil?
107
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
108
+ end
109
+
110
+ if @data.nil?
111
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ return false if @name.nil?
121
+ return false if @type.nil?
122
+ type_validator = EnumAttributeValidator.new('String', ["basic", "custom"])
123
+ return false unless type_validator.valid?(@type)
124
+ return false if @data.nil?
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] type Object to be assigned
130
+ def type=(type)
131
+ validator = EnumAttributeValidator.new('String', ["basic", "custom"])
132
+ unless validator.valid?(type)
133
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @type = type
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ name == o.name &&
144
+ type == o.type &&
145
+ data == o.data
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [name, type, data].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ new.build_from_hash(attributes)
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def build_from_hash(attributes)
171
+ return nil unless attributes.is_a?(Hash)
172
+ self.class.openapi_types.each_pair do |key, type|
173
+ if type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
177
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
178
+ end
179
+ elsif !attributes[self.class.attribute_map[key]].nil?
180
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
181
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
182
+ end
183
+
184
+ self
185
+ end
186
+
187
+ # Deserializes the data based on type
188
+ # @param string type Data type
189
+ # @param string value Value to be deserialized
190
+ # @return [Object] Deserialized data
191
+ def _deserialize(type, value)
192
+ case type.to_sym
193
+ when :DateTime
194
+ DateTime.parse(value)
195
+ when :Date
196
+ Date.parse(value)
197
+ when :String
198
+ value.to_s
199
+ when :Integer
200
+ value.to_i
201
+ when :Float
202
+ value.to_f
203
+ when :Boolean
204
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
205
+ true
206
+ else
207
+ false
208
+ end
209
+ when :Object
210
+ # generic object (usually a Hash), return directly
211
+ value
212
+ when /\AArray<(?<inner_type>.+)>\z/
213
+ inner_type = Regexp.last_match[:inner_type]
214
+ value.map { |v| _deserialize(inner_type, v) }
215
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
216
+ k_type = Regexp.last_match[:k_type]
217
+ v_type = Regexp.last_match[:v_type]
218
+ {}.tap do |hash|
219
+ value.each do |k, v|
220
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
221
+ end
222
+ end
223
+ else # model
224
+ TalonOne.const_get(type).build_from_hash(value)
225
+ end
226
+ end
227
+
228
+ # Returns the string representation of the object
229
+ # @return [String] String presentation of the object
230
+ def to_s
231
+ to_hash.to_s
232
+ end
233
+
234
+ # to_body is an alias to to_hash (backward compatibility)
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_body
237
+ to_hash
238
+ end
239
+
240
+ # Returns the object in the form of hash
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_hash
243
+ hash = {}
244
+ self.class.attribute_map.each_pair do |attr, param|
245
+ value = self.send(attr)
246
+ if value.nil?
247
+ is_nullable = self.class.openapi_nullable.include?(attr)
248
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
249
+ end
250
+
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+ end
274
+ end
@@ -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 WebhookAuthenticationDataBasic
17
+ # The Basic HTTP username.
18
+ attr_accessor :username
19
+
20
+ # The Basic HTTP password.
21
+ attr_accessor :password
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'username' => :'username',
27
+ :'password' => :'password'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'username' => :'String',
35
+ :'password' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::WebhookAuthenticationDataBasic` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::WebhookAuthenticationDataBasic`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'username')
61
+ self.username = attributes[:'username']
62
+ end
63
+
64
+ if attributes.key?(:'password')
65
+ self.password = attributes[:'password']
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 @username.nil?
74
+ invalid_properties.push('invalid value for "username", username cannot be nil.')
75
+ end
76
+
77
+ if @password.nil?
78
+ invalid_properties.push('invalid value for "password", password 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 @username.nil?
88
+ return false if @password.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
+ username == o.username &&
98
+ password == o.password
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
+ [username, password].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,213 @@
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 WebhookAuthenticationDataCustom
17
+ attr_accessor :headers
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'headers' => :'headers'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'headers' => :'Hash<String, String>'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::WebhookAuthenticationDataCustom` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::WebhookAuthenticationDataCustom`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'headers')
55
+ if (value = attributes[:'headers']).is_a?(Hash)
56
+ self.headers = value
57
+ end
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ if @headers.nil?
66
+ invalid_properties.push('invalid value for "headers", headers cannot be nil.')
67
+ end
68
+
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return false if @headers.nil?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ headers == o.headers
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [headers].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :Boolean
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ TalonOne.const_get(type).build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+ end
213
+ end