Sha256: d0592a32b20447a3e47c21d42e770a742da910eace74d9b8345b360647afb610
Contents?: true
Size: 1.08 KB
Versions: 16
Compression:
Stored size: 1.08 KB
Contents
module Myfinance module Resources class SaleAccount < Base def find_all http.get("/sale_accounts", body: {}) do |response| respond_with_collection(response) end end 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 def create(params = {}) path = "/sale_accounts/" http.post(path, body: { sale_account: params }) do |response| respond_with_object(response, "sale_account") end end 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 def destroy(sale_account_id, params = {}) path = "/sale_accounts/#{sale_account_id}" http.delete(path, body: { sale_account: params }) do |response| response end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems