ultracart_api 4.0.201 → 4.0.203

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