Class: Pipedrive::BaseMailThread
- Inherits:
-
Object
- Object
- Pipedrive::BaseMailThread
- Defined in:
- lib/pipedrive-openapi-client/models/base_mail_thread.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
The connection account ID.
-
#add_time ⇒ Object
The time when the mail thread was inserted to database.
-
#all_messages_sent_flag ⇒ Object
Whether all the mail thread messages have been sent.
-
#archived_flag ⇒ Object
Returns the value of attribute archived_flag.
-
#deal_id ⇒ Object
ID of the deal.
-
#deal_status ⇒ Object
Status of the deal.
-
#deleted_flag ⇒ Object
Whether the mail thread is deleted.
-
#drafts_parties ⇒ Object
Parties of the drafted mail thread.
-
#external_deleted_flag ⇒ Object
Whether the mail thread has been deleted externally.
-
#first_message_timestamp ⇒ Object
The time when the mail thread has had the first message received or created.
-
#first_message_to_me_flag ⇒ Object
Whether the mail thread was initialized by others.
-
#folders ⇒ Object
Folders in which messages from thread are being stored.
-
#has_attachments_flag ⇒ Object
Whether the mail thread has an attachment.
-
#has_draft_flag ⇒ Object
Whether the mail thread has any drafts.
-
#has_inline_attachments_flag ⇒ Object
Whether the mail thread has inline attachments.
-
#has_real_attachments_flag ⇒ Object
Whether the mail thread has real attachments (which are not inline).
-
#has_sent_flag ⇒ Object
Whether the mail thread has messages sent.
-
#id ⇒ Object
ID of the mail thread.
-
#last_message_received_timestamp ⇒ Object
The last time when the mail thread has had a message received.
-
#last_message_sent_timestamp ⇒ Object
The last time when the mail thread has had a message sent.
-
#last_message_timestamp ⇒ Object
Last message timestamp.
-
#mail_link_tracking_enabled_flag ⇒ Object
Whether the link tracking of the mail thread is enabled.
-
#mail_tracking_status ⇒ Object
Mail tracking status.
-
#message_count ⇒ Object
An amount of messages.
-
#parties ⇒ Object
Returns the value of attribute parties.
-
#read_flag ⇒ Object
Whether the mail thread is read.
-
#shared_flag ⇒ Object
Whether the mail thread is shared.
-
#smart_bcc_flag ⇒ Object
Whether one of the parties of the mail thread is Bcc.
-
#snippet ⇒ Object
A snippet.
-
#snippet_draft ⇒ Object
A snippet from a draft.
-
#snippet_sent ⇒ Object
A snippet from a message sent.
-
#subject ⇒ Object
The subject.
-
#synced_flag ⇒ Object
Whether the mail thread is synced.
-
#update_time ⇒ Object
The time when the mail thread was updated in database received.
-
#user_id ⇒ Object
ID of the user whom mail message will be assigned to.
-
#version ⇒ Object
Version.
-
#write_flag ⇒ Object
We strongly advise you to avoid the use of this property.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ BaseMailThread
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(attributes = {}) ⇒ BaseMailThread
Initializes the object
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 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 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 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 396 397 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 233 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pipedrive::BaseMailThread` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Pipedrive::BaseMailThread`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end if attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] end if attributes.key?(:'subject') self.subject = attributes[:'subject'] end if attributes.key?(:'snippet') self.snippet = attributes[:'snippet'] end if attributes.key?(:'read_flag') self.read_flag = attributes[:'read_flag'] end if attributes.key?(:'mail_tracking_status') self.mail_tracking_status = attributes[:'mail_tracking_status'] end if attributes.key?(:'has_attachments_flag') self. = attributes[:'has_attachments_flag'] end if attributes.key?(:'has_inline_attachments_flag') self. = attributes[:'has_inline_attachments_flag'] end if attributes.key?(:'has_real_attachments_flag') self. = attributes[:'has_real_attachments_flag'] end if attributes.key?(:'deleted_flag') self.deleted_flag = attributes[:'deleted_flag'] end if attributes.key?(:'synced_flag') self.synced_flag = attributes[:'synced_flag'] end if attributes.key?(:'smart_bcc_flag') self.smart_bcc_flag = attributes[:'smart_bcc_flag'] end if attributes.key?(:'mail_link_tracking_enabled_flag') self.mail_link_tracking_enabled_flag = attributes[:'mail_link_tracking_enabled_flag'] end if attributes.key?(:'write_flag') self.write_flag = attributes[:'write_flag'] end if attributes.key?(:'parties') self.parties = attributes[:'parties'] end if attributes.key?(:'drafts_parties') if (value = attributes[:'drafts_parties']).is_a?(Array) self.drafts_parties = value end end if attributes.key?(:'folders') if (value = attributes[:'folders']).is_a?(Array) self.folders = value end end if attributes.key?(:'version') self.version = attributes[:'version'] end if attributes.key?(:'snippet_draft') self.snippet_draft = attributes[:'snippet_draft'] end if attributes.key?(:'snippet_sent') self.snippet_sent = attributes[:'snippet_sent'] end if attributes.key?(:'message_count') self. = attributes[:'message_count'] end if attributes.key?(:'has_draft_flag') self.has_draft_flag = attributes[:'has_draft_flag'] end if attributes.key?(:'has_sent_flag') self.has_sent_flag = attributes[:'has_sent_flag'] end if attributes.key?(:'archived_flag') self.archived_flag = attributes[:'archived_flag'] end if attributes.key?(:'shared_flag') self.shared_flag = attributes[:'shared_flag'] end if attributes.key?(:'external_deleted_flag') self.external_deleted_flag = attributes[:'external_deleted_flag'] end if attributes.key?(:'first_message_to_me_flag') self. = attributes[:'first_message_to_me_flag'] end if attributes.key?(:'last_message_timestamp') self. = attributes[:'last_message_timestamp'] end if attributes.key?(:'first_message_timestamp') self. = attributes[:'first_message_timestamp'] end if attributes.key?(:'last_message_sent_timestamp') self. = attributes[:'last_message_sent_timestamp'] end if attributes.key?(:'last_message_received_timestamp') self. = attributes[:'last_message_received_timestamp'] end if attributes.key?(:'add_time') self.add_time = attributes[:'add_time'] end if attributes.key?(:'update_time') self.update_time = attributes[:'update_time'] end if attributes.key?(:'deal_id') self.deal_id = attributes[:'deal_id'] end if attributes.key?(:'deal_status') self.deal_status = attributes[:'deal_status'] end if attributes.key?(:'all_messages_sent_flag') self. = attributes[:'all_messages_sent_flag'] end end |
Instance Attribute Details
#account_id ⇒ Object
The connection account ID
21 22 23 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 21 def account_id @account_id end |
#add_time ⇒ Object
The time when the mail thread was inserted to database
112 113 114 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 112 def add_time @add_time end |
#all_messages_sent_flag ⇒ Object
Whether all the mail thread messages have been sent
124 125 126 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 124 def @all_messages_sent_flag end |
#archived_flag ⇒ Object
Returns the value of attribute archived_flag.
88 89 90 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 88 def archived_flag @archived_flag end |
#deal_id ⇒ Object
ID of the deal
118 119 120 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 118 def deal_id @deal_id end |
#deal_status ⇒ Object
Status of the deal
121 122 123 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 121 def deal_status @deal_status end |
#deleted_flag ⇒ Object
Whether the mail thread is deleted
48 49 50 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 48 def deleted_flag @deleted_flag end |
#drafts_parties ⇒ Object
Parties of the drafted mail thread
65 66 67 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 65 def drafts_parties @drafts_parties end |
#external_deleted_flag ⇒ Object
Whether the mail thread has been deleted externally
94 95 96 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 94 def external_deleted_flag @external_deleted_flag end |
#first_message_timestamp ⇒ Object
The time when the mail thread has had the first message received or created
103 104 105 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 103 def @first_message_timestamp end |
#first_message_to_me_flag ⇒ Object
Whether the mail thread was initialized by others
97 98 99 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 97 def @first_message_to_me_flag end |
#folders ⇒ Object
Folders in which messages from thread are being stored
68 69 70 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 68 def folders @folders end |
#has_attachments_flag ⇒ Object
Whether the mail thread has an attachment
39 40 41 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 39 def @has_attachments_flag end |
#has_draft_flag ⇒ Object
Whether the mail thread has any drafts
83 84 85 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 83 def has_draft_flag @has_draft_flag end |
#has_inline_attachments_flag ⇒ Object
Whether the mail thread has inline attachments
42 43 44 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 42 def @has_inline_attachments_flag end |
#has_real_attachments_flag ⇒ Object
Whether the mail thread has real attachments (which are not inline)
45 46 47 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 45 def @has_real_attachments_flag end |
#has_sent_flag ⇒ Object
Whether the mail thread has messages sent
86 87 88 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 86 def has_sent_flag @has_sent_flag end |
#id ⇒ Object
ID of the mail thread
18 19 20 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 18 def id @id end |
#last_message_received_timestamp ⇒ Object
The last time when the mail thread has had a message received
109 110 111 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 109 def @last_message_received_timestamp end |
#last_message_sent_timestamp ⇒ Object
The last time when the mail thread has had a message sent
106 107 108 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 106 def @last_message_sent_timestamp end |
#last_message_timestamp ⇒ Object
Last message timestamp
100 101 102 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 100 def @last_message_timestamp end |
#mail_link_tracking_enabled_flag ⇒ Object
Whether the link tracking of the mail thread is enabled
57 58 59 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 57 def mail_link_tracking_enabled_flag @mail_link_tracking_enabled_flag end |
#mail_tracking_status ⇒ Object
Mail tracking status
36 37 38 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 36 def mail_tracking_status @mail_tracking_status end |
#message_count ⇒ Object
An amount of messages
80 81 82 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 80 def @message_count end |
#parties ⇒ Object
Returns the value of attribute parties.
62 63 64 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 62 def parties @parties end |
#read_flag ⇒ Object
Whether the mail thread is read
33 34 35 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 33 def read_flag @read_flag end |
#shared_flag ⇒ Object
Whether the mail thread is shared
91 92 93 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 91 def shared_flag @shared_flag end |
#smart_bcc_flag ⇒ Object
Whether one of the parties of the mail thread is Bcc
54 55 56 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 54 def smart_bcc_flag @smart_bcc_flag end |
#snippet ⇒ Object
A snippet
30 31 32 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 30 def snippet @snippet end |
#snippet_draft ⇒ Object
A snippet from a draft
74 75 76 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 74 def snippet_draft @snippet_draft end |
#snippet_sent ⇒ Object
A snippet from a message sent
77 78 79 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 77 def snippet_sent @snippet_sent end |
#subject ⇒ Object
The subject
27 28 29 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 27 def subject @subject end |
#synced_flag ⇒ Object
Whether the mail thread is synced
51 52 53 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 51 def synced_flag @synced_flag end |
#update_time ⇒ Object
The time when the mail thread was updated in database received
115 116 117 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 115 def update_time @update_time end |
#user_id ⇒ Object
ID of the user whom mail message will be assigned to
24 25 26 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 24 def user_id @user_id end |
#version ⇒ Object
Version
71 72 73 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 71 def version @version end |
#write_flag ⇒ Object
We strongly advise you to avoid the use of this property. We will soon deprecate this property
60 61 62 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 60 def write_flag @write_flag end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 127 def self.attribute_map { :'id' => :'id', :'account_id' => :'account_id', :'user_id' => :'user_id', :'subject' => :'subject', :'snippet' => :'snippet', :'read_flag' => :'read_flag', :'mail_tracking_status' => :'mail_tracking_status', :'has_attachments_flag' => :'has_attachments_flag', :'has_inline_attachments_flag' => :'has_inline_attachments_flag', :'has_real_attachments_flag' => :'has_real_attachments_flag', :'deleted_flag' => :'deleted_flag', :'synced_flag' => :'synced_flag', :'smart_bcc_flag' => :'smart_bcc_flag', :'mail_link_tracking_enabled_flag' => :'mail_link_tracking_enabled_flag', :'write_flag' => :'write_flag', :'parties' => :'parties', :'drafts_parties' => :'drafts_parties', :'folders' => :'folders', :'version' => :'version', :'snippet_draft' => :'snippet_draft', :'snippet_sent' => :'snippet_sent', :'message_count' => :'message_count', :'has_draft_flag' => :'has_draft_flag', :'has_sent_flag' => :'has_sent_flag', :'archived_flag' => :'archived_flag', :'shared_flag' => :'shared_flag', :'external_deleted_flag' => :'external_deleted_flag', :'first_message_to_me_flag' => :'first_message_to_me_flag', :'last_message_timestamp' => :'last_message_timestamp', :'first_message_timestamp' => :'first_message_timestamp', :'last_message_sent_timestamp' => :'last_message_sent_timestamp', :'last_message_received_timestamp' => :'last_message_received_timestamp', :'add_time' => :'add_time', :'update_time' => :'update_time', :'deal_id' => :'deal_id', :'deal_status' => :'deal_status', :'all_messages_sent_flag' => :'all_messages_sent_flag' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
471 472 473 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 471 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
224 225 226 227 228 229 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 224 def self.openapi_all_of [ :'BaseMailThreadAllOf', :'CommonMailThread' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
213 214 215 216 217 218 219 220 221 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 213 def self.openapi_nullable Set.new([ :'mail_tracking_status', :'snippet_draft', :'last_message_sent_timestamp', :'deal_id', :'deal_status', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 170 def self.openapi_types { :'id' => :'Integer', :'account_id' => :'String', :'user_id' => :'Integer', :'subject' => :'String', :'snippet' => :'String', :'read_flag' => :'NumberBooleanDefault0', :'mail_tracking_status' => :'String', :'has_attachments_flag' => :'NumberBooleanDefault0', :'has_inline_attachments_flag' => :'NumberBooleanDefault0', :'has_real_attachments_flag' => :'NumberBooleanDefault0', :'deleted_flag' => :'NumberBooleanDefault0', :'synced_flag' => :'NumberBooleanDefault0', :'smart_bcc_flag' => :'NumberBooleanDefault0', :'mail_link_tracking_enabled_flag' => :'NumberBooleanDefault0', :'write_flag' => :'Boolean', :'parties' => :'BaseMailThreadAllOfParties', :'drafts_parties' => :'Array<Object>', :'folders' => :'Array<String>', :'version' => :'Float', :'snippet_draft' => :'String', :'snippet_sent' => :'String', :'message_count' => :'Integer', :'has_draft_flag' => :'NumberBooleanDefault0', :'has_sent_flag' => :'NumberBooleanDefault0', :'archived_flag' => :'NumberBoolean', :'shared_flag' => :'NumberBooleanDefault0', :'external_deleted_flag' => :'NumberBooleanDefault0', :'first_message_to_me_flag' => :'NumberBooleanDefault0', :'last_message_timestamp' => :'DateTime', :'first_message_timestamp' => :'DateTime', :'last_message_sent_timestamp' => :'DateTime', :'last_message_received_timestamp' => :'DateTime', :'add_time' => :'DateTime', :'update_time' => :'DateTime', :'deal_id' => :'Integer', :'deal_status' => :'String', :'all_messages_sent_flag' => :'NumberBooleanDefault0' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 414 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && account_id == o.account_id && user_id == o.user_id && subject == o.subject && snippet == o.snippet && read_flag == o.read_flag && mail_tracking_status == o.mail_tracking_status && == o. && == o. && == o. && deleted_flag == o.deleted_flag && synced_flag == o.synced_flag && smart_bcc_flag == o.smart_bcc_flag && mail_link_tracking_enabled_flag == o.mail_link_tracking_enabled_flag && write_flag == o.write_flag && parties == o.parties && drafts_parties == o.drafts_parties && folders == o.folders && version == o.version && snippet_draft == o.snippet_draft && snippet_sent == o.snippet_sent && == o. && has_draft_flag == o.has_draft_flag && has_sent_flag == o.has_sent_flag && archived_flag == o.archived_flag && shared_flag == o.shared_flag && external_deleted_flag == o.external_deleted_flag && == o. && == o. && == o. && == o. && == o. && add_time == o.add_time && update_time == o.update_time && deal_id == o.deal_id && deal_status == o.deal_status && == o. end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 499 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 Pipedrive.const_get(type).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
568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 568 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
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 478 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
458 459 460 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 458 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
464 465 466 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 464 def hash [id, account_id, user_id, subject, snippet, read_flag, mail_tracking_status, , , , deleted_flag, synced_flag, smart_bcc_flag, mail_link_tracking_enabled_flag, write_flag, parties, drafts_parties, folders, version, snippet_draft, snippet_sent, , has_draft_flag, has_sent_flag, archived_flag, shared_flag, external_deleted_flag, , , , , , add_time, update_time, deal_id, deal_status, ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
401 402 403 404 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 401 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
544 545 546 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 544 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 550 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
538 539 540 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 538 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
408 409 410 |
# File 'lib/pipedrive-openapi-client/models/base_mail_thread.rb', line 408 def valid? true end |