lib/purecloud/models/email_message.rb in purecloud-0.25.0 vs lib/purecloud/models/email_message.rb in purecloud-0.26.0
- old
+ new
@@ -1,40 +1,52 @@
require 'date'
module PureCloud
class EmailMessage
- attr_accessor :html_body
-
- attr_accessor :text_body
-
+ # The globally unique identifier for the object.
attr_accessor :id
+ attr_accessor :name
+
+ # The recipients of the email message.
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
- # Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
+ # 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
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
{
- :'html_body' => :'htmlBody',
-
- :'text_body' => :'textBody',
-
:'id' => :'id',
+ :'name' => :'name',
+
:'to' => :'to',
:'cc' => :'cc',
:'bcc' => :'bcc',
@@ -43,28 +55,36 @@
:'subject' => :'subject',
:'attachments' => :'attachments',
- :'time' => :'time'
+ :'text_body' => :'textBody',
+ :'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<EmailAttachment>',
- :'time' => :'DateTime'
+ :'attachments' => :'Array<Attachment>',
+ :'text_body' => :'String',
+ :'html_body' => :'String',
+ :'time' => :'DateTime',
+ :'self_uri' => :'String'
}
end
def initialize(attributes = {})
@@ -72,22 +92,18 @@
# convert string to symbol for hash key
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
- if attributes[:'htmlBody']
- self.html_body = attributes[:'htmlBody']
- end
-
- if attributes[:'textBody']
- self.text_body = attributes[:'textBody']
- end
-
if attributes[:'id']
self.id = attributes[:'id']
end
+ if attributes[:'name']
+ self.name = attributes[:'name']
+ end
+
if attributes[:'to']
if (value = attributes[:'to']).is_a?(Array)
self.to = value
end
end
@@ -116,39 +132,53 @@
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 &&
- time == o.time
+ text_body == o.text_body &&
+ html_body == o.html_body &&
+ time == o.time &&
+ self_uri == o.self_uri
end
# @see the `==` method
def eql?(o)
self == o
end
# Calculate hash code according to all attributes.
def hash
- [html_body, text_body, id, to, cc, bcc, from, subject, attachments, time].hash
+ [id, name, to, cc, bcc, from, subject, attachments, text_body, html_body, time, self_uri].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)