Class: Rentlinx::Company

Inherits:
Base
  • Object
show all
Defined in:
lib/rentlinx/models/company.rb

Overview

An object that represents a Rentlinx company.

Constant Summary collapse

ATTRIBUTES =
[:companyID, :companyCapAmount].freeze
REQUIRED_ATTRIBUTES =
[:companyID].freeze

Class Method Summary collapse

Methods inherited from Base

#attributes, get_from_id, #initialize, #patch, #patch_valid?, #post, #required_attributes, #to_hash, type, #unpost, unpost, #valid?, #validate

Constructor Details

This class inherits a constructor from Rentlinx::Base

Class Method Details

.from_id(id) ⇒ Object

Queries Rentlinx and builds a company with the given ID

The returned company will have all the attributes Rentlinx has for the company on their end.

Parameters:

  • id (String)

    the Rentlinx id of the company

Returns:

  • a Rentlinx::Company that is up to date with the remote one



17
18
19
# File 'lib/rentlinx/models/company.rb', line 17

def self.from_id(id)
  get_from_id(:company, id)
end