ultracart_api 3.10.184 → 3.10.186

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