Module: AvaTax::Client::GLAccount
- Defined in:
- lib/avatax/client/glaccount.rb
Instance Method Summary collapse
-
#bulk_upload_g_l_accounts(companyid, model) ⇒ Object
Bulk upload GL accounts.
-
#create_g_l_account(companyid, model) ⇒ Object
Create a new GL account.
-
#delete_g_l_account(companyid, glaccountid) ⇒ Object
Delete the GL account associated with the given company ID and GL account ID.
-
#get_g_l_account_by_id(companyid, glaccountid) ⇒ Object
Retrieve a single GL account.
-
#list_g_l_accounts_by_company(companyid, options = {}) ⇒ FetchResult
Retrieve GL accounts for this company.
-
#update_g_l_account(companyid, glaccountid, model) ⇒ Object
Update a single GL account.
Instance Method Details
#bulk_upload_g_l_accounts(companyid, model) ⇒ Object
Bulk upload GL accounts
Allows a bulk upload of GL accounts for the specified company. Use the companyid path parameter to identify the company for which the GL accounts should be uploaded. Swagger Name: AvaTaxClient
13 14 |
# File 'lib/avatax/client/glaccount.rb', line 13 def bulk_upload_g_l_accounts(companyid, model) path = "/api/v2/companies/#{companyid}/glaccounts/$upload" post(path, model, {}, AvaTax::VERSION) end |
#create_g_l_account(companyid, model) ⇒ Object
Create a new GL account
Creates one or more new GL account objects attached to this company.
A GL account is a general ledger account that can be passed to transactions at the line level to apply the multiple rules of the transactions, including exemptions, allocations, etc. to a specific general ledger. Swagger Name: AvaTaxClient
25 26 |
# File 'lib/avatax/client/glaccount.rb', line 25 def create_g_l_account(companyid, model) path = "/api/v2/companies/#{companyid}/glaccounts" post(path, model, {}, AvaTax::VERSION) end |
#delete_g_l_account(companyid, glaccountid) ⇒ Object
Delete the GL account associated with the given company ID and GL account ID
Deletes the GL account associated with the specified glaccountid
and companyid
Swagger Name: AvaTaxClient
35 36 |
# File 'lib/avatax/client/glaccount.rb', line 35 def delete_g_l_account(companyid, glaccountid) path = "/api/v2/companies/#{companyid}/glaccounts/#{glaccountid}" delete(path, {}, AvaTax::VERSION) end |
#get_g_l_account_by_id(companyid, glaccountid) ⇒ Object
Retrieve a single GL account
Retrieve details of a single GL account identified by its glaccountid
and companyid
Swagger Name: AvaTaxClient
45 46 |
# File 'lib/avatax/client/glaccount.rb', line 45 def get_g_l_account_by_id(companyid, glaccountid) path = "/api/v2/companies/#{companyid}/glaccounts/#{glaccountid}" get(path, {}, AvaTax::VERSION) end |
#list_g_l_accounts_by_company(companyid, options = {}) ⇒ FetchResult
Retrieve GL accounts for this company
Retrieves a list of GL accounts attached to this company. You can apply filters to retrieve specific records. Swagger Name: AvaTaxClient
59 60 |
# File 'lib/avatax/client/glaccount.rb', line 59 def list_g_l_accounts_by_company(companyid, ={}) path = "/api/v2/companies/#{companyid}/glaccounts" get(path, , AvaTax::VERSION) end |
#update_g_l_account(companyid, glaccountid, model) ⇒ Object
Update a single GL account
Updates a single GL account owned by the company. Use the glaccountid path parameter to identify the GL account to update. Swagger Name: AvaTaxClient
70 71 |
# File 'lib/avatax/client/glaccount.rb', line 70 def update_g_l_account(companyid, glaccountid, model) path = "/api/v2/companies/#{companyid}/glaccounts/#{glaccountid}" put(path, model, {}, AvaTax::VERSION) end |