ultracart_api 4.1.210 → 4.1.212

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.
@@ -0,0 +1,388 @@
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 SfvbSequenceStep
18
+ # Its two sides, for a condition, split or InboxGeek step. Absent for every other type.
19
+ attr_accessor :branches
20
+
21
+ # True when the step's settings could not be read.
22
+ attr_accessor :config_error
23
+
24
+ # The step's settings as the admin stores them. A webhook's header and parameter values are masked.
25
+ attr_accessor :config_json
26
+
27
+ # A note stored inside the step's settings, when there is one.
28
+ attr_accessor :config_merchant_notes
29
+
30
+ # True when the step is switched off in its settings.
31
+ attr_accessor :disabled
32
+
33
+ # The emails it sends. One for an email step, one per variant for an experiment.
34
+ attr_accessor :email_uuids
35
+
36
+ # The step's audience filter as stored, when it has one.
37
+ attr_accessor :filter_profile_equation_json
38
+
39
+ # The items it names, for a cart or rate limiter step.
40
+ attr_accessor :item_ids
41
+
42
+ # The type as the admin names it, such as Time Delay. The type itself for one it doesn't know.
43
+ attr_accessor :label
44
+
45
+ # The lists it subscribes or unsubscribes, for a list step.
46
+ attr_accessor :list_uuids
47
+
48
+ # The note stored on the step.
49
+ attr_accessor :merchant_notes
50
+
51
+ # The step's own display name from its settings, when it has one.
52
+ attr_accessor :name
53
+
54
+ # How many customers are waiting on this step now. Only when waiting counts were asked for.
55
+ attr_accessor :number_waiting
56
+
57
+ # The postcard it sends, for a postcard step.
58
+ attr_accessor :postcard_uuid
59
+
60
+ # The step uuid.
61
+ attr_accessor :step_uuid
62
+
63
+ # The step type, such as email, wait, condition or webhook.
64
+ attr_accessor :type
65
+
66
+ # True for a step no branch leads to. Listed at the end so nothing is hidden.
67
+ attr_accessor :unreachable
68
+
69
+ # Attribute mapping from ruby-style variable name to JSON key.
70
+ def self.attribute_map
71
+ {
72
+ :'branches' => :'branches',
73
+ :'config_error' => :'config_error',
74
+ :'config_json' => :'config_json',
75
+ :'config_merchant_notes' => :'config_merchant_notes',
76
+ :'disabled' => :'disabled',
77
+ :'email_uuids' => :'email_uuids',
78
+ :'filter_profile_equation_json' => :'filter_profile_equation_json',
79
+ :'item_ids' => :'item_ids',
80
+ :'label' => :'label',
81
+ :'list_uuids' => :'list_uuids',
82
+ :'merchant_notes' => :'merchant_notes',
83
+ :'name' => :'name',
84
+ :'number_waiting' => :'number_waiting',
85
+ :'postcard_uuid' => :'postcard_uuid',
86
+ :'step_uuid' => :'step_uuid',
87
+ :'type' => :'type',
88
+ :'unreachable' => :'unreachable'
89
+ }
90
+ end
91
+
92
+ # Returns all the JSON keys this model knows about
93
+ def self.acceptable_attributes
94
+ attribute_map.values
95
+ end
96
+
97
+ # Attribute type mapping.
98
+ def self.openapi_types
99
+ {
100
+ :'branches' => :'Array<SfvbSequenceBranch>',
101
+ :'config_error' => :'Boolean',
102
+ :'config_json' => :'String',
103
+ :'config_merchant_notes' => :'String',
104
+ :'disabled' => :'Boolean',
105
+ :'email_uuids' => :'Array<String>',
106
+ :'filter_profile_equation_json' => :'String',
107
+ :'item_ids' => :'Array<String>',
108
+ :'label' => :'String',
109
+ :'list_uuids' => :'Array<String>',
110
+ :'merchant_notes' => :'String',
111
+ :'name' => :'String',
112
+ :'number_waiting' => :'Integer',
113
+ :'postcard_uuid' => :'String',
114
+ :'step_uuid' => :'String',
115
+ :'type' => :'String',
116
+ :'unreachable' => :'Boolean'
117
+ }
118
+ end
119
+
120
+ # List of attributes with nullable: true
121
+ def self.openapi_nullable
122
+ Set.new([
123
+ ])
124
+ end
125
+
126
+ # Initializes the object
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ def initialize(attributes = {})
129
+ if (!attributes.is_a?(Hash))
130
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbSequenceStep` initialize method"
131
+ end
132
+
133
+ # check to see if the attribute exists and convert string to symbol for hash key
134
+ attributes = attributes.each_with_object({}) { |(k, v), h|
135
+ if (!self.class.attribute_map.key?(k.to_sym))
136
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbSequenceStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
137
+ end
138
+ h[k.to_sym] = v
139
+ }
140
+
141
+ if attributes.key?(:'branches')
142
+ if (value = attributes[:'branches']).is_a?(Array)
143
+ self.branches = value
144
+ end
145
+ end
146
+
147
+ if attributes.key?(:'config_error')
148
+ self.config_error = attributes[:'config_error']
149
+ end
150
+
151
+ if attributes.key?(:'config_json')
152
+ self.config_json = attributes[:'config_json']
153
+ end
154
+
155
+ if attributes.key?(:'config_merchant_notes')
156
+ self.config_merchant_notes = attributes[:'config_merchant_notes']
157
+ end
158
+
159
+ if attributes.key?(:'disabled')
160
+ self.disabled = attributes[:'disabled']
161
+ end
162
+
163
+ if attributes.key?(:'email_uuids')
164
+ if (value = attributes[:'email_uuids']).is_a?(Array)
165
+ self.email_uuids = value
166
+ end
167
+ end
168
+
169
+ if attributes.key?(:'filter_profile_equation_json')
170
+ self.filter_profile_equation_json = attributes[:'filter_profile_equation_json']
171
+ end
172
+
173
+ if attributes.key?(:'item_ids')
174
+ if (value = attributes[:'item_ids']).is_a?(Array)
175
+ self.item_ids = value
176
+ end
177
+ end
178
+
179
+ if attributes.key?(:'label')
180
+ self.label = attributes[:'label']
181
+ end
182
+
183
+ if attributes.key?(:'list_uuids')
184
+ if (value = attributes[:'list_uuids']).is_a?(Array)
185
+ self.list_uuids = value
186
+ end
187
+ end
188
+
189
+ if attributes.key?(:'merchant_notes')
190
+ self.merchant_notes = attributes[:'merchant_notes']
191
+ end
192
+
193
+ if attributes.key?(:'name')
194
+ self.name = attributes[:'name']
195
+ end
196
+
197
+ if attributes.key?(:'number_waiting')
198
+ self.number_waiting = attributes[:'number_waiting']
199
+ end
200
+
201
+ if attributes.key?(:'postcard_uuid')
202
+ self.postcard_uuid = attributes[:'postcard_uuid']
203
+ end
204
+
205
+ if attributes.key?(:'step_uuid')
206
+ self.step_uuid = attributes[:'step_uuid']
207
+ end
208
+
209
+ if attributes.key?(:'type')
210
+ self.type = attributes[:'type']
211
+ end
212
+
213
+ if attributes.key?(:'unreachable')
214
+ self.unreachable = attributes[:'unreachable']
215
+ end
216
+ end
217
+
218
+ # Show invalid properties with the reasons. Usually used together with valid?
219
+ # @return Array for valid properties with the reasons
220
+ def list_invalid_properties
221
+ invalid_properties = Array.new
222
+ invalid_properties
223
+ end
224
+
225
+ # Check to see if the all the properties in the model are valid
226
+ # @return true if the model is valid
227
+ def valid?
228
+ true
229
+ end
230
+
231
+ # Checks equality by comparing each attribute.
232
+ # @param [Object] Object to be compared
233
+ def ==(o)
234
+ return true if self.equal?(o)
235
+ self.class == o.class &&
236
+ branches == o.branches &&
237
+ config_error == o.config_error &&
238
+ config_json == o.config_json &&
239
+ config_merchant_notes == o.config_merchant_notes &&
240
+ disabled == o.disabled &&
241
+ email_uuids == o.email_uuids &&
242
+ filter_profile_equation_json == o.filter_profile_equation_json &&
243
+ item_ids == o.item_ids &&
244
+ label == o.label &&
245
+ list_uuids == o.list_uuids &&
246
+ merchant_notes == o.merchant_notes &&
247
+ name == o.name &&
248
+ number_waiting == o.number_waiting &&
249
+ postcard_uuid == o.postcard_uuid &&
250
+ step_uuid == o.step_uuid &&
251
+ type == o.type &&
252
+ unreachable == o.unreachable
253
+ end
254
+
255
+ # @see the `==` method
256
+ # @param [Object] Object to be compared
257
+ def eql?(o)
258
+ self == o
259
+ end
260
+
261
+ # Calculates hash code according to all attributes.
262
+ # @return [Integer] Hash code
263
+ def hash
264
+ [branches, config_error, config_json, config_merchant_notes, disabled, email_uuids, filter_profile_equation_json, item_ids, label, list_uuids, merchant_notes, name, number_waiting, postcard_uuid, step_uuid, type, unreachable].hash
265
+ end
266
+
267
+ # Builds the object from hash
268
+ # @param [Hash] attributes Model attributes in the form of hash
269
+ # @return [Object] Returns the model itself
270
+ def self.build_from_hash(attributes)
271
+ new.build_from_hash(attributes)
272
+ end
273
+
274
+ # Builds the object from hash
275
+ # @param [Hash] attributes Model attributes in the form of hash
276
+ # @return [Object] Returns the model itself
277
+ def build_from_hash(attributes)
278
+ return nil unless attributes.is_a?(Hash)
279
+ attributes = attributes.transform_keys(&:to_sym)
280
+ self.class.openapi_types.each_pair do |key, type|
281
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
282
+ self.send("#{key}=", nil)
283
+ elsif type =~ /\AArray<(.*)>/i
284
+ # check to ensure the input is an array given that the attribute
285
+ # is documented as an array but the input is not
286
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
287
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
288
+ end
289
+ elsif !attributes[self.class.attribute_map[key]].nil?
290
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
291
+ end
292
+ end
293
+
294
+ self
295
+ end
296
+
297
+ # Deserializes the data based on type
298
+ # @param string type Data type
299
+ # @param string value Value to be deserialized
300
+ # @return [Object] Deserialized data
301
+ def _deserialize(type, value)
302
+ case type.to_sym
303
+ when :Time
304
+ Time.parse(value)
305
+ when :Date
306
+ Date.parse(value)
307
+ when :String
308
+ value.to_s
309
+ when :Integer
310
+ value.to_i
311
+ when :Float
312
+ value.to_f
313
+ when :Boolean
314
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
315
+ true
316
+ else
317
+ false
318
+ end
319
+ when :Object
320
+ # generic object (usually a Hash), return directly
321
+ value
322
+ when /\AArray<(?<inner_type>.+)>\z/
323
+ inner_type = Regexp.last_match[:inner_type]
324
+ value.map { |v| _deserialize(inner_type, v) }
325
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
326
+ k_type = Regexp.last_match[:k_type]
327
+ v_type = Regexp.last_match[:v_type]
328
+ {}.tap do |hash|
329
+ value.each do |k, v|
330
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
331
+ end
332
+ end
333
+ else # model
334
+ # models (e.g. Pet) or oneOf
335
+ klass = UltracartClient.const_get(type)
336
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
337
+ end
338
+ end
339
+
340
+ # Returns the string representation of the object
341
+ # @return [String] String presentation of the object
342
+ def to_s
343
+ to_hash.to_s
344
+ end
345
+
346
+ # to_body is an alias to to_hash (backward compatibility)
347
+ # @return [Hash] Returns the object in the form of hash
348
+ def to_body
349
+ to_hash
350
+ end
351
+
352
+ # Returns the object in the form of hash
353
+ # @return [Hash] Returns the object in the form of hash
354
+ def to_hash
355
+ hash = {}
356
+ self.class.attribute_map.each_pair do |attr, param|
357
+ value = self.send(attr)
358
+ if value.nil?
359
+ is_nullable = self.class.openapi_nullable.include?(attr)
360
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
361
+ end
362
+
363
+ hash[param] = _to_hash(value)
364
+ end
365
+ hash
366
+ end
367
+
368
+ # Outputs non-array value in the form of hash
369
+ # For object, use to_hash. Otherwise, just return the value
370
+ # @param [Object] value Any valid value
371
+ # @return [Hash] Returns the value in the form of hash
372
+ def _to_hash(value)
373
+ if value.is_a?(Array)
374
+ value.compact.map { |v| _to_hash(v) }
375
+ elsif value.is_a?(Hash)
376
+ {}.tap do |hash|
377
+ value.each { |k, v| hash[k] = _to_hash(v) }
378
+ end
379
+ elsif value.respond_to? :to_hash
380
+ value.to_hash
381
+ else
382
+ value
383
+ end
384
+ end
385
+
386
+ end
387
+
388
+ 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.210'
14
+ VERSION = '4.1.212'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1185,6 +1185,9 @@ require 'ultracart_api/models/sfvb_secret_request'
1185
1185
  require 'ultracart_api/models/sfvb_secret_request_create'
1186
1186
  require 'ultracart_api/models/sfvb_secret_requests_response'
1187
1187
  require 'ultracart_api/models/sfvb_secret_sink'
1188
+ require 'ultracart_api/models/sfvb_sequence'
1189
+ require 'ultracart_api/models/sfvb_sequence_branch'
1190
+ require 'ultracart_api/models/sfvb_sequence_step'
1188
1191
  require 'ultracart_api/models/sfvb_server_log'
1189
1192
  require 'ultracart_api/models/sfvb_server_log_detail'
1190
1193
  require 'ultracart_api/models/sfvb_server_log_entry'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.210
4
+ version: 4.1.212
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1247,6 +1247,9 @@ files:
1247
1247
  - docs/SfvbSecretRequestCreate.md
1248
1248
  - docs/SfvbSecretRequestsResponse.md
1249
1249
  - docs/SfvbSecretSink.md
1250
+ - docs/SfvbSequence.md
1251
+ - docs/SfvbSequenceBranch.md
1252
+ - docs/SfvbSequenceStep.md
1250
1253
  - docs/SfvbServerLog.md
1251
1254
  - docs/SfvbServerLogDetail.md
1252
1255
  - docs/SfvbServerLogEntry.md
@@ -2590,6 +2593,9 @@ files:
2590
2593
  - lib/ultracart_api/models/sfvb_secret_request_create.rb
2591
2594
  - lib/ultracart_api/models/sfvb_secret_requests_response.rb
2592
2595
  - lib/ultracart_api/models/sfvb_secret_sink.rb
2596
+ - lib/ultracart_api/models/sfvb_sequence.rb
2597
+ - lib/ultracart_api/models/sfvb_sequence_branch.rb
2598
+ - lib/ultracart_api/models/sfvb_sequence_step.rb
2593
2599
  - lib/ultracart_api/models/sfvb_server_log.rb
2594
2600
  - lib/ultracart_api/models/sfvb_server_log_detail.rb
2595
2601
  - lib/ultracart_api/models/sfvb_server_log_entry.rb