Class: UltracartClient::ConversationPbxQueue

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/conversation_pbx_queue.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ConversationPbxQueue

Initializes the object



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 147

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxQueue` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      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
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'announce_queue_position')
    self.announce_queue_position = attributes[:'announce_queue_position']
  end

  if attributes.key?(:'conversation_pbx_queue_uuid')
    self.conversation_pbx_queue_uuid = attributes[:'conversation_pbx_queue_uuid']
  end

  if attributes.key?(:'conversation_voicemail_mailbox_uuid')
    self.conversation_voicemail_mailbox_uuid = attributes[:'conversation_voicemail_mailbox_uuid']
  end

  if attributes.key?(:'hold_conversation_pbx_audio_uuid')
    self.hold_conversation_pbx_audio_uuid = attributes[:'hold_conversation_pbx_audio_uuid']
  end

  if attributes.key?(:'max_hold_seconds')
    self.max_hold_seconds = attributes[:'max_hold_seconds']
  end

  if attributes.key?(:'members')
    self.members = attributes[:'members']
  end

  if attributes.key?(:'merchant_id')
    self.merchant_id = attributes[:'merchant_id']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'no_agent_available_play_audio_uuid')
    self.no_agent_available_play_audio_uuid = attributes[:'no_agent_available_play_audio_uuid']
  end

  if attributes.key?(:'no_agent_available_say')
    self.no_agent_available_say = attributes[:'no_agent_available_say']
  end

  if attributes.key?(:'no_agent_available_say_voice')
    self.no_agent_available_say_voice = attributes[:'no_agent_available_say_voice']
  end

  if attributes.key?(:'play_audio_uuid')
    self.play_audio_uuid = attributes[:'play_audio_uuid']
  end

  if attributes.key?(:'record_call')
    self.record_call = attributes[:'record_call']
  end

  if attributes.key?(:'say')
    self.say = attributes[:'say']
  end

  if attributes.key?(:'say_voice')
    self.say_voice = attributes[:'say_voice']
  end

  if attributes.key?(:'twilio_taskrouter_workflow_sid')
    self.twilio_taskrouter_workflow_sid = attributes[:'twilio_taskrouter_workflow_sid']
  end

  if attributes.key?(:'twilio_workspace_queue_sid')
    self.twilio_workspace_queue_sid = attributes[:'twilio_workspace_queue_sid']
  end

  if attributes.key?(:'voicemail')
    self.voicemail = attributes[:'voicemail']
  end

  if attributes.key?(:'wait_critical_seconds')
    self.wait_critical_seconds = attributes[:'wait_critical_seconds']
  end

  if attributes.key?(:'wait_warning_seconds')
    self.wait_warning_seconds = attributes[:'wait_warning_seconds']
  end

  if attributes.key?(:'wrap_up_seconds')
    self.wrap_up_seconds = attributes[:'wrap_up_seconds']
  end
end

Instance Attribute Details

#announce_queue_positionObject

If true, the customer is told their queue position upon entering the queue



19
20
21
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 19

def announce_queue_position
  @announce_queue_position
end

#conversation_pbx_queue_uuidObject

Conversation Pbx Queue unique identifier



22
23
24
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 22

def conversation_pbx_queue_uuid
  @conversation_pbx_queue_uuid
end

#conversation_voicemail_mailbox_uuidObject

The voicemail mailbox associated with this queue



25
26
27
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 25

def conversation_voicemail_mailbox_uuid
  @conversation_voicemail_mailbox_uuid
end

#hold_conversation_pbx_audio_uuidObject

The audio to play while holding in a queue



28
29
30
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 28

def hold_conversation_pbx_audio_uuid
  @hold_conversation_pbx_audio_uuid
end

#max_hold_secondsObject

The maximum number of seconds for a customer to hold in a queue



31
32
33
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 31

def max_hold_seconds
  @max_hold_seconds
end

#membersObject

Returns the value of attribute members.



33
34
35
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 33

def members
  @members
end

#merchant_idObject

Merchant Id



36
37
38
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 36

def merchant_id
  @merchant_id
end

#nameObject

Name of queue



39
40
41
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 39

def name
  @name
end

#no_agent_available_play_audio_uuidObject

When no agent is available after the max_hold_seconds, say this



42
43
44
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 42

def no_agent_available_play_audio_uuid
  @no_agent_available_play_audio_uuid
end

#no_agent_available_sayObject

When no agent is available after the max_hold_seconds, say this



45
46
47
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 45

def no_agent_available_say
  @no_agent_available_say
end

#no_agent_available_say_voiceObject

The type of voice used to say text when no agent is available



48
49
50
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 48

def no_agent_available_say_voice
  @no_agent_available_say_voice
end

#play_audio_uuidObject

Audio played when customer enters a queue



51
52
53
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 51

def play_audio_uuid
  @play_audio_uuid
end

#record_callObject

If true, any calls in this queue are recorded



54
55
56
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 54

def record_call
  @record_call
end

#sayObject

Say text when a customer enters queue



57
58
59
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 57

def say
  @say
end

#say_voiceObject

The type of voice to use when say text is spoken



60
61
62
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 60

def say_voice
  @say_voice
end

#twilio_taskrouter_workflow_sidObject

Twilio taskrouter workflow sid



63
64
65
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 63

def twilio_taskrouter_workflow_sid
  @twilio_taskrouter_workflow_sid
end

#twilio_workspace_queue_sidObject

Twilio workspace queue sid



66
67
68
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 66

def twilio_workspace_queue_sid
  @twilio_workspace_queue_sid
end

#voicemailObject

If true, this queue has a voicemail associated with it



69
70
71
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 69

def voicemail
  @voicemail
end

#wait_critical_secondsObject

Wait time in seconds before critical



72
73
74
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 72

def wait_critical_seconds
  @wait_critical_seconds
end

#wait_warning_secondsObject

Wait time in seconds before warning



75
76
77
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 75

def wait_warning_seconds
  @wait_warning_seconds
end

#wrap_up_secondsObject

Wrap up time in seconds



78
79
80
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 78

def wrap_up_seconds
  @wrap_up_seconds
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



108
109
110
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 108

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 81

def self.attribute_map
  {
    :'announce_queue_position' => :'announce_queue_position',
    :'conversation_pbx_queue_uuid' => :'conversation_pbx_queue_uuid',
    :'conversation_voicemail_mailbox_uuid' => :'conversation_voicemail_mailbox_uuid',
    :'hold_conversation_pbx_audio_uuid' => :'hold_conversation_pbx_audio_uuid',
    :'max_hold_seconds' => :'max_hold_seconds',
    :'members' => :'members',
    :'merchant_id' => :'merchant_id',
    :'name' => :'name',
    :'no_agent_available_play_audio_uuid' => :'no_agent_available_play_audio_uuid',
    :'no_agent_available_say' => :'no_agent_available_say',
    :'no_agent_available_say_voice' => :'no_agent_available_say_voice',
    :'play_audio_uuid' => :'play_audio_uuid',
    :'record_call' => :'record_call',
    :'say' => :'say',
    :'say_voice' => :'say_voice',
    :'twilio_taskrouter_workflow_sid' => :'twilio_taskrouter_workflow_sid',
    :'twilio_workspace_queue_sid' => :'twilio_workspace_queue_sid',
    :'voicemail' => :'voicemail',
    :'wait_critical_seconds' => :'wait_critical_seconds',
    :'wait_warning_seconds' => :'wait_warning_seconds',
    :'wrap_up_seconds' => :'wrap_up_seconds'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash



451
452
453
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 451

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



140
141
142
143
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 140

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 113

def self.openapi_types
  {
    :'announce_queue_position' => :'Boolean',
    :'conversation_pbx_queue_uuid' => :'String',
    :'conversation_voicemail_mailbox_uuid' => :'String',
    :'hold_conversation_pbx_audio_uuid' => :'String',
    :'max_hold_seconds' => :'Integer',
    :'members' => :'ConversationPbxQueueMembers',
    :'merchant_id' => :'String',
    :'name' => :'String',
    :'no_agent_available_play_audio_uuid' => :'String',
    :'no_agent_available_say' => :'String',
    :'no_agent_available_say_voice' => :'String',
    :'play_audio_uuid' => :'String',
    :'record_call' => :'Boolean',
    :'say' => :'String',
    :'say_voice' => :'String',
    :'twilio_taskrouter_workflow_sid' => :'String',
    :'twilio_workspace_queue_sid' => :'String',
    :'voicemail' => :'Boolean',
    :'wait_critical_seconds' => :'Integer',
    :'wait_warning_seconds' => :'Integer',
    :'wrap_up_seconds' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 410

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      announce_queue_position == o.announce_queue_position &&
      conversation_pbx_queue_uuid == o.conversation_pbx_queue_uuid &&
      conversation_voicemail_mailbox_uuid == o.conversation_voicemail_mailbox_uuid &&
      hold_conversation_pbx_audio_uuid == o.hold_conversation_pbx_audio_uuid &&
      max_hold_seconds == o.max_hold_seconds &&
      members == o.members &&
      merchant_id == o.merchant_id &&
      name == o.name &&
      no_agent_available_play_audio_uuid == o.no_agent_available_play_audio_uuid &&
      no_agent_available_say == o.no_agent_available_say &&
      no_agent_available_say_voice == o.no_agent_available_say_voice &&
      play_audio_uuid == o.play_audio_uuid &&
      record_call == o.record_call &&
      say == o.say &&
      say_voice == o.say_voice &&
      twilio_taskrouter_workflow_sid == o.twilio_taskrouter_workflow_sid &&
      twilio_workspace_queue_sid == o.twilio_workspace_queue_sid &&
      voicemail == o.voicemail &&
      wait_critical_seconds == o.wait_critical_seconds &&
      wait_warning_seconds == o.wait_warning_seconds &&
      wrap_up_seconds == o.wrap_up_seconds
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type



482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 482

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = UltracartClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value



553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 553

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash



458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 458

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

See Also:

  • `==` method


438
439
440
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 438

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.



444
445
446
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 444

def hash
  [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, wrap_up_seconds].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 247

def list_invalid_properties
  invalid_properties = Array.new
  if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
    invalid_properties.push('invalid value for "conversation_voicemail_mailbox_uuid", the character length must be smaller than or equal to 50.')
  end

  if !@hold_conversation_pbx_audio_uuid.nil? && @hold_conversation_pbx_audio_uuid.to_s.length > 50
    invalid_properties.push('invalid value for "hold_conversation_pbx_audio_uuid", the character length must be smaller than or equal to 50.')
  end

  if !@merchant_id.nil? && @merchant_id.to_s.length > 5
    invalid_properties.push('invalid value for "merchant_id", the character length must be smaller than or equal to 5.')
  end

  if !@name.nil? && @name.to_s.length > 50
    invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
  end

  if !@no_agent_available_play_audio_uuid.nil? && @no_agent_available_play_audio_uuid.to_s.length > 50
    invalid_properties.push('invalid value for "no_agent_available_play_audio_uuid", the character length must be smaller than or equal to 50.')
  end

  if !@no_agent_available_say_voice.nil? && @no_agent_available_say_voice.to_s.length > 50
    invalid_properties.push('invalid value for "no_agent_available_say_voice", the character length must be smaller than or equal to 50.')
  end

  if !@play_audio_uuid.nil? && @play_audio_uuid.to_s.length > 50
    invalid_properties.push('invalid value for "play_audio_uuid", the character length must be smaller than or equal to 50.')
  end

  if !@say_voice.nil? && @say_voice.to_s.length > 50
    invalid_properties.push('invalid value for "say_voice", the character length must be smaller than or equal to 50.')
  end

  if !@twilio_taskrouter_workflow_sid.nil? && @twilio_taskrouter_workflow_sid.to_s.length > 100
    invalid_properties.push('invalid value for "twilio_taskrouter_workflow_sid", the character length must be smaller than or equal to 100.')
  end

  if !@twilio_workspace_queue_sid.nil? && @twilio_workspace_queue_sid.to_s.length > 50
    invalid_properties.push('invalid value for "twilio_workspace_queue_sid", the character length must be smaller than or equal to 50.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)



529
530
531
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 529

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash



535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 535

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object



523
524
525
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 523

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid



294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/ultracart_api/models/conversation_pbx_queue.rb', line 294

def valid?
  return false if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
  return false if !@hold_conversation_pbx_audio_uuid.nil? && @hold_conversation_pbx_audio_uuid.to_s.length > 50
  return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
  return false if !@name.nil? && @name.to_s.length > 50
  return false if !@no_agent_available_play_audio_uuid.nil? && @no_agent_available_play_audio_uuid.to_s.length > 50
  return false if !@no_agent_available_say_voice.nil? && @no_agent_available_say_voice.to_s.length > 50
  return false if !@play_audio_uuid.nil? && @play_audio_uuid.to_s.length > 50
  return false if !@say_voice.nil? && @say_voice.to_s.length > 50
  return false if !@twilio_taskrouter_workflow_sid.nil? && @twilio_taskrouter_workflow_sid.to_s.length > 100
  return false if !@twilio_workspace_queue_sid.nil? && @twilio_workspace_queue_sid.to_s.length > 50
  true
end