Class: PureCloud::CampaignInteraction
- Inherits:
-
Object
- Object
- PureCloud::CampaignInteraction
- Defined in:
- lib/purecloud/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
Check 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 ⇒ Object
Calculate hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CampaignInteraction
constructor
A new instance of CampaignInteraction.
-
#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
Constructor Details
#initialize(attributes = {}) ⇒ CampaignInteraction
Returns a new instance of CampaignInteraction.
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/purecloud/models/campaign_interaction.rb', line 150 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'campaign'] self.campaign = attributes[:'campaign'] end if attributes[:'agent'] self.agent = attributes[:'agent'] end if attributes[:'contact'] self.contact = attributes[:'contact'] end if attributes[:'destinationAddress'] self.destination_address = attributes[:'destinationAddress'] end if attributes[:'activePreviewCall'] self.active_preview_call = attributes[:'activePreviewCall'] end if attributes[:'lastActivePreviewWrapupTime'] self.last_active_preview_wrapup_time = attributes[:'lastActivePreviewWrapupTime'] end if attributes[:'creationTime'] self.creation_time = attributes[:'creationTime'] end if attributes[:'callPlacedTime'] self.call_placed_time = attributes[:'callPlacedTime'] end if attributes[:'callRoutedTime'] self.call_routed_time = attributes[:'callRoutedTime'] end if attributes[:'previewConnectedTime'] self.preview_connected_time = attributes[:'previewConnectedTime'] end if attributes[:'queue'] self.queue = attributes[:'queue'] end if attributes[:'script'] self.script = attributes[:'script'] end if attributes[:'disposition'] self.disposition = attributes[:'disposition'] end if attributes[:'callerName'] self.caller_name = attributes[:'callerName'] end if attributes[:'callerAddress'] self.caller_address = attributes[:'callerAddress'] end if attributes[:'previewPopDeliveredTime'] self.preview_pop_delivered_time = attributes[:'previewPopDeliveredTime'] end if attributes[:'conversation'] self.conversation = attributes[:'conversation'] end if attributes[:'dialerSystemParticipantId'] self.dialer_system_participant_id = attributes[:'dialerSystemParticipantId'] end if attributes[:'dialingMode'] self.dialing_mode = attributes[:'dialingMode'] end if attributes[:'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/purecloud/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/purecloud/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/purecloud/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/purecloud/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/purecloud/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/purecloud/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/purecloud/models/campaign_interaction.rb', line 23 def campaign @campaign end |
#contact ⇒ Object
Returns the value of attribute contact.
27 28 29 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 27 def contact @contact end |
#conversation ⇒ Object
Returns the value of attribute conversation.
63 64 65 |
# File 'lib/purecloud/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/purecloud/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/purecloud/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/purecloud/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/purecloud/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/purecloud/models/campaign_interaction.rb', line 54 def disposition @disposition end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/purecloud/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/purecloud/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/purecloud/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/purecloud/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/purecloud/models/campaign_interaction.rb', line 49 def queue @queue end |
#script ⇒ Object
Returns the value of attribute script.
51 52 53 |
# File 'lib/purecloud/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/purecloud/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/purecloud/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 |
# File 'lib/purecloud/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' => :'Conversation', :'dialer_system_participant_id' => :'String', :'dialing_mode' => :'String', :'skills' => :'Array<UriReference>' } end |
Instance Method Details
#==(o) ⇒ Object
Check equality by comparing each attribute.
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 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 255 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
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 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 311 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
371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 371 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
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 292 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
282 283 284 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 282 def eql?(o) self == o end |
#hash ⇒ Object
Calculate hash code according to all attributes.
287 288 289 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 287 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 |
#to_body ⇒ Object
to_body is an alias to to_body (backward compatibility))
354 355 356 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 354 def to_body to_hash end |
#to_hash ⇒ Object
return the object in the form of hash
359 360 361 362 363 364 365 366 367 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 359 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
349 350 351 |
# File 'lib/purecloud/models/campaign_interaction.rb', line 349 def to_s to_hash.to_s end |