Module: AvaTax::Client::TaxRules
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/taxrules.rb
Instance Method Summary collapse
-
#create_tax_rules(companyId, model) ⇒ TaxRuleModel[]
Create a new tax rule.
-
#delete_tax_rule(companyId, id) ⇒ ErrorDetail[]
Delete a single tax rule.
-
#get_tax_rule(companyId, id) ⇒ Object
Retrieve a single tax rule.
-
#list_tax_rules(companyId, options = {}) ⇒ FetchResult
Retrieve tax rules for this company.
-
#query_tax_rules(options = {}) ⇒ FetchResult
Retrieve all tax rules.
-
#update_tax_rule(companyId, id, model) ⇒ Object
Update a single tax rule.
Instance Method Details
#create_tax_rules(companyId, model) ⇒ TaxRuleModel[]
Create a new tax rule
Create one or more custom tax rules attached to this company.
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item. Tax rules can also change tax behavior depending on the entityUseCode value submitted
with the transaction.
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your business. If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use custom tax rules to redefine the behavior for your company or item.
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your auditor, legal representative, and accounting team.
Security Policies
- This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
29 30 |
# File 'lib/avatax/client/taxrules.rb', line 29 def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules" post(path, model, {}, "22.5.0") end |
#delete_tax_rule(companyId, id) ⇒ ErrorDetail[]
Delete a single tax rule
Mark the custom tax rule identified by this URL as deleted.
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item. Tax rules can also change tax behavior depending on the entityUseCode value submitted
with the transaction.
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your business. If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use custom tax rules to redefine the behavior for your company or item.
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your auditor, legal representative, and accounting team.
Security Policies
- This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
55 56 |
# File 'lib/avatax/client/taxrules.rb', line 55 def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}" delete(path, {}, "22.5.0") end |
#get_tax_rule(companyId, id) ⇒ Object
Retrieve a single tax rule
Get the taxrule object identified by this URL.
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item. Tax rules can also change tax behavior depending on the entityUseCode value submitted
with the transaction.
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your business. If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use custom tax rules to redefine the behavior for your company or item.
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your auditor, legal representative, and accounting team.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
81 82 |
# File 'lib/avatax/client/taxrules.rb', line 81 def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}" get(path, {}, "22.5.0") end |
#list_tax_rules(companyId, options = {}) ⇒ FetchResult
Retrieve tax rules for this company
List all taxrule objects attached to this company.
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item. Tax rules can also change tax behavior depending on the entityUseCode value submitted
with the transaction.
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your business. If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use custom tax rules to redefine the behavior for your company or item.
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your auditor, legal representative, and accounting team.
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, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
114 115 |
# File 'lib/avatax/client/taxrules.rb', line 114 def list_tax_rules(companyId, ={}) path = "/api/v2/companies/#{companyId}/taxrules" get(path, , "22.5.0") end |
#query_tax_rules(options = {}) ⇒ FetchResult
Retrieve all tax rules
Get multiple taxrule objects across all companies.
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item. Tax rules can also change tax behavior depending on the entityUseCode value submitted
with the transaction.
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your business. If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use custom tax rules to redefine the behavior for your company or item.
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your auditor, legal representative, and accounting team.
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, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
146 147 |
# File 'lib/avatax/client/taxrules.rb', line 146 def query_tax_rules(={}) path = "/api/v2/taxrules" get(path, , "22.5.0") end |
#update_tax_rule(companyId, id, model) ⇒ Object
Update a single tax rule
Replace the existing custom tax rule object at this URL with an updated object.
A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
can be used to change the taxability of an item, to change the tax base of an item, or to change the tax rate
charged when selling an item. Tax rules can also change tax behavior depending on the entityUseCode value submitted
with the transaction.
You can create custom tax rules to customize the behavior of AvaTax to match specific rules that are custom to your business. If you have obtained a ruling from a tax auditor that requires custom tax calculations, you can use custom tax rules to redefine the behavior for your company or item.
Please use custom tax rules carefully and ensure that these tax rules match the behavior agreed upon with your auditor, legal representative, and accounting team.
Security Policies
- This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
173 174 |
# File 'lib/avatax/client/taxrules.rb', line 173 def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}" put(path, model, {}, "22.5.0") end |