Module: AvaTax::Client::TaxCodes
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/taxcodes.rb
Instance Method Summary collapse
-
#create_tax_codes(companyId, model) ⇒ TaxCodeModel[]
Create a new tax code.
-
#delete_tax_code(companyId, id) ⇒ ErrorDetail[]
Delete a single tax code.
-
#get_tax_code(companyId, id) ⇒ Object
Retrieve a single tax code.
-
#list_tax_codes_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve tax codes for this company.
-
#query_tax_codes(options = {}) ⇒ FetchResult
Retrieve all tax codes.
-
#update_tax_code(companyId, id, model) ⇒ Object
Update a single tax code.
Instance Method Details
#create_tax_codes(companyId, model) ⇒ TaxCodeModel[]
Create a new tax code
Create one or more new taxcode objects attached to this company. A 'TaxCode' represents a uniquely identified type of product, good, or service. Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and taxability rules for this product in all supported jurisdictions.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
21 22 |
# File 'lib/avatax/client/taxcodes.rb', line 21 def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes" post(path, model, {}, AvaTax::VERSION) end |
#delete_tax_code(companyId, id) ⇒ ErrorDetail[]
Delete a single tax code
Marks the existing TaxCode object at this URL as deleted.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
35 36 |
# File 'lib/avatax/client/taxcodes.rb', line 35 def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" delete(path, {}, AvaTax::VERSION) end |
#get_tax_code(companyId, id) ⇒ Object
Retrieve a single tax code
Get the taxcode object identified by this URL. A 'TaxCode' represents a uniquely identified type of product, good, or service. Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and taxability rules for this product in all supported jurisdictions.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
53 54 |
# File 'lib/avatax/client/taxcodes.rb', line 53 def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" get(path, {}, AvaTax::VERSION) end |
#list_tax_codes_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve tax codes for this company
List all taxcode objects attached to this company. A 'TaxCode' represents a uniquely identified type of product, good, or service. Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and taxability rules for this product in all supported jurisdictions.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
78 79 |
# File 'lib/avatax/client/taxcodes.rb', line 78 def list_tax_codes_by_company(companyId, ={}) path = "/api/v2/companies/#{companyId}/taxcodes" get(path, , AvaTax::VERSION) end |
#query_tax_codes(options = {}) ⇒ FetchResult
Retrieve all tax codes
Get multiple taxcode objects across all companies. A 'TaxCode' represents a uniquely identified type of product, good, or service. Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and taxability rules for this product in all supported jurisdictions.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
102 103 |
# File 'lib/avatax/client/taxcodes.rb', line 102 def query_tax_codes(={}) path = "/api/v2/taxcodes" get(path, , AvaTax::VERSION) end |
#update_tax_code(companyId, id, model) ⇒ Object
Update a single tax code
Replace the existing taxcode object at this URL with an updated object. A 'TaxCode' represents a uniquely identified type of product, good, or service. Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions. If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and taxability rules for this product in all supported jurisdictions. All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null, you may either set its value to null or omit that field from the object you post.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
123 124 |
# File 'lib/avatax/client/taxcodes.rb', line 123 def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" put(path, model, {}, AvaTax::VERSION) end |