ultracart_api 4.0.208 → 4.0.209
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/docs/AutoOrder.md +2 -0
- data/docs/AutoOrderItem.md +2 -0
- data/docs/ConversationApi.md +429 -0
- data/docs/ConversationPbxVoicemailMessage.md +42 -0
- data/docs/ConversationPbxVoicemailMessageResponse.md +26 -0
- data/docs/ConversationPbxVoicemailMessageSummariesResponse.md +26 -0
- data/docs/ConversationPbxVoicemailMessageSummary.md +36 -0
- data/lib/ultracart_api/api/conversation_api.rb +384 -0
- data/lib/ultracart_api/models/auto_order.rb +11 -1
- data/lib/ultracart_api/models/auto_order_item.rb +11 -1
- data/lib/ultracart_api/models/conversation_pbx_phone_number_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_phone_numbers_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_time_based_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_time_baseds_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_time_range_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_time_ranges_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_voicemail_mailbox.rb +29 -5
- data/lib/ultracart_api/models/conversation_pbx_voicemail_mailbox_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_voicemail_mailboxes_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_pbx_voicemail_message.rb +374 -0
- data/lib/ultracart_api/models/conversation_pbx_voicemail_message_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_voicemail_message_summaries_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_voicemail_message_summary.rb +344 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
@@ -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 ConversationPbxVoicemailMessageSummariesResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :metadata
|
21
|
+
|
22
|
+
# Indicates if API call was successful
|
23
|
+
attr_accessor :success
|
24
|
+
|
25
|
+
attr_accessor :voicemail_message_summaries
|
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
|
+
:'success' => :'success',
|
35
|
+
:'voicemail_message_summaries' => :'voicemail_message_summaries',
|
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
|
+
:'success' => :'Boolean',
|
51
|
+
:'voicemail_message_summaries' => :'Array<ConversationPbxVoicemailMessageSummary>',
|
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::ConversationPbxVoicemailMessageSummariesResponse` 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::ConversationPbxVoicemailMessageSummariesResponse`. 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?(:'success')
|
86
|
+
self.success = attributes[:'success']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'voicemail_message_summaries')
|
90
|
+
if (value = attributes[:'voicemail_message_summaries']).is_a?(Array)
|
91
|
+
self.voicemail_message_summaries = value
|
92
|
+
end
|
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
|
+
success == o.success &&
|
121
|
+
voicemail_message_summaries == o.voicemail_message_summaries &&
|
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, success, voicemail_message_summaries, 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
|
@@ -0,0 +1,344 @@
|
|
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 ConversationPbxVoicemailMessageSummary
|
18
|
+
# Call SID
|
19
|
+
attr_accessor :call_sid
|
20
|
+
|
21
|
+
# Duration in seconds
|
22
|
+
attr_accessor :duration
|
23
|
+
|
24
|
+
# From phone number in E.164
|
25
|
+
attr_accessor :from
|
26
|
+
|
27
|
+
# From caller id (if available)
|
28
|
+
attr_accessor :from_caller_id
|
29
|
+
|
30
|
+
# True if the voicemail has been listened to in the user interface
|
31
|
+
attr_accessor :listened
|
32
|
+
|
33
|
+
# Merchant ID
|
34
|
+
attr_accessor :merchant_id
|
35
|
+
|
36
|
+
# Recording SID
|
37
|
+
attr_accessor :recording_sid
|
38
|
+
|
39
|
+
# Recording size in bytes
|
40
|
+
attr_accessor :recording_size_bytes
|
41
|
+
|
42
|
+
# Recording Status
|
43
|
+
attr_accessor :recording_status
|
44
|
+
|
45
|
+
# Voicemail date/time
|
46
|
+
attr_accessor :voicemail_dts
|
47
|
+
|
48
|
+
class EnumAttributeValidator
|
49
|
+
attr_reader :datatype
|
50
|
+
attr_reader :allowable_values
|
51
|
+
|
52
|
+
def initialize(datatype, allowable_values)
|
53
|
+
@allowable_values = allowable_values.map do |value|
|
54
|
+
case datatype.to_s
|
55
|
+
when /Integer/i
|
56
|
+
value.to_i
|
57
|
+
when /Float/i
|
58
|
+
value.to_f
|
59
|
+
else
|
60
|
+
value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def valid?(value)
|
66
|
+
!value || allowable_values.include?(value)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
71
|
+
def self.attribute_map
|
72
|
+
{
|
73
|
+
:'call_sid' => :'call_sid',
|
74
|
+
:'duration' => :'duration',
|
75
|
+
:'from' => :'from',
|
76
|
+
:'from_caller_id' => :'from_caller_id',
|
77
|
+
:'listened' => :'listened',
|
78
|
+
:'merchant_id' => :'merchant_id',
|
79
|
+
:'recording_sid' => :'recording_sid',
|
80
|
+
:'recording_size_bytes' => :'recording_size_bytes',
|
81
|
+
:'recording_status' => :'recording_status',
|
82
|
+
:'voicemail_dts' => :'voicemail_dts'
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
# Returns all the JSON keys this model knows about
|
87
|
+
def self.acceptable_attributes
|
88
|
+
attribute_map.values
|
89
|
+
end
|
90
|
+
|
91
|
+
# Attribute type mapping.
|
92
|
+
def self.openapi_types
|
93
|
+
{
|
94
|
+
:'call_sid' => :'String',
|
95
|
+
:'duration' => :'Integer',
|
96
|
+
:'from' => :'String',
|
97
|
+
:'from_caller_id' => :'String',
|
98
|
+
:'listened' => :'Boolean',
|
99
|
+
:'merchant_id' => :'String',
|
100
|
+
:'recording_sid' => :'String',
|
101
|
+
:'recording_size_bytes' => :'Integer',
|
102
|
+
:'recording_status' => :'String',
|
103
|
+
:'voicemail_dts' => :'String'
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# List of attributes with nullable: true
|
108
|
+
def self.openapi_nullable
|
109
|
+
Set.new([
|
110
|
+
])
|
111
|
+
end
|
112
|
+
|
113
|
+
# Initializes the object
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
def initialize(attributes = {})
|
116
|
+
if (!attributes.is_a?(Hash))
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxVoicemailMessageSummary` initialize method"
|
118
|
+
end
|
119
|
+
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
122
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxVoicemailMessageSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
124
|
+
end
|
125
|
+
h[k.to_sym] = v
|
126
|
+
}
|
127
|
+
|
128
|
+
if attributes.key?(:'call_sid')
|
129
|
+
self.call_sid = attributes[:'call_sid']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'duration')
|
133
|
+
self.duration = attributes[:'duration']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'from')
|
137
|
+
self.from = attributes[:'from']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'from_caller_id')
|
141
|
+
self.from_caller_id = attributes[:'from_caller_id']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'listened')
|
145
|
+
self.listened = attributes[:'listened']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'merchant_id')
|
149
|
+
self.merchant_id = attributes[:'merchant_id']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'recording_sid')
|
153
|
+
self.recording_sid = attributes[:'recording_sid']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'recording_size_bytes')
|
157
|
+
self.recording_size_bytes = attributes[:'recording_size_bytes']
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'recording_status')
|
161
|
+
self.recording_status = attributes[:'recording_status']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'voicemail_dts')
|
165
|
+
self.voicemail_dts = attributes[:'voicemail_dts']
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
170
|
+
# @return Array for valid properties with the reasons
|
171
|
+
def list_invalid_properties
|
172
|
+
invalid_properties = Array.new
|
173
|
+
invalid_properties
|
174
|
+
end
|
175
|
+
|
176
|
+
# Check to see if the all the properties in the model are valid
|
177
|
+
# @return true if the model is valid
|
178
|
+
def valid?
|
179
|
+
recording_status_validator = EnumAttributeValidator.new('String', ["completed"])
|
180
|
+
return false unless recording_status_validator.valid?(@recording_status)
|
181
|
+
true
|
182
|
+
end
|
183
|
+
|
184
|
+
# Custom attribute writer method checking allowed values (enum).
|
185
|
+
# @param [Object] recording_status Object to be assigned
|
186
|
+
def recording_status=(recording_status)
|
187
|
+
validator = EnumAttributeValidator.new('String', ["completed"])
|
188
|
+
unless validator.valid?(recording_status)
|
189
|
+
fail ArgumentError, "invalid value for \"recording_status\", must be one of #{validator.allowable_values}."
|
190
|
+
end
|
191
|
+
@recording_status = recording_status
|
192
|
+
end
|
193
|
+
|
194
|
+
# Checks equality by comparing each attribute.
|
195
|
+
# @param [Object] Object to be compared
|
196
|
+
def ==(o)
|
197
|
+
return true if self.equal?(o)
|
198
|
+
self.class == o.class &&
|
199
|
+
call_sid == o.call_sid &&
|
200
|
+
duration == o.duration &&
|
201
|
+
from == o.from &&
|
202
|
+
from_caller_id == o.from_caller_id &&
|
203
|
+
listened == o.listened &&
|
204
|
+
merchant_id == o.merchant_id &&
|
205
|
+
recording_sid == o.recording_sid &&
|
206
|
+
recording_size_bytes == o.recording_size_bytes &&
|
207
|
+
recording_status == o.recording_status &&
|
208
|
+
voicemail_dts == o.voicemail_dts
|
209
|
+
end
|
210
|
+
|
211
|
+
# @see the `==` method
|
212
|
+
# @param [Object] Object to be compared
|
213
|
+
def eql?(o)
|
214
|
+
self == o
|
215
|
+
end
|
216
|
+
|
217
|
+
# Calculates hash code according to all attributes.
|
218
|
+
# @return [Integer] Hash code
|
219
|
+
def hash
|
220
|
+
[call_sid, duration, from, from_caller_id, listened, merchant_id, recording_sid, recording_size_bytes, recording_status, voicemail_dts].hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Builds the object from hash
|
224
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
225
|
+
# @return [Object] Returns the model itself
|
226
|
+
def self.build_from_hash(attributes)
|
227
|
+
new.build_from_hash(attributes)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Builds the object from hash
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
232
|
+
# @return [Object] Returns the model itself
|
233
|
+
def build_from_hash(attributes)
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
236
|
+
self.class.openapi_types.each_pair do |key, type|
|
237
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
238
|
+
self.send("#{key}=", nil)
|
239
|
+
elsif type =~ /\AArray<(.*)>/i
|
240
|
+
# check to ensure the input is an array given that the attribute
|
241
|
+
# is documented as an array but the input is not
|
242
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
243
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
244
|
+
end
|
245
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
246
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
self
|
251
|
+
end
|
252
|
+
|
253
|
+
# Deserializes the data based on type
|
254
|
+
# @param string type Data type
|
255
|
+
# @param string value Value to be deserialized
|
256
|
+
# @return [Object] Deserialized data
|
257
|
+
def _deserialize(type, value)
|
258
|
+
case type.to_sym
|
259
|
+
when :Time
|
260
|
+
Time.parse(value)
|
261
|
+
when :Date
|
262
|
+
Date.parse(value)
|
263
|
+
when :String
|
264
|
+
value.to_s
|
265
|
+
when :Integer
|
266
|
+
value.to_i
|
267
|
+
when :Float
|
268
|
+
value.to_f
|
269
|
+
when :Boolean
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
271
|
+
true
|
272
|
+
else
|
273
|
+
false
|
274
|
+
end
|
275
|
+
when :Object
|
276
|
+
# generic object (usually a Hash), return directly
|
277
|
+
value
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each do |k, v|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
else # model
|
290
|
+
# models (e.g. Pet) or oneOf
|
291
|
+
klass = UltracartClient.const_get(type)
|
292
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
# Returns the string representation of the object
|
297
|
+
# @return [String] String presentation of the object
|
298
|
+
def to_s
|
299
|
+
to_hash.to_s
|
300
|
+
end
|
301
|
+
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
304
|
+
def to_body
|
305
|
+
to_hash
|
306
|
+
end
|
307
|
+
|
308
|
+
# Returns the object in the form of hash
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
310
|
+
def to_hash
|
311
|
+
hash = {}
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
313
|
+
value = self.send(attr)
|
314
|
+
if value.nil?
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
317
|
+
end
|
318
|
+
|
319
|
+
hash[param] = _to_hash(value)
|
320
|
+
end
|
321
|
+
hash
|
322
|
+
end
|
323
|
+
|
324
|
+
# Outputs non-array value in the form of hash
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
326
|
+
# @param [Object] value Any valid value
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
328
|
+
def _to_hash(value)
|
329
|
+
if value.is_a?(Array)
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
331
|
+
elsif value.is_a?(Hash)
|
332
|
+
{}.tap do |hash|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
334
|
+
end
|
335
|
+
elsif value.respond_to? :to_hash
|
336
|
+
value.to_hash
|
337
|
+
else
|
338
|
+
value
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
end
|
343
|
+
|
344
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -216,6 +216,10 @@ require 'ultracart_api/models/conversation_pbx_time_ranges_response'
|
|
216
216
|
require 'ultracart_api/models/conversation_pbx_voicemail_mailbox'
|
217
217
|
require 'ultracart_api/models/conversation_pbx_voicemail_mailbox_response'
|
218
218
|
require 'ultracart_api/models/conversation_pbx_voicemail_mailboxes_response'
|
219
|
+
require 'ultracart_api/models/conversation_pbx_voicemail_message'
|
220
|
+
require 'ultracart_api/models/conversation_pbx_voicemail_message_response'
|
221
|
+
require 'ultracart_api/models/conversation_pbx_voicemail_message_summaries_response'
|
222
|
+
require 'ultracart_api/models/conversation_pbx_voicemail_message_summary'
|
219
223
|
require 'ultracart_api/models/conversation_permissions'
|
220
224
|
require 'ultracart_api/models/conversation_permissions_response'
|
221
225
|
require 'ultracart_api/models/conversation_response'
|
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.209
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -266,6 +266,10 @@ files:
|
|
266
266
|
- docs/ConversationPbxVoicemailMailbox.md
|
267
267
|
- docs/ConversationPbxVoicemailMailboxResponse.md
|
268
268
|
- docs/ConversationPbxVoicemailMailboxesResponse.md
|
269
|
+
- docs/ConversationPbxVoicemailMessage.md
|
270
|
+
- docs/ConversationPbxVoicemailMessageResponse.md
|
271
|
+
- docs/ConversationPbxVoicemailMessageSummariesResponse.md
|
272
|
+
- docs/ConversationPbxVoicemailMessageSummary.md
|
269
273
|
- docs/ConversationPermissions.md
|
270
274
|
- docs/ConversationPermissionsResponse.md
|
271
275
|
- docs/ConversationResponse.md
|
@@ -1147,6 +1151,10 @@ files:
|
|
1147
1151
|
- lib/ultracart_api/models/conversation_pbx_voicemail_mailbox.rb
|
1148
1152
|
- lib/ultracart_api/models/conversation_pbx_voicemail_mailbox_response.rb
|
1149
1153
|
- lib/ultracart_api/models/conversation_pbx_voicemail_mailboxes_response.rb
|
1154
|
+
- lib/ultracart_api/models/conversation_pbx_voicemail_message.rb
|
1155
|
+
- lib/ultracart_api/models/conversation_pbx_voicemail_message_response.rb
|
1156
|
+
- lib/ultracart_api/models/conversation_pbx_voicemail_message_summaries_response.rb
|
1157
|
+
- lib/ultracart_api/models/conversation_pbx_voicemail_message_summary.rb
|
1150
1158
|
- lib/ultracart_api/models/conversation_permissions.rb
|
1151
1159
|
- lib/ultracart_api/models/conversation_permissions_response.rb
|
1152
1160
|
- lib/ultracart_api/models/conversation_response.rb
|