class Myfinance::Resources::SaleAccount

Public Instance Methods

create(params = {}) click to toggle source
# File lib/myfinance/resources/sale_account.rb, line 17
def create(params = {})
  path = "/sale_accounts/"
  http.post(path, body: { sale_account: params }) do |response|
    respond_with_object(response, "sale_account")
  end
end
destroy(sale_account_id, params = {}) click to toggle source
# File lib/myfinance/resources/sale_account.rb, line 31
def destroy(sale_account_id, params = {})
  path = "/sale_accounts/#{sale_account_id}"
  http.delete(path, body: { sale_account: params }) do |response|
    response
  end
end
find(sale_account_id) click to toggle source
# File lib/myfinance/resources/sale_account.rb, line 10
def find(sale_account_id)
  path = "/sale_accounts/#{sale_account_id}"
  http.get(path, body: {}) do |response|
    respond_with_object(response, "sale_account")
  end
end
find_all() click to toggle source
# File lib/myfinance/resources/sale_account.rb, line 4
def find_all
  http.get("/sale_accounts", body: {}) do |response|
    respond_with_collection(response)
  end
end
update(sale_account_id, params = {}) click to toggle source
# File lib/myfinance/resources/sale_account.rb, line 24
def update(sale_account_id, params = {})
  path = "/sale_accounts/#{sale_account_id}"
  http.put(path, body: { sale_account: params }) do |response|
    respond_with_object(response, "sale_account")
  end
end