class PureCloud::CampaignInteraction
Attributes
Boolean value if there is an active preview call on the interaction
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
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
The time when dialer created the interaction. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
conversation participant id that is the dialer system participant to monitor the call from dialer perspective
Describes what happened with call analysis for instance: disposition.classification.callable.person, disposition.classification.callable.noanswer
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
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
Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
Any skills that are attached to the call for routing
Public Class Methods
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloudplatformclientv2/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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/purecloudplatformclientv2/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
Attribute
type mapping.
# File lib/purecloudplatformclientv2/models/campaign_interaction.rb, line 123 def self.swagger_types { :'id' => :'String', :'campaign' => :'DomainEntityRef', :'agent' => :'DomainEntityRef', :'contact' => :'DomainEntityRef', :'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' => :'DomainEntityRef', :'script' => :'DomainEntityRef', :'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<DomainEntityRef>' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/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
# File lib/purecloudplatformclientv2/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
Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
# File lib/purecloudplatformclientv2/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 the object from hash
# File lib/purecloudplatformclientv2/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
Custom attribute writer method checking allowed values (enum). @param [Object] disposition Object to be assigned
# File lib/purecloudplatformclientv2/models/campaign_interaction.rb, line 546 def disposition=(disposition) allowed_values = ["DISCONNECT", "LIVE_VOICE", "BUSY", "MACHINE", "NO_ANSWER", "SIT_CALLABLE", "SIT_UNCALLABLE", "FAX"] if disposition && !allowed_values.include?(disposition) fail ArgumentError, "invalid value for 'disposition', must be one of #{allowed_values}." end @disposition = disposition end
@see the `==` method @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/campaign_interaction.rb, line 622 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/purecloudplatformclientv2/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
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons
# File lib/purecloudplatformclientv2/models/campaign_interaction.rb, line 375 def list_invalid_properties invalid_properties = Array.new return invalid_properties end
return the object in the form of hash
# File lib/purecloudplatformclientv2/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
# File lib/purecloudplatformclientv2/models/campaign_interaction.rb, line 690 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/purecloudplatformclientv2/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