Module: AvaTax::Client::DataSources

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

Instance Method Summary collapse

Instance Method Details

#create_data_sources(companyId, model) ⇒ DataSourceModel[]

Create and store new datasources for the respective companies.

Create one or more datasource objects.

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


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

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

#delete_data_source(companyId, id) ⇒ ErrorDetail[]

Delete a datasource by datasource id for a company.

Marks the existing datasource 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


33
34
# File 'lib/avatax/client/datasources.rb', line 33

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

#get_data_source_by_id(companyId, id) ⇒ Object

Get data source by data source id

Retrieve the data source by its unique ID number.

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


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

def get_data_source_by_id(companyId, id)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
get(path, {}, AvaTax::VERSION)      end

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

Retrieve all datasources for this company

Gets multiple datasource objects for a given company.

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


66
67
# File 'lib/avatax/client/datasources.rb', line 66

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

#query_data_sources(options = {}) ⇒ FetchResult

Retrieve all datasources

Get multiple datasource objects across all companies.

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, 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


86
87
# File 'lib/avatax/client/datasources.rb', line 86

def query_data_sources(options={})        path = "/api/v2/datasources"
get(path, options, AvaTax::VERSION)      end

#update_data_source(companyId, id, model) ⇒ Object

Update a datasource identified by id for a company

Updates a datasource 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


102
103
# File 'lib/avatax/client/datasources.rb', line 102

def update_data_source(companyId, id, model)        path = "/api/v2/companies/#{companyId}/datasources/#{id}"
put(path, model, {}, AvaTax::VERSION)      end