Class: AsposeEmailCloud::MapiContactDto
- Inherits:
-
MapiMessageItemBaseDto
- Object
- MapiMessageItemBaseDto
- AsposeEmailCloud::MapiContactDto
- Defined in:
- lib/aspose-email-cloud/models/mapi_contact_dto.rb
Overview
Represents outlook contact information.
Instance Attribute Summary collapse
-
#attachments ⇒ Array<MapiAttachmentDto>
Message item attachments.
-
#billing ⇒ String
Billing information associated with an item.
-
#body ⇒ String
Message text.
-
#body_html ⇒ String
Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string.
-
#body_rtf ⇒ String
RTF formatted message text.
-
#body_type ⇒ String
The content type of message body.
-
#categories ⇒ Array<String>
Contains keywords or categories for the message object.
-
#companies ⇒ Array<String>
Contains the names of the companies that are associated with an item.
-
#electronic_addresses ⇒ MapiContactElectronicAddressPropertySetDto
Specify properties for up to three different e-mail addresses and three different fax addresses.
-
#events ⇒ MapiContactEventPropertySetDto
Specify events associated with a contact.
-
#item_id ⇒ String
The item id, uses with a server.
-
#message_class ⇒ String
Case-sensitive string that identifies the sender-defined message class, such as IPM.Note.
-
#mileage ⇒ String
Contains the mileage information that is associated with an item.
-
#name_info ⇒ MapiContactNamePropertySetDto
The properties are used to specify the name of the person represented by the contact.
-
#other_fields ⇒ MapiContactOtherPropertySetDto
Specify other fields of contact.
-
#personal_info ⇒ MapiContactPersonalInfoPropertySetDto
Specify other additional contact information.
-
#photo ⇒ MapiContactPhotoDto
Contact photo.
-
#physical_addresses ⇒ MapiContactPhysicalAddressPropertySetDto
Specify three physical addresses: Home Address, Work Address, and Other Address.
-
#professional_info ⇒ MapiContactProfessionalPropertySetDto
Properties are used to store professional details for the person represented by the contact.
-
#properties ⇒ Array<MapiPropertyDto>
List of MAPI properties.
-
#recipients ⇒ Array<MapiRecipientDto>
Recipients of the message.
-
#sensitivity ⇒ String
Contains values that indicate the message sensitivity.
-
#subject ⇒ String
Subject of the message.
-
#subject_prefix ⇒ String
Subject prefix that typically indicates some action on a message, such as "FW: " for forwarding.
-
#telephones ⇒ MapiContactTelephonePropertySetDto
Specify telephone numbers for the contact.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
#discriminator ⇒ Object
getter method.
-
#discriminator=(discriminator) ⇒ Object
setter method, parameter ignored.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attachments: nil, billing: nil, body: nil, body_html: nil, body_rtf: nil, body_type: nil, categories: nil, companies: nil, item_id: nil, message_class: nil, mileage: nil, recipients: nil, sensitivity: nil, subject: nil, subject_prefix: nil, properties: nil, electronic_addresses: nil, events: nil, name_info: nil, other_fields: nil, personal_info: nil, photo: nil, physical_addresses: nil, professional_info: nil, telephones: nil) ⇒ MapiContactDto
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attachments: nil, billing: nil, body: nil, body_html: nil, body_rtf: nil, body_type: nil, categories: nil, companies: nil, item_id: nil, message_class: nil, mileage: nil, recipients: nil, sensitivity: nil, subject: nil, subject_prefix: nil, properties: nil, electronic_addresses: nil, events: nil, name_info: nil, other_fields: nil, personal_info: nil, photo: nil, physical_addresses: nil, professional_info: nil, telephones: nil) ⇒ MapiContactDto
Initializes the object
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 203 def initialize( attachments: nil, billing: nil, body: nil, body_html: nil, body_rtf: nil, body_type: nil, categories: nil, companies: nil, item_id: nil, message_class: nil, mileage: nil, recipients: nil, sensitivity: nil, subject: nil, subject_prefix: nil, properties: nil, electronic_addresses: nil, events: nil, name_info: nil, other_fields: nil, personal_info: nil, photo: nil, physical_addresses: nil, professional_info: nil, telephones: nil) self. = if self.billing = billing if billing self.body = body if body self.body_html = body_html if body_html self.body_rtf = body_rtf if body_rtf self.body_type = body_type if body_type self.categories = categories if categories self.companies = companies if companies self.item_id = item_id if item_id self. = if self.mileage = mileage if mileage self.recipients = recipients if recipients self.sensitivity = sensitivity if sensitivity self.subject = subject if subject self.subject_prefix = subject_prefix if subject_prefix self.properties = properties if properties self.electronic_addresses = electronic_addresses if electronic_addresses self.events = events if events self.name_info = name_info if name_info self.other_fields = other_fields if other_fields self.personal_info = personal_info if personal_info self.photo = photo if photo self.physical_addresses = physical_addresses if physical_addresses self.professional_info = professional_info if professional_info self.telephones = telephones if telephones end |
Instance Attribute Details
#attachments ⇒ Array<MapiAttachmentDto>
Message item attachments.
33 34 35 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 33 def @attachments end |
#billing ⇒ String
Billing information associated with an item.
36 37 38 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 36 def billing @billing end |
#body ⇒ String
Message text.
39 40 41 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 39 def body @body end |
#body_html ⇒ String
Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string.
42 43 44 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 42 def body_html @body_html end |
#body_rtf ⇒ String
RTF formatted message text.
45 46 47 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 45 def body_rtf @body_rtf end |
#body_type ⇒ String
The content type of message body. Enum, available values: PlainText, Html, Rtf
48 49 50 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 48 def body_type @body_type end |
#categories ⇒ Array<String>
Contains keywords or categories for the message object.
51 52 53 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 51 def categories @categories end |
#companies ⇒ Array<String>
Contains the names of the companies that are associated with an item.
54 55 56 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 54 def companies @companies end |
#electronic_addresses ⇒ MapiContactElectronicAddressPropertySetDto
Specify properties for up to three different e-mail addresses and three different fax addresses.
88 89 90 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 88 def electronic_addresses @electronic_addresses end |
#events ⇒ MapiContactEventPropertySetDto
Specify events associated with a contact.
91 92 93 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 91 def events @events end |
#item_id ⇒ String
The item id, uses with a server.
57 58 59 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 57 def item_id @item_id end |
#message_class ⇒ String
Case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message.
60 61 62 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 60 def @message_class end |
#mileage ⇒ String
Contains the mileage information that is associated with an item.
63 64 65 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 63 def mileage @mileage end |
#name_info ⇒ MapiContactNamePropertySetDto
The properties are used to specify the name of the person represented by the contact.
94 95 96 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 94 def name_info @name_info end |
#other_fields ⇒ MapiContactOtherPropertySetDto
Specify other fields of contact.
97 98 99 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 97 def other_fields @other_fields end |
#personal_info ⇒ MapiContactPersonalInfoPropertySetDto
Specify other additional contact information.
100 101 102 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 100 def personal_info @personal_info end |
#photo ⇒ MapiContactPhotoDto
Contact photo.
103 104 105 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 103 def photo @photo end |
#physical_addresses ⇒ MapiContactPhysicalAddressPropertySetDto
Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address.
106 107 108 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 106 def physical_addresses @physical_addresses end |
#professional_info ⇒ MapiContactProfessionalPropertySetDto
Properties are used to store professional details for the person represented by the contact.
109 110 111 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 109 def professional_info @professional_info end |
#properties ⇒ Array<MapiPropertyDto>
List of MAPI properties
78 79 80 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 78 def properties @properties end |
#recipients ⇒ Array<MapiRecipientDto>
Recipients of the message.
66 67 68 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 66 def recipients @recipients end |
#sensitivity ⇒ String
Contains values that indicate the message sensitivity. Enum, available values: None, Personal, Private, CompanyConfidential
69 70 71 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 69 def sensitivity @sensitivity end |
#subject ⇒ String
Subject of the message.
72 73 74 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 72 def subject @subject end |
#subject_prefix ⇒ String
Subject prefix that typically indicates some action on a message, such as "FW: " for forwarding.
75 76 77 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 75 def subject_prefix @subject_prefix end |
#telephones ⇒ MapiContactTelephonePropertySetDto
Specify telephone numbers for the contact.
112 113 114 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 112 def telephones @telephones end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 114 def self.attribute_map { :'attachments' => :'attachments', :'billing' => :'billing', :'body' => :'body', :'body_html' => :'bodyHtml', :'body_rtf' => :'bodyRtf', :'body_type' => :'bodyType', :'categories' => :'categories', :'companies' => :'companies', :'item_id' => :'itemId', :'message_class' => :'messageClass', :'mileage' => :'mileage', :'recipients' => :'recipients', :'sensitivity' => :'sensitivity', :'subject' => :'subject', :'subject_prefix' => :'subjectPrefix', :'properties' => :'properties', :'discriminator' => :'discriminator', :'electronic_addresses' => :'electronicAddresses', :'events' => :'events', :'name_info' => :'nameInfo', :'other_fields' => :'otherFields', :'personal_info' => :'personalInfo', :'photo' => :'photo', :'physical_addresses' => :'physicalAddresses', :'professional_info' => :'professionalInfo', :'telephones' => :'telephones' } end |
.swagger_types ⇒ Object
Attribute type mapping.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 146 def self.swagger_types { :'attachments' => :'Array<MapiAttachmentDto>', :'billing' => :'String', :'body' => :'String', :'body_html' => :'String', :'body_rtf' => :'String', :'body_type' => :'String', :'categories' => :'Array<String>', :'companies' => :'Array<String>', :'item_id' => :'String', :'message_class' => :'String', :'mileage' => :'String', :'recipients' => :'Array<MapiRecipientDto>', :'sensitivity' => :'String', :'subject' => :'String', :'subject_prefix' => :'String', :'properties' => :'Array<MapiPropertyDto>', :'discriminator' => :'String', :'electronic_addresses' => :'MapiContactElectronicAddressPropertySetDto', :'events' => :'MapiContactEventPropertySetDto', :'name_info' => :'MapiContactNamePropertySetDto', :'other_fields' => :'MapiContactOtherPropertySetDto', :'personal_info' => :'MapiContactPersonalInfoPropertySetDto', :'photo' => :'MapiContactPhotoDto', :'physical_addresses' => :'MapiContactPhysicalAddressPropertySetDto', :'professional_info' => :'MapiContactProfessionalPropertySetDto', :'telephones' => :'MapiContactTelephonePropertySetDto' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 286 def ==(o) return true if self.equal?(o) self.class == o.class && == o. && billing == o.billing && body == o.body && body_html == o.body_html && body_rtf == o.body_rtf && body_type == o.body_type && categories == o.categories && companies == o.companies && item_id == o.item_id && == o. && mileage == o.mileage && recipients == o.recipients && sensitivity == o.sensitivity && subject == o.subject && subject_prefix == o.subject_prefix && properties == o.properties && discriminator == o.discriminator && electronic_addresses == o.electronic_addresses && events == o.events && name_info == o.name_info && other_fields == o.other_fields && personal_info == o.personal_info && photo == o.photo && physical_addresses == o.physical_addresses && professional_info == o.professional_info && telephones == o.telephones end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 355 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 =~ /\A(true|t|yes|y|1)\z/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 sub_type = value[:type] || value[:discriminator] || type if AsposeEmailCloud.const_defined?(sub_type) type = sub_type end temp_model = AsposeEmailCloud.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 425 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_from_hash(attributes) ⇒ Object
Builds the object from hash
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 332 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| attribute_key = self.class.attribute_map[key] attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[attribute_key].is_a?(Array) self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) }) end elsif !attributes[attribute_key].nil? self.send("#{key}=", _deserialize(type, attributes[attribute_key])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#discriminator ⇒ Object
getter method
79 80 81 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 79 def discriminator #getter method self.class.name.split('::').last end |
#discriminator=(discriminator) ⇒ Object
setter method, parameter ignored
83 84 85 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 83 def discriminator=(discriminator) #setter method, parameter ignored @discriminator = self.class.name.split('::').last end |
#eql?(o) ⇒ Boolean
319 320 321 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 319 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
325 326 327 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 325 def hash [, billing, body, body_html, body_rtf, body_type, categories, companies, item_id, , mileage, recipients, sensitivity, subject, subject_prefix, properties, discriminator, electronic_addresses, events, name_info, other_fields, personal_info, photo, physical_addresses, professional_info, telephones].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 258 def list_invalid_properties invalid_properties = Array.new if @body_type.nil? invalid_properties.push('invalid value for "body_type", body_type cannot be nil.') end if @sensitivity.nil? invalid_properties.push('invalid value for "sensitivity", sensitivity cannot be nil.') end if @discriminator.nil? invalid_properties.push('invalid value for "discriminator", discriminator cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
405 406 407 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 405 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
411 412 413 414 415 416 417 418 419 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 411 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 |
#to_s ⇒ String
Returns the string representation of the object
399 400 401 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 399 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
277 278 279 280 281 282 |
# File 'lib/aspose-email-cloud/models/mapi_contact_dto.rb', line 277 def valid? return false if @body_type.nil? return false if @sensitivity.nil? return false if @discriminator.nil? true end |