ultracart_api 4.1.222 → 4.1.224

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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +55 -2
  3. data/docs/OauthTokenResponse.md +2 -0
  4. data/docs/SfvbAffiliateNetwork.md +60 -0
  5. data/docs/SfvbAffiliateNetworkRequest.md +50 -0
  6. data/docs/SfvbAffiliateNetworksResponse.md +20 -0
  7. data/docs/SfvbApi.md +1456 -120
  8. data/docs/SfvbApprovalCreateRequest.md +8 -2
  9. data/docs/SfvbApprovalParams.md +7 -3
  10. data/docs/SfvbContainerResponse.md +3 -1
  11. data/docs/SfvbSmartAttribution.md +38 -0
  12. data/docs/SfvbSmartAttributionPlatform.md +34 -0
  13. data/docs/SfvbSmartAttributionRequest.md +30 -0
  14. data/docs/SfvbTrackingAdvanced.md +34 -0
  15. data/docs/SfvbTrackingAdvancedRequest.md +34 -0
  16. data/docs/SfvbTrackingChange.md +24 -0
  17. data/docs/SfvbTrackingHtml.md +36 -0
  18. data/docs/SfvbTrackingHtmlRequest.md +20 -0
  19. data/docs/SfvbTrackingHtmlResponse.md +22 -0
  20. data/docs/SfvbTrackingPrivacy.md +28 -0
  21. data/docs/SfvbTrackingPrivacyRequest.md +28 -0
  22. data/docs/SfvbTrackingProvider.md +48 -0
  23. data/docs/SfvbTrackingProviderConsent.md +22 -0
  24. data/docs/SfvbTrackingProviderEvent.md +20 -0
  25. data/docs/SfvbTrackingProviderField.md +42 -0
  26. data/docs/SfvbTrackingProviderOauth.md +28 -0
  27. data/docs/SfvbTrackingProviderRequest.md +32 -0
  28. data/docs/SfvbTrackingProviderSecrets.md +46 -0
  29. data/docs/SfvbTrackingProvidersResponse.md +22 -0
  30. data/docs/SfvbTrackingSettingsResponse.md +28 -0
  31. data/docs/SfvbTrackingWholesaleTier.md +22 -0
  32. data/docs/SfvbUtmShortcode.md +56 -0
  33. data/docs/SfvbUtmShortcodeRequest.md +44 -0
  34. data/docs/SfvbUtmShortcodesResponse.md +24 -0
  35. data/lib/ultracart_api/api/sfvb_api.rb +4602 -2793
  36. data/lib/ultracart_api/models/oauth_token_response.rb +11 -1
  37. data/lib/ultracart_api/models/sfvb_affiliate_network.rb +478 -0
  38. data/lib/ultracart_api/models/sfvb_affiliate_network_request.rb +428 -0
  39. data/lib/ultracart_api/models/sfvb_affiliate_networks_response.rb +232 -0
  40. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +34 -7
  41. data/lib/ultracart_api/models/sfvb_approval_params.rb +24 -4
  42. data/lib/ultracart_api/models/sfvb_container_response.rb +16 -4
  43. data/lib/ultracart_api/models/sfvb_smart_attribution.rb +324 -0
  44. data/lib/ultracart_api/models/sfvb_smart_attribution_platform.rb +300 -0
  45. data/lib/ultracart_api/models/sfvb_smart_attribution_request.rb +282 -0
  46. data/lib/ultracart_api/models/sfvb_tracking_advanced.rb +300 -0
  47. data/lib/ultracart_api/models/sfvb_tracking_advanced_request.rb +302 -0
  48. data/lib/ultracart_api/models/sfvb_tracking_change.rb +250 -0
  49. data/lib/ultracart_api/models/sfvb_tracking_html.rb +344 -0
  50. data/lib/ultracart_api/models/sfvb_tracking_html_request.rb +230 -0
  51. data/lib/ultracart_api/models/sfvb_tracking_html_response.rb +242 -0
  52. data/lib/ultracart_api/models/sfvb_tracking_privacy.rb +352 -0
  53. data/lib/ultracart_api/models/sfvb_tracking_privacy_request.rb +352 -0
  54. data/lib/ultracart_api/models/sfvb_tracking_provider.rb +378 -0
  55. data/lib/ultracart_api/models/sfvb_tracking_provider_consent.rb +240 -0
  56. data/lib/ultracart_api/models/sfvb_tracking_provider_event.rb +230 -0
  57. data/lib/ultracart_api/models/sfvb_tracking_provider_field.rb +342 -0
  58. data/lib/ultracart_api/models/sfvb_tracking_provider_oauth.rb +270 -0
  59. data/lib/ultracart_api/models/sfvb_tracking_provider_request.rb +292 -0
  60. data/lib/ultracart_api/models/sfvb_tracking_provider_secrets.rb +360 -0
  61. data/lib/ultracart_api/models/sfvb_tracking_providers_response.rb +242 -0
  62. data/lib/ultracart_api/models/sfvb_tracking_settings_response.rb +272 -0
  63. data/lib/ultracart_api/models/sfvb_tracking_wholesale_tier.rb +240 -0
  64. data/lib/ultracart_api/models/sfvb_utm_shortcode.rb +410 -0
  65. data/lib/ultracart_api/models/sfvb_utm_shortcode_request.rb +350 -0
  66. data/lib/ultracart_api/models/sfvb_utm_shortcodes_response.rb +252 -0
  67. data/lib/ultracart_api/version.rb +1 -1
  68. data/lib/ultracart_api.rb +27 -0
  69. metadata +55 -1
