Method: AvaTax::Client::Settings#create_settings

Defined in:
lib/avatax/client/settings.rb

#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

Parameters:

  • companyId (Integer)

    The ID of the company that owns this setting.

  • model (SettingModel[])

    The setting you wish to create.

Returns:

  • (SettingModel[])


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