ultracart_api 4.1.206 → 4.1.208
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.
- checksums.yaml +4 -4
- data/README.md +18 -2
- data/docs/SfvbApi.md +338 -0
- data/docs/SfvbCampaign.md +38 -0
- data/docs/SfvbCampaignsResponse.md +24 -0
- data/docs/SfvbCommsEmail.md +38 -0
- data/docs/SfvbCommsPostcard.md +28 -0
- data/docs/SfvbEmail.md +40 -0
- data/docs/SfvbEmailUpdateRequest.md +20 -0
- data/docs/SfvbFlow.md +40 -0
- data/docs/SfvbFlowsResponse.md +24 -0
- data/lib/ultracart_api/api/sfvb_api.rb +450 -0
- data/lib/ultracart_api/models/item_third_party_email_marketing.rb +2 -2
- data/lib/ultracart_api/models/sfvb_campaign.rb +324 -0
- data/lib/ultracart_api/models/sfvb_campaigns_response.rb +252 -0
- data/lib/ultracart_api/models/sfvb_comms_email.rb +320 -0
- data/lib/ultracart_api/models/sfvb_comms_postcard.rb +270 -0
- data/lib/ultracart_api/models/sfvb_email.rb +330 -0
- data/lib/ultracart_api/models/sfvb_email_update_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_flow.rb +334 -0
- data/lib/ultracart_api/models/sfvb_flows_response.rb +252 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
|
@@ -0,0 +1,334 @@
|
|
|
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 SfvbFlow
|
|
18
|
+
# The communication sequence the steps belong to.
|
|
19
|
+
attr_accessor :communication_sequence_uuid
|
|
20
|
+
|
|
21
|
+
# When the flow was created (ISO 8601, UTC).
|
|
22
|
+
attr_accessor :created_dts
|
|
23
|
+
|
|
24
|
+
# True when the flow was deleted.
|
|
25
|
+
attr_accessor :deleted
|
|
26
|
+
|
|
27
|
+
# Its emails, in step order.
|
|
28
|
+
attr_accessor :emails
|
|
29
|
+
|
|
30
|
+
# The flow uuid.
|
|
31
|
+
attr_accessor :flow_uuid
|
|
32
|
+
|
|
33
|
+
# True when the emails and postcards reach customers now, so a change to one shows at once. False only in a status that sends nothing.
|
|
34
|
+
attr_accessor :live
|
|
35
|
+
|
|
36
|
+
# The flow name.
|
|
37
|
+
attr_accessor :name
|
|
38
|
+
|
|
39
|
+
# Its postcards, in step order.
|
|
40
|
+
attr_accessor :postcards
|
|
41
|
+
|
|
42
|
+
# The status, such as draft, active, paused, draining or inactive.
|
|
43
|
+
attr_accessor :status
|
|
44
|
+
|
|
45
|
+
# When the status last changed (ISO 8601, UTC).
|
|
46
|
+
attr_accessor :status_dts
|
|
47
|
+
|
|
48
|
+
# The name of the trigger parameter, when the trigger takes one.
|
|
49
|
+
attr_accessor :trigger_parameter_name
|
|
50
|
+
|
|
51
|
+
# What starts the flow, such as cart abandon or an order.
|
|
52
|
+
attr_accessor :trigger_type
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'communication_sequence_uuid' => :'communication_sequence_uuid',
|
|
58
|
+
:'created_dts' => :'created_dts',
|
|
59
|
+
:'deleted' => :'deleted',
|
|
60
|
+
:'emails' => :'emails',
|
|
61
|
+
:'flow_uuid' => :'flow_uuid',
|
|
62
|
+
:'live' => :'live',
|
|
63
|
+
:'name' => :'name',
|
|
64
|
+
:'postcards' => :'postcards',
|
|
65
|
+
:'status' => :'status',
|
|
66
|
+
:'status_dts' => :'status_dts',
|
|
67
|
+
:'trigger_parameter_name' => :'trigger_parameter_name',
|
|
68
|
+
:'trigger_type' => :'trigger_type'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'communication_sequence_uuid' => :'String',
|
|
81
|
+
:'created_dts' => :'String',
|
|
82
|
+
:'deleted' => :'Boolean',
|
|
83
|
+
:'emails' => :'Array<SfvbCommsEmail>',
|
|
84
|
+
:'flow_uuid' => :'String',
|
|
85
|
+
:'live' => :'Boolean',
|
|
86
|
+
:'name' => :'String',
|
|
87
|
+
:'postcards' => :'Array<SfvbCommsPostcard>',
|
|
88
|
+
:'status' => :'String',
|
|
89
|
+
:'status_dts' => :'String',
|
|
90
|
+
:'trigger_parameter_name' => :'String',
|
|
91
|
+
:'trigger_type' => :'String'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# List of attributes with nullable: true
|
|
96
|
+
def self.openapi_nullable
|
|
97
|
+
Set.new([
|
|
98
|
+
])
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Initializes the object
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
def initialize(attributes = {})
|
|
104
|
+
if (!attributes.is_a?(Hash))
|
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbFlow` initialize method"
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbFlow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
112
|
+
end
|
|
113
|
+
h[k.to_sym] = v
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'communication_sequence_uuid')
|
|
117
|
+
self.communication_sequence_uuid = attributes[:'communication_sequence_uuid']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'created_dts')
|
|
121
|
+
self.created_dts = attributes[:'created_dts']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'deleted')
|
|
125
|
+
self.deleted = attributes[:'deleted']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'emails')
|
|
129
|
+
if (value = attributes[:'emails']).is_a?(Array)
|
|
130
|
+
self.emails = value
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'flow_uuid')
|
|
135
|
+
self.flow_uuid = attributes[:'flow_uuid']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'live')
|
|
139
|
+
self.live = attributes[:'live']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'name')
|
|
143
|
+
self.name = attributes[:'name']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'postcards')
|
|
147
|
+
if (value = attributes[:'postcards']).is_a?(Array)
|
|
148
|
+
self.postcards = value
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'status')
|
|
153
|
+
self.status = attributes[:'status']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'status_dts')
|
|
157
|
+
self.status_dts = attributes[:'status_dts']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'trigger_parameter_name')
|
|
161
|
+
self.trigger_parameter_name = attributes[:'trigger_parameter_name']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'trigger_type')
|
|
165
|
+
self.trigger_type = attributes[:'trigger_type']
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
170
|
+
# @return Array for valid properties with the reasons
|
|
171
|
+
def list_invalid_properties
|
|
172
|
+
invalid_properties = Array.new
|
|
173
|
+
invalid_properties
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Check to see if the all the properties in the model are valid
|
|
177
|
+
# @return true if the model is valid
|
|
178
|
+
def valid?
|
|
179
|
+
true
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Checks equality by comparing each attribute.
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def ==(o)
|
|
185
|
+
return true if self.equal?(o)
|
|
186
|
+
self.class == o.class &&
|
|
187
|
+
communication_sequence_uuid == o.communication_sequence_uuid &&
|
|
188
|
+
created_dts == o.created_dts &&
|
|
189
|
+
deleted == o.deleted &&
|
|
190
|
+
emails == o.emails &&
|
|
191
|
+
flow_uuid == o.flow_uuid &&
|
|
192
|
+
live == o.live &&
|
|
193
|
+
name == o.name &&
|
|
194
|
+
postcards == o.postcards &&
|
|
195
|
+
status == o.status &&
|
|
196
|
+
status_dts == o.status_dts &&
|
|
197
|
+
trigger_parameter_name == o.trigger_parameter_name &&
|
|
198
|
+
trigger_type == o.trigger_type
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# @see the `==` method
|
|
202
|
+
# @param [Object] Object to be compared
|
|
203
|
+
def eql?(o)
|
|
204
|
+
self == o
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Calculates hash code according to all attributes.
|
|
208
|
+
# @return [Integer] Hash code
|
|
209
|
+
def hash
|
|
210
|
+
[communication_sequence_uuid, created_dts, deleted, emails, flow_uuid, live, name, postcards, status, status_dts, trigger_parameter_name, trigger_type].hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Builds the object from hash
|
|
214
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
215
|
+
# @return [Object] Returns the model itself
|
|
216
|
+
def self.build_from_hash(attributes)
|
|
217
|
+
new.build_from_hash(attributes)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Builds the object from hash
|
|
221
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
222
|
+
# @return [Object] Returns the model itself
|
|
223
|
+
def build_from_hash(attributes)
|
|
224
|
+
return nil unless attributes.is_a?(Hash)
|
|
225
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
226
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
227
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
228
|
+
self.send("#{key}=", nil)
|
|
229
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
230
|
+
# check to ensure the input is an array given that the attribute
|
|
231
|
+
# is documented as an array but the input is not
|
|
232
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
233
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
234
|
+
end
|
|
235
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
236
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
self
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Deserializes the data based on type
|
|
244
|
+
# @param string type Data type
|
|
245
|
+
# @param string value Value to be deserialized
|
|
246
|
+
# @return [Object] Deserialized data
|
|
247
|
+
def _deserialize(type, value)
|
|
248
|
+
case type.to_sym
|
|
249
|
+
when :Time
|
|
250
|
+
Time.parse(value)
|
|
251
|
+
when :Date
|
|
252
|
+
Date.parse(value)
|
|
253
|
+
when :String
|
|
254
|
+
value.to_s
|
|
255
|
+
when :Integer
|
|
256
|
+
value.to_i
|
|
257
|
+
when :Float
|
|
258
|
+
value.to_f
|
|
259
|
+
when :Boolean
|
|
260
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
261
|
+
true
|
|
262
|
+
else
|
|
263
|
+
false
|
|
264
|
+
end
|
|
265
|
+
when :Object
|
|
266
|
+
# generic object (usually a Hash), return directly
|
|
267
|
+
value
|
|
268
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
269
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
270
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
271
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
272
|
+
k_type = Regexp.last_match[:k_type]
|
|
273
|
+
v_type = Regexp.last_match[:v_type]
|
|
274
|
+
{}.tap do |hash|
|
|
275
|
+
value.each do |k, v|
|
|
276
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
else # model
|
|
280
|
+
# models (e.g. Pet) or oneOf
|
|
281
|
+
klass = UltracartClient.const_get(type)
|
|
282
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Returns the string representation of the object
|
|
287
|
+
# @return [String] String presentation of the object
|
|
288
|
+
def to_s
|
|
289
|
+
to_hash.to_s
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
|
294
|
+
def to_body
|
|
295
|
+
to_hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Returns the object in the form of hash
|
|
299
|
+
# @return [Hash] Returns the object in the form of hash
|
|
300
|
+
def to_hash
|
|
301
|
+
hash = {}
|
|
302
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
303
|
+
value = self.send(attr)
|
|
304
|
+
if value.nil?
|
|
305
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
306
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
hash[param] = _to_hash(value)
|
|
310
|
+
end
|
|
311
|
+
hash
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Outputs non-array value in the form of hash
|
|
315
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
316
|
+
# @param [Object] value Any valid value
|
|
317
|
+
# @return [Hash] Returns the value in the form of hash
|
|
318
|
+
def _to_hash(value)
|
|
319
|
+
if value.is_a?(Array)
|
|
320
|
+
value.compact.map { |v| _to_hash(v) }
|
|
321
|
+
elsif value.is_a?(Hash)
|
|
322
|
+
{}.tap do |hash|
|
|
323
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
324
|
+
end
|
|
325
|
+
elsif value.respond_to? :to_hash
|
|
326
|
+
value.to_hash
|
|
327
|
+
else
|
|
328
|
+
value
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
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 SfvbFlowsResponse
|
|
18
|
+
# The flows on this page, newest first.
|
|
19
|
+
attr_accessor :flows
|
|
20
|
+
|
|
21
|
+
# This page number, starting at 1.
|
|
22
|
+
attr_accessor :page
|
|
23
|
+
|
|
24
|
+
# The page size.
|
|
25
|
+
attr_accessor :page_size
|
|
26
|
+
|
|
27
|
+
# How many match, across every page.
|
|
28
|
+
attr_accessor :total
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'flows' => :'flows',
|
|
34
|
+
:'page' => :'page',
|
|
35
|
+
:'page_size' => :'page_size',
|
|
36
|
+
:'total' => :'total'
|
|
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
|
+
:'flows' => :'Array<SfvbFlow>',
|
|
49
|
+
:'page' => :'Integer',
|
|
50
|
+
:'page_size' => :'Integer',
|
|
51
|
+
:'total' => :'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::SfvbFlowsResponse` 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::SfvbFlowsResponse`. 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?(:'flows')
|
|
77
|
+
if (value = attributes[:'flows']).is_a?(Array)
|
|
78
|
+
self.flows = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'page')
|
|
83
|
+
self.page = attributes[:'page']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'page_size')
|
|
87
|
+
self.page_size = attributes[:'page_size']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'total')
|
|
91
|
+
self.total = attributes[:'total']
|
|
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
|
+
flows == o.flows &&
|
|
114
|
+
page == o.page &&
|
|
115
|
+
page_size == o.page_size &&
|
|
116
|
+
total == o.total
|
|
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
|
+
[flows, page, page_size, total].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
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -996,7 +996,11 @@ require 'ultracart_api/models/sfvb_blog_post_image'
|
|
|
996
996
|
require 'ultracart_api/models/sfvb_blog_post_image_request'
|
|
997
997
|
require 'ultracart_api/models/sfvb_blog_post_request'
|
|
998
998
|
require 'ultracart_api/models/sfvb_blog_posts_response'
|
|
999
|
+
require 'ultracart_api/models/sfvb_campaign'
|
|
1000
|
+
require 'ultracart_api/models/sfvb_campaigns_response'
|
|
999
1001
|
require 'ultracart_api/models/sfvb_comms_dns_record'
|
|
1002
|
+
require 'ultracart_api/models/sfvb_comms_email'
|
|
1003
|
+
require 'ultracart_api/models/sfvb_comms_postcard'
|
|
1000
1004
|
require 'ultracart_api/models/sfvb_comms_sending_domain'
|
|
1001
1005
|
require 'ultracart_api/models/sfvb_comms_sending_domains_response'
|
|
1002
1006
|
require 'ultracart_api/models/sfvb_comms_twilio_account'
|
|
@@ -1011,8 +1015,10 @@ require 'ultracart_api/models/sfvb_container_write_request'
|
|
|
1011
1015
|
require 'ultracart_api/models/sfvb_element'
|
|
1012
1016
|
require 'ultracart_api/models/sfvb_element_schema_response'
|
|
1013
1017
|
require 'ultracart_api/models/sfvb_elements_response'
|
|
1018
|
+
require 'ultracart_api/models/sfvb_email'
|
|
1014
1019
|
require 'ultracart_api/models/sfvb_email_render_request'
|
|
1015
1020
|
require 'ultracart_api/models/sfvb_email_render_response'
|
|
1021
|
+
require 'ultracart_api/models/sfvb_email_update_request'
|
|
1016
1022
|
require 'ultracart_api/models/sfvb_error_detail'
|
|
1017
1023
|
require 'ultracart_api/models/sfvb_event'
|
|
1018
1024
|
require 'ultracart_api/models/sfvb_events_auth_request'
|
|
@@ -1038,6 +1044,8 @@ require 'ultracart_api/models/sfvb_file_versions_response'
|
|
|
1038
1044
|
require 'ultracart_api/models/sfvb_file_write_request'
|
|
1039
1045
|
require 'ultracart_api/models/sfvb_file_write_response'
|
|
1040
1046
|
require 'ultracart_api/models/sfvb_files_response'
|
|
1047
|
+
require 'ultracart_api/models/sfvb_flow'
|
|
1048
|
+
require 'ultracart_api/models/sfvb_flows_response'
|
|
1041
1049
|
require 'ultracart_api/models/sfvb_i18n_glossary'
|
|
1042
1050
|
require 'ultracart_api/models/sfvb_i18n_glossary_request'
|
|
1043
1051
|
require 'ultracart_api/models/sfvb_i18n_language'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ultracart_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.208
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1058,7 +1058,11 @@ files:
|
|
|
1058
1058
|
- docs/SfvbBlogPostImageRequest.md
|
|
1059
1059
|
- docs/SfvbBlogPostRequest.md
|
|
1060
1060
|
- docs/SfvbBlogPostsResponse.md
|
|
1061
|
+
- docs/SfvbCampaign.md
|
|
1062
|
+
- docs/SfvbCampaignsResponse.md
|
|
1061
1063
|
- docs/SfvbCommsDnsRecord.md
|
|
1064
|
+
- docs/SfvbCommsEmail.md
|
|
1065
|
+
- docs/SfvbCommsPostcard.md
|
|
1062
1066
|
- docs/SfvbCommsSendingDomain.md
|
|
1063
1067
|
- docs/SfvbCommsSendingDomainsResponse.md
|
|
1064
1068
|
- docs/SfvbCommsTwilioAccount.md
|
|
@@ -1073,8 +1077,10 @@ files:
|
|
|
1073
1077
|
- docs/SfvbElement.md
|
|
1074
1078
|
- docs/SfvbElementSchemaResponse.md
|
|
1075
1079
|
- docs/SfvbElementsResponse.md
|
|
1080
|
+
- docs/SfvbEmail.md
|
|
1076
1081
|
- docs/SfvbEmailRenderRequest.md
|
|
1077
1082
|
- docs/SfvbEmailRenderResponse.md
|
|
1083
|
+
- docs/SfvbEmailUpdateRequest.md
|
|
1078
1084
|
- docs/SfvbErrorDetail.md
|
|
1079
1085
|
- docs/SfvbEvent.md
|
|
1080
1086
|
- docs/SfvbEventsAuthRequest.md
|
|
@@ -1100,6 +1106,8 @@ files:
|
|
|
1100
1106
|
- docs/SfvbFileWriteRequest.md
|
|
1101
1107
|
- docs/SfvbFileWriteResponse.md
|
|
1102
1108
|
- docs/SfvbFilesResponse.md
|
|
1109
|
+
- docs/SfvbFlow.md
|
|
1110
|
+
- docs/SfvbFlowsResponse.md
|
|
1103
1111
|
- docs/SfvbI18nGlossary.md
|
|
1104
1112
|
- docs/SfvbI18nGlossaryRequest.md
|
|
1105
1113
|
- docs/SfvbI18nLanguage.md
|
|
@@ -2383,7 +2391,11 @@ files:
|
|
|
2383
2391
|
- lib/ultracart_api/models/sfvb_blog_post_image_request.rb
|
|
2384
2392
|
- lib/ultracart_api/models/sfvb_blog_post_request.rb
|
|
2385
2393
|
- lib/ultracart_api/models/sfvb_blog_posts_response.rb
|
|
2394
|
+
- lib/ultracart_api/models/sfvb_campaign.rb
|
|
2395
|
+
- lib/ultracart_api/models/sfvb_campaigns_response.rb
|
|
2386
2396
|
- lib/ultracart_api/models/sfvb_comms_dns_record.rb
|
|
2397
|
+
- lib/ultracart_api/models/sfvb_comms_email.rb
|
|
2398
|
+
- lib/ultracart_api/models/sfvb_comms_postcard.rb
|
|
2387
2399
|
- lib/ultracart_api/models/sfvb_comms_sending_domain.rb
|
|
2388
2400
|
- lib/ultracart_api/models/sfvb_comms_sending_domains_response.rb
|
|
2389
2401
|
- lib/ultracart_api/models/sfvb_comms_twilio_account.rb
|
|
@@ -2398,8 +2410,10 @@ files:
|
|
|
2398
2410
|
- lib/ultracart_api/models/sfvb_element.rb
|
|
2399
2411
|
- lib/ultracart_api/models/sfvb_element_schema_response.rb
|
|
2400
2412
|
- lib/ultracart_api/models/sfvb_elements_response.rb
|
|
2413
|
+
- lib/ultracart_api/models/sfvb_email.rb
|
|
2401
2414
|
- lib/ultracart_api/models/sfvb_email_render_request.rb
|
|
2402
2415
|
- lib/ultracart_api/models/sfvb_email_render_response.rb
|
|
2416
|
+
- lib/ultracart_api/models/sfvb_email_update_request.rb
|
|
2403
2417
|
- lib/ultracart_api/models/sfvb_error_detail.rb
|
|
2404
2418
|
- lib/ultracart_api/models/sfvb_event.rb
|
|
2405
2419
|
- lib/ultracart_api/models/sfvb_events_auth_request.rb
|
|
@@ -2425,6 +2439,8 @@ files:
|
|
|
2425
2439
|
- lib/ultracart_api/models/sfvb_file_write_request.rb
|
|
2426
2440
|
- lib/ultracart_api/models/sfvb_file_write_response.rb
|
|
2427
2441
|
- lib/ultracart_api/models/sfvb_files_response.rb
|
|
2442
|
+
- lib/ultracart_api/models/sfvb_flow.rb
|
|
2443
|
+
- lib/ultracart_api/models/sfvb_flows_response.rb
|
|
2428
2444
|
- lib/ultracart_api/models/sfvb_i18n_glossary.rb
|
|
2429
2445
|
- lib/ultracart_api/models/sfvb_i18n_glossary_request.rb
|
|
2430
2446
|
- lib/ultracart_api/models/sfvb_i18n_language.rb
|