class Kounta::Company

Public Class Methods

new(client, hash = {}) click to toggle source
Calls superclass method Kounta::Resource::new
# File lib/kounta/company.rb, line 48
def initialize(client, hash = {})
  @client = client

  if hash.empty?
    response = client.perform({ companies: 'me' }, :get).parsed
    super(response)
  else
    super(hash)
  end
end

Public Instance Methods

base_price_list() click to toggle source
# File lib/kounta/company.rb, line 59
def base_price_list
  client.object_from_response(Kounta::PriceList, :get, companies: id, price_lists: 'base')
end
resource_path() click to toggle source
# File lib/kounta/company.rb, line 63
def resource_path
  { companies: id }
end