@@ -0,0 +1,350 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class SfvbUtmShortcodeRequest
18
+ # The shortcode. Letters, digits, underscore and hyphen, 1 to 50 characters. Required on create.
19
+ attr_accessor :code
20
+
21
+ # What the shortcode is for, up to 250 characters. An empty string clears it.
22
+ attr_accessor :description
23
+
24
+ # ITM campaign, up to 100 characters. An empty string clears it.
25
+ attr_accessor :itm_campaign
26
+
27
+ # ITM content, up to 100 characters. An empty string clears it.
28
+ attr_accessor :itm_content
29
+
30
+ # ITM id, up to 100 characters. An empty string clears it.
31
+ attr_accessor :itm_id
32
+
33
+ # ITM medium, up to 100 characters. An empty string clears it.
34
+ attr_accessor :itm_medium
35
+
36
+ # ITM (internal tracking) source, up to 100 characters. An empty string clears it.
37
+ attr_accessor :itm_source
38
+
39
+ # ITM term, up to 100 characters. An empty string clears it.
40
+ attr_accessor :itm_term
41
+
42
+ # UTM campaign, up to 100 characters. An empty string clears it.
43
+ attr_accessor :utm_campaign
44
+
45
+ # UTM content, up to 100 characters. An empty string clears it.
46
+ attr_accessor :utm_content
47
+
48
+ # UTM id, up to 100 characters. An empty string clears it.
49
+ attr_accessor :utm_id
50
+
51
+ # UTM medium, up to 100 characters. An empty string clears it.
52
+ attr_accessor :utm_medium
53
+
54
+ # UTM source, up to 100 characters. An empty string clears it.
55
+ attr_accessor :utm_source
56
+
57
+ # UTM term, up to 100 characters. An empty string clears it.
58
+ attr_accessor :utm_term
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'code' => :'code',
64
+ :'description' => :'description',
65
+ :'itm_campaign' => :'itm_campaign',
66
+ :'itm_content' => :'itm_content',
67
+ :'itm_id' => :'itm_id',
68
+ :'itm_medium' => :'itm_medium',
69
+ :'itm_source' => :'itm_source',
70
+ :'itm_term' => :'itm_term',
71
+ :'utm_campaign' => :'utm_campaign',
72
+ :'utm_content' => :'utm_content',
73
+ :'utm_id' => :'utm_id',
74
+ :'utm_medium' => :'utm_medium',
75
+ :'utm_source' => :'utm_source',
76
+ :'utm_term' => :'utm_term'
77
+ }
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'code' => :'String',
89
+ :'description' => :'String',
90
+ :'itm_campaign' => :'String',
91
+ :'itm_content' => :'String',
92
+ :'itm_id' => :'String',
93
+ :'itm_medium' => :'String',
94
+ :'itm_source' => :'String',
95
+ :'itm_term' => :'String',
96
+ :'utm_campaign' => :'String',
97
+ :'utm_content' => :'String',
98
+ :'utm_id' => :'String',
99
+ :'utm_medium' => :'String',
100
+ :'utm_source' => :'String',
101
+ :'utm_term' => :'String'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbUtmShortcodeRequest` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!self.class.attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbUtmShortcodeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'code')
127
+ self.code = attributes[:'code']
128
+ end
129
+
130
+ if attributes.key?(:'description')
131
+ self.description = attributes[:'description']
132
+ end
133
+
134
+ if attributes.key?(:'itm_campaign')
135
+ self.itm_campaign = attributes[:'itm_campaign']
136
+ end
137
+
138
+ if attributes.key?(:'itm_content')
139
+ self.itm_content = attributes[:'itm_content']
140
+ end
141
+
142
+ if attributes.key?(:'itm_id')
143
+ self.itm_id = attributes[:'itm_id']
144
+ end
145
+
146
+ if attributes.key?(:'itm_medium')
147
+ self.itm_medium = attributes[:'itm_medium']
148
+ end
149
+
150
+ if attributes.key?(:'itm_source')
151
+ self.itm_source = attributes[:'itm_source']
152
+ end
153
+
154
+ if attributes.key?(:'itm_term')
155
+ self.itm_term = attributes[:'itm_term']
156
+ end
157
+
158
+ if attributes.key?(:'utm_campaign')
159
+ self.utm_campaign = attributes[:'utm_campaign']
160
+ end
161
+
162
+ if attributes.key?(:'utm_content')
163
+ self.utm_content = attributes[:'utm_content']
164
+ end
165
+
166
+ if attributes.key?(:'utm_id')
167
+ self.utm_id = attributes[:'utm_id']
168
+ end
169
+
170
+ if attributes.key?(:'utm_medium')
171
+ self.utm_medium = attributes[:'utm_medium']
172
+ end
173
+
174
+ if attributes.key?(:'utm_source')
175
+ self.utm_source = attributes[:'utm_source']
176
+ end
177
+
178
+ if attributes.key?(:'utm_term')
179
+ self.utm_term = attributes[:'utm_term']
180
+ end
181
+ end
182
+
183
+ # Show invalid properties with the reasons. Usually used together with valid?
184
+ # @return Array for valid properties with the reasons
185
+ def list_invalid_properties
186
+ invalid_properties = Array.new
187
+ invalid_properties
188
+ end
189
+
190
+ # Check to see if the all the properties in the model are valid
191
+ # @return true if the model is valid
192
+ def valid?
193
+ true
194
+ end
195
+
196
+ # Checks equality by comparing each attribute.
197
+ # @param [Object] Object to be compared
198
+ def ==(o)
199
+ return true if self.equal?(o)
200
+ self.class == o.class &&
201
+ code == o.code &&
202
+ description == o.description &&
203
+ itm_campaign == o.itm_campaign &&
204
+ itm_content == o.itm_content &&
205
+ itm_id == o.itm_id &&
206
+ itm_medium == o.itm_medium &&
207
+ itm_source == o.itm_source &&
208
+ itm_term == o.itm_term &&
209
+ utm_campaign == o.utm_campaign &&
210
+ utm_content == o.utm_content &&
211
+ utm_id == o.utm_id &&
212
+ utm_medium == o.utm_medium &&
213
+ utm_source == o.utm_source &&
214
+ utm_term == o.utm_term
215
+ end
216
+
217
+ # @see the `==` method
218
+ # @param [Object] Object to be compared
219
+ def eql?(o)
220
+ self == o
221
+ end
222
+
223
+ # Calculates hash code according to all attributes.
224
+ # @return [Integer] Hash code
225
+ def hash
226
+ [code, description, itm_campaign, itm_content, itm_id, itm_medium, itm_source, itm_term, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term].hash
227
+ end
228
+
229
+ # Builds the object from hash
230
+ # @param [Hash] attributes Model attributes in the form of hash
231
+ # @return [Object] Returns the model itself
232
+ def self.build_from_hash(attributes)
233
+ new.build_from_hash(attributes)
234
+ end
235
+
236
+ # Builds the object from hash
237
+ # @param [Hash] attributes Model attributes in the form of hash
238
+ # @return [Object] Returns the model itself
239
+ def build_from_hash(attributes)
240
+ return nil unless attributes.is_a?(Hash)
241
+ attributes = attributes.transform_keys(&:to_sym)
242
+ self.class.openapi_types.each_pair do |key, type|
243
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
244
+ self.send("#{key}=", nil)
245
+ elsif type =~ /\AArray<(.*)>/i
246
+ # check to ensure the input is an array given that the attribute
247
+ # is documented as an array but the input is not
248
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
249
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
250
+ end
251
+ elsif !attributes[self.class.attribute_map[key]].nil?
252
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
253
+ end
254
+ end
255
+
256
+ self
257
+ end
258
+
259
+ # Deserializes the data based on type
260
+ # @param string type Data type
261
+ # @param string value Value to be deserialized
262
+ # @return [Object] Deserialized data
263
+ def _deserialize(type, value)
264
+ case type.to_sym
265
+ when :Time
266
+ Time.parse(value)
267
+ when :Date
268
+ Date.parse(value)
269
+ when :String
270
+ value.to_s
271
+ when :Integer
272
+ value.to_i
273
+ when :Float
274
+ value.to_f
275
+ when :Boolean
276
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
277
+ true
278
+ else
279
+ false
280
+ end
281
+ when :Object
282
+ # generic object (usually a Hash), return directly
283
+ value
284
+ when /\AArray<(?<inner_type>.+)>\z/
285
+ inner_type = Regexp.last_match[:inner_type]
286
+ value.map { |v| _deserialize(inner_type, v) }
287
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
288
+ k_type = Regexp.last_match[:k_type]
289
+ v_type = Regexp.last_match[:v_type]
290
+ {}.tap do |hash|
291
+ value.each do |k, v|
292
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
293
+ end
294
+ end
295
+ else # model
296
+ # models (e.g. Pet) or oneOf
297
+ klass = UltracartClient.const_get(type)
298
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
299
+ end
300
+ end
301
+
302
+ # Returns the string representation of the object
303
+ # @return [String] String presentation of the object
304
+ def to_s
305
+ to_hash.to_s
306
+ end
307
+
308
+ # to_body is an alias to to_hash (backward compatibility)
309
+ # @return [Hash] Returns the object in the form of hash
310
+ def to_body
311
+ to_hash
312
+ end
313
+
314
+ # Returns the object in the form of hash
315
+ # @return [Hash] Returns the object in the form of hash
316
+ def to_hash
317
+ hash = {}
318
+ self.class.attribute_map.each_pair do |attr, param|
319
+ value = self.send(attr)
320
+ if value.nil?
321
+ is_nullable = self.class.openapi_nullable.include?(attr)
322
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
323
+ end
324
+
325
+ hash[param] = _to_hash(value)
326
+ end
327
+ hash
328
+ end
329
+
330
+ # Outputs non-array value in the form of hash
331
+ # For object, use to_hash. Otherwise, just return the value
332
+ # @param [Object] value Any valid value
333
+ # @return [Hash] Returns the value in the form of hash
334
+ def _to_hash(value)
335
+ if value.is_a?(Array)
336
+ value.compact.map { |v| _to_hash(v) }
337
+ elsif value.is_a?(Hash)
338
+ {}.tap do |hash|
339
+ value.each { |k, v| hash[k] = _to_hash(v) }
340
+ end
341
+ elsif value.respond_to? :to_hash
342
+ value.to_hash
343
+ else
344
+ value
345
+ end
346
+ end
347
+
348
+ end
349
+
350
+ end
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class SfvbUtmShortcodesResponse
18
+ # How many shortcodes are listed.
19
+ attr_accessor :count
20
+
21
+ # The most shortcodes the API will create on one storefront.
22
+ attr_accessor :limit
23
+
24
+ # Every live shortcode, sorted by code.
25
+ attr_accessor :shortcodes
26
+
27
+ # The storefront the shortcodes belong to.
28
+ attr_accessor :storefront_oid
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'count' => :'count',
34
+ :'limit' => :'limit',
35
+ :'shortcodes' => :'shortcodes',
36
+ :'storefront_oid' => :'storefront_oid'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'count' => :'Integer',
49
+ :'limit' => :'Integer',
50
+ :'shortcodes' => :'Array<SfvbUtmShortcode>',
51
+ :'storefront_oid' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbUtmShortcodesResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbUtmShortcodesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'count')
77
+ self.count = attributes[:'count']
78
+ end
79
+
80
+ if attributes.key?(:'limit')
81
+ self.limit = attributes[:'limit']
82
+ end
83
+
84
+ if attributes.key?(:'shortcodes')
85
+ if (value = attributes[:'shortcodes']).is_a?(Array)
86
+ self.shortcodes = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'storefront_oid')
91
+ self.storefront_oid = attributes[:'storefront_oid']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ count == o.count &&
114
+ limit == o.limit &&
115
+ shortcodes == o.shortcodes &&
116
+ storefront_oid == o.storefront_oid
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [count, limit, shortcodes, storefront_oid].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ new.build_from_hash(attributes)
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
+ self.send("#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = UltracartClient.const_get(type)
200
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.222'
14
+ VERSION = '4.1.224'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -984,6 +984,9 @@ require 'ultracart_api/models/screen_recording_user_agent_os'
984
984
  require 'ultracart_api/models/screen_recording_user_property'
985
985
  require 'ultracart_api/models/screenshots_response'
986
986
  require 'ultracart_api/models/self_config'
987
+ require 'ultracart_api/models/sfvb_affiliate_network'
988
+ require 'ultracart_api/models/sfvb_affiliate_network_request'
989
+ require 'ultracart_api/models/sfvb_affiliate_networks_response'
987
990
  require 'ultracart_api/models/sfvb_approval'
988
991
  require 'ultracart_api/models/sfvb_approval_create_request'
989
992
  require 'ultracart_api/models/sfvb_approval_params'
@@ -1212,6 +1215,9 @@ require 'ultracart_api/models/sfvb_site_attribute'
1212
1215
  require 'ultracart_api/models/sfvb_site_attribute_update'
1213
1216
  require 'ultracart_api/models/sfvb_site_attribute_update_request'
1214
1217
  require 'ultracart_api/models/sfvb_site_attributes_response'
1218
+ require 'ultracart_api/models/sfvb_smart_attribution'
1219
+ require 'ultracart_api/models/sfvb_smart_attribution_platform'
1220
+ require 'ultracart_api/models/sfvb_smart_attribution_request'
1215
1221
  require 'ultracart_api/models/sfvb_storefront'
1216
1222
  require 'ultracart_api/models/sfvb_storefronts_response'
1217
1223
  require 'ultracart_api/models/sfvb_template'
@@ -1231,6 +1237,24 @@ require 'ultracart_api/models/sfvb_theme_font'
1231
1237
  require 'ultracart_api/models/sfvb_theme_font_family'
1232
1238
  require 'ultracart_api/models/sfvb_theme_job_response'
1233
1239
  require 'ultracart_api/models/sfvb_themes_response'
1240
+ require 'ultracart_api/models/sfvb_tracking_advanced'
1241
+ require 'ultracart_api/models/sfvb_tracking_advanced_request'
1242
+ require 'ultracart_api/models/sfvb_tracking_change'
1243
+ require 'ultracart_api/models/sfvb_tracking_html'
1244
+ require 'ultracart_api/models/sfvb_tracking_html_request'
1245
+ require 'ultracart_api/models/sfvb_tracking_html_response'
1246
+ require 'ultracart_api/models/sfvb_tracking_privacy'
1247
+ require 'ultracart_api/models/sfvb_tracking_privacy_request'
1248
+ require 'ultracart_api/models/sfvb_tracking_provider'
1249
+ require 'ultracart_api/models/sfvb_tracking_provider_consent'
1250
+ require 'ultracart_api/models/sfvb_tracking_provider_event'
1251
+ require 'ultracart_api/models/sfvb_tracking_provider_field'
1252
+ require 'ultracart_api/models/sfvb_tracking_provider_oauth'
1253
+ require 'ultracart_api/models/sfvb_tracking_provider_request'
1254
+ require 'ultracart_api/models/sfvb_tracking_provider_secrets'
1255
+ require 'ultracart_api/models/sfvb_tracking_providers_response'
1256
+ require 'ultracart_api/models/sfvb_tracking_settings_response'
1257
+ require 'ultracart_api/models/sfvb_tracking_wholesale_tier'
1234
1258
  require 'ultracart_api/models/sfvb_transactional_email'
1235
1259
  require 'ultracart_api/models/sfvb_transactional_emails_response'
1236
1260
  require 'ultracart_api/models/sfvb_upsell_item_logic'
@@ -1246,6 +1270,9 @@ require 'ultracart_api/models/sfvb_upsell_step'
1246
1270
  require 'ultracart_api/models/sfvb_upsell_step_offer'
1247
1271
  require 'ultracart_api/models/sfvb_upsell_tower_data'
1248
1272
  require 'ultracart_api/models/sfvb_upsell_variation'
1273
+ require 'ultracart_api/models/sfvb_utm_shortcode'
1274
+ require 'ultracart_api/models/sfvb_utm_shortcode_request'
1275
+ require 'ultracart_api/models/sfvb_utm_shortcodes_response'
1249
1276
  require 'ultracart_api/models/sfvb_validate_request'
1250
1277
  require 'ultracart_api/models/sfvb_validation_response'
1251
1278
  require 'ultracart_api/models/sfvb_velocity_validate_request'