ultracart_api 4.0.97.rc → 4.0.98.rc
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 +11 -4
- data/docs/ConversationApi.md +144 -0
- data/docs/ConversationAutocompleteRequest.md +20 -0
- data/docs/ConversationAutocompleteResponse.md +30 -0
- data/docs/ConversationSearchRequest.md +36 -0
- data/docs/ConversationSearchResponse.md +22 -0
- data/lib/ultracart_api/api/conversation_api.rb +138 -0
- data/lib/ultracart_api/models/conversation_autocomplete_request.rb +228 -0
- data/lib/ultracart_api/models/conversation_autocomplete_response.rb +276 -0
- data/lib/ultracart_api/models/conversation_search_request.rb +300 -0
- data/lib/ultracart_api/models/conversation_search_response.rb +237 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
|
@@ -0,0 +1,300 @@
|
|
|
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 ConversationSearchRequest
|
|
18
|
+
attr_accessor :email_filter
|
|
19
|
+
|
|
20
|
+
attr_accessor :language_filter
|
|
21
|
+
|
|
22
|
+
attr_accessor :medium_filter
|
|
23
|
+
|
|
24
|
+
attr_accessor :order_by_newest
|
|
25
|
+
|
|
26
|
+
attr_accessor :order_by_oldest
|
|
27
|
+
|
|
28
|
+
attr_accessor :range_begin
|
|
29
|
+
|
|
30
|
+
attr_accessor :range_end
|
|
31
|
+
|
|
32
|
+
attr_accessor :sms_phone_number_filter
|
|
33
|
+
|
|
34
|
+
attr_accessor :text_search
|
|
35
|
+
|
|
36
|
+
attr_accessor :visible_filter
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'email_filter' => :'email_filter',
|
|
42
|
+
:'language_filter' => :'language_filter',
|
|
43
|
+
:'medium_filter' => :'medium_filter',
|
|
44
|
+
:'order_by_newest' => :'order_by_newest',
|
|
45
|
+
:'order_by_oldest' => :'order_by_oldest',
|
|
46
|
+
:'range_begin' => :'range_begin',
|
|
47
|
+
:'range_end' => :'range_end',
|
|
48
|
+
:'sms_phone_number_filter' => :'sms_phone_number_filter',
|
|
49
|
+
:'text_search' => :'text_search',
|
|
50
|
+
:'visible_filter' => :'visible_filter'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'email_filter' => :'String',
|
|
63
|
+
:'language_filter' => :'String',
|
|
64
|
+
:'medium_filter' => :'String',
|
|
65
|
+
:'order_by_newest' => :'Boolean',
|
|
66
|
+
:'order_by_oldest' => :'Boolean',
|
|
67
|
+
:'range_begin' => :'Integer',
|
|
68
|
+
:'range_end' => :'Integer',
|
|
69
|
+
:'sms_phone_number_filter' => :'String',
|
|
70
|
+
:'text_search' => :'String',
|
|
71
|
+
:'visible_filter' => :'Boolean'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationSearchRequest` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationSearchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'email_filter')
|
|
97
|
+
self.email_filter = attributes[:'email_filter']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'language_filter')
|
|
101
|
+
self.language_filter = attributes[:'language_filter']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'medium_filter')
|
|
105
|
+
self.medium_filter = attributes[:'medium_filter']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'order_by_newest')
|
|
109
|
+
self.order_by_newest = attributes[:'order_by_newest']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'order_by_oldest')
|
|
113
|
+
self.order_by_oldest = attributes[:'order_by_oldest']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'range_begin')
|
|
117
|
+
self.range_begin = attributes[:'range_begin']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'range_end')
|
|
121
|
+
self.range_end = attributes[:'range_end']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'sms_phone_number_filter')
|
|
125
|
+
self.sms_phone_number_filter = attributes[:'sms_phone_number_filter']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'text_search')
|
|
129
|
+
self.text_search = attributes[:'text_search']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'visible_filter')
|
|
133
|
+
self.visible_filter = attributes[:'visible_filter']
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
138
|
+
# @return Array for valid properties with the reasons
|
|
139
|
+
def list_invalid_properties
|
|
140
|
+
invalid_properties = Array.new
|
|
141
|
+
invalid_properties
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Check to see if the all the properties in the model are valid
|
|
145
|
+
# @return true if the model is valid
|
|
146
|
+
def valid?
|
|
147
|
+
true
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def ==(o)
|
|
153
|
+
return true if self.equal?(o)
|
|
154
|
+
self.class == o.class &&
|
|
155
|
+
email_filter == o.email_filter &&
|
|
156
|
+
language_filter == o.language_filter &&
|
|
157
|
+
medium_filter == o.medium_filter &&
|
|
158
|
+
order_by_newest == o.order_by_newest &&
|
|
159
|
+
order_by_oldest == o.order_by_oldest &&
|
|
160
|
+
range_begin == o.range_begin &&
|
|
161
|
+
range_end == o.range_end &&
|
|
162
|
+
sms_phone_number_filter == o.sms_phone_number_filter &&
|
|
163
|
+
text_search == o.text_search &&
|
|
164
|
+
visible_filter == o.visible_filter
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[email_filter, language_filter, medium_filter, order_by_newest, order_by_oldest, range_begin, range_end, sms_phone_number_filter, text_search, visible_filter].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
new.build_from_hash(attributes)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Builds the object from hash
|
|
187
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
188
|
+
# @return [Object] Returns the model itself
|
|
189
|
+
def build_from_hash(attributes)
|
|
190
|
+
return nil unless attributes.is_a?(Hash)
|
|
191
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
192
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
193
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
194
|
+
self.send("#{key}=", nil)
|
|
195
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
196
|
+
# check to ensure the input is an array given that the attribute
|
|
197
|
+
# is documented as an array but the input is not
|
|
198
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
199
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
200
|
+
end
|
|
201
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
202
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
self
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Deserializes the data based on type
|
|
210
|
+
# @param string type Data type
|
|
211
|
+
# @param string value Value to be deserialized
|
|
212
|
+
# @return [Object] Deserialized data
|
|
213
|
+
def _deserialize(type, value)
|
|
214
|
+
case type.to_sym
|
|
215
|
+
when :Time
|
|
216
|
+
Time.parse(value)
|
|
217
|
+
when :Date
|
|
218
|
+
Date.parse(value)
|
|
219
|
+
when :String
|
|
220
|
+
value.to_s
|
|
221
|
+
when :Integer
|
|
222
|
+
value.to_i
|
|
223
|
+
when :Float
|
|
224
|
+
value.to_f
|
|
225
|
+
when :Boolean
|
|
226
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
227
|
+
true
|
|
228
|
+
else
|
|
229
|
+
false
|
|
230
|
+
end
|
|
231
|
+
when :Object
|
|
232
|
+
# generic object (usually a Hash), return directly
|
|
233
|
+
value
|
|
234
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
235
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
236
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
237
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
238
|
+
k_type = Regexp.last_match[:k_type]
|
|
239
|
+
v_type = Regexp.last_match[:v_type]
|
|
240
|
+
{}.tap do |hash|
|
|
241
|
+
value.each do |k, v|
|
|
242
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
else # model
|
|
246
|
+
# models (e.g. Pet) or oneOf
|
|
247
|
+
klass = UltracartClient.const_get(type)
|
|
248
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Returns the string representation of the object
|
|
253
|
+
# @return [String] String presentation of the object
|
|
254
|
+
def to_s
|
|
255
|
+
to_hash.to_s
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
|
260
|
+
def to_body
|
|
261
|
+
to_hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Returns the object in the form of hash
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_hash
|
|
267
|
+
hash = {}
|
|
268
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
269
|
+
value = self.send(attr)
|
|
270
|
+
if value.nil?
|
|
271
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
272
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
hash[param] = _to_hash(value)
|
|
276
|
+
end
|
|
277
|
+
hash
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Outputs non-array value in the form of hash
|
|
281
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
282
|
+
# @param [Object] value Any valid value
|
|
283
|
+
# @return [Hash] Returns the value in the form of hash
|
|
284
|
+
def _to_hash(value)
|
|
285
|
+
if value.is_a?(Array)
|
|
286
|
+
value.compact.map { |v| _to_hash(v) }
|
|
287
|
+
elsif value.is_a?(Hash)
|
|
288
|
+
{}.tap do |hash|
|
|
289
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
290
|
+
end
|
|
291
|
+
elsif value.respond_to? :to_hash
|
|
292
|
+
value.to_hash
|
|
293
|
+
else
|
|
294
|
+
value
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
end
|
|
@@ -0,0 +1,237 @@
|
|
|
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 ConversationSearchResponse
|
|
18
|
+
attr_accessor :range_begin
|
|
19
|
+
|
|
20
|
+
attr_accessor :range_end
|
|
21
|
+
|
|
22
|
+
attr_accessor :total
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'range_begin' => :'range_begin',
|
|
28
|
+
:'range_end' => :'range_end',
|
|
29
|
+
:'total' => :'total'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'range_begin' => :'Integer',
|
|
42
|
+
:'range_end' => :'Integer',
|
|
43
|
+
:'total' => :'Integer'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationSearchResponse` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'range_begin')
|
|
69
|
+
self.range_begin = attributes[:'range_begin']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'range_end')
|
|
73
|
+
self.range_end = attributes[:'range_end']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'total')
|
|
77
|
+
self.total = attributes[:'total']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
range_begin == o.range_begin &&
|
|
100
|
+
range_end == o.range_end &&
|
|
101
|
+
total == o.total
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[range_begin, range_end, total].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
new.build_from_hash(attributes)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
130
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
131
|
+
self.send("#{key}=", nil)
|
|
132
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
self
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Deserializes the data based on type
|
|
147
|
+
# @param string type Data type
|
|
148
|
+
# @param string value Value to be deserialized
|
|
149
|
+
# @return [Object] Deserialized data
|
|
150
|
+
def _deserialize(type, value)
|
|
151
|
+
case type.to_sym
|
|
152
|
+
when :Time
|
|
153
|
+
Time.parse(value)
|
|
154
|
+
when :Date
|
|
155
|
+
Date.parse(value)
|
|
156
|
+
when :String
|
|
157
|
+
value.to_s
|
|
158
|
+
when :Integer
|
|
159
|
+
value.to_i
|
|
160
|
+
when :Float
|
|
161
|
+
value.to_f
|
|
162
|
+
when :Boolean
|
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
+
true
|
|
165
|
+
else
|
|
166
|
+
false
|
|
167
|
+
end
|
|
168
|
+
when :Object
|
|
169
|
+
# generic object (usually a Hash), return directly
|
|
170
|
+
value
|
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
|
177
|
+
{}.tap do |hash|
|
|
178
|
+
value.each do |k, v|
|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
else # model
|
|
183
|
+
# models (e.g. Pet) or oneOf
|
|
184
|
+
klass = UltracartClient.const_get(type)
|
|
185
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the string representation of the object
|
|
190
|
+
# @return [String] String presentation of the object
|
|
191
|
+
def to_s
|
|
192
|
+
to_hash.to_s
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
|
197
|
+
def to_body
|
|
198
|
+
to_hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Outputs non-array value in the form of hash
|
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
219
|
+
# @param [Object] value Any valid value
|
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
|
221
|
+
def _to_hash(value)
|
|
222
|
+
if value.is_a?(Array)
|
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
|
224
|
+
elsif value.is_a?(Hash)
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
227
|
+
end
|
|
228
|
+
elsif value.respond_to? :to_hash
|
|
229
|
+
value.to_hash
|
|
230
|
+
else
|
|
231
|
+
value
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -138,6 +138,8 @@ require 'ultracart_api/models/city_state_zip'
|
|
|
138
138
|
require 'ultracart_api/models/conversation'
|
|
139
139
|
require 'ultracart_api/models/conversation_agent_auth'
|
|
140
140
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
|
141
|
+
require 'ultracart_api/models/conversation_autocomplete_request'
|
|
142
|
+
require 'ultracart_api/models/conversation_autocomplete_response'
|
|
141
143
|
require 'ultracart_api/models/conversation_canned_message'
|
|
142
144
|
require 'ultracart_api/models/conversation_canned_message_response'
|
|
143
145
|
require 'ultracart_api/models/conversation_canned_messages_response'
|
|
@@ -164,6 +166,8 @@ require 'ultracart_api/models/conversation_multimedia_upload_url'
|
|
|
164
166
|
require 'ultracart_api/models/conversation_multimedia_upload_url_response'
|
|
165
167
|
require 'ultracart_api/models/conversation_participant'
|
|
166
168
|
require 'ultracart_api/models/conversation_response'
|
|
169
|
+
require 'ultracart_api/models/conversation_search_request'
|
|
170
|
+
require 'ultracart_api/models/conversation_search_response'
|
|
167
171
|
require 'ultracart_api/models/conversation_start_request'
|
|
168
172
|
require 'ultracart_api/models/conversation_start_response'
|
|
169
173
|
require 'ultracart_api/models/conversation_summary'
|
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.98.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-12-
|
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -188,6 +188,8 @@ files:
|
|
|
188
188
|
- docs/ConversationAgentAuth.md
|
|
189
189
|
- docs/ConversationAgentAuthResponse.md
|
|
190
190
|
- docs/ConversationApi.md
|
|
191
|
+
- docs/ConversationAutocompleteRequest.md
|
|
192
|
+
- docs/ConversationAutocompleteResponse.md
|
|
191
193
|
- docs/ConversationCannedMessage.md
|
|
192
194
|
- docs/ConversationCannedMessageResponse.md
|
|
193
195
|
- docs/ConversationCannedMessagesResponse.md
|
|
@@ -214,6 +216,8 @@ files:
|
|
|
214
216
|
- docs/ConversationMultimediaUploadUrlResponse.md
|
|
215
217
|
- docs/ConversationParticipant.md
|
|
216
218
|
- docs/ConversationResponse.md
|
|
219
|
+
- docs/ConversationSearchRequest.md
|
|
220
|
+
- docs/ConversationSearchResponse.md
|
|
217
221
|
- docs/ConversationStartRequest.md
|
|
218
222
|
- docs/ConversationStartResponse.md
|
|
219
223
|
- docs/ConversationSummary.md
|
|
@@ -930,6 +934,8 @@ files:
|
|
|
930
934
|
- lib/ultracart_api/models/conversation.rb
|
|
931
935
|
- lib/ultracart_api/models/conversation_agent_auth.rb
|
|
932
936
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
|
937
|
+
- lib/ultracart_api/models/conversation_autocomplete_request.rb
|
|
938
|
+
- lib/ultracart_api/models/conversation_autocomplete_response.rb
|
|
933
939
|
- lib/ultracart_api/models/conversation_canned_message.rb
|
|
934
940
|
- lib/ultracart_api/models/conversation_canned_message_response.rb
|
|
935
941
|
- lib/ultracart_api/models/conversation_canned_messages_response.rb
|
|
@@ -956,6 +962,8 @@ files:
|
|
|
956
962
|
- lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
|
|
957
963
|
- lib/ultracart_api/models/conversation_participant.rb
|
|
958
964
|
- lib/ultracart_api/models/conversation_response.rb
|
|
965
|
+
- lib/ultracart_api/models/conversation_search_request.rb
|
|
966
|
+
- lib/ultracart_api/models/conversation_search_response.rb
|
|
959
967
|
- lib/ultracart_api/models/conversation_start_request.rb
|
|
960
968
|
- lib/ultracart_api/models/conversation_start_response.rb
|
|
961
969
|
- lib/ultracart_api/models/conversation_summary.rb
|