Module: AvaTax::Client::Settings
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/settings.rb
Instance Method Summary collapse
-
#create_settings(companyId, model) ⇒ SettingModel[]
Create a new setting.
-
#delete_setting(companyId, id) ⇒ ErrorDetail[]
Delete a single setting.
-
#get_setting(companyId, id) ⇒ Object
Retrieve a single setting.
-
#list_settings_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve all settings for this company.
-
#query_settings(options = {}) ⇒ FetchResult
Retrieve all settings.
-
#update_setting(companyId, id, model) ⇒ Object
Update a single setting.
Instance Method Details
#create_settings(companyId, model) ⇒ SettingModel[]
Create a new setting
Create one or more new setting objects attached to this company.
The company settings system is a metadata system that you can use to store extra information about a company. Your integration or connector could use this data storage to keep track of preference information, reminders, or any other storage that would need to persist even if the customer uninstalls your application.
A setting can refer to any type of data you need to remember about this company object.
When creating this object, you may define your own set
, name
, and value
parameters.
To define your own values, please choose a set
name that begins with X-
to indicate an extension.
Use Set = Transactions, Name = TaxCodePrioritization/HSCodePrioritization and Value = Transaction/ItemMaster for prioritizing which TaxCodes/HsCodes should be used for calculating taxes.
Example: To prioritize TaxCodes passed in a Transaction over values stored with Items when calculating tax, use Set = Transactions, Name = TaxCodePrioritization, Value = Transaction
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
31 32 |
# File 'lib/avatax/client/settings.rb', line 31 def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings" post(path, model, {}, AvaTax::VERSION) end |
#delete_setting(companyId, id) ⇒ ErrorDetail[]
Delete a single setting
Mark the setting object at this URL as deleted.
The company settings system is a metadata system that you can use to store extra information about a company. Your integration or connector could use this data storage to keep track of preference information, reminders, or any other storage that would need to persist even if the customer uninstalls your application.
A setting can refer to any type of data you need to remember about this company object.
When creating this object, you may define your own set
, name
, and value
parameters.
To define your own values, please choose a set
name that begins with X-
to indicate an extension.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
54 55 |
# File 'lib/avatax/client/settings.rb', line 54 def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}" delete(path, {}, AvaTax::VERSION) end |
#get_setting(companyId, id) ⇒ Object
Retrieve a single setting
Get a single setting object by its unique ID.
The company settings system is a metadata system that you can use to store extra information about a company. Your integration or connector could use this data storage to keep track of preference information, reminders, or any other storage that would need to persist even if the customer uninstalls your application.
A setting can refer to any type of data you need to remember about this company object.
When creating this object, you may define your own set
, name
, and value
parameters.
To define your own values, please choose a set
name that begins with X-
to indicate an extension.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
77 78 |
# File 'lib/avatax/client/settings.rb', line 77 def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}" get(path, {}, AvaTax::VERSION) end |
#list_settings_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve all settings for this company
List all setting objects attached to this company.
The company settings system is a metadata system that you can use to store extra information about a company. Your integration or connector could use this data storage to keep track of preference information, reminders, or any other storage that would need to persist even if the customer uninstalls your application.
A setting can refer to any type of data you need to remember about this company object.
When creating this object, you may define your own set
, name
, and value
parameters.
To define your own values, please choose a set
name that begins with X-
to indicate an extension.
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, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
107 108 |
# File 'lib/avatax/client/settings.rb', line 107 def list_settings_by_company(companyId, ={}) path = "/api/v2/companies/#{companyId}/settings" get(path, , AvaTax::VERSION) end |
#query_settings(options = {}) ⇒ FetchResult
Retrieve all settings
Get multiple setting objects across all companies.
The company settings system is a metadata system that you can use to store extra information about a company. Your integration or connector could use this data storage to keep track of preference information, reminders, or any other storage that would need to persist even if the customer uninstalls your application.
A setting can refer to any type of data you need to remember about this company object.
When creating this object, you may define your own set
, name
, and value
parameters.
To define your own values, please choose a set
name that begins with X-
to indicate an extension.
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, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
136 137 |
# File 'lib/avatax/client/settings.rb', line 136 def query_settings(={}) path = "/api/v2/settings" get(path, , AvaTax::VERSION) end |
#update_setting(companyId, id, model) ⇒ Object
Update a single setting
Replace the existing setting object at this URL with an updated object.
The company settings system is a metadata system that you can use to store extra information about a company. Your integration or connector could use this data storage to keep track of preference information, reminders, or any other storage that would need to persist even if the customer uninstalls your application.
A setting can refer to any type of data you need to remember about this company object.
When creating this object, you may define your own set
, name
, and value
parameters.
To define your own values, please choose a set
name that begins with X-
to indicate an extension.
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 when calling update.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
164 165 |
# File 'lib/avatax/client/settings.rb', line 164 def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}" put(path, model, {}, AvaTax::VERSION) end |