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,410 @@
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 SfvbUtmShortcode
18
+ # The shortcode. Matched ignoring case.
19
+ attr_accessor :code
20
+
21
+ # When the shortcode was created, ISO 8601.
22
+ attr_accessor :creation_dts
23
+
24
+ # What the shortcode is for. Null when blank.
25
+ attr_accessor :description
26
+
27
+ # The hash of the code, description and values. Send it as If-Match when changing or deleting the shortcode.
28
+ attr_accessor :hash_sha256
29
+
30
+ # ITM campaign the shortcode applies. Null when blank.
31
+ attr_accessor :itm_campaign
32
+
33
+ # ITM content the shortcode applies. Null when blank.
34
+ attr_accessor :itm_content
35
+
36
+ # ITM id the shortcode applies. Null when blank.
37
+ attr_accessor :itm_id
38
+
39
+ # ITM medium the shortcode applies. Null when blank.
40
+ attr_accessor :itm_medium
41
+
42
+ # ITM (internal tracking) source the shortcode applies. Null when blank.
43
+ attr_accessor :itm_source
44
+
45
+ # ITM term the shortcode applies. Null when blank.
46
+ attr_accessor :itm_term
47
+
48
+ # When the shortcode last changed, ISO 8601.
49
+ attr_accessor :last_modified_dts
50
+
51
+ # Append this to a storefront path (as its last segment) to apply the shortcode. Fires only where that full path is not itself a page.
52
+ attr_accessor :path_segment
53
+
54
+ # Add this query parameter to a link on any page running UC Analytics, including other sites, to apply the shortcode.
55
+ attr_accessor :query_parameter
56
+
57
+ # The shortcode's id on this storefront.
58
+ attr_accessor :shortcode_oid
59
+
60
+ # UTM campaign the shortcode applies. Null when blank.
61
+ attr_accessor :utm_campaign
62
+
63
+ # UTM content the shortcode applies. Null when blank.
64
+ attr_accessor :utm_content
65
+
66
+ # UTM id the shortcode applies. Null when blank.
67
+ attr_accessor :utm_id
68
+
69
+ # UTM medium the shortcode applies. Null when blank.
70
+ attr_accessor :utm_medium
71
+
72
+ # UTM source the shortcode applies. Null when blank.
73
+ attr_accessor :utm_source
74
+
75
+ # UTM term the shortcode applies. Null when blank.
76
+ attr_accessor :utm_term
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ def self.attribute_map
80
+ {
81
+ :'code' => :'code',
82
+ :'creation_dts' => :'creation_dts',
83
+ :'description' => :'description',
84
+ :'hash_sha256' => :'hash_sha256',
85
+ :'itm_campaign' => :'itm_campaign',
86
+ :'itm_content' => :'itm_content',
87
+ :'itm_id' => :'itm_id',
88
+ :'itm_medium' => :'itm_medium',
89
+ :'itm_source' => :'itm_source',
90
+ :'itm_term' => :'itm_term',
91
+ :'last_modified_dts' => :'last_modified_dts',
92
+ :'path_segment' => :'path_segment',
93
+ :'query_parameter' => :'query_parameter',
94
+ :'shortcode_oid' => :'shortcode_oid',
95
+ :'utm_campaign' => :'utm_campaign',
96
+ :'utm_content' => :'utm_content',
97
+ :'utm_id' => :'utm_id',
98
+ :'utm_medium' => :'utm_medium',
99
+ :'utm_source' => :'utm_source',
100
+ :'utm_term' => :'utm_term'
101
+ }
102
+ end
103
+
104
+ # Returns all the JSON keys this model knows about
105
+ def self.acceptable_attributes
106
+ attribute_map.values
107
+ end
108
+
109
+ # Attribute type mapping.
110
+ def self.openapi_types
111
+ {
112
+ :'code' => :'String',
113
+ :'creation_dts' => :'String',
114
+ :'description' => :'String',
115
+ :'hash_sha256' => :'String',
116
+ :'itm_campaign' => :'String',
117
+ :'itm_content' => :'String',
118
+ :'itm_id' => :'String',
119
+ :'itm_medium' => :'String',
120
+ :'itm_source' => :'String',
121
+ :'itm_term' => :'String',
122
+ :'last_modified_dts' => :'String',
123
+ :'path_segment' => :'String',
124
+ :'query_parameter' => :'String',
125
+ :'shortcode_oid' => :'Integer',
126
+ :'utm_campaign' => :'String',
127
+ :'utm_content' => :'String',
128
+ :'utm_id' => :'String',
129
+ :'utm_medium' => :'String',
130
+ :'utm_source' => :'String',
131
+ :'utm_term' => :'String'
132
+ }
133
+ end
134
+
135
+ # List of attributes with nullable: true
136
+ def self.openapi_nullable
137
+ Set.new([
138
+ ])
139
+ end
140
+
141
+ # Initializes the object
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ def initialize(attributes = {})
144
+ if (!attributes.is_a?(Hash))
145
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbUtmShortcode` initialize method"
146
+ end
147
+
148
+ # check to see if the attribute exists and convert string to symbol for hash key
149
+ attributes = attributes.each_with_object({}) { |(k, v), h|
150
+ if (!self.class.attribute_map.key?(k.to_sym))
151
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbUtmShortcode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
152
+ end
153
+ h[k.to_sym] = v
154
+ }
155
+
156
+ if attributes.key?(:'code')
157
+ self.code = attributes[:'code']
158
+ end
159
+
160
+ if attributes.key?(:'creation_dts')
161
+ self.creation_dts = attributes[:'creation_dts']
162
+ end
163
+
164
+ if attributes.key?(:'description')
165
+ self.description = attributes[:'description']
166
+ end
167
+
168
+ if attributes.key?(:'hash_sha256')
169
+ self.hash_sha256 = attributes[:'hash_sha256']
170
+ end
171
+
172
+ if attributes.key?(:'itm_campaign')
173
+ self.itm_campaign = attributes[:'itm_campaign']
174
+ end
175
+
176
+ if attributes.key?(:'itm_content')
177
+ self.itm_content = attributes[:'itm_content']
178
+ end
179
+
180
+ if attributes.key?(:'itm_id')
181
+ self.itm_id = attributes[:'itm_id']
182
+ end
183
+
184
+ if attributes.key?(:'itm_medium')
185
+ self.itm_medium = attributes[:'itm_medium']
186
+ end
187
+
188
+ if attributes.key?(:'itm_source')
189
+ self.itm_source = attributes[:'itm_source']
190
+ end
191
+
192
+ if attributes.key?(:'itm_term')
193
+ self.itm_term = attributes[:'itm_term']
194
+ end
195
+
196
+ if attributes.key?(:'last_modified_dts')
197
+ self.last_modified_dts = attributes[:'last_modified_dts']
198
+ end
199
+
200
+ if attributes.key?(:'path_segment')
201
+ self.path_segment = attributes[:'path_segment']
202
+ end
203
+
204
+ if attributes.key?(:'query_parameter')
205
+ self.query_parameter = attributes[:'query_parameter']
206
+ end
207
+
208
+ if attributes.key?(:'shortcode_oid')
209
+ self.shortcode_oid = attributes[:'shortcode_oid']
210
+ end
211
+
212
+ if attributes.key?(:'utm_campaign')
213
+ self.utm_campaign = attributes[:'utm_campaign']
214
+ end
215
+
216
+ if attributes.key?(:'utm_content')
217
+ self.utm_content = attributes[:'utm_content']
218
+ end
219
+
220
+ if attributes.key?(:'utm_id')
221
+ self.utm_id = attributes[:'utm_id']
222
+ end
223
+
224
+ if attributes.key?(:'utm_medium')
225
+ self.utm_medium = attributes[:'utm_medium']
226
+ end
227
+
228
+ if attributes.key?(:'utm_source')
229
+ self.utm_source = attributes[:'utm_source']
230
+ end
231
+
232
+ if attributes.key?(:'utm_term')
233
+ self.utm_term = attributes[:'utm_term']
234
+ end
235
+ end
236
+
237
+ # Show invalid properties with the reasons. Usually used together with valid?
238
+ # @return Array for valid properties with the reasons
239
+ def list_invalid_properties
240
+ invalid_properties = Array.new
241
+ invalid_properties
242
+ end
243
+
244
+ # Check to see if the all the properties in the model are valid
245
+ # @return true if the model is valid
246
+ def valid?
247
+ true
248
+ end
249
+
250
+ # Checks equality by comparing each attribute.
251
+ # @param [Object] Object to be compared
252
+ def ==(o)
253
+ return true if self.equal?(o)
254
+ self.class == o.class &&
255
+ code == o.code &&
256
+ creation_dts == o.creation_dts &&
257
+ description == o.description &&
258
+ hash_sha256 == o.hash_sha256 &&
259
+ itm_campaign == o.itm_campaign &&
260
+ itm_content == o.itm_content &&
261
+ itm_id == o.itm_id &&
262
+ itm_medium == o.itm_medium &&
263
+ itm_source == o.itm_source &&
264
+ itm_term == o.itm_term &&
265
+ last_modified_dts == o.last_modified_dts &&
266
+ path_segment == o.path_segment &&
267
+ query_parameter == o.query_parameter &&
268
+ shortcode_oid == o.shortcode_oid &&
269
+ utm_campaign == o.utm_campaign &&
270
+ utm_content == o.utm_content &&
271
+ utm_id == o.utm_id &&
272
+ utm_medium == o.utm_medium &&
273
+ utm_source == o.utm_source &&
274
+ utm_term == o.utm_term
275
+ end
276
+
277
+ # @see the `==` method
278
+ # @param [Object] Object to be compared
279
+ def eql?(o)
280
+ self == o
281
+ end
282
+
283
+ # Calculates hash code according to all attributes.
284
+ # @return [Integer] Hash code
285
+ def hash
286
+ [code, creation_dts, description, hash_sha256, itm_campaign, itm_content, itm_id, itm_medium, itm_source, itm_term, last_modified_dts, path_segment, query_parameter, shortcode_oid, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term].hash
287
+ end
288
+
289
+ # Builds the object from hash
290
+ # @param [Hash] attributes Model attributes in the form of hash
291
+ # @return [Object] Returns the model itself
292
+ def self.build_from_hash(attributes)
293
+ new.build_from_hash(attributes)
294
+ end
295
+
296
+ # Builds the object from hash
297
+ # @param [Hash] attributes Model attributes in the form of hash
298
+ # @return [Object] Returns the model itself
299
+ def build_from_hash(attributes)
300
+ return nil unless attributes.is_a?(Hash)
301
+ attributes = attributes.transform_keys(&:to_sym)
302
+ self.class.openapi_types.each_pair do |key, type|
303
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
304
+ self.send("#{key}=", nil)
305
+ elsif type =~ /\AArray<(.*)>/i
306
+ # check to ensure the input is an array given that the attribute
307
+ # is documented as an array but the input is not
308
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
309
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
310
+ end
311
+ elsif !attributes[self.class.attribute_map[key]].nil?
312
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
313
+ end
314
+ end
315
+
316
+ self
317
+ end
318
+
319
+ # Deserializes the data based on type
320
+ # @param string type Data type
321
+ # @param string value Value to be deserialized
322
+ # @return [Object] Deserialized data
323
+ def _deserialize(type, value)
324
+ case type.to_sym
325
+ when :Time
326
+ Time.parse(value)
327
+ when :Date
328
+ Date.parse(value)
329
+ when :String
330
+ value.to_s
331
+ when :Integer
332
+ value.to_i
333
+ when :Float
334
+ value.to_f
335
+ when :Boolean
336
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
337
+ true
338
+ else
339
+ false
340
+ end
341
+ when :Object
342
+ # generic object (usually a Hash), return directly
343
+ value
344
+ when /\AArray<(?<inner_type>.+)>\z/
345
+ inner_type = Regexp.last_match[:inner_type]
346
+ value.map { |v| _deserialize(inner_type, v) }
347
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
348
+ k_type = Regexp.last_match[:k_type]
349
+ v_type = Regexp.last_match[:v_type]
350
+ {}.tap do |hash|
351
+ value.each do |k, v|
352
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
353
+ end
354
+ end
355
+ else # model
356
+ # models (e.g. Pet) or oneOf
357
+ klass = UltracartClient.const_get(type)
358
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
359
+ end
360
+ end
361
+
362
+ # Returns the string representation of the object
363
+ # @return [String] String presentation of the object
364
+ def to_s
365
+ to_hash.to_s
366
+ end
367
+
368
+ # to_body is an alias to to_hash (backward compatibility)
369
+ # @return [Hash] Returns the object in the form of hash
370
+ def to_body
371
+ to_hash
372
+ end
373
+
374
+ # Returns the object in the form of hash
375
+ # @return [Hash] Returns the object in the form of hash
376
+ def to_hash
377
+ hash = {}
378
+ self.class.attribute_map.each_pair do |attr, param|
379
+ value = self.send(attr)
380
+ if value.nil?
381
+ is_nullable = self.class.openapi_nullable.include?(attr)
382
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
383
+ end
384
+
385
+ hash[param] = _to_hash(value)
386
+ end
387
+ hash
388
+ end
389
+
390
+ # Outputs non-array value in the form of hash
391
+ # For object, use to_hash. Otherwise, just return the value
392
+ # @param [Object] value Any valid value
393
+ # @return [Hash] Returns the value in the form of hash
394
+ def _to_hash(value)
395
+ if value.is_a?(Array)
396
+ value.compact.map { |v| _to_hash(v) }
397
+ elsif value.is_a?(Hash)
398
+ {}.tap do |hash|
399
+ value.each { |k, v| hash[k] = _to_hash(v) }
400
+ end
401
+ elsif value.respond_to? :to_hash
402
+ value.to_hash
403
+ else
404
+ value
405
+ end
406
+ end
407
+
408
+ end
409
+
410
+ end