ultracart_api 3.10.184 → 3.10.185

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