Class: BlockScore::Companies
- Inherits:
-
Object
- Object
- BlockScore::Companies
- Defined in:
- lib/blockscore/companies.rb
Constant Summary collapse
- PATH =
'/companies'
Instance Method Summary collapse
-
#all(count = nil, offset = nil, options = {}) ⇒ Object
‘/companies’ GET.
-
#create(options = {}) ⇒ Object
/companies POST.
-
#initialize(client) ⇒ Companies
constructor
A new instance of Companies.
-
#retrieve(id, options = {}) ⇒ Object
/companies/:id GET.
Constructor Details
#initialize(client) ⇒ Companies
Returns a new instance of Companies.
5 6 7 |
# File 'lib/blockscore/companies.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#all(count = nil, offset = nil, options = {}) ⇒ Object
‘/companies’ GET
27 28 29 30 31 32 33 34 |
# File 'lib/blockscore/companies.rb', line 27 def all(count = nil, offset = nil, = {}) body = (.include? :body) ? [:body] : {} body[:count] = count body[:offset] = offset @client.get PATH, body end |
#create(options = {}) ⇒ Object
/companies POST
12 13 14 |
# File 'lib/blockscore/companies.rb', line 12 def create( = {}) response = @client.post PATH, end |
#retrieve(id, options = {}) ⇒ Object
/companies/:id GET
19 20 21 22 |
# File 'lib/blockscore/companies.rb', line 19 def retrieve(id, = {}) body = (.include? :query) ? [:body] : {} response = @client.get "#{PATH}/#{id.to_s}", body end |