ultracart_api 4.0.39.rc → 4.0.42.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 +10 -4
- data/docs/AutoOrder.md +2 -0
- data/docs/AutoOrderItem.md +0 -4
- data/docs/AutoOrderManagement.md +18 -0
- data/docs/Conversation.md +2 -0
- data/docs/ConversationEventQueuePosition.md +20 -0
- data/docs/ConversationStartRequest.md +3 -1
- data/docs/ConversationSummary.md +2 -0
- data/docs/ConversationWebsocketMessage.md +34 -0
- data/docs/EmailCommseqPostcard.md +1 -1
- data/lib/ultracart_api/models/auto_order.rb +10 -1
- data/lib/ultracart_api/models/auto_order_item.rb +1 -21
- data/lib/ultracart_api/models/auto_order_management.rb +220 -0
- data/lib/ultracart_api/models/conversation.rb +10 -1
- data/lib/ultracart_api/models/conversation_event_queue_position.rb +230 -0
- data/lib/ultracart_api/models/conversation_start_request.rb +13 -4
- data/lib/ultracart_api/models/conversation_summary.rb +10 -1
- data/lib/ultracart_api/models/conversation_websocket_message.rb +340 -0
- data/lib/ultracart_api/models/email_commseq_postcard.rb +1 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
@@ -0,0 +1,340 @@
|
|
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 ConversationWebsocketMessage
|
18
|
+
# Conversation UUID if the websocket message is tied to a specific conversation
|
19
|
+
attr_accessor :conversation_uuid
|
20
|
+
|
21
|
+
attr_accessor :event_conversation_closed
|
22
|
+
|
23
|
+
attr_accessor :event_new_conversation
|
24
|
+
|
25
|
+
attr_accessor :event_new_message
|
26
|
+
|
27
|
+
attr_accessor :event_queue_position
|
28
|
+
|
29
|
+
# Type of event
|
30
|
+
attr_accessor :event_type
|
31
|
+
|
32
|
+
attr_accessor :event_updated_message
|
33
|
+
|
34
|
+
attr_accessor :message
|
35
|
+
|
36
|
+
# Type of message
|
37
|
+
attr_accessor :type
|
38
|
+
|
39
|
+
class EnumAttributeValidator
|
40
|
+
attr_reader :datatype
|
41
|
+
attr_reader :allowable_values
|
42
|
+
|
43
|
+
def initialize(datatype, allowable_values)
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
45
|
+
case datatype.to_s
|
46
|
+
when /Integer/i
|
47
|
+
value.to_i
|
48
|
+
when /Float/i
|
49
|
+
value.to_f
|
50
|
+
else
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def valid?(value)
|
57
|
+
!value || allowable_values.include?(value)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
62
|
+
def self.attribute_map
|
63
|
+
{
|
64
|
+
:'conversation_uuid' => :'conversation_uuid',
|
65
|
+
:'event_conversation_closed' => :'event_conversation_closed',
|
66
|
+
:'event_new_conversation' => :'event_new_conversation',
|
67
|
+
:'event_new_message' => :'event_new_message',
|
68
|
+
:'event_queue_position' => :'event_queue_position',
|
69
|
+
:'event_type' => :'event_type',
|
70
|
+
:'event_updated_message' => :'event_updated_message',
|
71
|
+
:'message' => :'message',
|
72
|
+
:'type' => :'type'
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
# Returns all the JSON keys this model knows about
|
77
|
+
def self.acceptable_attributes
|
78
|
+
attribute_map.values
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute type mapping.
|
82
|
+
def self.openapi_types
|
83
|
+
{
|
84
|
+
:'conversation_uuid' => :'String',
|
85
|
+
:'event_conversation_closed' => :'ConversationSummary',
|
86
|
+
:'event_new_conversation' => :'ConversationSummary',
|
87
|
+
:'event_new_message' => :'ConversationSummary',
|
88
|
+
:'event_queue_position' => :'ConversationEventQueuePosition',
|
89
|
+
:'event_type' => :'String',
|
90
|
+
:'event_updated_message' => :'ConversationMessage',
|
91
|
+
:'message' => :'ConversationMessage',
|
92
|
+
:'type' => :'String'
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
# List of attributes with nullable: true
|
97
|
+
def self.openapi_nullable
|
98
|
+
Set.new([
|
99
|
+
])
|
100
|
+
end
|
101
|
+
|
102
|
+
# Initializes the object
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
104
|
+
def initialize(attributes = {})
|
105
|
+
if (!attributes.is_a?(Hash))
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationWebsocketMessage` initialize method"
|
107
|
+
end
|
108
|
+
|
109
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
110
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
111
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
112
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationWebsocketMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
113
|
+
end
|
114
|
+
h[k.to_sym] = v
|
115
|
+
}
|
116
|
+
|
117
|
+
if attributes.key?(:'conversation_uuid')
|
118
|
+
self.conversation_uuid = attributes[:'conversation_uuid']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'event_conversation_closed')
|
122
|
+
self.event_conversation_closed = attributes[:'event_conversation_closed']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'event_new_conversation')
|
126
|
+
self.event_new_conversation = attributes[:'event_new_conversation']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'event_new_message')
|
130
|
+
self.event_new_message = attributes[:'event_new_message']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'event_queue_position')
|
134
|
+
self.event_queue_position = attributes[:'event_queue_position']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'event_type')
|
138
|
+
self.event_type = attributes[:'event_type']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'event_updated_message')
|
142
|
+
self.event_updated_message = attributes[:'event_updated_message']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'message')
|
146
|
+
self.message = attributes[:'message']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'type')
|
150
|
+
self.type = attributes[:'type']
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
155
|
+
# @return Array for valid properties with the reasons
|
156
|
+
def list_invalid_properties
|
157
|
+
invalid_properties = Array.new
|
158
|
+
invalid_properties
|
159
|
+
end
|
160
|
+
|
161
|
+
# Check to see if the all the properties in the model are valid
|
162
|
+
# @return true if the model is valid
|
163
|
+
def valid?
|
164
|
+
event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message"])
|
165
|
+
return false unless event_type_validator.valid?(@event_type)
|
166
|
+
type_validator = EnumAttributeValidator.new('String', ["message", "event", "ping"])
|
167
|
+
return false unless type_validator.valid?(@type)
|
168
|
+
true
|
169
|
+
end
|
170
|
+
|
171
|
+
# Custom attribute writer method checking allowed values (enum).
|
172
|
+
# @param [Object] event_type Object to be assigned
|
173
|
+
def event_type=(event_type)
|
174
|
+
validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message"])
|
175
|
+
unless validator.valid?(event_type)
|
176
|
+
fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
|
177
|
+
end
|
178
|
+
@event_type = event_type
|
179
|
+
end
|
180
|
+
|
181
|
+
# Custom attribute writer method checking allowed values (enum).
|
182
|
+
# @param [Object] type Object to be assigned
|
183
|
+
def type=(type)
|
184
|
+
validator = EnumAttributeValidator.new('String', ["message", "event", "ping"])
|
185
|
+
unless validator.valid?(type)
|
186
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
187
|
+
end
|
188
|
+
@type = type
|
189
|
+
end
|
190
|
+
|
191
|
+
# Checks equality by comparing each attribute.
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
conversation_uuid == o.conversation_uuid &&
|
197
|
+
event_conversation_closed == o.event_conversation_closed &&
|
198
|
+
event_new_conversation == o.event_new_conversation &&
|
199
|
+
event_new_message == o.event_new_message &&
|
200
|
+
event_queue_position == o.event_queue_position &&
|
201
|
+
event_type == o.event_type &&
|
202
|
+
event_updated_message == o.event_updated_message &&
|
203
|
+
message == o.message &&
|
204
|
+
type == o.type
|
205
|
+
end
|
206
|
+
|
207
|
+
# @see the `==` method
|
208
|
+
# @param [Object] Object to be compared
|
209
|
+
def eql?(o)
|
210
|
+
self == o
|
211
|
+
end
|
212
|
+
|
213
|
+
# Calculates hash code according to all attributes.
|
214
|
+
# @return [Integer] Hash code
|
215
|
+
def hash
|
216
|
+
[conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_queue_position, event_type, event_updated_message, message, type].hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Builds the object from hash
|
220
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
221
|
+
# @return [Object] Returns the model itself
|
222
|
+
def self.build_from_hash(attributes)
|
223
|
+
new.build_from_hash(attributes)
|
224
|
+
end
|
225
|
+
|
226
|
+
# Builds the object from hash
|
227
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
228
|
+
# @return [Object] Returns the model itself
|
229
|
+
def build_from_hash(attributes)
|
230
|
+
return nil unless attributes.is_a?(Hash)
|
231
|
+
attributes = attributes.transform_keys(&:to_sym)
|
232
|
+
self.class.openapi_types.each_pair do |key, type|
|
233
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
234
|
+
self.send("#{key}=", nil)
|
235
|
+
elsif type =~ /\AArray<(.*)>/i
|
236
|
+
# check to ensure the input is an array given that the attribute
|
237
|
+
# is documented as an array but the input is not
|
238
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
239
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
240
|
+
end
|
241
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
242
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
self
|
247
|
+
end
|
248
|
+
|
249
|
+
# Deserializes the data based on type
|
250
|
+
# @param string type Data type
|
251
|
+
# @param string value Value to be deserialized
|
252
|
+
# @return [Object] Deserialized data
|
253
|
+
def _deserialize(type, value)
|
254
|
+
case type.to_sym
|
255
|
+
when :Time
|
256
|
+
Time.parse(value)
|
257
|
+
when :Date
|
258
|
+
Date.parse(value)
|
259
|
+
when :String
|
260
|
+
value.to_s
|
261
|
+
when :Integer
|
262
|
+
value.to_i
|
263
|
+
when :Float
|
264
|
+
value.to_f
|
265
|
+
when :Boolean
|
266
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
267
|
+
true
|
268
|
+
else
|
269
|
+
false
|
270
|
+
end
|
271
|
+
when :Object
|
272
|
+
# generic object (usually a Hash), return directly
|
273
|
+
value
|
274
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
275
|
+
inner_type = Regexp.last_match[:inner_type]
|
276
|
+
value.map { |v| _deserialize(inner_type, v) }
|
277
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
278
|
+
k_type = Regexp.last_match[:k_type]
|
279
|
+
v_type = Regexp.last_match[:v_type]
|
280
|
+
{}.tap do |hash|
|
281
|
+
value.each do |k, v|
|
282
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
else # model
|
286
|
+
# models (e.g. Pet) or oneOf
|
287
|
+
klass = UltracartClient.const_get(type)
|
288
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
# Returns the string representation of the object
|
293
|
+
# @return [String] String presentation of the object
|
294
|
+
def to_s
|
295
|
+
to_hash.to_s
|
296
|
+
end
|
297
|
+
|
298
|
+
# to_body is an alias to to_hash (backward compatibility)
|
299
|
+
# @return [Hash] Returns the object in the form of hash
|
300
|
+
def to_body
|
301
|
+
to_hash
|
302
|
+
end
|
303
|
+
|
304
|
+
# Returns the object in the form of hash
|
305
|
+
# @return [Hash] Returns the object in the form of hash
|
306
|
+
def to_hash
|
307
|
+
hash = {}
|
308
|
+
self.class.attribute_map.each_pair do |attr, param|
|
309
|
+
value = self.send(attr)
|
310
|
+
if value.nil?
|
311
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
312
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
313
|
+
end
|
314
|
+
|
315
|
+
hash[param] = _to_hash(value)
|
316
|
+
end
|
317
|
+
hash
|
318
|
+
end
|
319
|
+
|
320
|
+
# Outputs non-array value in the form of hash
|
321
|
+
# For object, use to_hash. Otherwise, just return the value
|
322
|
+
# @param [Object] value Any valid value
|
323
|
+
# @return [Hash] Returns the value in the form of hash
|
324
|
+
def _to_hash(value)
|
325
|
+
if value.is_a?(Array)
|
326
|
+
value.compact.map { |v| _to_hash(v) }
|
327
|
+
elsif value.is_a?(Hash)
|
328
|
+
{}.tap do |hash|
|
329
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
330
|
+
end
|
331
|
+
elsif value.respond_to? :to_hash
|
332
|
+
value.to_hash
|
333
|
+
else
|
334
|
+
value
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
end
|
339
|
+
|
340
|
+
end
|
@@ -45,7 +45,7 @@ module UltracartClient
|
|
45
45
|
# Postcard front container uuid
|
46
46
|
attr_accessor :postcard_front_container_uuid
|
47
47
|
|
48
|
-
# URL to screenshot of the
|
48
|
+
# URL to screenshot of the back of the postcard
|
49
49
|
attr_accessor :screenshot_back_url
|
50
50
|
|
51
51
|
# URL to screenshot of the front of the postcard
|
data/lib/ultracart_api.rb
CHANGED
@@ -44,6 +44,7 @@ require 'ultracart_api/models/auto_order_item_future_schedule'
|
|
44
44
|
require 'ultracart_api/models/auto_order_item_option'
|
45
45
|
require 'ultracart_api/models/auto_order_item_simple_schedule'
|
46
46
|
require 'ultracart_api/models/auto_order_log'
|
47
|
+
require 'ultracart_api/models/auto_order_management'
|
47
48
|
require 'ultracart_api/models/auto_order_query'
|
48
49
|
require 'ultracart_api/models/auto_order_query_batch'
|
49
50
|
require 'ultracart_api/models/auto_order_response'
|
@@ -136,6 +137,7 @@ require 'ultracart_api/models/city_state_zip'
|
|
136
137
|
require 'ultracart_api/models/conversation'
|
137
138
|
require 'ultracart_api/models/conversation_agent_auth'
|
138
139
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
140
|
+
require 'ultracart_api/models/conversation_event_queue_position'
|
139
141
|
require 'ultracart_api/models/conversation_message'
|
140
142
|
require 'ultracart_api/models/conversation_message_transport_status'
|
141
143
|
require 'ultracart_api/models/conversation_multimedia_upload_url'
|
@@ -145,6 +147,7 @@ require 'ultracart_api/models/conversation_response'
|
|
145
147
|
require 'ultracart_api/models/conversation_start_request'
|
146
148
|
require 'ultracart_api/models/conversation_start_response'
|
147
149
|
require 'ultracart_api/models/conversation_summary'
|
150
|
+
require 'ultracart_api/models/conversation_websocket_message'
|
148
151
|
require 'ultracart_api/models/conversations_response'
|
149
152
|
require 'ultracart_api/models/countries_response'
|
150
153
|
require 'ultracart_api/models/country'
|
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.42.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-07-
|
11
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- docs/AutoOrderItemOption.md
|
91
91
|
- docs/AutoOrderItemSimpleSchedule.md
|
92
92
|
- docs/AutoOrderLog.md
|
93
|
+
- docs/AutoOrderManagement.md
|
93
94
|
- docs/AutoOrderQuery.md
|
94
95
|
- docs/AutoOrderQueryBatch.md
|
95
96
|
- docs/AutoOrderResponse.md
|
@@ -186,6 +187,7 @@ files:
|
|
186
187
|
- docs/ConversationAgentAuth.md
|
187
188
|
- docs/ConversationAgentAuthResponse.md
|
188
189
|
- docs/ConversationApi.md
|
190
|
+
- docs/ConversationEventQueuePosition.md
|
189
191
|
- docs/ConversationMessage.md
|
190
192
|
- docs/ConversationMessageTransportStatus.md
|
191
193
|
- docs/ConversationMultimediaUploadUrl.md
|
@@ -195,6 +197,7 @@ files:
|
|
195
197
|
- docs/ConversationStartRequest.md
|
196
198
|
- docs/ConversationStartResponse.md
|
197
199
|
- docs/ConversationSummary.md
|
200
|
+
- docs/ConversationWebsocketMessage.md
|
198
201
|
- docs/ConversationsResponse.md
|
199
202
|
- docs/CountriesResponse.md
|
200
203
|
- docs/Country.md
|
@@ -777,6 +780,7 @@ files:
|
|
777
780
|
- lib/ultracart_api/models/auto_order_item_option.rb
|
778
781
|
- lib/ultracart_api/models/auto_order_item_simple_schedule.rb
|
779
782
|
- lib/ultracart_api/models/auto_order_log.rb
|
783
|
+
- lib/ultracart_api/models/auto_order_management.rb
|
780
784
|
- lib/ultracart_api/models/auto_order_query.rb
|
781
785
|
- lib/ultracart_api/models/auto_order_query_batch.rb
|
782
786
|
- lib/ultracart_api/models/auto_order_response.rb
|
@@ -869,6 +873,7 @@ files:
|
|
869
873
|
- lib/ultracart_api/models/conversation.rb
|
870
874
|
- lib/ultracart_api/models/conversation_agent_auth.rb
|
871
875
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
876
|
+
- lib/ultracart_api/models/conversation_event_queue_position.rb
|
872
877
|
- lib/ultracart_api/models/conversation_message.rb
|
873
878
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
874
879
|
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|
@@ -878,6 +883,7 @@ files:
|
|
878
883
|
- lib/ultracart_api/models/conversation_start_request.rb
|
879
884
|
- lib/ultracart_api/models/conversation_start_response.rb
|
880
885
|
- lib/ultracart_api/models/conversation_summary.rb
|
886
|
+
- lib/ultracart_api/models/conversation_websocket_message.rb
|
881
887
|
- lib/ultracart_api/models/conversations_response.rb
|
882
888
|
- lib/ultracart_api/models/countries_response.rb
|
883
889
|
- lib/ultracart_api/models/country.rb
|