Class: Propertyware::Prospect
- Inherits:
-
Object
- Object
- Propertyware::Prospect
- Defined in:
- lib/propertyware/models/prospect.rb
Overview
Prospect
Instance Attribute Summary collapse
-
#application_fee_paid ⇒ Object
Indicates if the application fee has been paid by the prospect.
-
#assigne_full_name ⇒ Object
Name of the assigned prospect.
-
#building_id ⇒ Object
Id of the building associated with the prospect.
-
#city_desired ⇒ Object
Desired city.
-
#comments ⇒ Object
Indicates if the prospect has any comments.
-
#contacts ⇒ Object
Contacts of the prospect.
-
#created_by ⇒ Object
User who created the record.
-
#created_date_time ⇒ Object
Date and time the record was created.
-
#current_home_type ⇒ Object
Current home type.
-
#current_rent_mortgage ⇒ Object
Current home mortgage.
-
#custom_fields ⇒ Object
Custom fields.
-
#has_pets ⇒ Object
Indicates if the prospect has pets.
-
#id ⇒ Object
Unique identifier.
-
#last_modified_by ⇒ Object
User who last modified the record.
-
#last_modified_date_time ⇒ Object
Date and time the record was last modified.
-
#lease_end_date ⇒ Object
Confirmed lease end date.
-
#lease_start_date ⇒ Object
Confirmed lease start date.
-
#move_in_date ⇒ Object
Desired move-in date.
-
#neighborhood_desired ⇒ Object
Desired neighborhood.
-
#number_bathrooms ⇒ Object
Number of bathrooms desired by the prospect.
-
#number_bedrooms ⇒ Object
Number of bedrooms desired by the prospect.
-
#number_of_pets ⇒ Object
Number of pets.
-
#pet_type ⇒ Object
Pet type.
-
#pet_weights ⇒ Object
Pet weights.
-
#portfolio_id ⇒ Object
Id of the portfolio associated with the prospect.
-
#preferred_contact_method ⇒ Object
Preferred contact method.
-
#property_address ⇒ Object
Address of the property.
-
#property_address2 ⇒ Object
Additional address information of the property.
-
#property_area ⇒ Object
Area of the property.
-
#property_area_units ⇒ Object
Unit of measurement for the area of the property.
-
#property_city ⇒ Object
City of the property.
-
#property_country ⇒ Object
Country of the property.
-
#property_number_bathrooms ⇒ Object
Number of bathrooms.
-
#property_number_bedrooms ⇒ Object
Number of bedrooms.
-
#property_state ⇒ Object
State of the property.
-
#property_zip ⇒ Object
Zip code of the property.
-
#reason_for_moving ⇒ Object
Reason for moving.
-
#rent ⇒ Object
Confirmed lease rent.
-
#rent_max ⇒ Object
Maximum desired rent.
-
#rent_min ⇒ Object
Minimum desired rent.
-
#security_deposit ⇒ Object
Confirmed lease security deposit.
-
#source ⇒ Object
Prospect source.
-
#state_desired ⇒ Object
Desired state.
-
#status ⇒ Object
Status.
-
#time_at_current_residence ⇒ Object
Time the prospect is living at the current residence.
-
#type ⇒ Object
Prospect type.
-
#type_of_inquiry ⇒ Object
Type of inquiry made by the prospect.
-
#unit_desired ⇒ Object
Desired unit.
-
#unit_id ⇒ Object
Id of the unit associated with the prospect.
-
#unit_type_desired ⇒ Object
Desired unit type.
-
#zip_desired ⇒ Object
Desired zip code.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.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 = {}) ⇒ Prospect
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 = {}) ⇒ Prospect
Initializes the object
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 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 |
# File 'lib/propertyware/models/prospect.rb', line 299 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Propertyware::Prospect` 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 `Propertyware::Prospect`. 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?(:'application_fee_paid') self.application_fee_paid = attributes[:'application_fee_paid'] end if attributes.key?(:'assigne_full_name') self.assigne_full_name = attributes[:'assigne_full_name'] end if attributes.key?(:'building_id') self.building_id = attributes[:'building_id'] end if attributes.key?(:'city_desired') self.city_desired = attributes[:'city_desired'] end if attributes.key?(:'comments') self.comments = attributes[:'comments'] end if attributes.key?(:'contacts') if (value = attributes[:'contacts']).is_a?(Array) self.contacts = value end end if attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] end if attributes.key?(:'created_date_time') self.created_date_time = attributes[:'created_date_time'] end if attributes.key?(:'current_home_type') self.current_home_type = attributes[:'current_home_type'] end if attributes.key?(:'current_rent_mortgage') self.current_rent_mortgage = attributes[:'current_rent_mortgage'] end if attributes.key?(:'custom_fields') if (value = attributes[:'custom_fields']).is_a?(Array) self.custom_fields = value end end if attributes.key?(:'has_pets') self.has_pets = attributes[:'has_pets'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'last_modified_by') self.last_modified_by = attributes[:'last_modified_by'] end if attributes.key?(:'last_modified_date_time') self.last_modified_date_time = attributes[:'last_modified_date_time'] end if attributes.key?(:'lease_end_date') self.lease_end_date = attributes[:'lease_end_date'] end if attributes.key?(:'lease_start_date') self.lease_start_date = attributes[:'lease_start_date'] end if attributes.key?(:'move_in_date') self.move_in_date = attributes[:'move_in_date'] end if attributes.key?(:'neighborhood_desired') self.neighborhood_desired = attributes[:'neighborhood_desired'] end if attributes.key?(:'number_bathrooms') self.number_bathrooms = attributes[:'number_bathrooms'] end if attributes.key?(:'number_bedrooms') self.number_bedrooms = attributes[:'number_bedrooms'] end if attributes.key?(:'number_of_pets') self.number_of_pets = attributes[:'number_of_pets'] end if attributes.key?(:'pet_type') self.pet_type = attributes[:'pet_type'] end if attributes.key?(:'pet_weights') self.pet_weights = attributes[:'pet_weights'] end if attributes.key?(:'portfolio_id') self.portfolio_id = attributes[:'portfolio_id'] end if attributes.key?(:'preferred_contact_method') self.preferred_contact_method = attributes[:'preferred_contact_method'] end if attributes.key?(:'property_address') self.property_address = attributes[:'property_address'] end if attributes.key?(:'property_address2') self.property_address2 = attributes[:'property_address2'] end if attributes.key?(:'property_area') self.property_area = attributes[:'property_area'] end if attributes.key?(:'property_area_units') self.property_area_units = attributes[:'property_area_units'] end if attributes.key?(:'property_city') self.property_city = attributes[:'property_city'] end if attributes.key?(:'property_country') self.property_country = attributes[:'property_country'] end if attributes.key?(:'property_number_bathrooms') self.property_number_bathrooms = attributes[:'property_number_bathrooms'] end if attributes.key?(:'property_number_bedrooms') self.property_number_bedrooms = attributes[:'property_number_bedrooms'] end if attributes.key?(:'property_state') self.property_state = attributes[:'property_state'] end if attributes.key?(:'property_zip') self.property_zip = attributes[:'property_zip'] end if attributes.key?(:'reason_for_moving') self.reason_for_moving = attributes[:'reason_for_moving'] end if attributes.key?(:'rent') self.rent = attributes[:'rent'] end if attributes.key?(:'rent_max') self.rent_max = attributes[:'rent_max'] end if attributes.key?(:'rent_min') self.rent_min = attributes[:'rent_min'] end if attributes.key?(:'security_deposit') self.security_deposit = attributes[:'security_deposit'] end if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'state_desired') self.state_desired = attributes[:'state_desired'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'time_at_current_residence') self.time_at_current_residence = attributes[:'time_at_current_residence'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'type_of_inquiry') self.type_of_inquiry = attributes[:'type_of_inquiry'] end if attributes.key?(:'unit_desired') self.unit_desired = attributes[:'unit_desired'] end if attributes.key?(:'unit_id') self.unit_id = attributes[:'unit_id'] end if attributes.key?(:'unit_type_desired') self.unit_type_desired = attributes[:'unit_type_desired'] end if attributes.key?(:'zip_desired') self.zip_desired = attributes[:'zip_desired'] end end |
Instance Attribute Details
#application_fee_paid ⇒ Object
Indicates if the application fee has been paid by the prospect.
20 21 22 |
# File 'lib/propertyware/models/prospect.rb', line 20 def application_fee_paid @application_fee_paid end |
#assigne_full_name ⇒ Object
Name of the assigned prospect.
23 24 25 |
# File 'lib/propertyware/models/prospect.rb', line 23 def assigne_full_name @assigne_full_name end |
#building_id ⇒ Object
Id of the building associated with the prospect.
26 27 28 |
# File 'lib/propertyware/models/prospect.rb', line 26 def building_id @building_id end |
#city_desired ⇒ Object
Desired city.
29 30 31 |
# File 'lib/propertyware/models/prospect.rb', line 29 def city_desired @city_desired end |
#comments ⇒ Object
Indicates if the prospect has any comments.
32 33 34 |
# File 'lib/propertyware/models/prospect.rb', line 32 def comments @comments end |
#contacts ⇒ Object
Contacts of the prospect
35 36 37 |
# File 'lib/propertyware/models/prospect.rb', line 35 def contacts @contacts end |
#created_by ⇒ Object
User who created the record.
38 39 40 |
# File 'lib/propertyware/models/prospect.rb', line 38 def created_by @created_by end |
#created_date_time ⇒ Object
Date and time the record was created. (Timezone: UTC)
41 42 43 |
# File 'lib/propertyware/models/prospect.rb', line 41 def created_date_time @created_date_time end |
#current_home_type ⇒ Object
Current home type.
44 45 46 |
# File 'lib/propertyware/models/prospect.rb', line 44 def current_home_type @current_home_type end |
#current_rent_mortgage ⇒ Object
Current home mortgage.
47 48 49 |
# File 'lib/propertyware/models/prospect.rb', line 47 def current_rent_mortgage @current_rent_mortgage end |
#custom_fields ⇒ Object
Custom fields.
50 51 52 |
# File 'lib/propertyware/models/prospect.rb', line 50 def custom_fields @custom_fields end |
#has_pets ⇒ Object
Indicates if the prospect has pets.
53 54 55 |
# File 'lib/propertyware/models/prospect.rb', line 53 def has_pets @has_pets end |
#id ⇒ Object
Unique identifier.
56 57 58 |
# File 'lib/propertyware/models/prospect.rb', line 56 def id @id end |
#last_modified_by ⇒ Object
User who last modified the record.
59 60 61 |
# File 'lib/propertyware/models/prospect.rb', line 59 def last_modified_by @last_modified_by end |
#last_modified_date_time ⇒ Object
Date and time the record was last modified. (Timezone: UTC)
62 63 64 |
# File 'lib/propertyware/models/prospect.rb', line 62 def last_modified_date_time @last_modified_date_time end |
#lease_end_date ⇒ Object
Confirmed lease end date.
65 66 67 |
# File 'lib/propertyware/models/prospect.rb', line 65 def lease_end_date @lease_end_date end |
#lease_start_date ⇒ Object
Confirmed lease start date.
68 69 70 |
# File 'lib/propertyware/models/prospect.rb', line 68 def lease_start_date @lease_start_date end |
#move_in_date ⇒ Object
Desired move-in date.
71 72 73 |
# File 'lib/propertyware/models/prospect.rb', line 71 def move_in_date @move_in_date end |
#neighborhood_desired ⇒ Object
Desired neighborhood.
74 75 76 |
# File 'lib/propertyware/models/prospect.rb', line 74 def neighborhood_desired @neighborhood_desired end |
#number_bathrooms ⇒ Object
Number of bathrooms desired by the prospect.
77 78 79 |
# File 'lib/propertyware/models/prospect.rb', line 77 def number_bathrooms @number_bathrooms end |
#number_bedrooms ⇒ Object
Number of bedrooms desired by the prospect.
80 81 82 |
# File 'lib/propertyware/models/prospect.rb', line 80 def number_bedrooms @number_bedrooms end |
#number_of_pets ⇒ Object
Number of pets.
83 84 85 |
# File 'lib/propertyware/models/prospect.rb', line 83 def number_of_pets @number_of_pets end |
#pet_type ⇒ Object
Pet type.
86 87 88 |
# File 'lib/propertyware/models/prospect.rb', line 86 def pet_type @pet_type end |
#pet_weights ⇒ Object
Pet weights.
89 90 91 |
# File 'lib/propertyware/models/prospect.rb', line 89 def pet_weights @pet_weights end |
#portfolio_id ⇒ Object
Id of the portfolio associated with the prospect.
92 93 94 |
# File 'lib/propertyware/models/prospect.rb', line 92 def portfolio_id @portfolio_id end |
#preferred_contact_method ⇒ Object
Preferred contact method.
95 96 97 |
# File 'lib/propertyware/models/prospect.rb', line 95 def preferred_contact_method @preferred_contact_method end |
#property_address ⇒ Object
Address of the property.
98 99 100 |
# File 'lib/propertyware/models/prospect.rb', line 98 def property_address @property_address end |
#property_address2 ⇒ Object
Additional address information of the property.
101 102 103 |
# File 'lib/propertyware/models/prospect.rb', line 101 def property_address2 @property_address2 end |
#property_area ⇒ Object
Area of the property.
104 105 106 |
# File 'lib/propertyware/models/prospect.rb', line 104 def property_area @property_area end |
#property_area_units ⇒ Object
Unit of measurement for the area of the property.
107 108 109 |
# File 'lib/propertyware/models/prospect.rb', line 107 def property_area_units @property_area_units end |
#property_city ⇒ Object
City of the property.
110 111 112 |
# File 'lib/propertyware/models/prospect.rb', line 110 def property_city @property_city end |
#property_country ⇒ Object
Country of the property.
113 114 115 |
# File 'lib/propertyware/models/prospect.rb', line 113 def property_country @property_country end |
#property_number_bathrooms ⇒ Object
Number of bathrooms.
116 117 118 |
# File 'lib/propertyware/models/prospect.rb', line 116 def property_number_bathrooms @property_number_bathrooms end |
#property_number_bedrooms ⇒ Object
Number of bedrooms.
119 120 121 |
# File 'lib/propertyware/models/prospect.rb', line 119 def property_number_bedrooms @property_number_bedrooms end |
#property_state ⇒ Object
State of the property.
122 123 124 |
# File 'lib/propertyware/models/prospect.rb', line 122 def property_state @property_state end |
#property_zip ⇒ Object
Zip code of the property.
125 126 127 |
# File 'lib/propertyware/models/prospect.rb', line 125 def property_zip @property_zip end |
#reason_for_moving ⇒ Object
Reason for moving.
128 129 130 |
# File 'lib/propertyware/models/prospect.rb', line 128 def reason_for_moving @reason_for_moving end |
#rent ⇒ Object
Confirmed lease rent.
131 132 133 |
# File 'lib/propertyware/models/prospect.rb', line 131 def rent @rent end |
#rent_max ⇒ Object
Maximum desired rent.
134 135 136 |
# File 'lib/propertyware/models/prospect.rb', line 134 def rent_max @rent_max end |
#rent_min ⇒ Object
Minimum desired rent.
137 138 139 |
# File 'lib/propertyware/models/prospect.rb', line 137 def rent_min @rent_min end |
#security_deposit ⇒ Object
Confirmed lease security deposit.
140 141 142 |
# File 'lib/propertyware/models/prospect.rb', line 140 def security_deposit @security_deposit end |
#source ⇒ Object
Prospect source.
143 144 145 |
# File 'lib/propertyware/models/prospect.rb', line 143 def source @source end |
#state_desired ⇒ Object
Desired state.
146 147 148 |
# File 'lib/propertyware/models/prospect.rb', line 146 def state_desired @state_desired end |
#status ⇒ Object
Status.
149 150 151 |
# File 'lib/propertyware/models/prospect.rb', line 149 def status @status end |
#time_at_current_residence ⇒ Object
Time the prospect is living at the current residence.
152 153 154 |
# File 'lib/propertyware/models/prospect.rb', line 152 def time_at_current_residence @time_at_current_residence end |
#type ⇒ Object
Prospect type.
155 156 157 |
# File 'lib/propertyware/models/prospect.rb', line 155 def type @type end |
#type_of_inquiry ⇒ Object
Type of inquiry made by the prospect.
158 159 160 |
# File 'lib/propertyware/models/prospect.rb', line 158 def type_of_inquiry @type_of_inquiry end |
#unit_desired ⇒ Object
Desired unit.
161 162 163 |
# File 'lib/propertyware/models/prospect.rb', line 161 def unit_desired @unit_desired end |
#unit_id ⇒ Object
Id of the unit associated with the prospect.
164 165 166 |
# File 'lib/propertyware/models/prospect.rb', line 164 def unit_id @unit_id end |
#unit_type_desired ⇒ Object
Desired unit type.
167 168 169 |
# File 'lib/propertyware/models/prospect.rb', line 167 def unit_type_desired @unit_type_desired end |
#zip_desired ⇒ Object
Desired zip code.
170 171 172 |
# File 'lib/propertyware/models/prospect.rb', line 170 def zip_desired @zip_desired end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
230 231 232 |
# File 'lib/propertyware/models/prospect.rb', line 230 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/propertyware/models/prospect.rb', line 173 def self.attribute_map { :'application_fee_paid' => :'applicationFeePaid', :'assigne_full_name' => :'assigneFullName', :'building_id' => :'buildingID', :'city_desired' => :'cityDesired', :'comments' => :'comments', :'contacts' => :'contacts', :'created_by' => :'createdBy', :'created_date_time' => :'createdDateTime', :'current_home_type' => :'currentHomeType', :'current_rent_mortgage' => :'currentRentMortgage', :'custom_fields' => :'customFields', :'has_pets' => :'hasPets', :'id' => :'id', :'last_modified_by' => :'lastModifiedBy', :'last_modified_date_time' => :'lastModifiedDateTime', :'lease_end_date' => :'leaseEndDate', :'lease_start_date' => :'leaseStartDate', :'move_in_date' => :'moveInDate', :'neighborhood_desired' => :'neighborhoodDesired', :'number_bathrooms' => :'numberBathrooms', :'number_bedrooms' => :'numberBedrooms', :'number_of_pets' => :'numberOfPets', :'pet_type' => :'petType', :'pet_weights' => :'petWeights', :'portfolio_id' => :'portfolioID', :'preferred_contact_method' => :'preferredContactMethod', :'property_address' => :'propertyAddress', :'property_address2' => :'propertyAddress2', :'property_area' => :'propertyArea', :'property_area_units' => :'propertyAreaUnits', :'property_city' => :'propertyCity', :'property_country' => :'propertyCountry', :'property_number_bathrooms' => :'propertyNumberBathrooms', :'property_number_bedrooms' => :'propertyNumberBedrooms', :'property_state' => :'propertyState', :'property_zip' => :'propertyZip', :'reason_for_moving' => :'reasonForMoving', :'rent' => :'rent', :'rent_max' => :'rentMax', :'rent_min' => :'rentMin', :'security_deposit' => :'securityDeposit', :'source' => :'source', :'state_desired' => :'stateDesired', :'status' => :'status', :'time_at_current_residence' => :'timeAtCurrentResidence', :'type' => :'type', :'type_of_inquiry' => :'typeOfInquiry', :'unit_desired' => :'unitDesired', :'unit_id' => :'unitID', :'unit_type_desired' => :'unitTypeDesired', :'zip_desired' => :'zipDesired' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
607 608 609 |
# File 'lib/propertyware/models/prospect.rb', line 607 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
292 293 294 295 |
# File 'lib/propertyware/models/prospect.rb', line 292 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/propertyware/models/prospect.rb', line 235 def self.openapi_types { :'application_fee_paid' => :'Boolean', :'assigne_full_name' => :'String', :'building_id' => :'Integer', :'city_desired' => :'String', :'comments' => :'String', :'contacts' => :'Array<ProspectContact>', :'created_by' => :'String', :'created_date_time' => :'Time', :'current_home_type' => :'String', :'current_rent_mortgage' => :'Float', :'custom_fields' => :'Array<CustomField>', :'has_pets' => :'Boolean', :'id' => :'Integer', :'last_modified_by' => :'String', :'last_modified_date_time' => :'Time', :'lease_end_date' => :'Date', :'lease_start_date' => :'Date', :'move_in_date' => :'Date', :'neighborhood_desired' => :'String', :'number_bathrooms' => :'Float', :'number_bedrooms' => :'Integer', :'number_of_pets' => :'Integer', :'pet_type' => :'String', :'pet_weights' => :'String', :'portfolio_id' => :'Integer', :'preferred_contact_method' => :'String', :'property_address' => :'String', :'property_address2' => :'String', :'property_area' => :'Float', :'property_area_units' => :'String', :'property_city' => :'String', :'property_country' => :'String', :'property_number_bathrooms' => :'Float', :'property_number_bedrooms' => :'Integer', :'property_state' => :'String', :'property_zip' => :'String', :'reason_for_moving' => :'String', :'rent' => :'Float', :'rent_max' => :'Float', :'rent_min' => :'Float', :'security_deposit' => :'Float', :'source' => :'String', :'state_desired' => :'String', :'status' => :'String', :'time_at_current_residence' => :'String', :'type' => :'String', :'type_of_inquiry' => :'String', :'unit_desired' => :'String', :'unit_id' => :'Integer', :'unit_type_desired' => :'String', :'zip_desired' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
536 537 538 539 540 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 |
# File 'lib/propertyware/models/prospect.rb', line 536 def ==(o) return true if self.equal?(o) self.class == o.class && application_fee_paid == o.application_fee_paid && assigne_full_name == o.assigne_full_name && building_id == o.building_id && city_desired == o.city_desired && comments == o.comments && contacts == o.contacts && created_by == o.created_by && created_date_time == o.created_date_time && current_home_type == o.current_home_type && current_rent_mortgage == o.current_rent_mortgage && custom_fields == o.custom_fields && has_pets == o.has_pets && id == o.id && last_modified_by == o.last_modified_by && last_modified_date_time == o.last_modified_date_time && lease_end_date == o.lease_end_date && lease_start_date == o.lease_start_date && move_in_date == o.move_in_date && neighborhood_desired == o.neighborhood_desired && number_bathrooms == o.number_bathrooms && number_bedrooms == o.number_bedrooms && number_of_pets == o.number_of_pets && pet_type == o.pet_type && pet_weights == o.pet_weights && portfolio_id == o.portfolio_id && preferred_contact_method == o.preferred_contact_method && property_address == o.property_address && property_address2 == o.property_address2 && property_area == o.property_area && property_area_units == o.property_area_units && property_city == o.property_city && property_country == o.property_country && property_number_bathrooms == o.property_number_bathrooms && property_number_bedrooms == o.property_number_bedrooms && property_state == o.property_state && property_zip == o.property_zip && reason_for_moving == o.reason_for_moving && rent == o.rent && rent_max == o.rent_max && rent_min == o.rent_min && security_deposit == o.security_deposit && source == o.source && state_desired == o.state_desired && status == o.status && time_at_current_residence == o.time_at_current_residence && type == o.type && type_of_inquiry == o.type_of_inquiry && unit_desired == o.unit_desired && unit_id == o.unit_id && unit_type_desired == o.unit_type_desired && zip_desired == o.zip_desired end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
638 639 640 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 |
# File 'lib/propertyware/models/prospect.rb', line 638 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = Propertyware.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
709 710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/propertyware/models/prospect.rb', line 709 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
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/propertyware/models/prospect.rb', line 614 def build_from_hash(attributes) return unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif 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 end self end |
#eql?(o) ⇒ Boolean
594 595 596 |
# File 'lib/propertyware/models/prospect.rb', line 594 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
600 601 602 |
# File 'lib/propertyware/models/prospect.rb', line 600 def hash [application_fee_paid, assigne_full_name, building_id, city_desired, comments, contacts, created_by, created_date_time, current_home_type, current_rent_mortgage, custom_fields, has_pets, id, last_modified_by, last_modified_date_time, lease_end_date, lease_start_date, move_in_date, neighborhood_desired, number_bathrooms, number_bedrooms, number_of_pets, pet_type, pet_weights, portfolio_id, preferred_contact_method, property_address, property_address2, property_area, property_area_units, property_city, property_country, property_number_bathrooms, property_number_bedrooms, property_state, property_zip, reason_for_moving, rent, rent_max, rent_min, security_deposit, source, state_desired, status, time_at_current_residence, type, type_of_inquiry, unit_desired, unit_id, unit_type_desired, zip_desired].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
523 524 525 526 |
# File 'lib/propertyware/models/prospect.rb', line 523 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
685 686 687 |
# File 'lib/propertyware/models/prospect.rb', line 685 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/propertyware/models/prospect.rb', line 691 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
679 680 681 |
# File 'lib/propertyware/models/prospect.rb', line 679 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
530 531 532 |
# File 'lib/propertyware/models/prospect.rb', line 530 def valid? true end |