Module: AvaTax::Client::AdvancedRules

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

Instance Method Summary collapse

Instance Method Details

#create_company_lookup_file(accountId, companyId, model) ⇒ Object

Create a lookup file for a company

Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account for the company

  • companyId (Integer)

    The ID of the company for which the lookup file is to be created

  • model (Object)

    The lookup file you wish to create

Returns:

  • (Object)


14
15
# File 'lib/avatax/client/advancedrules.rb', line 14

def create_company_lookup_file(accountId, companyId, model)        path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
post(path, model, {}, AvaTax::VERSION)      end

#delete_lookup_file(accountId, id) ⇒ ErrorDetail[]

Delete a lookup file

Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account for the company the lookup file is for

  • id (String)

    The unique ID/GUID for the company lookup file to be deleted

Returns:

  • (ErrorDetail[])


24
25
# File 'lib/avatax/client/advancedrules.rb', line 24

def delete_lookup_file(accountId, id)        path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
delete(path, {}, AvaTax::VERSION)      end

#get_company_lookup_files(accountId, companyId) ⇒ FetchResult

Get the lookup files for a company

Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The account ID for the company

  • companyId (Integer)

    The ID of the company for which to retrieve lookup files

Returns:

  • (FetchResult)


34
35
# File 'lib/avatax/client/advancedrules.rb', line 34

def get_company_lookup_files(accountId, companyId)        path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
get(path, {}, AvaTax::VERSION)      end

#get_lookup_file(accountId, id) ⇒ Object

Get a lookup file for an accountId and companyLookupFileId

Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account for the lookup file

  • id (String)

    The unique ID/GUID of the company lookup file to return

Returns:

  • (Object)


44
45
# File 'lib/avatax/client/advancedrules.rb', line 44

def get_lookup_file(accountId, id)        path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
get(path, {}, AvaTax::VERSION)      end

#update_lookup_file(accountId, id, model) ⇒ Object

Update a lookup file

Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account for the company the lookup file is for

  • id (String)

    The unique ID/GUID of the company lookup file to be updated

  • model (Object)

    The new values to update the lookup file

Returns:

  • (Object)


55
56
# File 'lib/avatax/client/advancedrules.rb', line 55

def update_lookup_file(accountId, id, model)        path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
put(path, model, {}, AvaTax::VERSION)      end