lib/purecloud/models/email_message.rb in purecloud-0.26.0 vs lib/purecloud/models/email_message.rb in purecloud-0.27.0
- old
+ new
@@ -1,52 +1,40 @@
require 'date'
module PureCloud
class EmailMessage
- # The globally unique identifier for the object.
- attr_accessor :id
+ attr_accessor :html_body
- attr_accessor :name
+ attr_accessor :text_body
- # The recipients of the email message.
+ attr_accessor :id
+
attr_accessor :to
- # The recipients that were copied on the email message.
attr_accessor :cc
- # The recipients that were blind copied on the email message.
attr_accessor :bcc
- # The sender of the email message.
attr_accessor :from
- # The subject of the email message.
attr_accessor :subject
- # The attachments of the email message.
attr_accessor :attachments
- # The text body of the email message.
- attr_accessor :text_body
-
- # The html body of the email message.
- attr_accessor :html_body
-
- # The time when the message was received or sent. 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
attr_accessor :time
- # The URI for this object
- attr_accessor :self_uri
-
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'id' => :'id',
+ :'html_body' => :'htmlBody',
- :'name' => :'name',
+ :'text_body' => :'textBody',
+ :'id' => :'id',
+
:'to' => :'to',
:'cc' => :'cc',
:'bcc' => :'bcc',
@@ -55,36 +43,28 @@
:'subject' => :'subject',
:'attachments' => :'attachments',
- :'text_body' => :'textBody',
+ :'time' => :'time'
- :'html_body' => :'htmlBody',
-
- :'time' => :'time',
-
- :'self_uri' => :'selfUri'
-
}
end
# Attribute type mapping.
def self.swagger_types
{
+ :'html_body' => :'String',
+ :'text_body' => :'String',
:'id' => :'String',
- :'name' => :'String',
:'to' => :'Array<EmailAddress>',
:'cc' => :'Array<EmailAddress>',
:'bcc' => :'Array<EmailAddress>',
:'from' => :'EmailAddress',
:'subject' => :'String',
- :'attachments' => :'Array<Attachment>',
- :'text_body' => :'String',
- :'html_body' => :'String',
- :'time' => :'DateTime',
- :'self_uri' => :'String'
+ :'attachments' => :'Array<EmailAttachment>',
+ :'time' => :'DateTime'
}
end
def initialize(attributes = {})
@@ -92,18 +72,22 @@
# 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']
+ if attributes[:'htmlBody']
+ self.html_body = attributes[:'htmlBody']
end
- if attributes[:'name']
- self.name = attributes[:'name']
+ if attributes[:'textBody']
+ self.text_body = attributes[:'textBody']
end
+ if attributes[:'id']
+ self.id = attributes[:'id']
+ end
+
if attributes[:'to']
if (value = attributes[:'to']).is_a?(Array)
self.to = value
end
end
@@ -132,53 +116,39 @@
if (value = attributes[:'attachments']).is_a?(Array)
self.attachments = value
end
end
- if attributes[:'textBody']
- self.text_body = attributes[:'textBody']
- end
-
- if attributes[:'htmlBody']
- self.html_body = attributes[:'htmlBody']
- end
-
if attributes[:'time']
self.time = attributes[:'time']
end
- if attributes[:'selfUri']
- self.self_uri = attributes[:'selfUri']
- end
-
end
# Check equality by comparing each attribute.
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ html_body == o.html_body &&
+ text_body == o.text_body &&
id == o.id &&
- name == o.name &&
to == o.to &&
cc == o.cc &&
bcc == o.bcc &&
from == o.from &&
subject == o.subject &&
attachments == o.attachments &&
- text_body == o.text_body &&
- html_body == o.html_body &&
- time == o.time &&
- self_uri == o.self_uri
+ time == o.time
end
# @see the `==` method
def eql?(o)
self == o
end
# Calculate hash code according to all attributes.
def hash
- [id, name, to, cc, bcc, from, subject, attachments, text_body, html_body, time, self_uri].hash
+ [html_body, text_body, id, to, cc, bcc, from, subject, attachments, time].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)