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, at_time: nil, request_options: {}) ⇒ Increase::Models::BookkeepingBalanceLookup
Retrieve a Bookkeeping Account Balance.
-
#create(name: , account_id: nil, compliance_category: nil, entity_id: nil, request_options: {}) ⇒ Increase::Models::BookkeepingAccount
Create a Bookkeeping Account.
-
#initialize(client:) ⇒ BookkeepingAccounts
constructor
private
A new instance of BookkeepingAccounts.
-
#list(cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::BookkeepingAccount>
Some parameter documentations has been truncated, see Models::BookkeepingAccountListParams for more details.
-
#update(bookkeeping_account_id, name: , request_options: {}) ⇒ Increase::Models::BookkeepingAccount
Update a Bookkeeping Account.
Constructor Details
#initialize(client:) ⇒ BookkeepingAccounts
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of BookkeepingAccounts.
115 116 117 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 115 def initialize(client:) @client = client end |
Instance Method Details
#balance(bookkeeping_account_id, at_time: nil, request_options: {}) ⇒ Increase::Models::BookkeepingBalanceLookup
Retrieve a Bookkeeping Account Balance
101 102 103 104 105 106 107 108 109 110 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 101 def balance(bookkeeping_account_id, params = {}) parsed, = Increase::BookkeepingAccountBalanceParams.dump_request(params) @client.request( method: :get, path: ["bookkeeping_accounts/%1$s/balance", bookkeeping_account_id], query: parsed, model: Increase::BookkeepingBalanceLookup, options: ) end |
#create(name: , account_id: nil, compliance_category: nil, entity_id: nil, request_options: {}) ⇒ Increase::Models::BookkeepingAccount
Create a Bookkeeping Account
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 23 def create(params) parsed, = Increase::BookkeepingAccountCreateParams.dump_request(params) @client.request( method: :post, path: "bookkeeping_accounts", body: parsed, model: Increase::BookkeepingAccount, options: ) end |
#list(cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::BookkeepingAccount>
Some parameter documentations has been truncated, see Models::BookkeepingAccountListParams for more details.
List Bookkeeping Accounts
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 76 def list(params = {}) parsed, = Increase::BookkeepingAccountListParams.dump_request(params) @client.request( method: :get, path: "bookkeeping_accounts", query: parsed, page: Increase::Internal::Page, model: Increase::BookkeepingAccount, options: ) end |
#update(bookkeeping_account_id, name: , request_options: {}) ⇒ Increase::Models::BookkeepingAccount
Update a Bookkeeping Account
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/increase/resources/bookkeeping_accounts.rb', line 47 def update(bookkeeping_account_id, params) parsed, = Increase::BookkeepingAccountUpdateParams.dump_request(params) @client.request( method: :patch, path: ["bookkeeping_accounts/%1$s", bookkeeping_account_id], body: parsed, model: Increase::BookkeepingAccount, options: ) end |