ultracart_api 4.0.52.rc → 4.0.55.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -4
- data/docs/ConversationEventReadMessage.md +22 -0
- data/docs/ConversationMessage.md +2 -0
- data/docs/ConversationMessageTransportStatus.md +1 -1
- data/docs/ConversationParticipant.md +3 -1
- data/docs/ConversationWebsocketMessage.md +2 -0
- data/docs/Coupon.md +1 -1
- data/docs/CouponNoDiscount.md +18 -0
- data/docs/CustomerApi.md +74 -0
- data/docs/CustomerMagicLinkResponse.md +26 -0
- data/docs/StoreFront.md +38 -0
- data/docs/StoreFrontsResponse.md +26 -0
- data/docs/StorefrontApi.md +67 -0
- data/lib/ultracart_api/api/customer_api.rb +70 -0
- data/lib/ultracart_api/api/storefront_api.rb +56 -0
- data/lib/ultracart_api/models/conversation_event_read_message.rb +238 -0
- data/lib/ultracart_api/models/conversation_message.rb +11 -1
- data/lib/ultracart_api/models/conversation_message_transport_status.rb +35 -0
- data/lib/ultracart_api/models/conversation_participant.rb +13 -4
- data/lib/ultracart_api/models/conversation_websocket_message.rb +12 -3
- data/lib/ultracart_api/models/coupon.rb +1 -1
- data/lib/ultracart_api/models/coupon_no_discount.rb +220 -0
- data/lib/ultracart_api/models/customer_magic_link_response.rb +257 -0
- data/lib/ultracart_api/models/store_front.rb +309 -0
- data/lib/ultracart_api/models/store_fronts_response.rb +258 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
@@ -0,0 +1,309 @@
|
|
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 StoreFront
|
18
|
+
attr_accessor :host_alias1
|
19
|
+
|
20
|
+
attr_accessor :host_alias2
|
21
|
+
|
22
|
+
attr_accessor :host_alias3
|
23
|
+
|
24
|
+
attr_accessor :host_alias4
|
25
|
+
|
26
|
+
attr_accessor :host_alias5
|
27
|
+
|
28
|
+
attr_accessor :host_name
|
29
|
+
|
30
|
+
attr_accessor :locked
|
31
|
+
|
32
|
+
attr_accessor :merchant_id
|
33
|
+
|
34
|
+
attr_accessor :redirect_aliases
|
35
|
+
|
36
|
+
attr_accessor :storefront_oid
|
37
|
+
|
38
|
+
attr_accessor :unlock_password
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'host_alias1' => :'host_alias1',
|
44
|
+
:'host_alias2' => :'host_alias2',
|
45
|
+
:'host_alias3' => :'host_alias3',
|
46
|
+
:'host_alias4' => :'host_alias4',
|
47
|
+
:'host_alias5' => :'host_alias5',
|
48
|
+
:'host_name' => :'host_name',
|
49
|
+
:'locked' => :'locked',
|
50
|
+
:'merchant_id' => :'merchant_id',
|
51
|
+
:'redirect_aliases' => :'redirect_aliases',
|
52
|
+
:'storefront_oid' => :'storefront_oid',
|
53
|
+
:'unlock_password' => :'unlock_password'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Returns all the JSON keys this model knows about
|
58
|
+
def self.acceptable_attributes
|
59
|
+
attribute_map.values
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.openapi_types
|
64
|
+
{
|
65
|
+
:'host_alias1' => :'String',
|
66
|
+
:'host_alias2' => :'String',
|
67
|
+
:'host_alias3' => :'String',
|
68
|
+
:'host_alias4' => :'String',
|
69
|
+
:'host_alias5' => :'String',
|
70
|
+
:'host_name' => :'String',
|
71
|
+
:'locked' => :'Boolean',
|
72
|
+
:'merchant_id' => :'String',
|
73
|
+
:'redirect_aliases' => :'Boolean',
|
74
|
+
:'storefront_oid' => :'Integer',
|
75
|
+
:'unlock_password' => :'String'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# List of attributes with nullable: true
|
80
|
+
def self.openapi_nullable
|
81
|
+
Set.new([
|
82
|
+
])
|
83
|
+
end
|
84
|
+
|
85
|
+
# Initializes the object
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
def initialize(attributes = {})
|
88
|
+
if (!attributes.is_a?(Hash))
|
89
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::StoreFront` initialize method"
|
90
|
+
end
|
91
|
+
|
92
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
94
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::StoreFront`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
96
|
+
end
|
97
|
+
h[k.to_sym] = v
|
98
|
+
}
|
99
|
+
|
100
|
+
if attributes.key?(:'host_alias1')
|
101
|
+
self.host_alias1 = attributes[:'host_alias1']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'host_alias2')
|
105
|
+
self.host_alias2 = attributes[:'host_alias2']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'host_alias3')
|
109
|
+
self.host_alias3 = attributes[:'host_alias3']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'host_alias4')
|
113
|
+
self.host_alias4 = attributes[:'host_alias4']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'host_alias5')
|
117
|
+
self.host_alias5 = attributes[:'host_alias5']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'host_name')
|
121
|
+
self.host_name = attributes[:'host_name']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'locked')
|
125
|
+
self.locked = attributes[:'locked']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'merchant_id')
|
129
|
+
self.merchant_id = attributes[:'merchant_id']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'redirect_aliases')
|
133
|
+
self.redirect_aliases = attributes[:'redirect_aliases']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'storefront_oid')
|
137
|
+
self.storefront_oid = attributes[:'storefront_oid']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'unlock_password')
|
141
|
+
self.unlock_password = attributes[:'unlock_password']
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
146
|
+
# @return Array for valid properties with the reasons
|
147
|
+
def list_invalid_properties
|
148
|
+
invalid_properties = Array.new
|
149
|
+
invalid_properties
|
150
|
+
end
|
151
|
+
|
152
|
+
# Check to see if the all the properties in the model are valid
|
153
|
+
# @return true if the model is valid
|
154
|
+
def valid?
|
155
|
+
true
|
156
|
+
end
|
157
|
+
|
158
|
+
# Checks equality by comparing each attribute.
|
159
|
+
# @param [Object] Object to be compared
|
160
|
+
def ==(o)
|
161
|
+
return true if self.equal?(o)
|
162
|
+
self.class == o.class &&
|
163
|
+
host_alias1 == o.host_alias1 &&
|
164
|
+
host_alias2 == o.host_alias2 &&
|
165
|
+
host_alias3 == o.host_alias3 &&
|
166
|
+
host_alias4 == o.host_alias4 &&
|
167
|
+
host_alias5 == o.host_alias5 &&
|
168
|
+
host_name == o.host_name &&
|
169
|
+
locked == o.locked &&
|
170
|
+
merchant_id == o.merchant_id &&
|
171
|
+
redirect_aliases == o.redirect_aliases &&
|
172
|
+
storefront_oid == o.storefront_oid &&
|
173
|
+
unlock_password == o.unlock_password
|
174
|
+
end
|
175
|
+
|
176
|
+
# @see the `==` method
|
177
|
+
# @param [Object] Object to be compared
|
178
|
+
def eql?(o)
|
179
|
+
self == o
|
180
|
+
end
|
181
|
+
|
182
|
+
# Calculates hash code according to all attributes.
|
183
|
+
# @return [Integer] Hash code
|
184
|
+
def hash
|
185
|
+
[host_alias1, host_alias2, host_alias3, host_alias4, host_alias5, host_name, locked, merchant_id, redirect_aliases, storefront_oid, unlock_password].hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Builds the object from hash
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
190
|
+
# @return [Object] Returns the model itself
|
191
|
+
def self.build_from_hash(attributes)
|
192
|
+
new.build_from_hash(attributes)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Builds the object from hash
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
# @return [Object] Returns the model itself
|
198
|
+
def build_from_hash(attributes)
|
199
|
+
return nil unless attributes.is_a?(Hash)
|
200
|
+
attributes = attributes.transform_keys(&:to_sym)
|
201
|
+
self.class.openapi_types.each_pair do |key, type|
|
202
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
203
|
+
self.send("#{key}=", nil)
|
204
|
+
elsif type =~ /\AArray<(.*)>/i
|
205
|
+
# check to ensure the input is an array given that the attribute
|
206
|
+
# is documented as an array but the input is not
|
207
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
208
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
209
|
+
end
|
210
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
211
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
self
|
216
|
+
end
|
217
|
+
|
218
|
+
# Deserializes the data based on type
|
219
|
+
# @param string type Data type
|
220
|
+
# @param string value Value to be deserialized
|
221
|
+
# @return [Object] Deserialized data
|
222
|
+
def _deserialize(type, value)
|
223
|
+
case type.to_sym
|
224
|
+
when :Time
|
225
|
+
Time.parse(value)
|
226
|
+
when :Date
|
227
|
+
Date.parse(value)
|
228
|
+
when :String
|
229
|
+
value.to_s
|
230
|
+
when :Integer
|
231
|
+
value.to_i
|
232
|
+
when :Float
|
233
|
+
value.to_f
|
234
|
+
when :Boolean
|
235
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
236
|
+
true
|
237
|
+
else
|
238
|
+
false
|
239
|
+
end
|
240
|
+
when :Object
|
241
|
+
# generic object (usually a Hash), return directly
|
242
|
+
value
|
243
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
244
|
+
inner_type = Regexp.last_match[:inner_type]
|
245
|
+
value.map { |v| _deserialize(inner_type, v) }
|
246
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
247
|
+
k_type = Regexp.last_match[:k_type]
|
248
|
+
v_type = Regexp.last_match[:v_type]
|
249
|
+
{}.tap do |hash|
|
250
|
+
value.each do |k, v|
|
251
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
else # model
|
255
|
+
# models (e.g. Pet) or oneOf
|
256
|
+
klass = UltracartClient.const_get(type)
|
257
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
# Returns the string representation of the object
|
262
|
+
# @return [String] String presentation of the object
|
263
|
+
def to_s
|
264
|
+
to_hash.to_s
|
265
|
+
end
|
266
|
+
|
267
|
+
# to_body is an alias to to_hash (backward compatibility)
|
268
|
+
# @return [Hash] Returns the object in the form of hash
|
269
|
+
def to_body
|
270
|
+
to_hash
|
271
|
+
end
|
272
|
+
|
273
|
+
# Returns the object in the form of hash
|
274
|
+
# @return [Hash] Returns the object in the form of hash
|
275
|
+
def to_hash
|
276
|
+
hash = {}
|
277
|
+
self.class.attribute_map.each_pair do |attr, param|
|
278
|
+
value = self.send(attr)
|
279
|
+
if value.nil?
|
280
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
281
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
282
|
+
end
|
283
|
+
|
284
|
+
hash[param] = _to_hash(value)
|
285
|
+
end
|
286
|
+
hash
|
287
|
+
end
|
288
|
+
|
289
|
+
# Outputs non-array value in the form of hash
|
290
|
+
# For object, use to_hash. Otherwise, just return the value
|
291
|
+
# @param [Object] value Any valid value
|
292
|
+
# @return [Hash] Returns the value in the form of hash
|
293
|
+
def _to_hash(value)
|
294
|
+
if value.is_a?(Array)
|
295
|
+
value.compact.map { |v| _to_hash(v) }
|
296
|
+
elsif value.is_a?(Hash)
|
297
|
+
{}.tap do |hash|
|
298
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
299
|
+
end
|
300
|
+
elsif value.respond_to? :to_hash
|
301
|
+
value.to_hash
|
302
|
+
else
|
303
|
+
value
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
@@ -0,0 +1,258 @@
|
|
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 StoreFrontsResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :metadata
|
21
|
+
|
22
|
+
attr_accessor :store_fronts
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'store_fronts' => :'storeFronts',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
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
|
+
:'error' => :'Error',
|
49
|
+
:'metadata' => :'ResponseMetadata',
|
50
|
+
:'store_fronts' => :'Array<StoreFront>',
|
51
|
+
:'success' => :'Boolean',
|
52
|
+
:'warning' => :'Warning'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::StoreFrontsResponse` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::StoreFrontsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'error')
|
78
|
+
self.error = attributes[:'error']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'metadata')
|
82
|
+
self.metadata = attributes[:'metadata']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'store_fronts')
|
86
|
+
if (value = attributes[:'store_fronts']).is_a?(Array)
|
87
|
+
self.store_fronts = value
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'success')
|
92
|
+
self.success = attributes[:'success']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'warning')
|
96
|
+
self.warning = attributes[:'warning']
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properties with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
invalid_properties
|
105
|
+
end
|
106
|
+
|
107
|
+
# Check to see if the all the properties in the model are valid
|
108
|
+
# @return true if the model is valid
|
109
|
+
def valid?
|
110
|
+
true
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def ==(o)
|
116
|
+
return true if self.equal?(o)
|
117
|
+
self.class == o.class &&
|
118
|
+
error == o.error &&
|
119
|
+
metadata == o.metadata &&
|
120
|
+
store_fronts == o.store_fronts &&
|
121
|
+
success == o.success &&
|
122
|
+
warning == o.warning
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(o)
|
128
|
+
self == o
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Integer] Hash code
|
133
|
+
def hash
|
134
|
+
[error, metadata, store_fronts, success, warning].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def self.build_from_hash(attributes)
|
141
|
+
new.build_from_hash(attributes)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Builds the object from hash
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
146
|
+
# @return [Object] Returns the model itself
|
147
|
+
def build_from_hash(attributes)
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
150
|
+
self.class.openapi_types.each_pair do |key, type|
|
151
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
152
|
+
self.send("#{key}=", nil)
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
157
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
158
|
+
end
|
159
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
160
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
self
|
165
|
+
end
|
166
|
+
|
167
|
+
# Deserializes the data based on type
|
168
|
+
# @param string type Data type
|
169
|
+
# @param string value Value to be deserialized
|
170
|
+
# @return [Object] Deserialized data
|
171
|
+
def _deserialize(type, value)
|
172
|
+
case type.to_sym
|
173
|
+
when :Time
|
174
|
+
Time.parse(value)
|
175
|
+
when :Date
|
176
|
+
Date.parse(value)
|
177
|
+
when :String
|
178
|
+
value.to_s
|
179
|
+
when :Integer
|
180
|
+
value.to_i
|
181
|
+
when :Float
|
182
|
+
value.to_f
|
183
|
+
when :Boolean
|
184
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
185
|
+
true
|
186
|
+
else
|
187
|
+
false
|
188
|
+
end
|
189
|
+
when :Object
|
190
|
+
# generic object (usually a Hash), return directly
|
191
|
+
value
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
195
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each do |k, v|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
else # model
|
204
|
+
# models (e.g. Pet) or oneOf
|
205
|
+
klass = UltracartClient.const_get(type)
|
206
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the string representation of the object
|
211
|
+
# @return [String] String presentation of the object
|
212
|
+
def to_s
|
213
|
+
to_hash.to_s
|
214
|
+
end
|
215
|
+
|
216
|
+
# to_body is an alias to to_hash (backward compatibility)
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_body
|
219
|
+
to_hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Returns the object in the form of hash
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_hash
|
225
|
+
hash = {}
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
227
|
+
value = self.send(attr)
|
228
|
+
if value.nil?
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
231
|
+
end
|
232
|
+
|
233
|
+
hash[param] = _to_hash(value)
|
234
|
+
end
|
235
|
+
hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Outputs non-array value in the form of hash
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
240
|
+
# @param [Object] value Any valid value
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
242
|
+
def _to_hash(value)
|
243
|
+
if value.is_a?(Array)
|
244
|
+
value.compact.map { |v| _to_hash(v) }
|
245
|
+
elsif value.is_a?(Hash)
|
246
|
+
{}.tap do |hash|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
248
|
+
end
|
249
|
+
elsif value.respond_to? :to_hash
|
250
|
+
value.to_hash
|
251
|
+
else
|
252
|
+
value
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -139,6 +139,7 @@ require 'ultracart_api/models/conversation_agent_auth'
|
|
139
139
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
140
140
|
require 'ultracart_api/models/conversation_event_queue_position'
|
141
141
|
require 'ultracart_api/models/conversation_event_rr_web'
|
142
|
+
require 'ultracart_api/models/conversation_event_read_message'
|
142
143
|
require 'ultracart_api/models/conversation_event_typing'
|
143
144
|
require 'ultracart_api/models/conversation_message'
|
144
145
|
require 'ultracart_api/models/conversation_message_transport_status'
|
@@ -193,6 +194,7 @@ require 'ultracart_api/models/coupon_free_shipping_with_subtotal'
|
|
193
194
|
require 'ultracart_api/models/coupon_item_search_result'
|
194
195
|
require 'ultracart_api/models/coupon_item_search_results_response'
|
195
196
|
require 'ultracart_api/models/coupon_multiple_amounts_off_items'
|
197
|
+
require 'ultracart_api/models/coupon_no_discount'
|
196
198
|
require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purchase'
|
197
199
|
require 'ultracart_api/models/coupon_percent_off_items'
|
198
200
|
require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
|
@@ -234,6 +236,7 @@ require 'ultracart_api/models/customer_email_list_changes'
|
|
234
236
|
require 'ultracart_api/models/customer_loyalty'
|
235
237
|
require 'ultracart_api/models/customer_loyalty_ledger'
|
236
238
|
require 'ultracart_api/models/customer_loyalty_redemption'
|
239
|
+
require 'ultracart_api/models/customer_magic_link_response'
|
237
240
|
require 'ultracart_api/models/customer_merge_request'
|
238
241
|
require 'ultracart_api/models/customer_orders_summary'
|
239
242
|
require 'ultracart_api/models/customer_pricing_tier'
|
@@ -621,6 +624,8 @@ require 'ultracart_api/models/single_sign_on_token_response'
|
|
621
624
|
require 'ultracart_api/models/sovos_config'
|
622
625
|
require 'ultracart_api/models/state_province'
|
623
626
|
require 'ultracart_api/models/step_waiting'
|
627
|
+
require 'ultracart_api/models/store_front'
|
628
|
+
require 'ultracart_api/models/store_fronts_response'
|
624
629
|
require 'ultracart_api/models/tax_city'
|
625
630
|
require 'ultracart_api/models/tax_country'
|
626
631
|
require 'ultracart_api/models/tax_country_code'
|
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.0.
|
4
|
+
version: 4.0.55.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- docs/ConversationApi.md
|
190
190
|
- docs/ConversationEventQueuePosition.md
|
191
191
|
- docs/ConversationEventRRWeb.md
|
192
|
+
- docs/ConversationEventReadMessage.md
|
192
193
|
- docs/ConversationEventTyping.md
|
193
194
|
- docs/ConversationMessage.md
|
194
195
|
- docs/ConversationMessageTransportStatus.md
|
@@ -244,6 +245,7 @@ files:
|
|
244
245
|
- docs/CouponItemSearchResult.md
|
245
246
|
- docs/CouponItemSearchResultsResponse.md
|
246
247
|
- docs/CouponMultipleAmountsOffItems.md
|
248
|
+
- docs/CouponNoDiscount.md
|
247
249
|
- docs/CouponPercentOffItemWithItemsQuantityPurchase.md
|
248
250
|
- docs/CouponPercentOffItems.md
|
249
251
|
- docs/CouponPercentOffItemsAndFreeShipping.md
|
@@ -286,6 +288,7 @@ files:
|
|
286
288
|
- docs/CustomerLoyalty.md
|
287
289
|
- docs/CustomerLoyaltyLedger.md
|
288
290
|
- docs/CustomerLoyaltyRedemption.md
|
291
|
+
- docs/CustomerMagicLinkResponse.md
|
289
292
|
- docs/CustomerMergeRequest.md
|
290
293
|
- docs/CustomerOrdersSummary.md
|
291
294
|
- docs/CustomerPricingTier.md
|
@@ -680,6 +683,8 @@ files:
|
|
680
683
|
- docs/SsoApi.md
|
681
684
|
- docs/StateProvince.md
|
682
685
|
- docs/StepWaiting.md
|
686
|
+
- docs/StoreFront.md
|
687
|
+
- docs/StoreFrontsResponse.md
|
683
688
|
- docs/StorefrontApi.md
|
684
689
|
- docs/TaxApi.md
|
685
690
|
- docs/TaxCity.md
|
@@ -884,6 +889,7 @@ files:
|
|
884
889
|
- lib/ultracart_api/models/conversation_agent_auth.rb
|
885
890
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
886
891
|
- lib/ultracart_api/models/conversation_event_queue_position.rb
|
892
|
+
- lib/ultracart_api/models/conversation_event_read_message.rb
|
887
893
|
- lib/ultracart_api/models/conversation_event_rr_web.rb
|
888
894
|
- lib/ultracart_api/models/conversation_event_typing.rb
|
889
895
|
- lib/ultracart_api/models/conversation_message.rb
|
@@ -939,6 +945,7 @@ files:
|
|
939
945
|
- lib/ultracart_api/models/coupon_item_search_result.rb
|
940
946
|
- lib/ultracart_api/models/coupon_item_search_results_response.rb
|
941
947
|
- lib/ultracart_api/models/coupon_multiple_amounts_off_items.rb
|
948
|
+
- lib/ultracart_api/models/coupon_no_discount.rb
|
942
949
|
- lib/ultracart_api/models/coupon_percent_off_item_with_items_quantity_purchase.rb
|
943
950
|
- lib/ultracart_api/models/coupon_percent_off_items.rb
|
944
951
|
- lib/ultracart_api/models/coupon_percent_off_items_and_free_shipping.rb
|
@@ -980,6 +987,7 @@ files:
|
|
980
987
|
- lib/ultracart_api/models/customer_loyalty.rb
|
981
988
|
- lib/ultracart_api/models/customer_loyalty_ledger.rb
|
982
989
|
- lib/ultracart_api/models/customer_loyalty_redemption.rb
|
990
|
+
- lib/ultracart_api/models/customer_magic_link_response.rb
|
983
991
|
- lib/ultracart_api/models/customer_merge_request.rb
|
984
992
|
- lib/ultracart_api/models/customer_orders_summary.rb
|
985
993
|
- lib/ultracart_api/models/customer_pricing_tier.rb
|
@@ -1367,6 +1375,8 @@ files:
|
|
1367
1375
|
- lib/ultracart_api/models/sovos_config.rb
|
1368
1376
|
- lib/ultracart_api/models/state_province.rb
|
1369
1377
|
- lib/ultracart_api/models/step_waiting.rb
|
1378
|
+
- lib/ultracart_api/models/store_front.rb
|
1379
|
+
- lib/ultracart_api/models/store_fronts_response.rb
|
1370
1380
|
- lib/ultracart_api/models/tax_city.rb
|
1371
1381
|
- lib/ultracart_api/models/tax_country.rb
|
1372
1382
|
- lib/ultracart_api/models/tax_country_code.rb
|