ultracart_api 4.0.36.rc → 4.0.39.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 +12 -4
- data/docs/AutoOrderItem.md +4 -0
- data/docs/ConversationAgentAuth.md +28 -0
- data/docs/ConversationAgentAuthResponse.md +10 -10
- data/docs/ConversationApi.md +11 -10
- data/docs/ConversationMessage.md +3 -1
- data/docs/ConversationMessageTransportStatus.md +20 -0
- data/docs/ConversationMultimediaUploadUrl.md +20 -0
- data/docs/ConversationMultimediaUploadUrlResponse.md +26 -0
- data/docs/ConversationResponse.md +26 -0
- data/docs/ConversationStartResponse.md +2 -4
- data/docs/EmailCommseqPostcard.md +1 -1
- data/lib/ultracart_api/api/conversation_api.rb +8 -8
- data/lib/ultracart_api/models/auto_order_item.rb +21 -1
- data/lib/ultracart_api/models/conversation_agent_auth.rb +266 -0
- data/lib/ultracart_api/models/conversation_agent_auth_response.rb +32 -33
- data/lib/ultracart_api/models/conversation_message.rb +15 -4
- data/lib/ultracart_api/models/conversation_message_transport_status.rb +228 -0
- data/lib/ultracart_api/models/conversation_multimedia_upload_url.rb +228 -0
- data/lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_start_response.rb +7 -16
- data/lib/ultracart_api/models/email_commseq_postcard.rb +1 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
@@ -0,0 +1,256 @@
|
|
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 ConversationResponse
|
18
|
+
attr_accessor :conversation
|
19
|
+
|
20
|
+
attr_accessor :error
|
21
|
+
|
22
|
+
attr_accessor :metadata
|
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
|
+
:'conversation' => :'conversation',
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
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
|
+
:'conversation' => :'Conversation',
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
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::ConversationResponse` 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::ConversationResponse`. 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?(:'conversation')
|
78
|
+
self.conversation = attributes[:'conversation']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'error')
|
82
|
+
self.error = attributes[:'error']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'metadata')
|
86
|
+
self.metadata = attributes[:'metadata']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'success')
|
90
|
+
self.success = attributes[:'success']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'warning')
|
94
|
+
self.warning = attributes[:'warning']
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
conversation == o.conversation &&
|
117
|
+
error == o.error &&
|
118
|
+
metadata == o.metadata &&
|
119
|
+
success == o.success &&
|
120
|
+
warning == o.warning
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Integer] Hash code
|
131
|
+
def hash
|
132
|
+
[conversation, error, metadata, success, warning].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
150
|
+
self.send("#{key}=", nil)
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = UltracartClient.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
@@ -15,15 +15,12 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class ConversationStartResponse
|
18
|
-
attr_accessor :
|
19
|
-
|
20
|
-
attr_accessor :conversation_uuid
|
18
|
+
attr_accessor :conversation
|
21
19
|
|
22
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
21
|
def self.attribute_map
|
24
22
|
{
|
25
|
-
:'
|
26
|
-
:'conversation_uuid' => :'conversation_uuid'
|
23
|
+
:'conversation' => :'conversation'
|
27
24
|
}
|
28
25
|
end
|
29
26
|
|
@@ -35,8 +32,7 @@ module UltracartClient
|
|
35
32
|
# Attribute type mapping.
|
36
33
|
def self.openapi_types
|
37
34
|
{
|
38
|
-
:'
|
39
|
-
:'conversation_uuid' => :'String'
|
35
|
+
:'conversation' => :'Conversation'
|
40
36
|
}
|
41
37
|
end
|
42
38
|
|
@@ -61,12 +57,8 @@ module UltracartClient
|
|
61
57
|
h[k.to_sym] = v
|
62
58
|
}
|
63
59
|
|
64
|
-
if attributes.key?(:'
|
65
|
-
self.
|
66
|
-
end
|
67
|
-
|
68
|
-
if attributes.key?(:'conversation_uuid')
|
69
|
-
self.conversation_uuid = attributes[:'conversation_uuid']
|
60
|
+
if attributes.key?(:'conversation')
|
61
|
+
self.conversation = attributes[:'conversation']
|
70
62
|
end
|
71
63
|
end
|
72
64
|
|
@@ -88,8 +80,7 @@ module UltracartClient
|
|
88
80
|
def ==(o)
|
89
81
|
return true if self.equal?(o)
|
90
82
|
self.class == o.class &&
|
91
|
-
|
92
|
-
conversation_uuid == o.conversation_uuid
|
83
|
+
conversation == o.conversation
|
93
84
|
end
|
94
85
|
|
95
86
|
# @see the `==` method
|
@@ -101,7 +92,7 @@ module UltracartClient
|
|
101
92
|
# Calculates hash code according to all attributes.
|
102
93
|
# @return [Integer] Hash code
|
103
94
|
def hash
|
104
|
-
[
|
95
|
+
[conversation].hash
|
105
96
|
end
|
106
97
|
|
107
98
|
# Builds the object from hash
|
@@ -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 front 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
@@ -134,9 +134,14 @@ require 'ultracart_api/models/checkout_setup_browser_key_response'
|
|
134
134
|
require 'ultracart_api/models/checkout_state_province_response'
|
135
135
|
require 'ultracart_api/models/city_state_zip'
|
136
136
|
require 'ultracart_api/models/conversation'
|
137
|
+
require 'ultracart_api/models/conversation_agent_auth'
|
137
138
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
138
139
|
require 'ultracart_api/models/conversation_message'
|
140
|
+
require 'ultracart_api/models/conversation_message_transport_status'
|
141
|
+
require 'ultracart_api/models/conversation_multimedia_upload_url'
|
142
|
+
require 'ultracart_api/models/conversation_multimedia_upload_url_response'
|
139
143
|
require 'ultracart_api/models/conversation_participant'
|
144
|
+
require 'ultracart_api/models/conversation_response'
|
140
145
|
require 'ultracart_api/models/conversation_start_request'
|
141
146
|
require 'ultracart_api/models/conversation_start_response'
|
142
147
|
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.39.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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -183,10 +183,15 @@ files:
|
|
183
183
|
- docs/CheckoutStateProvinceResponse.md
|
184
184
|
- docs/CityStateZip.md
|
185
185
|
- docs/Conversation.md
|
186
|
+
- docs/ConversationAgentAuth.md
|
186
187
|
- docs/ConversationAgentAuthResponse.md
|
187
188
|
- docs/ConversationApi.md
|
188
189
|
- docs/ConversationMessage.md
|
190
|
+
- docs/ConversationMessageTransportStatus.md
|
191
|
+
- docs/ConversationMultimediaUploadUrl.md
|
192
|
+
- docs/ConversationMultimediaUploadUrlResponse.md
|
189
193
|
- docs/ConversationParticipant.md
|
194
|
+
- docs/ConversationResponse.md
|
190
195
|
- docs/ConversationStartRequest.md
|
191
196
|
- docs/ConversationStartResponse.md
|
192
197
|
- docs/ConversationSummary.md
|
@@ -862,9 +867,14 @@ files:
|
|
862
867
|
- lib/ultracart_api/models/checkout_state_province_response.rb
|
863
868
|
- lib/ultracart_api/models/city_state_zip.rb
|
864
869
|
- lib/ultracart_api/models/conversation.rb
|
870
|
+
- lib/ultracart_api/models/conversation_agent_auth.rb
|
865
871
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
866
872
|
- lib/ultracart_api/models/conversation_message.rb
|
873
|
+
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
874
|
+
- lib/ultracart_api/models/conversation_multimedia_upload_url.rb
|
875
|
+
- lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
|
867
876
|
- lib/ultracart_api/models/conversation_participant.rb
|
877
|
+
- lib/ultracart_api/models/conversation_response.rb
|
868
878
|
- lib/ultracart_api/models/conversation_start_request.rb
|
869
879
|
- lib/ultracart_api/models/conversation_start_response.rb
|
870
880
|
- lib/ultracart_api/models/conversation_summary.rb
|