Class: Pipedrive::BaseDeal
- Inherits:
-
Object
- Object
- Pipedrive::BaseDeal
- Defined in:
- lib/pipedrive-openapi-client/models/base_deal.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
If the Deal is activated or not.
-
#activities_count ⇒ Object
The number of Activities associated with the Deal.
-
#add_time ⇒ Object
The creation date and time of the Deal.
-
#cc_email ⇒ Object
The Cc email of the Deal.
-
#close_time ⇒ Object
The date and time of closing the Deal.
-
#currency ⇒ Object
The currency associated with the Deal.
-
#deleted ⇒ Object
If the Deal is deleted or not.
-
#done_activities_count ⇒ Object
The number of completed Activities associated with the Deal.
-
#email_messages_count ⇒ Object
The number of emails associated with the Deal.
-
#expected_close_date ⇒ Object
The expected close date and time of the Deal.
-
#files_count ⇒ Object
The number of Files associated with the Deal.
-
#first_won_time ⇒ Object
The date and time of the first time changing the Deal status as won.
-
#followers_count ⇒ Object
The number of Followers associated with the Deal.
-
#formatted_value ⇒ Object
The Deal value formatted with selected currency.
-
#formatted_weighted_value ⇒ Object
The weighted_value formatted with selected currency.
-
#label ⇒ Object
The label assigned to the Deal.
-
#last_activity_date ⇒ Object
The date of the last activity associated with the Deal.
-
#last_activity_id ⇒ Object
The ID of the last activity associated with the Deal.
-
#last_incoming_mail_time ⇒ Object
The date and time of the last incoming email associated with the Deal.
-
#last_outgoing_mail_time ⇒ Object
The date and time of the last outgoing email associated with the Deal.
-
#lost_reason ⇒ Object
The reason for losing the Deal.
-
#lost_time ⇒ Object
The date and time of changing the Deal status as lost.
-
#next_activity_date ⇒ Object
The date of the next activity associated with the Deal.
-
#next_activity_duration ⇒ Object
The duration of the next activity associated with the Deal.
-
#next_activity_id ⇒ Object
The ID of the next activity associated with the Deal.
-
#next_activity_note ⇒ Object
The note of the next activity associated with the Deal.
-
#next_activity_subject ⇒ Object
The subject of the next activity associated with the Deal.
-
#next_activity_time ⇒ Object
The time of the next activity associated with the Deal.
-
#next_activity_type ⇒ Object
The type of the next activity associated with the Deal.
-
#notes_count ⇒ Object
The number of Notes associated with the Deal.
-
#org_hidden ⇒ Object
If the Organization that is associated with the Deal is hidden or not.
-
#org_name ⇒ Object
The name of the Organization associated with the Deal.
-
#owner_name ⇒ Object
The name of the Deal owner.
-
#participants_count ⇒ Object
The number of Participants associated with the Deal.
-
#person_hidden ⇒ Object
If the Person that is associated with the Deal is hidden or not.
-
#person_name ⇒ Object
The name of the Person associated with the Deal.
-
#pipeline_id ⇒ Object
The ID of pipeline associated with the Deal.
-
#probability ⇒ Object
The success probability percentage of the Deal.
-
#products_count ⇒ Object
The number of Products associated with the Deal.
-
#rotten_time ⇒ Object
The date and time of changing the Deal status as rotten.
-
#stage_change_time ⇒ Object
The last updated date and time of the Deal stage.
-
#stage_id ⇒ Object
The ID of the Deal stage.
-
#stage_order_nr ⇒ Object
The order number of the Deal stage associated with the Deal.
-
#status ⇒ Object
The status of the Deal.
-
#title ⇒ Object
The title of the Deal.
-
#undone_activities_count ⇒ Object
The number of incomplete Activities associated with the Deal.
-
#update_time ⇒ Object
The last updated date and time of the Deal.
-
#value ⇒ Object
The value of the Deal.
-
#visible_to ⇒ Object
The visibility of the Deal.
-
#weighted_value ⇒ Object
Probability times Deal value.
-
#weighted_value_currency ⇒ Object
The currency associated with the Deal.
-
#won_time ⇒ Object
The date and time of changing the Deal status as won.
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_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 = {}) ⇒ BaseDeal
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 = {}) ⇒ BaseDeal
Initializes the object
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 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 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 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 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 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 304 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pipedrive::BaseDeal` 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::BaseDeal`. 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?(:'stage_id') self.stage_id = attributes[:'stage_id'] end if attributes.key?(:'title') self.title = attributes[:'title'] end if attributes.key?(:'value') self.value = attributes[:'value'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] 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?(:'stage_change_time') self.stage_change_time = attributes[:'stage_change_time'] end if attributes.key?(:'active') self.active = attributes[:'active'] end if attributes.key?(:'deleted') self.deleted = attributes[:'deleted'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'probability') self.probability = attributes[:'probability'] end if attributes.key?(:'next_activity_date') self.next_activity_date = attributes[:'next_activity_date'] end if attributes.key?(:'next_activity_time') self.next_activity_time = attributes[:'next_activity_time'] end if attributes.key?(:'next_activity_id') self.next_activity_id = attributes[:'next_activity_id'] end if attributes.key?(:'last_activity_id') self.last_activity_id = attributes[:'last_activity_id'] end if attributes.key?(:'last_activity_date') self.last_activity_date = attributes[:'last_activity_date'] end if attributes.key?(:'lost_reason') self.lost_reason = attributes[:'lost_reason'] end if attributes.key?(:'visible_to') self.visible_to = attributes[:'visible_to'] end if attributes.key?(:'close_time') self.close_time = attributes[:'close_time'] end if attributes.key?(:'pipeline_id') self.pipeline_id = attributes[:'pipeline_id'] end if attributes.key?(:'won_time') self.won_time = attributes[:'won_time'] end if attributes.key?(:'first_won_time') self.first_won_time = attributes[:'first_won_time'] end if attributes.key?(:'lost_time') self.lost_time = attributes[:'lost_time'] end if attributes.key?(:'products_count') self.products_count = attributes[:'products_count'] end if attributes.key?(:'files_count') self.files_count = attributes[:'files_count'] end if attributes.key?(:'notes_count') self.notes_count = attributes[:'notes_count'] end if attributes.key?(:'followers_count') self.followers_count = attributes[:'followers_count'] end if attributes.key?(:'email_messages_count') self. = attributes[:'email_messages_count'] end if attributes.key?(:'activities_count') self.activities_count = attributes[:'activities_count'] end if attributes.key?(:'done_activities_count') self.done_activities_count = attributes[:'done_activities_count'] end if attributes.key?(:'undone_activities_count') self.undone_activities_count = attributes[:'undone_activities_count'] end if attributes.key?(:'participants_count') self.participants_count = attributes[:'participants_count'] end if attributes.key?(:'expected_close_date') self.expected_close_date = attributes[:'expected_close_date'] end if attributes.key?(:'last_incoming_mail_time') self.last_incoming_mail_time = attributes[:'last_incoming_mail_time'] end if attributes.key?(:'last_outgoing_mail_time') self.last_outgoing_mail_time = attributes[:'last_outgoing_mail_time'] end if attributes.key?(:'label') self.label = attributes[:'label'] end if attributes.key?(:'stage_order_nr') self.stage_order_nr = attributes[:'stage_order_nr'] end if attributes.key?(:'person_name') self.person_name = attributes[:'person_name'] end if attributes.key?(:'org_name') self.org_name = attributes[:'org_name'] end if attributes.key?(:'next_activity_subject') self.next_activity_subject = attributes[:'next_activity_subject'] end if attributes.key?(:'next_activity_type') self.next_activity_type = attributes[:'next_activity_type'] end if attributes.key?(:'next_activity_duration') self.next_activity_duration = attributes[:'next_activity_duration'] end if attributes.key?(:'next_activity_note') self.next_activity_note = attributes[:'next_activity_note'] end if attributes.key?(:'formatted_value') self.formatted_value = attributes[:'formatted_value'] end if attributes.key?(:'weighted_value') self.weighted_value = attributes[:'weighted_value'] end if attributes.key?(:'formatted_weighted_value') self.formatted_weighted_value = attributes[:'formatted_weighted_value'] end if attributes.key?(:'weighted_value_currency') self.weighted_value_currency = attributes[:'weighted_value_currency'] end if attributes.key?(:'rotten_time') self.rotten_time = attributes[:'rotten_time'] end if attributes.key?(:'owner_name') self.owner_name = attributes[:'owner_name'] end if attributes.key?(:'cc_email') self.cc_email = attributes[:'cc_email'] end if attributes.key?(:'org_hidden') self.org_hidden = attributes[:'org_hidden'] end if attributes.key?(:'person_hidden') self.person_hidden = attributes[:'person_hidden'] end end |
Instance Attribute Details
#active ⇒ Object
If the Deal is activated or not
39 40 41 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 39 def active @active end |
#activities_count ⇒ Object
The number of Activities associated with the Deal
102 103 104 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 102 def activities_count @activities_count end |
#add_time ⇒ Object
The creation date and time of the Deal
30 31 32 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 30 def add_time @add_time end |
#cc_email ⇒ Object
The Cc email of the Deal
165 166 167 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 165 def cc_email @cc_email end |
#close_time ⇒ Object
The date and time of closing the Deal
72 73 74 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 72 def close_time @close_time end |
#currency ⇒ Object
The currency associated with the Deal
27 28 29 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 27 def currency @currency end |
#deleted ⇒ Object
If the Deal is deleted or not
42 43 44 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 42 def deleted @deleted end |
#done_activities_count ⇒ Object
The number of completed Activities associated with the Deal
105 106 107 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 105 def done_activities_count @done_activities_count end |
#email_messages_count ⇒ Object
The number of emails associated with the Deal
99 100 101 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 99 def end |
#expected_close_date ⇒ Object
The expected close date and time of the Deal
114 115 116 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 114 def expected_close_date @expected_close_date end |
#files_count ⇒ Object
The number of Files associated with the Deal
90 91 92 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 90 def files_count @files_count end |
#first_won_time ⇒ Object
The date and time of the first time changing the Deal status as won
81 82 83 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 81 def first_won_time @first_won_time end |
#followers_count ⇒ Object
The number of Followers associated with the Deal
96 97 98 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 96 def followers_count @followers_count end |
#formatted_value ⇒ Object
The Deal value formatted with selected currency. E.g. US$500
147 148 149 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 147 def formatted_value @formatted_value end |
#formatted_weighted_value ⇒ Object
The weighted_value formatted with selected currency. E.g. US$500
153 154 155 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 153 def formatted_weighted_value @formatted_weighted_value end |
#label ⇒ Object
The label assigned to the Deal
123 124 125 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 123 def label @label end |
#last_activity_date ⇒ Object
The date of the last activity associated with the Deal
63 64 65 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 63 def last_activity_date @last_activity_date end |
#last_activity_id ⇒ Object
The ID of the last activity associated with the Deal
60 61 62 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 60 def last_activity_id @last_activity_id end |
#last_incoming_mail_time ⇒ Object
The date and time of the last incoming email associated with the Deal
117 118 119 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 117 def last_incoming_mail_time @last_incoming_mail_time end |
#last_outgoing_mail_time ⇒ Object
The date and time of the last outgoing email associated with the Deal
120 121 122 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 120 def last_outgoing_mail_time @last_outgoing_mail_time end |
#lost_reason ⇒ Object
The reason for losing the Deal
66 67 68 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 66 def lost_reason @lost_reason end |
#lost_time ⇒ Object
The date and time of changing the Deal status as lost
84 85 86 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 84 def lost_time @lost_time end |
#next_activity_date ⇒ Object
The date of the next activity associated with the Deal
51 52 53 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 51 def next_activity_date @next_activity_date end |
#next_activity_duration ⇒ Object
The duration of the next activity associated with the Deal
141 142 143 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 141 def next_activity_duration @next_activity_duration end |
#next_activity_id ⇒ Object
The ID of the next activity associated with the Deal
57 58 59 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 57 def next_activity_id @next_activity_id end |
#next_activity_note ⇒ Object
The note of the next activity associated with the Deal
144 145 146 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 144 def next_activity_note @next_activity_note end |
#next_activity_subject ⇒ Object
The subject of the next activity associated with the Deal
135 136 137 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 135 def next_activity_subject @next_activity_subject end |
#next_activity_time ⇒ Object
The time of the next activity associated with the Deal
54 55 56 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 54 def next_activity_time @next_activity_time end |
#next_activity_type ⇒ Object
The type of the next activity associated with the Deal
138 139 140 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 138 def next_activity_type @next_activity_type end |
#notes_count ⇒ Object
The number of Notes associated with the Deal
93 94 95 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 93 def notes_count @notes_count end |
#org_hidden ⇒ Object
If the Organization that is associated with the Deal is hidden or not
168 169 170 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 168 def org_hidden @org_hidden end |
#org_name ⇒ Object
The name of the Organization associated with the Deal
132 133 134 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 132 def org_name @org_name end |
#owner_name ⇒ Object
The name of the Deal owner
162 163 164 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 162 def owner_name @owner_name end |
#participants_count ⇒ Object
The number of Participants associated with the Deal
111 112 113 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 111 def participants_count @participants_count end |
#person_hidden ⇒ Object
If the Person that is associated with the Deal is hidden or not
171 172 173 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 171 def person_hidden @person_hidden end |
#person_name ⇒ Object
The name of the Person associated with the Deal
129 130 131 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 129 def person_name @person_name end |
#pipeline_id ⇒ Object
The ID of pipeline associated with the Deal
75 76 77 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 75 def pipeline_id @pipeline_id end |
#probability ⇒ Object
The success probability percentage of the Deal
48 49 50 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 48 def probability @probability end |
#products_count ⇒ Object
The number of Products associated with the Deal
87 88 89 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 87 def products_count @products_count end |
#rotten_time ⇒ Object
The date and time of changing the Deal status as rotten
159 160 161 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 159 def rotten_time @rotten_time end |
#stage_change_time ⇒ Object
The last updated date and time of the Deal stage
36 37 38 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 36 def stage_change_time @stage_change_time end |
#stage_id ⇒ Object
The ID of the Deal stage
18 19 20 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 18 def stage_id @stage_id end |
#stage_order_nr ⇒ Object
The order number of the Deal stage associated with the Deal
126 127 128 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 126 def stage_order_nr @stage_order_nr end |
#status ⇒ Object
The status of the Deal
45 46 47 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 45 def status @status end |
#title ⇒ Object
The title of the Deal
21 22 23 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 21 def title @title end |
#undone_activities_count ⇒ Object
The number of incomplete Activities associated with the Deal
108 109 110 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 108 def undone_activities_count @undone_activities_count end |
#update_time ⇒ Object
The last updated date and time of the Deal
33 34 35 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 33 def update_time @update_time end |
#value ⇒ Object
The value of the Deal
24 25 26 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 24 def value @value end |
#visible_to ⇒ Object
The visibility of the Deal
69 70 71 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 69 def visible_to @visible_to end |
#weighted_value ⇒ Object
Probability times Deal value. Probability can either be Deal probability or if not set, then stage probability.
150 151 152 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 150 def weighted_value @weighted_value end |
#weighted_value_currency ⇒ Object
The currency associated with the Deal
156 157 158 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 156 def weighted_value_currency @weighted_value_currency end |
#won_time ⇒ Object
The date and time of changing the Deal status as won
78 79 80 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 78 def won_time @won_time end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 174 def self.attribute_map { :'stage_id' => :'stage_id', :'title' => :'title', :'value' => :'value', :'currency' => :'currency', :'add_time' => :'add_time', :'update_time' => :'update_time', :'stage_change_time' => :'stage_change_time', :'active' => :'active', :'deleted' => :'deleted', :'status' => :'status', :'probability' => :'probability', :'next_activity_date' => :'next_activity_date', :'next_activity_time' => :'next_activity_time', :'next_activity_id' => :'next_activity_id', :'last_activity_id' => :'last_activity_id', :'last_activity_date' => :'last_activity_date', :'lost_reason' => :'lost_reason', :'visible_to' => :'visible_to', :'close_time' => :'close_time', :'pipeline_id' => :'pipeline_id', :'won_time' => :'won_time', :'first_won_time' => :'first_won_time', :'lost_time' => :'lost_time', :'products_count' => :'products_count', :'files_count' => :'files_count', :'notes_count' => :'notes_count', :'followers_count' => :'followers_count', :'email_messages_count' => :'email_messages_count', :'activities_count' => :'activities_count', :'done_activities_count' => :'done_activities_count', :'undone_activities_count' => :'undone_activities_count', :'participants_count' => :'participants_count', :'expected_close_date' => :'expected_close_date', :'last_incoming_mail_time' => :'last_incoming_mail_time', :'last_outgoing_mail_time' => :'last_outgoing_mail_time', :'label' => :'label', :'stage_order_nr' => :'stage_order_nr', :'person_name' => :'person_name', :'org_name' => :'org_name', :'next_activity_subject' => :'next_activity_subject', :'next_activity_type' => :'next_activity_type', :'next_activity_duration' => :'next_activity_duration', :'next_activity_note' => :'next_activity_note', :'formatted_value' => :'formatted_value', :'weighted_value' => :'weighted_value', :'formatted_weighted_value' => :'formatted_weighted_value', :'weighted_value_currency' => :'weighted_value_currency', :'rotten_time' => :'rotten_time', :'owner_name' => :'owner_name', :'cc_email' => :'cc_email', :'org_hidden' => :'org_hidden', :'person_hidden' => :'person_hidden' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
613 614 615 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 613 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 290 def self.openapi_nullable Set.new([ :'probability', :'next_activity_id', :'last_activity_id', :'last_activity_date', :'lost_reason', :'close_time', :'rotten_time', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
232 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 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 232 def self.openapi_types { :'stage_id' => :'Integer', :'title' => :'String', :'value' => :'Float', :'currency' => :'String', :'add_time' => :'String', :'update_time' => :'String', :'stage_change_time' => :'String', :'active' => :'Boolean', :'deleted' => :'Boolean', :'status' => :'String', :'probability' => :'Float', :'next_activity_date' => :'String', :'next_activity_time' => :'String', :'next_activity_id' => :'Integer', :'last_activity_id' => :'Integer', :'last_activity_date' => :'String', :'lost_reason' => :'String', :'visible_to' => :'String', :'close_time' => :'String', :'pipeline_id' => :'Integer', :'won_time' => :'String', :'first_won_time' => :'String', :'lost_time' => :'String', :'products_count' => :'Integer', :'files_count' => :'Integer', :'notes_count' => :'Integer', :'followers_count' => :'Integer', :'email_messages_count' => :'Integer', :'activities_count' => :'Integer', :'done_activities_count' => :'Integer', :'undone_activities_count' => :'Integer', :'participants_count' => :'Integer', :'expected_close_date' => :'String', :'last_incoming_mail_time' => :'String', :'last_outgoing_mail_time' => :'String', :'label' => :'String', :'stage_order_nr' => :'Integer', :'person_name' => :'String', :'org_name' => :'String', :'next_activity_subject' => :'String', :'next_activity_type' => :'String', :'next_activity_duration' => :'String', :'next_activity_note' => :'String', :'formatted_value' => :'String', :'weighted_value' => :'Float', :'formatted_weighted_value' => :'String', :'weighted_value_currency' => :'String', :'rotten_time' => :'String', :'owner_name' => :'String', :'cc_email' => :'String', :'org_hidden' => :'Boolean', :'person_hidden' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 541 def ==(o) return true if self.equal?(o) self.class == o.class && stage_id == o.stage_id && title == o.title && value == o.value && currency == o.currency && add_time == o.add_time && update_time == o.update_time && stage_change_time == o.stage_change_time && active == o.active && deleted == o.deleted && status == o.status && probability == o.probability && next_activity_date == o.next_activity_date && next_activity_time == o.next_activity_time && next_activity_id == o.next_activity_id && last_activity_id == o.last_activity_id && last_activity_date == o.last_activity_date && lost_reason == o.lost_reason && visible_to == o.visible_to && close_time == o.close_time && pipeline_id == o.pipeline_id && won_time == o.won_time && first_won_time == o.first_won_time && lost_time == o.lost_time && products_count == o.products_count && files_count == o.files_count && notes_count == o.notes_count && followers_count == o.followers_count && == o. && activities_count == o.activities_count && done_activities_count == o.done_activities_count && undone_activities_count == o.undone_activities_count && participants_count == o.participants_count && expected_close_date == o.expected_close_date && last_incoming_mail_time == o.last_incoming_mail_time && last_outgoing_mail_time == o.last_outgoing_mail_time && label == o.label && stage_order_nr == o.stage_order_nr && person_name == o.person_name && org_name == o.org_name && next_activity_subject == o.next_activity_subject && next_activity_type == o.next_activity_type && next_activity_duration == o.next_activity_duration && next_activity_note == o.next_activity_note && formatted_value == o.formatted_value && weighted_value == o.weighted_value && formatted_weighted_value == o.formatted_weighted_value && weighted_value_currency == o.weighted_value_currency && rotten_time == o.rotten_time && owner_name == o.owner_name && cc_email == o.cc_email && org_hidden == o.org_hidden && person_hidden == o.person_hidden end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 641 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
710 711 712 713 714 715 716 717 718 719 720 721 722 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 710 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
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 620 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
600 601 602 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 600 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
606 607 608 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 606 def hash [stage_id, title, value, currency, add_time, update_time, stage_change_time, active, deleted, status, probability, next_activity_date, next_activity_time, next_activity_id, last_activity_id, last_activity_date, lost_reason, visible_to, close_time, pipeline_id, won_time, first_won_time, lost_time, products_count, files_count, notes_count, followers_count, , activities_count, done_activities_count, undone_activities_count, participants_count, expected_close_date, last_incoming_mail_time, last_outgoing_mail_time, label, stage_order_nr, person_name, org_name, next_activity_subject, next_activity_type, next_activity_duration, next_activity_note, formatted_value, weighted_value, formatted_weighted_value, weighted_value_currency, rotten_time, owner_name, cc_email, org_hidden, person_hidden].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
528 529 530 531 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 528 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
686 687 688 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 686 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
692 693 694 695 696 697 698 699 700 701 702 703 704 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 692 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
680 681 682 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 680 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
535 536 537 |
# File 'lib/pipedrive-openapi-client/models/base_deal.rb', line 535 def valid? true end |