Class: Propertyware::Vendor
- Inherits:
-
Object
- Object
- Propertyware::Vendor
- Defined in:
- lib/propertyware/models/vendor.rb
Overview
Vendor
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Account number.
-
#active ⇒ Object
Indicates if the vendor is active.
-
#address ⇒ Object
Address.
-
#address2 ⇒ Object
Address line 2.
-
#alert_email ⇒ Object
Alert Email.
-
#city ⇒ Object
City.
-
#comments ⇒ Object
Comments.
-
#company_name ⇒ Object
Name of the vendor’s company.
-
#country ⇒ Object
Country.
-
#created_by ⇒ Object
User who created the record.
-
#created_date_time ⇒ Object
Date and time the record was created.
-
#credit_limit ⇒ Object
Credit limit.
-
#custom_fields ⇒ Object
Custom fields.
-
#default_bill_split_account_id ⇒ Object
Default bill split id.
-
#default_markup_discount_percentage ⇒ Object
Default markup discount.
-
#description ⇒ Object
Description.
-
#eligible1099 ⇒ Object
Indicates if the vendor is eligible for a 1099 form.
-
#email ⇒ Object
Email address.
-
#fax ⇒ Object
Fax number.
-
#id ⇒ Object
Unique identifier.
-
#include_company_name_on1099 ⇒ Object
Include company name on 1099.
-
#last_modified_by ⇒ Object
User who last modified the record.
-
#last_modified_date_time ⇒ Object
Date and time the record was last modified.
-
#markup_account_id ⇒ Object
Markup account id.
-
#name ⇒ Object
Name.
-
#name_on_check ⇒ Object
Name to be used on checks.
-
#other_phone ⇒ Object
Other phone number.
-
#payment_term_days_to_pay ⇒ Object
The number of days within payments are due.
-
#payment_terms ⇒ Object
Payment terms.
-
#phone ⇒ Object
Phone number.
-
#search_tag ⇒ Object
Search Tag.
-
#state ⇒ Object
State.
-
#sync_to_vmm ⇒ Object
Vendor Sync To Maintenance.
-
#tax_id ⇒ Object
Tax identification number.
-
#tax_payer_name ⇒ Object
Tax Payer Name.
-
#time_tracking ⇒ Object
Time Tracking, is enabled or disabled.
-
#type ⇒ Object
The type of vendor.
-
#website ⇒ Object
Website URL.
-
#zip ⇒ Object
ZIP or postal 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 = {}) ⇒ Vendor
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 = {}) ⇒ Vendor
Initializes the object
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 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/propertyware/models/vendor.rb', line 239 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Propertyware::Vendor` 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::Vendor`. 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?(:'account_number') self.account_number = attributes[:'account_number'] end if attributes.key?(:'active') self.active = attributes[:'active'] end if attributes.key?(:'address') self.address = attributes[:'address'] end if attributes.key?(:'address2') self.address2 = attributes[:'address2'] end if attributes.key?(:'alert_email') self.alert_email = attributes[:'alert_email'] end if attributes.key?(:'city') self.city = attributes[:'city'] end if attributes.key?(:'comments') self.comments = attributes[:'comments'] end if attributes.key?(:'company_name') self.company_name = attributes[:'company_name'] end if attributes.key?(:'country') self.country = attributes[:'country'] 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?(:'credit_limit') self.credit_limit = attributes[:'credit_limit'] end if attributes.key?(:'custom_fields') if (value = attributes[:'custom_fields']).is_a?(Array) self.custom_fields = value end end if attributes.key?(:'default_bill_split_account_id') self.default_bill_split_account_id = attributes[:'default_bill_split_account_id'] end if attributes.key?(:'default_markup_discount_percentage') self.default_markup_discount_percentage = attributes[:'default_markup_discount_percentage'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'eligible1099') self.eligible1099 = attributes[:'eligible1099'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'fax') self.fax = attributes[:'fax'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'include_company_name_on1099') self.include_company_name_on1099 = attributes[:'include_company_name_on1099'] 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?(:'markup_account_id') self.markup_account_id = attributes[:'markup_account_id'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'name_on_check') self.name_on_check = attributes[:'name_on_check'] end if attributes.key?(:'other_phone') self.other_phone = attributes[:'other_phone'] end if attributes.key?(:'payment_term_days_to_pay') self.payment_term_days_to_pay = attributes[:'payment_term_days_to_pay'] end if attributes.key?(:'payment_terms') self.payment_terms = attributes[:'payment_terms'] end if attributes.key?(:'phone') self.phone = attributes[:'phone'] end if attributes.key?(:'search_tag') self.search_tag = attributes[:'search_tag'] end if attributes.key?(:'state') self.state = attributes[:'state'] end if attributes.key?(:'sync_to_vmm') self.sync_to_vmm = attributes[:'sync_to_vmm'] end if attributes.key?(:'tax_id') self.tax_id = attributes[:'tax_id'] end if attributes.key?(:'tax_payer_name') self.tax_payer_name = attributes[:'tax_payer_name'] end if attributes.key?(:'time_tracking') self.time_tracking = attributes[:'time_tracking'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'website') self.website = attributes[:'website'] end if attributes.key?(:'zip') self.zip = attributes[:'zip'] end end |
Instance Attribute Details
#account_number ⇒ Object
Account number.
20 21 22 |
# File 'lib/propertyware/models/vendor.rb', line 20 def account_number @account_number end |
#active ⇒ Object
Indicates if the vendor is active.
23 24 25 |
# File 'lib/propertyware/models/vendor.rb', line 23 def active @active end |
#address ⇒ Object
Address.
26 27 28 |
# File 'lib/propertyware/models/vendor.rb', line 26 def address @address end |
#address2 ⇒ Object
Address line 2.
29 30 31 |
# File 'lib/propertyware/models/vendor.rb', line 29 def address2 @address2 end |
#alert_email ⇒ Object
Alert Email
32 33 34 |
# File 'lib/propertyware/models/vendor.rb', line 32 def alert_email @alert_email end |
#city ⇒ Object
City.
35 36 37 |
# File 'lib/propertyware/models/vendor.rb', line 35 def city @city end |
#comments ⇒ Object
Comments.
38 39 40 |
# File 'lib/propertyware/models/vendor.rb', line 38 def comments @comments end |
#company_name ⇒ Object
Name of the vendor’s company.
41 42 43 |
# File 'lib/propertyware/models/vendor.rb', line 41 def company_name @company_name end |
#country ⇒ Object
Country.
44 45 46 |
# File 'lib/propertyware/models/vendor.rb', line 44 def country @country end |
#created_by ⇒ Object
User who created the record.
47 48 49 |
# File 'lib/propertyware/models/vendor.rb', line 47 def created_by @created_by end |
#created_date_time ⇒ Object
Date and time the record was created. (Timezone: UTC)
50 51 52 |
# File 'lib/propertyware/models/vendor.rb', line 50 def created_date_time @created_date_time end |
#credit_limit ⇒ Object
Credit limit.
53 54 55 |
# File 'lib/propertyware/models/vendor.rb', line 53 def credit_limit @credit_limit end |
#custom_fields ⇒ Object
Custom fields.
56 57 58 |
# File 'lib/propertyware/models/vendor.rb', line 56 def custom_fields @custom_fields end |
#default_bill_split_account_id ⇒ Object
Default bill split id
59 60 61 |
# File 'lib/propertyware/models/vendor.rb', line 59 def default_bill_split_account_id @default_bill_split_account_id end |
#default_markup_discount_percentage ⇒ Object
Default markup discount
62 63 64 |
# File 'lib/propertyware/models/vendor.rb', line 62 def default_markup_discount_percentage @default_markup_discount_percentage end |
#description ⇒ Object
Description.
65 66 67 |
# File 'lib/propertyware/models/vendor.rb', line 65 def description @description end |
#eligible1099 ⇒ Object
Indicates if the vendor is eligible for a 1099 form.
68 69 70 |
# File 'lib/propertyware/models/vendor.rb', line 68 def eligible1099 @eligible1099 end |
#email ⇒ Object
Email address.
71 72 73 |
# File 'lib/propertyware/models/vendor.rb', line 71 def email @email end |
#fax ⇒ Object
Fax number.
74 75 76 |
# File 'lib/propertyware/models/vendor.rb', line 74 def fax @fax end |
#id ⇒ Object
Unique identifier.
77 78 79 |
# File 'lib/propertyware/models/vendor.rb', line 77 def id @id end |
#include_company_name_on1099 ⇒ Object
Include company name on 1099
80 81 82 |
# File 'lib/propertyware/models/vendor.rb', line 80 def include_company_name_on1099 @include_company_name_on1099 end |
#last_modified_by ⇒ Object
User who last modified the record.
83 84 85 |
# File 'lib/propertyware/models/vendor.rb', line 83 def last_modified_by @last_modified_by end |
#last_modified_date_time ⇒ Object
Date and time the record was last modified. (Timezone: UTC)
86 87 88 |
# File 'lib/propertyware/models/vendor.rb', line 86 def last_modified_date_time @last_modified_date_time end |
#markup_account_id ⇒ Object
Markup account id
89 90 91 |
# File 'lib/propertyware/models/vendor.rb', line 89 def markup_account_id @markup_account_id end |
#name ⇒ Object
Name.
92 93 94 |
# File 'lib/propertyware/models/vendor.rb', line 92 def name @name end |
#name_on_check ⇒ Object
Name to be used on checks.
95 96 97 |
# File 'lib/propertyware/models/vendor.rb', line 95 def name_on_check @name_on_check end |
#other_phone ⇒ Object
Other phone number.
98 99 100 |
# File 'lib/propertyware/models/vendor.rb', line 98 def other_phone @other_phone end |
#payment_term_days_to_pay ⇒ Object
The number of days within payments are due.
101 102 103 |
# File 'lib/propertyware/models/vendor.rb', line 101 def payment_term_days_to_pay @payment_term_days_to_pay end |
#payment_terms ⇒ Object
Payment terms.
104 105 106 |
# File 'lib/propertyware/models/vendor.rb', line 104 def payment_terms @payment_terms end |
#phone ⇒ Object
Phone number.
107 108 109 |
# File 'lib/propertyware/models/vendor.rb', line 107 def phone @phone end |
#search_tag ⇒ Object
Search Tag
110 111 112 |
# File 'lib/propertyware/models/vendor.rb', line 110 def search_tag @search_tag end |
#state ⇒ Object
State.
113 114 115 |
# File 'lib/propertyware/models/vendor.rb', line 113 def state @state end |
#sync_to_vmm ⇒ Object
Vendor Sync To Maintenance.
116 117 118 |
# File 'lib/propertyware/models/vendor.rb', line 116 def sync_to_vmm @sync_to_vmm end |
#tax_id ⇒ Object
Tax identification number.
119 120 121 |
# File 'lib/propertyware/models/vendor.rb', line 119 def tax_id @tax_id end |
#tax_payer_name ⇒ Object
Tax Payer Name
122 123 124 |
# File 'lib/propertyware/models/vendor.rb', line 122 def tax_payer_name @tax_payer_name end |
#time_tracking ⇒ Object
Time Tracking, is enabled or disabled
125 126 127 |
# File 'lib/propertyware/models/vendor.rb', line 125 def time_tracking @time_tracking end |
#type ⇒ Object
The type of vendor.
128 129 130 |
# File 'lib/propertyware/models/vendor.rb', line 128 def type @type end |
#website ⇒ Object
Website URL.
131 132 133 |
# File 'lib/propertyware/models/vendor.rb', line 131 def website @website end |
#zip ⇒ Object
ZIP or postal code.
134 135 136 |
# File 'lib/propertyware/models/vendor.rb', line 134 def zip @zip end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
182 183 184 |
# File 'lib/propertyware/models/vendor.rb', line 182 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/propertyware/models/vendor.rb', line 137 def self.attribute_map { :'account_number' => :'accountNumber', :'active' => :'active', :'address' => :'address', :'address2' => :'address2', :'alert_email' => :'alertEmail', :'city' => :'city', :'comments' => :'comments', :'company_name' => :'companyName', :'country' => :'country', :'created_by' => :'createdBy', :'created_date_time' => :'createdDateTime', :'credit_limit' => :'creditLimit', :'custom_fields' => :'customFields', :'default_bill_split_account_id' => :'defaultBillSplitAccountId', :'default_markup_discount_percentage' => :'defaultMarkupDiscountPercentage', :'description' => :'description', :'eligible1099' => :'eligible1099', :'email' => :'email', :'fax' => :'fax', :'id' => :'id', :'include_company_name_on1099' => :'includeCompanyNameOn1099', :'last_modified_by' => :'lastModifiedBy', :'last_modified_date_time' => :'lastModifiedDateTime', :'markup_account_id' => :'markupAccountId', :'name' => :'name', :'name_on_check' => :'nameOnCheck', :'other_phone' => :'otherPhone', :'payment_term_days_to_pay' => :'paymentTermDaysToPay', :'payment_terms' => :'paymentTerms', :'phone' => :'phone', :'search_tag' => :'searchTag', :'state' => :'state', :'sync_to_vmm' => :'syncToVMM', :'tax_id' => :'taxId', :'tax_payer_name' => :'taxPayerName', :'time_tracking' => :'timeTracking', :'type' => :'type', :'website' => :'website', :'zip' => :'zip' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
485 486 487 |
# File 'lib/propertyware/models/vendor.rb', line 485 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
232 233 234 235 |
# File 'lib/propertyware/models/vendor.rb', line 232 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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/propertyware/models/vendor.rb', line 187 def self.openapi_types { :'account_number' => :'String', :'active' => :'Boolean', :'address' => :'String', :'address2' => :'String', :'alert_email' => :'String', :'city' => :'String', :'comments' => :'String', :'company_name' => :'String', :'country' => :'String', :'created_by' => :'String', :'created_date_time' => :'Time', :'credit_limit' => :'Float', :'custom_fields' => :'Array<CustomField>', :'default_bill_split_account_id' => :'Integer', :'default_markup_discount_percentage' => :'Float', :'description' => :'String', :'eligible1099' => :'Boolean', :'email' => :'String', :'fax' => :'String', :'id' => :'Integer', :'include_company_name_on1099' => :'Boolean', :'last_modified_by' => :'String', :'last_modified_date_time' => :'Time', :'markup_account_id' => :'Integer', :'name' => :'String', :'name_on_check' => :'String', :'other_phone' => :'String', :'payment_term_days_to_pay' => :'Integer', :'payment_terms' => :'String', :'phone' => :'String', :'search_tag' => :'String', :'state' => :'String', :'sync_to_vmm' => :'Boolean', :'tax_id' => :'String', :'tax_payer_name' => :'String', :'time_tracking' => :'String', :'type' => :'String', :'website' => :'String', :'zip' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/propertyware/models/vendor.rb', line 426 def ==(o) return true if self.equal?(o) self.class == o.class && account_number == o.account_number && active == o.active && address == o.address && address2 == o.address2 && alert_email == o.alert_email && city == o.city && comments == o.comments && company_name == o.company_name && country == o.country && created_by == o.created_by && created_date_time == o.created_date_time && credit_limit == o.credit_limit && custom_fields == o.custom_fields && default_bill_split_account_id == o.default_bill_split_account_id && default_markup_discount_percentage == o.default_markup_discount_percentage && description == o.description && eligible1099 == o.eligible1099 && email == o.email && fax == o.fax && id == o.id && include_company_name_on1099 == o.include_company_name_on1099 && last_modified_by == o.last_modified_by && last_modified_date_time == o.last_modified_date_time && markup_account_id == o.markup_account_id && name == o.name && name_on_check == o.name_on_check && other_phone == o.other_phone && payment_term_days_to_pay == o.payment_term_days_to_pay && payment_terms == o.payment_terms && phone == o.phone && search_tag == o.search_tag && state == o.state && sync_to_vmm == o.sync_to_vmm && tax_id == o.tax_id && tax_payer_name == o.tax_payer_name && time_tracking == o.time_tracking && type == o.type && website == o.website && zip == o.zip end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/propertyware/models/vendor.rb', line 516 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
587 588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/propertyware/models/vendor.rb', line 587 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
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
# File 'lib/propertyware/models/vendor.rb', line 492 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
472 473 474 |
# File 'lib/propertyware/models/vendor.rb', line 472 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
478 479 480 |
# File 'lib/propertyware/models/vendor.rb', line 478 def hash [account_number, active, address, address2, alert_email, city, comments, company_name, country, created_by, created_date_time, credit_limit, custom_fields, default_bill_split_account_id, default_markup_discount_percentage, description, eligible1099, email, fax, id, include_company_name_on1099, last_modified_by, last_modified_date_time, markup_account_id, name, name_on_check, other_phone, payment_term_days_to_pay, payment_terms, phone, search_tag, state, sync_to_vmm, tax_id, tax_payer_name, time_tracking, type, website, zip].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
413 414 415 416 |
# File 'lib/propertyware/models/vendor.rb', line 413 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
563 564 565 |
# File 'lib/propertyware/models/vendor.rb', line 563 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
569 570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/propertyware/models/vendor.rb', line 569 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
557 558 559 |
# File 'lib/propertyware/models/vendor.rb', line 557 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
420 421 422 |
# File 'lib/propertyware/models/vendor.rb', line 420 def valid? true end |