class PureCloud::ParticipantBasic
Attributes
The address for the this participant. For a phone call this will be the ANI.
The address for the this participant. For a phone call this will be the ANI.
The ani-based name for this participant.
Additional participant attributes
The timestamp when this participant was connected to the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
If this participant is part of a consult transfer, then this will be the participant id of the participant being transferred.
The address for the this participant. For a phone call this will be the ANI.
The timestamp when this participant disconnected from the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
If this participant represents an external contact, then this will be the globally unique identifier for the external contact.
If this participant represents an external org, then this will be the globally unique identifier for the external org.
If present, group of users the participant represents.
A globally unique identifier for this conversation.
An ISO 639 language code specifying the locale for this participant
If this participant is a monitor, then this will be the id of the participant that is being monitored.
A human readable name identifying the participant.
A well known string that specifies the type of this participant.
A well known string that specifies the purpose of this participant.
If present, the queue id that the communication channel came in on.
If present, the queue name that the communication channel came in on.
The timestamp when this participant joined the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
If this participant represents a user, then this will be the globally unique identifier for the user.
If this participant represents a user, then this will be an URI that can be used to fetch the user.
Call
wrap up or disposition data.
This field controls how the UI prompts the agent for a wrapup.
True iff this participant is required to enter wrapup for this conversation.
The UI sets this field when the agent chooses to skip entering a wrapup for this participant.
Specifies how long a timed ACW session will last.
Public Class Methods
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloud/models/participant_basic.rb, line 121 def self.attribute_map { :'id' => :'id', :'start_time' => :'startTime', :'end_time' => :'endTime', :'connected_time' => :'connectedTime', :'name' => :'name', :'user_uri' => :'userUri', :'user_id' => :'userId', :'external_contact_id' => :'externalContactId', :'external_organization_id' => :'externalOrganizationId', :'queue_id' => :'queueId', :'group_id' => :'groupId', :'queue_name' => :'queueName', :'purpose' => :'purpose', :'participant_type' => :'participantType', :'consult_participant_id' => :'consultParticipantId', :'address' => :'address', :'ani' => :'ani', :'ani_name' => :'aniName', :'dnis' => :'dnis', :'locale' => :'locale', :'wrapup_required' => :'wrapupRequired', :'wrapup_prompt' => :'wrapupPrompt', :'wrapup_timeout_ms' => :'wrapupTimeoutMs', :'wrapup_skipped' => :'wrapupSkipped', :'wrapup' => :'wrapup', :'monitored_participant_id' => :'monitoredParticipantId', :'attributes' => :'attributes', :'calls' => :'calls', :'callbacks' => :'callbacks', :'chats' => :'chats', :'cobrowsesessions' => :'cobrowsesessions', :'emails' => :'emails', :'screenshares' => :'screenshares', :'social_expressions' => :'socialExpressions', :'videos' => :'videos', :'evaluations' => :'evaluations' } end
# File lib/purecloud/models/participant_basic.rb, line 242 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[:'startTime'] self.start_time = attributes[:'startTime'] end if attributes[:'endTime'] self.end_time = attributes[:'endTime'] end if attributes[:'connectedTime'] self.connected_time = attributes[:'connectedTime'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'userUri'] self.user_uri = attributes[:'userUri'] end if attributes[:'userId'] self.user_id = attributes[:'userId'] end if attributes[:'externalContactId'] self.external_contact_id = attributes[:'externalContactId'] end if attributes[:'externalOrganizationId'] self.external_organization_id = attributes[:'externalOrganizationId'] end if attributes[:'queueId'] self.queue_id = attributes[:'queueId'] end if attributes[:'groupId'] self.group_id = attributes[:'groupId'] end if attributes[:'queueName'] self.queue_name = attributes[:'queueName'] end if attributes[:'purpose'] self.purpose = attributes[:'purpose'] end if attributes[:'participantType'] self.participant_type = attributes[:'participantType'] end if attributes[:'consultParticipantId'] self.consult_participant_id = attributes[:'consultParticipantId'] end if attributes[:'address'] self.address = attributes[:'address'] end if attributes[:'ani'] self.ani = attributes[:'ani'] end if attributes[:'aniName'] self.ani_name = attributes[:'aniName'] end if attributes[:'dnis'] self.dnis = attributes[:'dnis'] end if attributes[:'locale'] self.locale = attributes[:'locale'] end if attributes[:'wrapupRequired'] self.wrapup_required = attributes[:'wrapupRequired'] end if attributes[:'wrapupPrompt'] self.wrapup_prompt = attributes[:'wrapupPrompt'] end if attributes[:'wrapupTimeoutMs'] self.wrapup_timeout_ms = attributes[:'wrapupTimeoutMs'] end if attributes[:'wrapupSkipped'] self.wrapup_skipped = attributes[:'wrapupSkipped'] end if attributes[:'wrapup'] self.wrapup = attributes[:'wrapup'] end if attributes[:'monitoredParticipantId'] self.monitored_participant_id = attributes[:'monitoredParticipantId'] end if attributes[:'attributes'] if (value = attributes[:'attributes']).is_a?(Array) self.attributes = value end end if attributes[:'calls'] if (value = attributes[:'calls']).is_a?(Array) self.calls = value end end if attributes[:'callbacks'] if (value = attributes[:'callbacks']).is_a?(Array) self.callbacks = value end end if attributes[:'chats'] if (value = attributes[:'chats']).is_a?(Array) self.chats = value end end if attributes[:'cobrowsesessions'] if (value = attributes[:'cobrowsesessions']).is_a?(Array) self.cobrowsesessions = value end end if attributes[:'emails'] if (value = attributes[:'emails']).is_a?(Array) self.emails = value end end if attributes[:'screenshares'] if (value = attributes[:'screenshares']).is_a?(Array) self.screenshares = value end end if attributes[:'socialExpressions'] if (value = attributes[:'socialExpressions']).is_a?(Array) self.social_expressions = value end end if attributes[:'videos'] if (value = attributes[:'videos']).is_a?(Array) self.videos = value end end if attributes[:'evaluations'] if (value = attributes[:'evaluations']).is_a?(Array) self.evaluations = value end end end
Attribute
type mapping.
# File lib/purecloud/models/participant_basic.rb, line 200 def self.swagger_types { :'id' => :'String', :'start_time' => :'DateTime', :'end_time' => :'DateTime', :'connected_time' => :'DateTime', :'name' => :'String', :'user_uri' => :'String', :'user_id' => :'String', :'external_contact_id' => :'String', :'external_organization_id' => :'String', :'queue_id' => :'String', :'group_id' => :'String', :'queue_name' => :'String', :'purpose' => :'String', :'participant_type' => :'String', :'consult_participant_id' => :'String', :'address' => :'String', :'ani' => :'String', :'ani_name' => :'String', :'dnis' => :'String', :'locale' => :'String', :'wrapup_required' => :'BOOLEAN', :'wrapup_prompt' => :'String', :'wrapup_timeout_ms' => :'Integer', :'wrapup_skipped' => :'BOOLEAN', :'wrapup' => :'Wrapup', :'monitored_participant_id' => :'String', :'attributes' => :'Hash<String, String>', :'calls' => :'Array<CallBasic>', :'callbacks' => :'Array<CallbackBasic>', :'chats' => :'Array<ConversationChat>', :'cobrowsesessions' => :'Array<Cobrowsesession>', :'emails' => :'Array<Email>', :'screenshares' => :'Array<Screenshare>', :'social_expressions' => :'Array<SocialExpression>', :'videos' => :'Array<Video>', :'evaluations' => :'Array<Evaluation>' } end
Public Instance Methods
Check equality by comparing each attribute.
# File lib/purecloud/models/participant_basic.rb, line 425 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && start_time == o.start_time && end_time == o.end_time && connected_time == o.connected_time && name == o.name && user_uri == o.user_uri && user_id == o.user_id && external_contact_id == o.external_contact_id && external_organization_id == o.external_organization_id && queue_id == o.queue_id && group_id == o.group_id && queue_name == o.queue_name && purpose == o.purpose && participant_type == o.participant_type && consult_participant_id == o.consult_participant_id && address == o.address && ani == o.ani && ani_name == o.ani_name && dnis == o.dnis && locale == o.locale && wrapup_required == o.wrapup_required && wrapup_prompt == o.wrapup_prompt && wrapup_timeout_ms == o.wrapup_timeout_ms && wrapup_skipped == o.wrapup_skipped && wrapup == o.wrapup && monitored_participant_id == o.monitored_participant_id && attributes == o.attributes && calls == o.calls && callbacks == o.callbacks && chats == o.chats && cobrowsesessions == o.cobrowsesessions && emails == o.emails && screenshares == o.screenshares && social_expressions == o.social_expressions && videos == o.videos && evaluations == o.evaluations end
# File lib/purecloud/models/participant_basic.rb, line 496 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/purecloud/models/participant_basic.rb, line 556 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/purecloud/models/participant_basic.rb, line 477 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
@see the `==` method
# File lib/purecloud/models/participant_basic.rb, line 467 def eql?(o) self == o end
Calculate hash code according to all attributes.
# File lib/purecloud/models/participant_basic.rb, line 472 def hash [id, start_time, end_time, connected_time, name, user_uri, user_id, external_contact_id, external_organization_id, queue_id, group_id, queue_name, purpose, participant_type, consult_participant_id, address, ani, ani_name, dnis, locale, wrapup_required, wrapup_prompt, wrapup_timeout_ms, wrapup_skipped, wrapup, monitored_participant_id, attributes, calls, callbacks, chats, cobrowsesessions, emails, screenshares, social_expressions, videos, evaluations].hash end
return the object in the form of hash
# File lib/purecloud/models/participant_basic.rb, line 544 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/purecloud/models/participant_basic.rb, line 534 def to_s to_hash.to_s end
Custom attribute writer method checking allowed values (enum).
# File lib/purecloud/models/participant_basic.rb, line 416 def wrapup_prompt=(wrapup_prompt) allowed_values = ["mandatory", "optional", "timeout", "forcedTimeout"] if wrapup_prompt && !allowed_values.include?(wrapup_prompt) fail "invalid value for 'wrapup_prompt', must be one of #{allowed_values}" end @wrapup_prompt = wrapup_prompt end