Class: PureCloud::CampaignInteraction
- Inherits:
-
Object
- Object
- PureCloud::CampaignInteraction
- Defined in:
- lib/purecloudclient_v2a/models/campaign_interaction.rb
Instance Attribute Summary collapse
-
#active_preview_call ⇒ Object
Boolean value if there is an active preview call on the interaction.
-
#agent ⇒ Object
Returns the value of attribute agent.
-
#call_placed_time ⇒ Object
The time when the agent or system places the call.
-
#call_routed_time ⇒ Object
The time when the agent was connected to the call.
-
#caller_address ⇒ Object
Returns the value of attribute caller_address.
-
#caller_name ⇒ Object
Returns the value of attribute caller_name.
-
#campaign ⇒ Object
Returns the value of attribute campaign.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#conversation ⇒ Object
Returns the value of attribute conversation.
-
#creation_time ⇒ Object
The time when dialer created the interaction.
-
#destination_address ⇒ Object
Returns the value of attribute destination_address.
-
#dialer_system_participant_id ⇒ Object
conversation participant id that is the dialer system participant to monitor the call from dialer perspective.
-
#dialing_mode ⇒ Object
Returns the value of attribute dialing_mode.
-
#disposition ⇒ Object
Describes what happened with call analysis for instance: disposition.classification.callable.person, disposition.classification.callable.noanswer.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_active_preview_wrapup_time ⇒ Object
The time when the last preview of the interaction was wrapped up.
-
#preview_connected_time ⇒ Object
The time when the customer and routing participant are connected.
-
#preview_pop_delivered_time ⇒ Object
Date time is represented as an ISO-8601 string.
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#script ⇒ Object
Returns the value of attribute script.
-
#skills ⇒ Object
Any skills that are attached to the call for routing.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #_deserialize(type, value) ⇒ Object
-
#_to_hash(value) ⇒ Object
Method to output non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
build the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CampaignInteraction
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Object
to_body is an alias to to_body (backward compatibility)).
-
#to_hash ⇒ Object
return the object in the form of hash.
- #to_s ⇒ Object
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CampaignInteraction
Initializes the object
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 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 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 173 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'campaign') self.campaign = attributes[:'campaign'] end if attributes.has_key?(:'agent') self.agent = attributes[:'agent'] end if attributes.has_key?(:'contact') self.contact = attributes[:'contact'] end if attributes.has_key?(:'destinationAddress') self.destination_address = attributes[:'destinationAddress'] end if attributes.has_key?(:'activePreviewCall') self.active_preview_call = attributes[:'activePreviewCall'] end if attributes.has_key?(:'lastActivePreviewWrapupTime') self.last_active_preview_wrapup_time = attributes[:'lastActivePreviewWrapupTime'] end if attributes.has_key?(:'creationTime') self.creation_time = attributes[:'creationTime'] end if attributes.has_key?(:'callPlacedTime') self.call_placed_time = attributes[:'callPlacedTime'] end if attributes.has_key?(:'callRoutedTime') self.call_routed_time = attributes[:'callRoutedTime'] end if attributes.has_key?(:'previewConnectedTime') self.preview_connected_time = attributes[:'previewConnectedTime'] end if attributes.has_key?(:'queue') self.queue = attributes[:'queue'] end if attributes.has_key?(:'script') self.script = attributes[:'script'] end if attributes.has_key?(:'disposition') self.disposition = attributes[:'disposition'] end if attributes.has_key?(:'callerName') self.caller_name = attributes[:'callerName'] end if attributes.has_key?(:'callerAddress') self.caller_address = attributes[:'callerAddress'] end if attributes.has_key?(:'previewPopDeliveredTime') self.preview_pop_delivered_time = attributes[:'previewPopDeliveredTime'] end if attributes.has_key?(:'conversation') self.conversation = attributes[:'conversation'] end if attributes.has_key?(:'dialerSystemParticipantId') self.dialer_system_participant_id = attributes[:'dialerSystemParticipantId'] end if attributes.has_key?(:'dialingMode') self.dialing_mode = attributes[:'dialingMode'] end if attributes.has_key?(:'skills') if (value = attributes[:'skills']).is_a?(Array) self.skills = value end end end |
Instance Attribute Details
#active_preview_call ⇒ Object
Boolean value if there is an active preview call on the interaction
32 33 34 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 32 def active_preview_call @active_preview_call end |
#agent ⇒ Object
Returns the value of attribute agent.
25 26 27 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 25 def agent @agent end |
#call_placed_time ⇒ Object
The time when the agent or system places the call. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
41 42 43 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 41 def call_placed_time @call_placed_time end |
#call_routed_time ⇒ Object
The time when the agent was connected to the call. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
44 45 46 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 44 def call_routed_time @call_routed_time end |
#caller_address ⇒ Object
Returns the value of attribute caller_address.
58 59 60 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 58 def caller_address @caller_address end |
#caller_name ⇒ Object
Returns the value of attribute caller_name.
56 57 58 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 56 def caller_name @caller_name end |
#campaign ⇒ Object
Returns the value of attribute campaign.
23 24 25 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 23 def campaign @campaign end |
#contact ⇒ Object
Returns the value of attribute contact.
27 28 29 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 27 def contact @contact end |
#conversation ⇒ Object
Returns the value of attribute conversation.
63 64 65 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 63 def conversation @conversation end |
#creation_time ⇒ Object
The time when dialer created the interaction. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
38 39 40 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 38 def creation_time @creation_time end |
#destination_address ⇒ Object
Returns the value of attribute destination_address.
29 30 31 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 29 def destination_address @destination_address end |
#dialer_system_participant_id ⇒ Object
conversation participant id that is the dialer system participant to monitor the call from dialer perspective
66 67 68 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 66 def dialer_system_participant_id @dialer_system_participant_id end |
#dialing_mode ⇒ Object
Returns the value of attribute dialing_mode.
68 69 70 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 68 def dialing_mode @dialing_mode end |
#disposition ⇒ Object
Describes what happened with call analysis for instance: disposition.classification.callable.person, disposition.classification.callable.noanswer
54 55 56 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 54 def disposition @disposition end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 21 def id @id end |
#last_active_preview_wrapup_time ⇒ Object
The time when the last preview of the interaction was wrapped up. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
35 36 37 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 35 def last_active_preview_wrapup_time @last_active_preview_wrapup_time end |
#preview_connected_time ⇒ Object
The time when the customer and routing participant are connected. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
47 48 49 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 47 def preview_connected_time @preview_connected_time end |
#preview_pop_delivered_time ⇒ Object
Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
61 62 63 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 61 def preview_pop_delivered_time @preview_pop_delivered_time end |
#queue ⇒ Object
Returns the value of attribute queue.
49 50 51 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 49 def queue @queue end |
#script ⇒ Object
Returns the value of attribute script.
51 52 53 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 51 def script @script end |
#skills ⇒ Object
Any skills that are attached to the call for routing
71 72 73 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 71 def skills @skills end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 74 def self.attribute_map { :'id' => :'id', :'campaign' => :'campaign', :'agent' => :'agent', :'contact' => :'contact', :'destination_address' => :'destinationAddress', :'active_preview_call' => :'activePreviewCall', :'last_active_preview_wrapup_time' => :'lastActivePreviewWrapupTime', :'creation_time' => :'creationTime', :'call_placed_time' => :'callPlacedTime', :'call_routed_time' => :'callRoutedTime', :'preview_connected_time' => :'previewConnectedTime', :'queue' => :'queue', :'script' => :'script', :'disposition' => :'disposition', :'caller_name' => :'callerName', :'caller_address' => :'callerAddress', :'preview_pop_delivered_time' => :'previewPopDeliveredTime', :'conversation' => :'conversation', :'dialer_system_participant_id' => :'dialerSystemParticipantId', :'dialing_mode' => :'dialingMode', :'skills' => :'skills' } end |
.swagger_types ⇒ Object
Attribute type mapping.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 123 def self.swagger_types { :'id' => :'String', :'campaign' => :'UriReference', :'agent' => :'UriReference', :'contact' => :'UriReference', :'destination_address' => :'String', :'active_preview_call' => :'BOOLEAN', :'last_active_preview_wrapup_time' => :'DateTime', :'creation_time' => :'DateTime', :'call_placed_time' => :'DateTime', :'call_routed_time' => :'DateTime', :'preview_connected_time' => :'DateTime', :'queue' => :'UriReference', :'script' => :'UriReference', :'disposition' => :'String', :'caller_name' => :'String', :'caller_address' => :'String', :'preview_pop_delivered_time' => :'DateTime', :'conversation' => :'ConversationBasic', :'dialer_system_participant_id' => :'String', :'dialing_mode' => :'String', :'skills' => :'Array<UriReference>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 594 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && campaign == o.campaign && agent == o.agent && contact == o.contact && destination_address == o.destination_address && active_preview_call == o.active_preview_call && last_active_preview_wrapup_time == o.last_active_preview_wrapup_time && creation_time == o.creation_time && call_placed_time == o.call_placed_time && call_routed_time == o.call_routed_time && preview_connected_time == o.preview_connected_time && queue == o.queue && script == o.script && disposition == o.disposition && caller_name == o.caller_name && caller_address == o.caller_address && preview_pop_delivered_time == o.preview_pop_delivered_time && conversation == o.conversation && dialer_system_participant_id == o.dialer_system_participant_id && dialing_mode == o.dialing_mode && skills == o.skills end |
#_deserialize(type, value) ⇒ Object
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 652 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.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 =~ /^(true|t|yes|y|1)$/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 _model = Object.const_get("PureCloud").const_get(type).new _model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Object
Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
712 713 714 715 716 717 718 719 720 721 722 723 724 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 712 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
build the object from hash
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 633 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) else #TODO show warning in debug mode end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) else # data not found in attributes(hash), not an issue as the data can be optional end end self end |
#eql?(o) ⇒ Boolean
622 623 624 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 622 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
628 629 630 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 628 def hash [id, campaign, agent, contact, destination_address, active_preview_call, last_active_preview_wrapup_time, creation_time, call_placed_time, call_routed_time, preview_connected_time, queue, script, disposition, caller_name, caller_address, preview_pop_delivered_time, conversation, dialer_system_participant_id, dialing_mode, skills].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
375 376 377 378 379 380 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 375 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Object
to_body is an alias to to_body (backward compatibility))
695 696 697 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 695 def to_body to_hash end |
#to_hash ⇒ Object
return the object in the form of hash
700 701 702 703 704 705 706 707 708 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 700 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ Object
690 691 692 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 690 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 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 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/purecloudclient_v2a/models/campaign_interaction.rb', line 384 def valid? allowed_values = ["DISCONNECT", "LIVE_VOICE", "BUSY", "MACHINE", "NO_ANSWER", "SIT_CALLABLE", "SIT_UNCALLABLE", "FAX"] if @disposition && !allowed_values.include?(@disposition) return false end end |