ultracart_api 4.0.201 → 4.0.202
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +80 -4
- data/docs/ConversationApi.md +3565 -549
- data/docs/ConversationPbxAgent.md +34 -0
- data/docs/ConversationPbxAgentResponse.md +26 -0
- data/docs/ConversationPbxAgentsResponse.md +26 -0
- data/docs/ConversationPbxAudio.md +34 -0
- data/docs/ConversationPbxAudioResponse.md +26 -0
- data/docs/ConversationPbxAudiosResponse.md +26 -0
- data/docs/ConversationPbxCustomerSnapshotRequest.md +32 -0
- data/docs/ConversationPbxCustomerSnapshotResponse.md +30 -0
- data/docs/ConversationPbxMenu.md +36 -0
- data/docs/ConversationPbxMenuMapping.md +24 -0
- data/docs/ConversationPbxMenuResponse.md +26 -0
- data/docs/ConversationPbxMenusResponse.md +26 -0
- data/docs/ConversationPbxPhoneNumber.md +26 -0
- data/docs/ConversationPbxPhoneNumberResponse.md +26 -0
- data/docs/ConversationPbxPhoneNumbersResponse.md +26 -0
- data/docs/ConversationPbxQueue.md +52 -0
- data/docs/ConversationPbxQueueMembers.md +20 -0
- data/docs/ConversationPbxQueueResponse.md +26 -0
- data/docs/ConversationPbxQueuesResponse.md +26 -0
- data/docs/ConversationPbxTimeBased.md +24 -0
- data/docs/ConversationPbxTimeBasedMapping.md +24 -0
- data/docs/ConversationPbxTimeBasedMappingConfig.md +20 -0
- data/docs/ConversationPbxTimeBasedResponse.md +26 -0
- data/docs/ConversationPbxTimeBasedsResponse.md +26 -0
- data/docs/ConversationPbxTimeRange.md +26 -0
- data/docs/ConversationPbxTimeRangeConfig.md +28 -0
- data/docs/ConversationPbxTimeRangeResponse.md +26 -0
- data/docs/ConversationPbxTimeRangesResponse.md +26 -0
- data/docs/ConversationPbxVoicemailMailbox.md +38 -0
- data/docs/ConversationPbxVoicemailMailboxResponse.md +26 -0
- data/docs/ConversationPbxVoicemailMailboxesResponse.md +26 -0
- data/docs/WorkflowApi.md +69 -0
- data/docs/WorkflowTaskTagsResponse.md +26 -0
- data/lib/ultracart_api/api/conversation_api.rb +3422 -649
- data/lib/ultracart_api/api/workflow_api.rb +58 -0
- data/lib/ultracart_api/models/conversation_pbx_agent.rb +360 -0
- data/lib/ultracart_api/models/conversation_pbx_agent_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_agents_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_audio.rb +390 -0
- data/lib/ultracart_api/models/conversation_pbx_audio_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_audios_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_customer_snapshot_request.rb +283 -0
- data/lib/ultracart_api/models/conversation_pbx_customer_snapshot_response.rb +278 -0
- data/lib/ultracart_api/models/conversation_pbx_menu.rb +402 -0
- data/lib/ultracart_api/models/conversation_pbx_menu_mapping.rb +250 -0
- data/lib/ultracart_api/models/conversation_pbx_menu_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_menus_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_phone_number.rb +335 -0
- data/lib/ultracart_api/models/conversation_pbx_phone_number_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_phone_numbers_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_queue.rb +539 -0
- data/lib/ultracart_api/models/conversation_pbx_queue_members.rb +232 -0
- data/lib/ultracart_api/models/conversation_pbx_queue_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_queues_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_time_based.rb +246 -0
- data/lib/ultracart_api/models/conversation_pbx_time_based_mapping.rb +310 -0
- data/lib/ultracart_api/models/conversation_pbx_time_based_mapping_config.rb +231 -0
- data/lib/ultracart_api/models/conversation_pbx_time_based_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_time_baseds_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_time_range.rb +322 -0
- data/lib/ultracart_api/models/conversation_pbx_time_range_config.rb +270 -0
- data/lib/ultracart_api/models/conversation_pbx_time_range_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_time_ranges_response.rb +258 -0
- data/lib/ultracart_api/models/conversation_pbx_voicemail_mailbox.rb +440 -0
- data/lib/ultracart_api/models/conversation_pbx_voicemail_mailbox_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_pbx_voicemail_mailboxes_response.rb +258 -0
- data/lib/ultracart_api/models/workflow_task_tags_response.rb +259 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +32 -0
- metadata +66 -2
@@ -0,0 +1,539 @@
|
|
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 ConversationPbxQueue
|
18
|
+
# If true, the customer is told their queue position upon entering the queue
|
19
|
+
attr_accessor :announce_queue_position
|
20
|
+
|
21
|
+
# Conversation Pbx Queue unique identifier
|
22
|
+
attr_accessor :conversation_pbx_queue_uuid
|
23
|
+
|
24
|
+
# The voicemail mailbox associated with this queue
|
25
|
+
attr_accessor :conversation_voicemail_mailbox_uuid
|
26
|
+
|
27
|
+
# The audio to play while holding in a queue
|
28
|
+
attr_accessor :hold_conversation_pbx_audio_uuid
|
29
|
+
|
30
|
+
# The maximum number of seconds for a customer to hold in a queue
|
31
|
+
attr_accessor :max_hold_seconds
|
32
|
+
|
33
|
+
attr_accessor :members
|
34
|
+
|
35
|
+
# Merchant Id
|
36
|
+
attr_accessor :merchant_id
|
37
|
+
|
38
|
+
# Name of queue
|
39
|
+
attr_accessor :name
|
40
|
+
|
41
|
+
# When no agent is available after the max_hold_seconds, say this
|
42
|
+
attr_accessor :no_agent_available_play_audio_uuid
|
43
|
+
|
44
|
+
# When no agent is available after the max_hold_seconds, say this
|
45
|
+
attr_accessor :no_agent_available_say
|
46
|
+
|
47
|
+
# The type of voice used to say text when no agent is available
|
48
|
+
attr_accessor :no_agent_available_say_voice
|
49
|
+
|
50
|
+
# Audio played when customer enters a queue
|
51
|
+
attr_accessor :play_audio_uuid
|
52
|
+
|
53
|
+
# If true, any calls in this queue are recorded
|
54
|
+
attr_accessor :record_call
|
55
|
+
|
56
|
+
# Say text when a customer enters queue
|
57
|
+
attr_accessor :say
|
58
|
+
|
59
|
+
# The type of voice to use when say text is spoken
|
60
|
+
attr_accessor :say_voice
|
61
|
+
|
62
|
+
# Twilio taskrouter workflow sid
|
63
|
+
attr_accessor :twilio_taskrouter_workflow_sid
|
64
|
+
|
65
|
+
# Twilio workspace queue sid
|
66
|
+
attr_accessor :twilio_workspace_queue_sid
|
67
|
+
|
68
|
+
# If true, this queue has a voicemail associated with it
|
69
|
+
attr_accessor :voicemail
|
70
|
+
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
72
|
+
def self.attribute_map
|
73
|
+
{
|
74
|
+
:'announce_queue_position' => :'announce_queue_position',
|
75
|
+
:'conversation_pbx_queue_uuid' => :'conversation_pbx_queue_uuid',
|
76
|
+
:'conversation_voicemail_mailbox_uuid' => :'conversation_voicemail_mailbox_uuid',
|
77
|
+
:'hold_conversation_pbx_audio_uuid' => :'hold_conversation_pbx_audio_uuid',
|
78
|
+
:'max_hold_seconds' => :'max_hold_seconds',
|
79
|
+
:'members' => :'members',
|
80
|
+
:'merchant_id' => :'merchant_id',
|
81
|
+
:'name' => :'name',
|
82
|
+
:'no_agent_available_play_audio_uuid' => :'no_agent_available_play_audio_uuid',
|
83
|
+
:'no_agent_available_say' => :'no_agent_available_say',
|
84
|
+
:'no_agent_available_say_voice' => :'no_agent_available_say_voice',
|
85
|
+
:'play_audio_uuid' => :'play_audio_uuid',
|
86
|
+
:'record_call' => :'record_call',
|
87
|
+
:'say' => :'say',
|
88
|
+
:'say_voice' => :'say_voice',
|
89
|
+
:'twilio_taskrouter_workflow_sid' => :'twilio_taskrouter_workflow_sid',
|
90
|
+
:'twilio_workspace_queue_sid' => :'twilio_workspace_queue_sid',
|
91
|
+
:'voicemail' => :'voicemail'
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# Returns all the JSON keys this model knows about
|
96
|
+
def self.acceptable_attributes
|
97
|
+
attribute_map.values
|
98
|
+
end
|
99
|
+
|
100
|
+
# Attribute type mapping.
|
101
|
+
def self.openapi_types
|
102
|
+
{
|
103
|
+
:'announce_queue_position' => :'Boolean',
|
104
|
+
:'conversation_pbx_queue_uuid' => :'String',
|
105
|
+
:'conversation_voicemail_mailbox_uuid' => :'String',
|
106
|
+
:'hold_conversation_pbx_audio_uuid' => :'String',
|
107
|
+
:'max_hold_seconds' => :'Integer',
|
108
|
+
:'members' => :'ConversationPbxQueueMembers',
|
109
|
+
:'merchant_id' => :'String',
|
110
|
+
:'name' => :'String',
|
111
|
+
:'no_agent_available_play_audio_uuid' => :'String',
|
112
|
+
:'no_agent_available_say' => :'String',
|
113
|
+
:'no_agent_available_say_voice' => :'String',
|
114
|
+
:'play_audio_uuid' => :'String',
|
115
|
+
:'record_call' => :'Boolean',
|
116
|
+
:'say' => :'String',
|
117
|
+
:'say_voice' => :'String',
|
118
|
+
:'twilio_taskrouter_workflow_sid' => :'String',
|
119
|
+
:'twilio_workspace_queue_sid' => :'String',
|
120
|
+
:'voicemail' => :'Boolean'
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
# List of attributes with nullable: true
|
125
|
+
def self.openapi_nullable
|
126
|
+
Set.new([
|
127
|
+
])
|
128
|
+
end
|
129
|
+
|
130
|
+
# Initializes the object
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
def initialize(attributes = {})
|
133
|
+
if (!attributes.is_a?(Hash))
|
134
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxQueue` initialize method"
|
135
|
+
end
|
136
|
+
|
137
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
138
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
139
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
140
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxQueue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
141
|
+
end
|
142
|
+
h[k.to_sym] = v
|
143
|
+
}
|
144
|
+
|
145
|
+
if attributes.key?(:'announce_queue_position')
|
146
|
+
self.announce_queue_position = attributes[:'announce_queue_position']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'conversation_pbx_queue_uuid')
|
150
|
+
self.conversation_pbx_queue_uuid = attributes[:'conversation_pbx_queue_uuid']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'conversation_voicemail_mailbox_uuid')
|
154
|
+
self.conversation_voicemail_mailbox_uuid = attributes[:'conversation_voicemail_mailbox_uuid']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'hold_conversation_pbx_audio_uuid')
|
158
|
+
self.hold_conversation_pbx_audio_uuid = attributes[:'hold_conversation_pbx_audio_uuid']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.key?(:'max_hold_seconds')
|
162
|
+
self.max_hold_seconds = attributes[:'max_hold_seconds']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'members')
|
166
|
+
self.members = attributes[:'members']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'merchant_id')
|
170
|
+
self.merchant_id = attributes[:'merchant_id']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'name')
|
174
|
+
self.name = attributes[:'name']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'no_agent_available_play_audio_uuid')
|
178
|
+
self.no_agent_available_play_audio_uuid = attributes[:'no_agent_available_play_audio_uuid']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'no_agent_available_say')
|
182
|
+
self.no_agent_available_say = attributes[:'no_agent_available_say']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'no_agent_available_say_voice')
|
186
|
+
self.no_agent_available_say_voice = attributes[:'no_agent_available_say_voice']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'play_audio_uuid')
|
190
|
+
self.play_audio_uuid = attributes[:'play_audio_uuid']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.key?(:'record_call')
|
194
|
+
self.record_call = attributes[:'record_call']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.key?(:'say')
|
198
|
+
self.say = attributes[:'say']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.key?(:'say_voice')
|
202
|
+
self.say_voice = attributes[:'say_voice']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.key?(:'twilio_taskrouter_workflow_sid')
|
206
|
+
self.twilio_taskrouter_workflow_sid = attributes[:'twilio_taskrouter_workflow_sid']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'twilio_workspace_queue_sid')
|
210
|
+
self.twilio_workspace_queue_sid = attributes[:'twilio_workspace_queue_sid']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.key?(:'voicemail')
|
214
|
+
self.voicemail = attributes[:'voicemail']
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
219
|
+
# @return Array for valid properties with the reasons
|
220
|
+
def list_invalid_properties
|
221
|
+
invalid_properties = Array.new
|
222
|
+
if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
|
223
|
+
invalid_properties.push('invalid value for "conversation_voicemail_mailbox_uuid", the character length must be smaller than or equal to 50.')
|
224
|
+
end
|
225
|
+
|
226
|
+
if !@hold_conversation_pbx_audio_uuid.nil? && @hold_conversation_pbx_audio_uuid.to_s.length > 50
|
227
|
+
invalid_properties.push('invalid value for "hold_conversation_pbx_audio_uuid", the character length must be smaller than or equal to 50.')
|
228
|
+
end
|
229
|
+
|
230
|
+
if !@merchant_id.nil? && @merchant_id.to_s.length > 5
|
231
|
+
invalid_properties.push('invalid value for "merchant_id", the character length must be smaller than or equal to 5.')
|
232
|
+
end
|
233
|
+
|
234
|
+
if !@name.nil? && @name.to_s.length > 50
|
235
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
|
236
|
+
end
|
237
|
+
|
238
|
+
if !@no_agent_available_play_audio_uuid.nil? && @no_agent_available_play_audio_uuid.to_s.length > 50
|
239
|
+
invalid_properties.push('invalid value for "no_agent_available_play_audio_uuid", the character length must be smaller than or equal to 50.')
|
240
|
+
end
|
241
|
+
|
242
|
+
if !@no_agent_available_say_voice.nil? && @no_agent_available_say_voice.to_s.length > 50
|
243
|
+
invalid_properties.push('invalid value for "no_agent_available_say_voice", the character length must be smaller than or equal to 50.')
|
244
|
+
end
|
245
|
+
|
246
|
+
if !@play_audio_uuid.nil? && @play_audio_uuid.to_s.length > 50
|
247
|
+
invalid_properties.push('invalid value for "play_audio_uuid", the character length must be smaller than or equal to 50.')
|
248
|
+
end
|
249
|
+
|
250
|
+
if !@say_voice.nil? && @say_voice.to_s.length > 50
|
251
|
+
invalid_properties.push('invalid value for "say_voice", the character length must be smaller than or equal to 50.')
|
252
|
+
end
|
253
|
+
|
254
|
+
if !@twilio_taskrouter_workflow_sid.nil? && @twilio_taskrouter_workflow_sid.to_s.length > 100
|
255
|
+
invalid_properties.push('invalid value for "twilio_taskrouter_workflow_sid", the character length must be smaller than or equal to 100.')
|
256
|
+
end
|
257
|
+
|
258
|
+
if !@twilio_workspace_queue_sid.nil? && @twilio_workspace_queue_sid.to_s.length > 50
|
259
|
+
invalid_properties.push('invalid value for "twilio_workspace_queue_sid", the character length must be smaller than or equal to 50.')
|
260
|
+
end
|
261
|
+
|
262
|
+
invalid_properties
|
263
|
+
end
|
264
|
+
|
265
|
+
# Check to see if the all the properties in the model are valid
|
266
|
+
# @return true if the model is valid
|
267
|
+
def valid?
|
268
|
+
return false if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
|
269
|
+
return false if !@hold_conversation_pbx_audio_uuid.nil? && @hold_conversation_pbx_audio_uuid.to_s.length > 50
|
270
|
+
return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
|
271
|
+
return false if !@name.nil? && @name.to_s.length > 50
|
272
|
+
return false if !@no_agent_available_play_audio_uuid.nil? && @no_agent_available_play_audio_uuid.to_s.length > 50
|
273
|
+
return false if !@no_agent_available_say_voice.nil? && @no_agent_available_say_voice.to_s.length > 50
|
274
|
+
return false if !@play_audio_uuid.nil? && @play_audio_uuid.to_s.length > 50
|
275
|
+
return false if !@say_voice.nil? && @say_voice.to_s.length > 50
|
276
|
+
return false if !@twilio_taskrouter_workflow_sid.nil? && @twilio_taskrouter_workflow_sid.to_s.length > 100
|
277
|
+
return false if !@twilio_workspace_queue_sid.nil? && @twilio_workspace_queue_sid.to_s.length > 50
|
278
|
+
true
|
279
|
+
end
|
280
|
+
|
281
|
+
# Custom attribute writer method with validation
|
282
|
+
# @param [Object] conversation_voicemail_mailbox_uuid Value to be assigned
|
283
|
+
def conversation_voicemail_mailbox_uuid=(conversation_voicemail_mailbox_uuid)
|
284
|
+
if !conversation_voicemail_mailbox_uuid.nil? && conversation_voicemail_mailbox_uuid.to_s.length > 50
|
285
|
+
fail ArgumentError, 'invalid value for "conversation_voicemail_mailbox_uuid", the character length must be smaller than or equal to 50.'
|
286
|
+
end
|
287
|
+
|
288
|
+
@conversation_voicemail_mailbox_uuid = conversation_voicemail_mailbox_uuid
|
289
|
+
end
|
290
|
+
|
291
|
+
# Custom attribute writer method with validation
|
292
|
+
# @param [Object] hold_conversation_pbx_audio_uuid Value to be assigned
|
293
|
+
def hold_conversation_pbx_audio_uuid=(hold_conversation_pbx_audio_uuid)
|
294
|
+
if !hold_conversation_pbx_audio_uuid.nil? && hold_conversation_pbx_audio_uuid.to_s.length > 50
|
295
|
+
fail ArgumentError, 'invalid value for "hold_conversation_pbx_audio_uuid", the character length must be smaller than or equal to 50.'
|
296
|
+
end
|
297
|
+
|
298
|
+
@hold_conversation_pbx_audio_uuid = hold_conversation_pbx_audio_uuid
|
299
|
+
end
|
300
|
+
|
301
|
+
# Custom attribute writer method with validation
|
302
|
+
# @param [Object] merchant_id Value to be assigned
|
303
|
+
def merchant_id=(merchant_id)
|
304
|
+
if !merchant_id.nil? && merchant_id.to_s.length > 5
|
305
|
+
fail ArgumentError, 'invalid value for "merchant_id", the character length must be smaller than or equal to 5.'
|
306
|
+
end
|
307
|
+
|
308
|
+
@merchant_id = merchant_id
|
309
|
+
end
|
310
|
+
|
311
|
+
# Custom attribute writer method with validation
|
312
|
+
# @param [Object] name Value to be assigned
|
313
|
+
def name=(name)
|
314
|
+
if !name.nil? && name.to_s.length > 50
|
315
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 50.'
|
316
|
+
end
|
317
|
+
|
318
|
+
@name = name
|
319
|
+
end
|
320
|
+
|
321
|
+
# Custom attribute writer method with validation
|
322
|
+
# @param [Object] no_agent_available_play_audio_uuid Value to be assigned
|
323
|
+
def no_agent_available_play_audio_uuid=(no_agent_available_play_audio_uuid)
|
324
|
+
if !no_agent_available_play_audio_uuid.nil? && no_agent_available_play_audio_uuid.to_s.length > 50
|
325
|
+
fail ArgumentError, 'invalid value for "no_agent_available_play_audio_uuid", the character length must be smaller than or equal to 50.'
|
326
|
+
end
|
327
|
+
|
328
|
+
@no_agent_available_play_audio_uuid = no_agent_available_play_audio_uuid
|
329
|
+
end
|
330
|
+
|
331
|
+
# Custom attribute writer method with validation
|
332
|
+
# @param [Object] no_agent_available_say_voice Value to be assigned
|
333
|
+
def no_agent_available_say_voice=(no_agent_available_say_voice)
|
334
|
+
if !no_agent_available_say_voice.nil? && no_agent_available_say_voice.to_s.length > 50
|
335
|
+
fail ArgumentError, 'invalid value for "no_agent_available_say_voice", the character length must be smaller than or equal to 50.'
|
336
|
+
end
|
337
|
+
|
338
|
+
@no_agent_available_say_voice = no_agent_available_say_voice
|
339
|
+
end
|
340
|
+
|
341
|
+
# Custom attribute writer method with validation
|
342
|
+
# @param [Object] play_audio_uuid Value to be assigned
|
343
|
+
def play_audio_uuid=(play_audio_uuid)
|
344
|
+
if !play_audio_uuid.nil? && play_audio_uuid.to_s.length > 50
|
345
|
+
fail ArgumentError, 'invalid value for "play_audio_uuid", the character length must be smaller than or equal to 50.'
|
346
|
+
end
|
347
|
+
|
348
|
+
@play_audio_uuid = play_audio_uuid
|
349
|
+
end
|
350
|
+
|
351
|
+
# Custom attribute writer method with validation
|
352
|
+
# @param [Object] say_voice Value to be assigned
|
353
|
+
def say_voice=(say_voice)
|
354
|
+
if !say_voice.nil? && say_voice.to_s.length > 50
|
355
|
+
fail ArgumentError, 'invalid value for "say_voice", the character length must be smaller than or equal to 50.'
|
356
|
+
end
|
357
|
+
|
358
|
+
@say_voice = say_voice
|
359
|
+
end
|
360
|
+
|
361
|
+
# Custom attribute writer method with validation
|
362
|
+
# @param [Object] twilio_taskrouter_workflow_sid Value to be assigned
|
363
|
+
def twilio_taskrouter_workflow_sid=(twilio_taskrouter_workflow_sid)
|
364
|
+
if !twilio_taskrouter_workflow_sid.nil? && twilio_taskrouter_workflow_sid.to_s.length > 100
|
365
|
+
fail ArgumentError, 'invalid value for "twilio_taskrouter_workflow_sid", the character length must be smaller than or equal to 100.'
|
366
|
+
end
|
367
|
+
|
368
|
+
@twilio_taskrouter_workflow_sid = twilio_taskrouter_workflow_sid
|
369
|
+
end
|
370
|
+
|
371
|
+
# Custom attribute writer method with validation
|
372
|
+
# @param [Object] twilio_workspace_queue_sid Value to be assigned
|
373
|
+
def twilio_workspace_queue_sid=(twilio_workspace_queue_sid)
|
374
|
+
if !twilio_workspace_queue_sid.nil? && twilio_workspace_queue_sid.to_s.length > 50
|
375
|
+
fail ArgumentError, 'invalid value for "twilio_workspace_queue_sid", the character length must be smaller than or equal to 50.'
|
376
|
+
end
|
377
|
+
|
378
|
+
@twilio_workspace_queue_sid = twilio_workspace_queue_sid
|
379
|
+
end
|
380
|
+
|
381
|
+
# Checks equality by comparing each attribute.
|
382
|
+
# @param [Object] Object to be compared
|
383
|
+
def ==(o)
|
384
|
+
return true if self.equal?(o)
|
385
|
+
self.class == o.class &&
|
386
|
+
announce_queue_position == o.announce_queue_position &&
|
387
|
+
conversation_pbx_queue_uuid == o.conversation_pbx_queue_uuid &&
|
388
|
+
conversation_voicemail_mailbox_uuid == o.conversation_voicemail_mailbox_uuid &&
|
389
|
+
hold_conversation_pbx_audio_uuid == o.hold_conversation_pbx_audio_uuid &&
|
390
|
+
max_hold_seconds == o.max_hold_seconds &&
|
391
|
+
members == o.members &&
|
392
|
+
merchant_id == o.merchant_id &&
|
393
|
+
name == o.name &&
|
394
|
+
no_agent_available_play_audio_uuid == o.no_agent_available_play_audio_uuid &&
|
395
|
+
no_agent_available_say == o.no_agent_available_say &&
|
396
|
+
no_agent_available_say_voice == o.no_agent_available_say_voice &&
|
397
|
+
play_audio_uuid == o.play_audio_uuid &&
|
398
|
+
record_call == o.record_call &&
|
399
|
+
say == o.say &&
|
400
|
+
say_voice == o.say_voice &&
|
401
|
+
twilio_taskrouter_workflow_sid == o.twilio_taskrouter_workflow_sid &&
|
402
|
+
twilio_workspace_queue_sid == o.twilio_workspace_queue_sid &&
|
403
|
+
voicemail == o.voicemail
|
404
|
+
end
|
405
|
+
|
406
|
+
# @see the `==` method
|
407
|
+
# @param [Object] Object to be compared
|
408
|
+
def eql?(o)
|
409
|
+
self == o
|
410
|
+
end
|
411
|
+
|
412
|
+
# Calculates hash code according to all attributes.
|
413
|
+
# @return [Integer] Hash code
|
414
|
+
def hash
|
415
|
+
[announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail].hash
|
416
|
+
end
|
417
|
+
|
418
|
+
# Builds the object from hash
|
419
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
420
|
+
# @return [Object] Returns the model itself
|
421
|
+
def self.build_from_hash(attributes)
|
422
|
+
new.build_from_hash(attributes)
|
423
|
+
end
|
424
|
+
|
425
|
+
# Builds the object from hash
|
426
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
427
|
+
# @return [Object] Returns the model itself
|
428
|
+
def build_from_hash(attributes)
|
429
|
+
return nil unless attributes.is_a?(Hash)
|
430
|
+
attributes = attributes.transform_keys(&:to_sym)
|
431
|
+
self.class.openapi_types.each_pair do |key, type|
|
432
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
433
|
+
self.send("#{key}=", nil)
|
434
|
+
elsif type =~ /\AArray<(.*)>/i
|
435
|
+
# check to ensure the input is an array given that the attribute
|
436
|
+
# is documented as an array but the input is not
|
437
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
438
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
439
|
+
end
|
440
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
441
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
self
|
446
|
+
end
|
447
|
+
|
448
|
+
# Deserializes the data based on type
|
449
|
+
# @param string type Data type
|
450
|
+
# @param string value Value to be deserialized
|
451
|
+
# @return [Object] Deserialized data
|
452
|
+
def _deserialize(type, value)
|
453
|
+
case type.to_sym
|
454
|
+
when :Time
|
455
|
+
Time.parse(value)
|
456
|
+
when :Date
|
457
|
+
Date.parse(value)
|
458
|
+
when :String
|
459
|
+
value.to_s
|
460
|
+
when :Integer
|
461
|
+
value.to_i
|
462
|
+
when :Float
|
463
|
+
value.to_f
|
464
|
+
when :Boolean
|
465
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
466
|
+
true
|
467
|
+
else
|
468
|
+
false
|
469
|
+
end
|
470
|
+
when :Object
|
471
|
+
# generic object (usually a Hash), return directly
|
472
|
+
value
|
473
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
474
|
+
inner_type = Regexp.last_match[:inner_type]
|
475
|
+
value.map { |v| _deserialize(inner_type, v) }
|
476
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
477
|
+
k_type = Regexp.last_match[:k_type]
|
478
|
+
v_type = Regexp.last_match[:v_type]
|
479
|
+
{}.tap do |hash|
|
480
|
+
value.each do |k, v|
|
481
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
482
|
+
end
|
483
|
+
end
|
484
|
+
else # model
|
485
|
+
# models (e.g. Pet) or oneOf
|
486
|
+
klass = UltracartClient.const_get(type)
|
487
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
# Returns the string representation of the object
|
492
|
+
# @return [String] String presentation of the object
|
493
|
+
def to_s
|
494
|
+
to_hash.to_s
|
495
|
+
end
|
496
|
+
|
497
|
+
# to_body is an alias to to_hash (backward compatibility)
|
498
|
+
# @return [Hash] Returns the object in the form of hash
|
499
|
+
def to_body
|
500
|
+
to_hash
|
501
|
+
end
|
502
|
+
|
503
|
+
# Returns the object in the form of hash
|
504
|
+
# @return [Hash] Returns the object in the form of hash
|
505
|
+
def to_hash
|
506
|
+
hash = {}
|
507
|
+
self.class.attribute_map.each_pair do |attr, param|
|
508
|
+
value = self.send(attr)
|
509
|
+
if value.nil?
|
510
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
511
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
512
|
+
end
|
513
|
+
|
514
|
+
hash[param] = _to_hash(value)
|
515
|
+
end
|
516
|
+
hash
|
517
|
+
end
|
518
|
+
|
519
|
+
# Outputs non-array value in the form of hash
|
520
|
+
# For object, use to_hash. Otherwise, just return the value
|
521
|
+
# @param [Object] value Any valid value
|
522
|
+
# @return [Hash] Returns the value in the form of hash
|
523
|
+
def _to_hash(value)
|
524
|
+
if value.is_a?(Array)
|
525
|
+
value.compact.map { |v| _to_hash(v) }
|
526
|
+
elsif value.is_a?(Hash)
|
527
|
+
{}.tap do |hash|
|
528
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
529
|
+
end
|
530
|
+
elsif value.respond_to? :to_hash
|
531
|
+
value.to_hash
|
532
|
+
else
|
533
|
+
value
|
534
|
+
end
|
535
|
+
end
|
536
|
+
|
537
|
+
end
|
538
|
+
|
539
|
+
end
|