Class: Increase::Resources::BookkeepingAccounts
- Inherits:
-
Object
- Object
- Increase::Resources::BookkeepingAccounts
- Defined in:
- lib/increase/resources/bookkeeping_accounts.rb
Instance Method Summary collapse
-
#balance(bookkeeping_account_id, params = {}, opts = {}) ⇒ Increase::Models::BookkeepingBalanceLookup
Retrieve a Bookkeeping Account Balance.
-
#create(params = {}, opts = {}) ⇒ Increase::Models::BookkeepingAccount
Create a Bookkeeping Account.
-
#initialize(client:) ⇒ BookkeepingAccounts
constructor
A new instance of BookkeepingAccounts.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::BookkeepingAccount>
List Bookkeeping Accounts.
-
#update(bookkeeping_account_id, params = {}, opts = {}) ⇒ Increase::Models::BookkeepingAccount
Update a Bookkeeping Account.
Constructor Details
#initialize(client:) ⇒ BookkeepingAccounts
Returns a new instance of BookkeepingAccounts.
6 7 8 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#balance(bookkeeping_account_id, params = {}, opts = {}) ⇒ Increase::Models::BookkeepingBalanceLookup
Retrieve a Bookkeeping Account Balance
83 84 85 86 87 88 89 90 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 83 def balance(bookkeeping_account_id, params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/bookkeeping_accounts/#{bookkeeping_account_id}/balance" req[:query] = params req[:model] = Increase::Models::BookkeepingBalanceLookup @client.request(req, opts) end |
#create(params = {}, opts = {}) ⇒ Increase::Models::BookkeepingAccount
Create a Bookkeeping Account
21 22 23 24 25 26 27 28 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 21 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/bookkeeping_accounts" req[:body] = params req[:model] = Increase::Models::BookkeepingAccount @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::BookkeepingAccount>
List Bookkeeping Accounts
63 64 65 66 67 68 69 70 71 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 63 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/bookkeeping_accounts" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::BookkeepingAccount @client.request(req, opts) end |
#update(bookkeeping_account_id, params = {}, opts = {}) ⇒ Increase::Models::BookkeepingAccount
Update a Bookkeeping Account
40 41 42 43 44 45 46 47 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 40 def update(bookkeeping_account_id, params = {}, opts = {}) req = {} req[:method] = :patch req[:path] = "/bookkeeping_accounts/#{bookkeeping_account_id}" req[:body] = params req[:model] = Increase::Models::BookkeepingAccount @client.request(req, opts) end |