lib/purecloudplatformclientv2/models/chat_message.rb in purecloudplatformclientv2-57.0.0 vs lib/purecloudplatformclientv2/models/chat_message.rb in purecloudplatformclientv2-58.0.0

- old
+ new

@@ -40,10 +40,16 @@ attr_accessor :type # Type of the message body (v2 chats only) attr_accessor :body_type + # Communication of sender (v2 chats only) + attr_accessor :sender_communication_id + + # Participant purpose of sender (v2 chats only) + attr_accessor :participant_purpose + # The user information for the sender (if available) attr_accessor :user # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map @@ -65,10 +71,14 @@ :'type' => :'type', :'body_type' => :'bodyType', + :'sender_communication_id' => :'senderCommunicationId', + + :'participant_purpose' => :'participantPurpose', + :'user' => :'user' } end @@ -92,10 +102,14 @@ :'type' => :'String', :'body_type' => :'String', + :'sender_communication_id' => :'String', + + :'participant_purpose' => :'String', + :'user' => :'ChatMessageUser' } end @@ -187,10 +201,28 @@ end + if attributes.has_key?(:'senderCommunicationId') + + + self.sender_communication_id = attributes[:'senderCommunicationId'] + + + end + + + if attributes.has_key?(:'participantPurpose') + + + self.participant_purpose = attributes[:'participantPurpose'] + + + end + + if attributes.has_key?(:'user') self.user = attributes[:'user'] @@ -256,10 +288,18 @@ + + + + + + + + end @@ -318,10 +358,20 @@ + + + + + + + + + + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && @@ -332,10 +382,12 @@ utc == o.utc && chat == o.chat && message == o.message && type == o.type && body_type == o.body_type && + sender_communication_id == o.sender_communication_id && + participant_purpose == o.participant_purpose && user == o.user end # @see the `==` method # @param [Object] Object to be compared @@ -344,10 +396,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [body, id, to, from, utc, chat, message, type, body_type, user].hash + [body, id, to, from, utc, chat, message, type, body_type, sender_communication_id, participant_purpose, user].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash)