Class: Sourcescrub::Apis::Companies
- Inherits:
-
Object
- Object
- Sourcescrub::Apis::Companies
- Includes:
- Utils::SsModel
- Defined in:
- lib/sourcescrub/apis/companies.rb
Overview
Companies endpoint
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
Attributes included from Utils::SsModel
Instance Method Summary collapse
-
#initialize(identifier, args) ⇒ Companies
constructor
A new instance of Companies.
- #request_url ⇒ Object
- #search_url ⇒ Object
Methods included from Utils::SsModel
#exact_kclass_object, #kclass_name, #sobject
Constructor Details
#initialize(identifier, args) ⇒ Companies
Returns a new instance of Companies.
15 16 17 18 19 20 |
# File 'lib/sourcescrub/apis/companies.rb', line 15 def initialize(identifier, args) @identifier = identifier @model_type = args.delete(:model_type) @card_id = args.delete(:card_id) @args = args end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
13 14 15 |
# File 'lib/sourcescrub/apis/companies.rb', line 13 def args @args end |
Instance Method Details
#request_url ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/sourcescrub/apis/companies.rb', line 22 def request_url [ Models::Company::ENDPOINT, @identifier, @card_id ].compact.join('/') end |
#search_url ⇒ Object
30 31 32 33 34 35 |
# File 'lib/sourcescrub/apis/companies.rb', line 30 def search_url [ 'search', Models::Company::ENDPOINT ].compact.join('/') end |