Module: AvaTax::Client::UserDefinedFields

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

Instance Method Summary collapse

Instance Method Details

#delete_user_defined_field(companyId, id) ⇒ ErrorDetail[]

Delete a User Defined Field by User Defined Field id for a company.

Marks the existing user defined field for a company as deleted.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
  • This API depends on the following active services:Required (all): AvaTaxPro, BasicReturns. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The id of the company the User Defined Field belongs to.

  • id (Integer)

    The id of the User Defined Field you wish to delete.

Returns:

  • (ErrorDetail[])


18
19
# File 'lib/avatax/client/userdefinedfields.rb', line 18

def delete_user_defined_field(companyId, id)        path = "/api/v2/companies/#{companyId}/userdefinedfields/#{id}"
delete(path, {}, AvaTax::VERSION)      end

#list_user_defined_fields_by_company_id(companyId, options = {}) ⇒ FetchResult

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
  • This API depends on the following active services:Required (all): AvaTaxPro, BasicReturns. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)
  • udfType (String)

    Document or Line level UDF (See UserDefinedFieldType::* for a list of allowable values)

  • allowDefaults (Boolean)

    If true this will add defaulted UDFs to the list that are not named yet

Returns:

  • (FetchResult)


32
33
# File 'lib/avatax/client/userdefinedfields.rb', line 32

def list_user_defined_fields_by_company_id(companyId, options={})        path = "/api/v2/companies/#{companyId}/userdefinedfields"
get(path, options, AvaTax::VERSION)      end

#update_user_defined_field(companyId, model, options = {}) ⇒ Object

Update a User Defined Field identified by id for a company

Updates a User Defined Field for a company.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
  • This API depends on the following active services:Required (all): AvaTaxPro, BasicReturns. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The id of the company the user defined field belongs to.

  • id (Integer)
  • model (Object)

Returns:

  • (Object)


48
49
# File 'lib/avatax/client/userdefinedfields.rb', line 48

def update_user_defined_field(companyId, model, options={})        path = "/api/v2/companies/#{companyId}/userdefinedfields"
post(path, model, options, AvaTax::VERSION)      end