Class: UltracartClient::ConversationPbxCall
- Inherits:
-
Object
- Object
- UltracartClient::ConversationPbxCall
- Defined in:
- lib/ultracart_api/models/conversation_pbx_call.rb
Instance Attribute Summary collapse
-
#account_sid ⇒ Object
Twilio account SID.
-
#agents ⇒ Object
List of agents who participated in this call.
-
#ai_agent_engagements ⇒ Object
List of AI agent engagements during the call.
-
#call_sid ⇒ Object
Twilio call SID for the primary (customer) call leg.
-
#call_uuid ⇒ Object
Unique identifier for this call record.
-
#caller ⇒ Object
Returns the value of attribute caller.
-
#conference_sid ⇒ Object
Twilio conference SID if this call used conferencing.
-
#created_at_dts ⇒ Object
Timestamp when the call record was created.
-
#customer_name ⇒ Object
Customer name associated with this call.
-
#customer_profile_oid ⇒ Object
UltraCart customer profile OID if the caller was matched to a customer.
-
#disposition ⇒ Object
Call disposition describing how the call ended.
-
#email ⇒ Object
Email address of the caller if known.
-
#financial ⇒ Object
Returns the value of attribute financial.
-
#holds ⇒ Object
List of hold events during the call.
-
#merchant_id ⇒ Object
Merchant identifier.
-
#recording_sids ⇒ Object
List of all Twilio recording SIDs associated with this call.
-
#recordings ⇒ Object
List of recordings made during the call.
-
#routing ⇒ Object
Returns the value of attribute routing.
-
#status ⇒ Object
Final status of the call.
-
#timeline ⇒ Object
Returns the value of attribute timeline.
-
#transfers ⇒ Object
List of transfer events during the call.
-
#updated_at_dts ⇒ Object
Timestamp when the call record was last updated.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ConversationPbxCall
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ConversationPbxCall
Initializes the object
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 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 149 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxCall` 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::ConversationPbxCall`. 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?(:'account_sid') self.account_sid = attributes[:'account_sid'] end if attributes.key?(:'agents') if (value = attributes[:'agents']).is_a?(Array) self.agents = value end end if attributes.key?(:'ai_agent_engagements') if (value = attributes[:'ai_agent_engagements']).is_a?(Array) self.ai_agent_engagements = value end end if attributes.key?(:'call_sid') self.call_sid = attributes[:'call_sid'] end if attributes.key?(:'call_uuid') self.call_uuid = attributes[:'call_uuid'] end if attributes.key?(:'caller') self.caller = attributes[:'caller'] end if attributes.key?(:'conference_sid') self.conference_sid = attributes[:'conference_sid'] end if attributes.key?(:'created_at_dts') self.created_at_dts = attributes[:'created_at_dts'] end if attributes.key?(:'customer_name') self.customer_name = attributes[:'customer_name'] end if attributes.key?(:'customer_profile_oid') self.customer_profile_oid = attributes[:'customer_profile_oid'] end if attributes.key?(:'disposition') self.disposition = attributes[:'disposition'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'financial') self.financial = attributes[:'financial'] end if attributes.key?(:'holds') if (value = attributes[:'holds']).is_a?(Array) self.holds = value end end if attributes.key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.key?(:'recording_sids') if (value = attributes[:'recording_sids']).is_a?(Array) self.recording_sids = value end end if attributes.key?(:'recordings') if (value = attributes[:'recordings']).is_a?(Array) self.recordings = value end end if attributes.key?(:'routing') self.routing = attributes[:'routing'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'timeline') self.timeline = attributes[:'timeline'] end if attributes.key?(:'transfers') if (value = attributes[:'transfers']).is_a?(Array) self.transfers = value end end if attributes.key?(:'updated_at_dts') self.updated_at_dts = attributes[:'updated_at_dts'] end end |
Instance Attribute Details
#account_sid ⇒ Object
Twilio account SID
19 20 21 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 19 def account_sid @account_sid end |
#agents ⇒ Object
List of agents who participated in this call
22 23 24 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 22 def agents @agents end |
#ai_agent_engagements ⇒ Object
List of AI agent engagements during the call
25 26 27 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 25 def ai_agent_engagements @ai_agent_engagements end |
#call_sid ⇒ Object
Twilio call SID for the primary (customer) call leg
28 29 30 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 28 def call_sid @call_sid end |
#call_uuid ⇒ Object
Unique identifier for this call record
31 32 33 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 31 def call_uuid @call_uuid end |
#caller ⇒ Object
Returns the value of attribute caller.
33 34 35 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 33 def caller @caller end |
#conference_sid ⇒ Object
Twilio conference SID if this call used conferencing
36 37 38 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 36 def conference_sid @conference_sid end |
#created_at_dts ⇒ Object
Timestamp when the call record was created
39 40 41 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 39 def created_at_dts @created_at_dts end |
#customer_name ⇒ Object
Customer name associated with this call
42 43 44 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 42 def customer_name @customer_name end |
#customer_profile_oid ⇒ Object
UltraCart customer profile OID if the caller was matched to a customer
45 46 47 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 45 def customer_profile_oid @customer_profile_oid end |
#disposition ⇒ Object
Call disposition describing how the call ended
48 49 50 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 48 def disposition @disposition end |
#email ⇒ Object
Email address of the caller if known
51 52 53 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 51 def email @email end |
#financial ⇒ Object
Returns the value of attribute financial.
53 54 55 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 53 def financial @financial end |
#holds ⇒ Object
List of hold events during the call
56 57 58 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 56 def holds @holds end |
#merchant_id ⇒ Object
Merchant identifier
59 60 61 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 59 def merchant_id @merchant_id end |
#recording_sids ⇒ Object
List of all Twilio recording SIDs associated with this call
62 63 64 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 62 def recording_sids @recording_sids end |
#recordings ⇒ Object
List of recordings made during the call
65 66 67 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 65 def recordings @recordings end |
#routing ⇒ Object
Returns the value of attribute routing.
67 68 69 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 67 def routing @routing end |
#status ⇒ Object
Final status of the call
70 71 72 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 70 def status @status end |
#timeline ⇒ Object
Returns the value of attribute timeline.
72 73 74 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 72 def timeline @timeline end |
#transfers ⇒ Object
List of transfer events during the call
75 76 77 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 75 def transfers @transfers end |
#updated_at_dts ⇒ Object
Timestamp when the call record was last updated
78 79 80 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 78 def updated_at_dts @updated_at_dts end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
109 110 111 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 109 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
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 106 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 81 def self.attribute_map { :'account_sid' => :'account_sid', :'agents' => :'agents', :'ai_agent_engagements' => :'ai_agent_engagements', :'call_sid' => :'call_sid', :'call_uuid' => :'call_uuid', :'caller' => :'caller', :'conference_sid' => :'conference_sid', :'created_at_dts' => :'created_at_dts', :'customer_name' => :'customer_name', :'customer_profile_oid' => :'customer_profile_oid', :'disposition' => :'disposition', :'email' => :'email', :'financial' => :'financial', :'holds' => :'holds', :'merchant_id' => :'merchant_id', :'recording_sids' => :'recording_sids', :'recordings' => :'recordings', :'routing' => :'routing', :'status' => :'status', :'timeline' => :'timeline', :'transfers' => :'transfers', :'updated_at_dts' => :'updated_at_dts' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
320 321 322 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 320 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
142 143 144 145 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 142 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 114 def self.openapi_types { :'account_sid' => :'String', :'agents' => :'Array<ConversationPbxCallAgent>', :'ai_agent_engagements' => :'Array<ConversationPbxCallAiEngagement>', :'call_sid' => :'String', :'call_uuid' => :'String', :'caller' => :'ConversationPbxCallCaller', :'conference_sid' => :'String', :'created_at_dts' => :'String', :'customer_name' => :'String', :'customer_profile_oid' => :'String', :'disposition' => :'String', :'email' => :'String', :'financial' => :'ConversationPbxCallFinancial', :'holds' => :'Array<ConversationPbxCallHold>', :'merchant_id' => :'String', :'recording_sids' => :'Array<String>', :'recordings' => :'Array<ConversationPbxCallRecording>', :'routing' => :'ConversationPbxCallRouting', :'status' => :'String', :'timeline' => :'ConversationPbxCallTimeline', :'transfers' => :'Array<ConversationPbxCallTransfer>', :'updated_at_dts' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 278 def ==(o) return true if self.equal?(o) self.class == o.class && account_sid == o.account_sid && agents == o.agents && ai_agent_engagements == o.ai_agent_engagements && call_sid == o.call_sid && call_uuid == o.call_uuid && caller == o.caller && conference_sid == o.conference_sid && created_at_dts == o.created_at_dts && customer_name == o.customer_name && customer_profile_oid == o.customer_profile_oid && disposition == o.disposition && email == o.email && financial == o.financial && holds == o.holds && merchant_id == o.merchant_id && recording_sids == o.recording_sids && recordings == o.recordings && routing == o.routing && status == o.status && timeline == o.timeline && transfers == o.transfers && updated_at_dts == o.updated_at_dts end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 351 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
422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 422 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
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 327 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
307 308 309 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 307 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
313 314 315 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 313 def hash [account_sid, agents, ai_agent_engagements, call_sid, call_uuid, caller, conference_sid, created_at_dts, customer_name, customer_profile_oid, disposition, email, financial, holds, merchant_id, recording_sids, recordings, routing, status, timeline, transfers, updated_at_dts].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
265 266 267 268 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 265 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
398 399 400 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 398 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 404 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_s ⇒ String
Returns the string representation of the object
392 393 394 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 392 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
272 273 274 |
# File 'lib/ultracart_api/models/conversation_pbx_call.rb', line 272 def valid? true end |