ultracart_api 4.0.38.rc → 4.0.39.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 +7 -4
- data/docs/ConversationApi.md +7 -6
- data/docs/ConversationMultimediaUploadUrl.md +20 -0
- data/docs/ConversationMultimediaUploadUrlResponse.md +26 -0
- data/lib/ultracart_api/api/conversation_api.rb +5 -5
- 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/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2afae6d4cb49326077cb7026388f479020fffc6857cb1a7478b3a044a8600b6c
|
|
4
|
+
data.tar.gz: 9494739cc7d3065dca654bd08aeac99e603b1dc678c0f7e8897bae7a428b7b45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6908035700e3811ef04ec77fafaeb8b6af8e947437cb98f126c9426b32e8e16110f952dae467ba534a7a04b814339bc82298e83b46f352b52f7895ae4139123
|
|
7
|
+
data.tar.gz: d0508988b13bd0a7ffef3b77bd53ea8ff74e30fec28a675842096b56d1fd34dc5b1608d254eb8f3b98d632541bc72eb8e65ab1abdc831cf5d847e7e0f4907af1
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 4.0.
|
|
10
|
+
- Package version: 4.0.39.rc
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
|
13
13
|
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./ultracart_api-4.0.
|
|
27
|
+
gem install ./ultracart_api-4.0.39.rc.gem
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.39.rc.gem` to install the development dependencies)
|
|
31
31
|
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
33
|
|
|
34
34
|
Finally add this to the Gemfile:
|
|
35
35
|
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
|
36
|
+
gem 'ultracart_api', '~> 4.0.39.rc'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -566,6 +566,8 @@ Class | Method | HTTP request | Description
|
|
|
566
566
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
|
567
567
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
|
568
568
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
|
569
|
+
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
|
570
|
+
- [UltracartClient::ConversationMultimediaUploadUrlResponse](docs/ConversationMultimediaUploadUrlResponse.md)
|
|
569
571
|
- [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
|
|
570
572
|
- [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
|
|
571
573
|
- [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
|
|
@@ -1162,6 +1164,7 @@ Not every change is committed to every SDK.
|
|
|
1162
1164
|
|
|
1163
1165
|
| Version | Date | Comments |
|
|
1164
1166
|
| --: | :-: | --- |
|
|
1167
|
+
| 4.0.39-RC | 07/21/2022 | conversation response types improvements |
|
|
1165
1168
|
| 4.0.38-RC | 07/21/2022 | conversation bugfix for poor response objects |
|
|
1166
1169
|
| 4.0.37-RC | 07/20/2022 | conversation participant name added |
|
|
1167
1170
|
| 4.0.36-RC | 07/18/2022 | twilio dev |
|
data/docs/ConversationApi.md
CHANGED
|
@@ -154,7 +154,7 @@ end
|
|
|
154
154
|
|
|
155
155
|
## get_conversation_multimedia_upload_url
|
|
156
156
|
|
|
157
|
-
> get_conversation_multimedia_upload_url(extension)
|
|
157
|
+
> <ConversationMultimediaUploadUrlResponse> get_conversation_multimedia_upload_url(extension)
|
|
158
158
|
|
|
159
159
|
Get a presigned conersation multimedia upload URL
|
|
160
160
|
|
|
@@ -178,7 +178,8 @@ extension = 'extension_example' # String |
|
|
|
178
178
|
|
|
179
179
|
begin
|
|
180
180
|
# Get a presigned conersation multimedia upload URL
|
|
181
|
-
api_instance.get_conversation_multimedia_upload_url(extension)
|
|
181
|
+
result = api_instance.get_conversation_multimedia_upload_url(extension)
|
|
182
|
+
p result
|
|
182
183
|
rescue UltracartClient::ApiError => e
|
|
183
184
|
puts "Error when calling ConversationApi->get_conversation_multimedia_upload_url: #{e}"
|
|
184
185
|
end
|
|
@@ -186,9 +187,9 @@ end
|
|
|
186
187
|
|
|
187
188
|
#### Using the get_conversation_multimedia_upload_url_with_http_info variant
|
|
188
189
|
|
|
189
|
-
This returns an Array which contains the response data
|
|
190
|
+
This returns an Array which contains the response data, status code and headers.
|
|
190
191
|
|
|
191
|
-
> <Array(
|
|
192
|
+
> <Array(<ConversationMultimediaUploadUrlResponse>, Integer, Hash)> get_conversation_multimedia_upload_url_with_http_info(extension)
|
|
192
193
|
|
|
193
194
|
```ruby
|
|
194
195
|
begin
|
|
@@ -196,7 +197,7 @@ begin
|
|
|
196
197
|
data, status_code, headers = api_instance.get_conversation_multimedia_upload_url_with_http_info(extension)
|
|
197
198
|
p status_code # => 2xx
|
|
198
199
|
p headers # => { ... }
|
|
199
|
-
p data # =>
|
|
200
|
+
p data # => <ConversationMultimediaUploadUrlResponse>
|
|
200
201
|
rescue UltracartClient::ApiError => e
|
|
201
202
|
puts "Error when calling ConversationApi->get_conversation_multimedia_upload_url_with_http_info: #{e}"
|
|
202
203
|
end
|
|
@@ -210,7 +211,7 @@ end
|
|
|
210
211
|
|
|
211
212
|
### Return type
|
|
212
213
|
|
|
213
|
-
|
|
214
|
+
[**ConversationMultimediaUploadUrlResponse**](ConversationMultimediaUploadUrlResponse.md)
|
|
214
215
|
|
|
215
216
|
### Authorization
|
|
216
217
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::ConversationMultimediaUploadUrl
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **key** | **String** | | [optional] |
|
|
8
|
+
| **url** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::ConversationMultimediaUploadUrl.new(
|
|
16
|
+
key: null,
|
|
17
|
+
url: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UltracartClient::ConversationMultimediaUploadUrlResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **conversation_multimedia_upload_url** | [**ConversationMultimediaUploadUrl**](ConversationMultimediaUploadUrl.md) | | [optional] |
|
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ultracart_api'
|
|
17
|
+
|
|
18
|
+
instance = UltracartClient::ConversationMultimediaUploadUrlResponse.new(
|
|
19
|
+
conversation_multimedia_upload_url: null,
|
|
20
|
+
error: null,
|
|
21
|
+
metadata: null,
|
|
22
|
+
success: null,
|
|
23
|
+
warning: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -158,17 +158,17 @@ module UltracartClient
|
|
|
158
158
|
# Get a presigned conersation multimedia upload URL
|
|
159
159
|
# @param extension [String]
|
|
160
160
|
# @param [Hash] opts the optional parameters
|
|
161
|
-
# @return [
|
|
161
|
+
# @return [ConversationMultimediaUploadUrlResponse]
|
|
162
162
|
def get_conversation_multimedia_upload_url(extension, opts = {})
|
|
163
|
-
get_conversation_multimedia_upload_url_with_http_info(extension, opts)
|
|
164
|
-
|
|
163
|
+
data, _status_code, _headers = get_conversation_multimedia_upload_url_with_http_info(extension, opts)
|
|
164
|
+
data
|
|
165
165
|
end
|
|
166
166
|
|
|
167
167
|
# Get a presigned conersation multimedia upload URL
|
|
168
168
|
# Get a presigned conersation multimedia upload URL
|
|
169
169
|
# @param extension [String]
|
|
170
170
|
# @param [Hash] opts the optional parameters
|
|
171
|
-
# @return [Array<(
|
|
171
|
+
# @return [Array<(ConversationMultimediaUploadUrlResponse, Integer, Hash)>] ConversationMultimediaUploadUrlResponse data, response status code and response headers
|
|
172
172
|
def get_conversation_multimedia_upload_url_with_http_info(extension, opts = {})
|
|
173
173
|
if @api_client.config.debugging
|
|
174
174
|
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_multimedia_upload_url ...'
|
|
@@ -196,7 +196,7 @@ module UltracartClient
|
|
|
196
196
|
post_body = opts[:debug_body]
|
|
197
197
|
|
|
198
198
|
# return_type
|
|
199
|
-
return_type = opts[:debug_return_type]
|
|
199
|
+
return_type = opts[:debug_return_type] || 'ConversationMultimediaUploadUrlResponse'
|
|
200
200
|
|
|
201
201
|
# auth_names
|
|
202
202
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
@@ -0,0 +1,228 @@
|
|
|
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 ConversationMultimediaUploadUrl
|
|
18
|
+
attr_accessor :key
|
|
19
|
+
|
|
20
|
+
attr_accessor :url
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'key' => :'key',
|
|
26
|
+
:'url' => :'url'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
|
31
|
+
def self.acceptable_attributes
|
|
32
|
+
attribute_map.values
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.openapi_types
|
|
37
|
+
{
|
|
38
|
+
:'key' => :'String',
|
|
39
|
+
:'url' => :'String'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List of attributes with nullable: true
|
|
44
|
+
def self.openapi_nullable
|
|
45
|
+
Set.new([
|
|
46
|
+
])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationMultimediaUploadUrl` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationMultimediaUploadUrl`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'key')
|
|
65
|
+
self.key = attributes[:'key']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'url')
|
|
69
|
+
self.url = attributes[:'url']
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
invalid_properties = Array.new
|
|
77
|
+
invalid_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Check to see if the all the properties in the model are valid
|
|
81
|
+
# @return true if the model is valid
|
|
82
|
+
def valid?
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
key == o.key &&
|
|
92
|
+
url == o.url
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @see the `==` method
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def eql?(o)
|
|
98
|
+
self == o
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Calculates hash code according to all attributes.
|
|
102
|
+
# @return [Integer] Hash code
|
|
103
|
+
def hash
|
|
104
|
+
[key, url].hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def self.build_from_hash(attributes)
|
|
111
|
+
new.build_from_hash(attributes)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Builds the object from hash
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
# @return [Object] Returns the model itself
|
|
117
|
+
def build_from_hash(attributes)
|
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
|
119
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
120
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
121
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
122
|
+
self.send("#{key}=", nil)
|
|
123
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
124
|
+
# check to ensure the input is an array given that the attribute
|
|
125
|
+
# is documented as an array but the input is not
|
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
128
|
+
end
|
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
self
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Deserializes the data based on type
|
|
138
|
+
# @param string type Data type
|
|
139
|
+
# @param string value Value to be deserialized
|
|
140
|
+
# @return [Object] Deserialized data
|
|
141
|
+
def _deserialize(type, value)
|
|
142
|
+
case type.to_sym
|
|
143
|
+
when :Time
|
|
144
|
+
Time.parse(value)
|
|
145
|
+
when :Date
|
|
146
|
+
Date.parse(value)
|
|
147
|
+
when :String
|
|
148
|
+
value.to_s
|
|
149
|
+
when :Integer
|
|
150
|
+
value.to_i
|
|
151
|
+
when :Float
|
|
152
|
+
value.to_f
|
|
153
|
+
when :Boolean
|
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
155
|
+
true
|
|
156
|
+
else
|
|
157
|
+
false
|
|
158
|
+
end
|
|
159
|
+
when :Object
|
|
160
|
+
# generic object (usually a Hash), return directly
|
|
161
|
+
value
|
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
|
168
|
+
{}.tap do |hash|
|
|
169
|
+
value.each do |k, v|
|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
else # model
|
|
174
|
+
# models (e.g. Pet) or oneOf
|
|
175
|
+
klass = UltracartClient.const_get(type)
|
|
176
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the string representation of the object
|
|
181
|
+
# @return [String] String presentation of the object
|
|
182
|
+
def to_s
|
|
183
|
+
to_hash.to_s
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_body
|
|
189
|
+
to_hash
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the object in the form of hash
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_hash
|
|
195
|
+
hash = {}
|
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
197
|
+
value = self.send(attr)
|
|
198
|
+
if value.nil?
|
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
hash[param] = _to_hash(value)
|
|
204
|
+
end
|
|
205
|
+
hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Outputs non-array value in the form of hash
|
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
210
|
+
# @param [Object] value Any valid value
|
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
|
212
|
+
def _to_hash(value)
|
|
213
|
+
if value.is_a?(Array)
|
|
214
|
+
value.compact.map { |v| _to_hash(v) }
|
|
215
|
+
elsif value.is_a?(Hash)
|
|
216
|
+
{}.tap do |hash|
|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
218
|
+
end
|
|
219
|
+
elsif value.respond_to? :to_hash
|
|
220
|
+
value.to_hash
|
|
221
|
+
else
|
|
222
|
+
value
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
@@ -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 ConversationMultimediaUploadUrlResponse
|
|
18
|
+
attr_accessor :conversation_multimedia_upload_url
|
|
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_multimedia_upload_url' => :'conversation_multimedia_upload_url',
|
|
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_multimedia_upload_url' => :'ConversationMultimediaUploadUrl',
|
|
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::ConversationMultimediaUploadUrlResponse` 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::ConversationMultimediaUploadUrlResponse`. 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_multimedia_upload_url')
|
|
78
|
+
self.conversation_multimedia_upload_url = attributes[:'conversation_multimedia_upload_url']
|
|
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_multimedia_upload_url == o.conversation_multimedia_upload_url &&
|
|
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_multimedia_upload_url, 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
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -138,6 +138,8 @@ require 'ultracart_api/models/conversation_agent_auth'
|
|
|
138
138
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
|
139
139
|
require 'ultracart_api/models/conversation_message'
|
|
140
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'
|
|
141
143
|
require 'ultracart_api/models/conversation_participant'
|
|
142
144
|
require 'ultracart_api/models/conversation_response'
|
|
143
145
|
require 'ultracart_api/models/conversation_start_request'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
@@ -188,6 +188,8 @@ files:
|
|
|
188
188
|
- docs/ConversationApi.md
|
|
189
189
|
- docs/ConversationMessage.md
|
|
190
190
|
- docs/ConversationMessageTransportStatus.md
|
|
191
|
+
- docs/ConversationMultimediaUploadUrl.md
|
|
192
|
+
- docs/ConversationMultimediaUploadUrlResponse.md
|
|
191
193
|
- docs/ConversationParticipant.md
|
|
192
194
|
- docs/ConversationResponse.md
|
|
193
195
|
- docs/ConversationStartRequest.md
|
|
@@ -869,6 +871,8 @@ files:
|
|
|
869
871
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
|
870
872
|
- lib/ultracart_api/models/conversation_message.rb
|
|
871
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
|
|
872
876
|
- lib/ultracart_api/models/conversation_participant.rb
|
|
873
877
|
- lib/ultracart_api/models/conversation_response.rb
|
|
874
878
|
- lib/ultracart_api/models/conversation_start_request.rb
|