lib/purecloud/models/email.rb in purecloud-0.50.1 vs lib/purecloud/models/email.rb in purecloud-0.51.1

- old
+ new

@@ -16,39 +16,51 @@ require 'date' module PureCloud class Email + # The connection state of this communication. attr_accessor :state + # A globally unique identifier for this communication. attr_accessor :id + # True if this call is held and the person on this side hears silence. attr_accessor :held + # The subject for the initial email that started this conversation. attr_accessor :subject + # The number of email messages sent by this participant. attr_accessor :messages_sent + # The time line of the participant's email, divided into activity segments. attr_accessor :segments + # The direction of the email attr_accessor :direction + # A globally unique identifier for the recording associated with this call. attr_accessor :recording_id attr_accessor :error_info + # System defined string indicating what caused the communication to disconnect. Will be null until the communication disconnects. attr_accessor :disconnect_type - # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ + # The timestamp the email was placed on hold in the cloud clock if the email is currently on hold. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ attr_accessor :start_hold_time - # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ + # The timestamp when this communication was connected in the cloud clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ attr_accessor :connected_time - # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ + # The timestamp when this communication 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 attr_accessor :disconnected_time + # The source provider for the email. + attr_accessor :provider + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'state' => :'state', @@ -73,12 +85,14 @@ :'start_hold_time' => :'startHoldTime', :'connected_time' => :'connectedTime', - :'disconnected_time' => :'disconnectedTime' + :'disconnected_time' => :'disconnectedTime', + :'provider' => :'provider' + } end # Attribute type mapping. def self.swagger_types @@ -93,11 +107,12 @@ :'recording_id' => :'String', :'error_info' => :'ErrorBody', :'disconnect_type' => :'String', :'start_hold_time' => :'DateTime', :'connected_time' => :'DateTime', - :'disconnected_time' => :'DateTime' + :'disconnected_time' => :'DateTime', + :'provider' => :'String' } end def initialize(attributes = {}) @@ -161,10 +176,14 @@ if attributes[:'disconnectedTime'] self.disconnected_time = attributes[:'disconnectedTime'] end + if attributes[:'provider'] + self.provider = attributes[:'provider'] + end + end # Custom attribute writer method checking allowed values (enum). def state=(state) allowed_values = ["ALERTING", "CONNECTED", "DISCONNECTED", "NONE"] @@ -183,11 +202,11 @@ @direction = direction end # Custom attribute writer method checking allowed values (enum). def disconnect_type=(disconnect_type) - allowed_values = ["ENDPOINT", "CLIENT", "SYSTEM", "TIMEOUT", "TRANSFER", "TRANSFER_CONFERENCE", "TRANSFER_CONSULT", "TRANSFER_FORWARD", "TRANSPORT_FAILURE", "ERROR", "PEER", "OTHER", "SPAM"] + allowed_values = ["ENDPOINT", "CLIENT", "SYSTEM", "TIMEOUT", "TRANSFER", "TRANSFER_CONFERENCE", "TRANSFER_CONSULT", "TRANSFER_FORWARD", "TRANSFER_NOANSWER", "TRANSFER_NOTAVAILABLE", "TRANSPORT_FAILURE", "ERROR", "PEER", "OTHER", "SPAM"] if disconnect_type && !allowed_values.include?(disconnect_type) fail "invalid value for 'disconnect_type', must be one of #{allowed_values}" end @disconnect_type = disconnect_type end @@ -206,20 +225,21 @@ recording_id == o.recording_id && error_info == o.error_info && disconnect_type == o.disconnect_type && start_hold_time == o.start_hold_time && connected_time == o.connected_time && - disconnected_time == o.disconnected_time + disconnected_time == o.disconnected_time && + provider == o.provider end # @see the `==` method def eql?(o) self == o end # Calculate hash code according to all attributes. def hash - [state, id, held, subject, messages_sent, segments, direction, recording_id, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time].hash + [state, id, held, subject, messages_sent, segments, direction, recording_id, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, provider].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash)