Module: AvaTax::Client::Batches
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/batches.rb
Instance Method Summary collapse
- 
  
    
      #cancel_batch(companyId, id)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Cancel an in progress batch. 
- 
  
    
      #create_advanced_rules_batch(companyId, model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Create a new Advanced Rules batch. 
- 
  
    
      #create_batches(companyId, model)  ⇒ BatchModel[] 
    
    
  
  
  
  
  
  
  
  
  
    Create a new batch. 
- 
  
    
      #create_transaction_batch(companyId, model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Create a new transaction batch. 
- 
  
    
      #delete_batch(companyId, id)  ⇒ ErrorDetail[] 
    
    
  
  
  
  
  
  
  
  
  
    Delete a single batch. 
- 
  
    
      #download_batch(companyId, batchId, id)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Download a single batch file. 
- 
  
    
      #get_batch(companyId, id)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Retrieve a single batch. 
- 
  
    
      #list_batches_by_company(companyId, options = {})  ⇒ FetchResult 
    
    
  
  
  
  
  
  
  
  
  
    Retrieve all batches for this company. 
- 
  
    
      #query_batches(options = {})  ⇒ FetchResult 
    
    
  
  
  
  
  
  
  
  
  
    Retrieve all batches. 
Instance Method Details
#cancel_batch(companyId, id) ⇒ Object
Cancel an in progress batch
Marks the in progress batch identified by this URL as cancelled.
Only JSON batches can be cancelled. If you attempt to cancel a file batch, you will receive an error message.
Only in progress batches can be cancelled. If you attempt to cancel a batch that its status is not Waiting or Processing, you will receive an error message. Cancelling an in progress batch does not delete any transactions that were created before the cancellation.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
| 28 29 | # File 'lib/avatax/client/batches.rb', line 28 def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel" post(path, {}, {}, AvaTax::VERSION) end | 
#create_advanced_rules_batch(companyId, model) ⇒ Object
Create a new Advanced Rules batch
Create a new Advanced Rules batch objects attached to this company.
When an Advanced Rules batch is created, it is added to the AvaTax Batch v2 Queue and will be processed as quickly as possible in the order it was received. To check the status of a batch, fetch the batch and retrieve the results of the batch operation.
The maximum content length of the request body is limited to 28.6 MB. If this limit is exceeded, a 404 Not Found status will be returned (possibly with a CORS error if the API is called from a browser). In this situation, please split the request into smaller batches.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
| 52 53 | # File 'lib/avatax/client/batches.rb', line 52 def create_advanced_rules_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/advancedrules" post(path, model, {}, AvaTax::VERSION) end | 
#create_batches(companyId, model) ⇒ BatchModel[]
Create a new batch
Create one or more new batch objects attached to this company.
Each batch object may have one or more file objects (currently only one file is supported).
When a batch is created, it is added to the AvaTax Batch Queue and will be processed as quickly as possible in the order it was received. To check the status of a batch, fetch the batch and retrieve the results of the batch operation.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
The maximum content length of the request body is limited to 28.6 MB. If this limit is exceeded, a 404 Not Found status will be returned (possibly with a CORS error if the API is called from a browser). In this situation, please split the request into smaller batches.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
| 84 85 | # File 'lib/avatax/client/batches.rb', line 84 def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches" post(path, model, {}, AvaTax::VERSION) end | 
#create_transaction_batch(companyId, model) ⇒ Object
Create a new transaction batch
Create a new transaction batch objects attached to this company.
When a transaction batch is created, it is added to the AvaTax Batch v2 Queue and will be processed as quickly as possible in the order it was received. To check the status of a batch, fetch the batch and retrieve the results of the batch operation.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
The maximum content length of the request body is limited to 28.6 MB. If this limit is exceeded, a 404 Not Found status will be returned (possibly with a CORS error if the API is called from a browser). In this situation, please split the request into smaller batches.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
| 114 115 | # File 'lib/avatax/client/batches.rb', line 114 def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions" post(path, model, {}, AvaTax::VERSION) end | 
#delete_batch(companyId, id) ⇒ ErrorDetail[]
Delete a single batch
Marks the batch identified by this URL as deleted.
If you attempt to delete a batch that is being processed, you will receive an error message. Deleting a batch does not delete any transactions that were created by importing the batch.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
Security Policies
- This API requires one of the following user roles: BatchServiceAdmin, CSPAdmin, CSPTester, FirmAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
| 137 138 | # File 'lib/avatax/client/batches.rb', line 137 def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}" delete(path, {}, AvaTax::VERSION) end | 
#download_batch(companyId, batchId, id) ⇒ Object
Download a single batch file
Download a single batch file identified by this URL.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
| 152 153 | # File 'lib/avatax/client/batches.rb', line 152 def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment" get(path, {}, AvaTax::VERSION) end | 
#get_batch(companyId, id) ⇒ Object
Retrieve a single batch
Get the batch object identified by this URL. A batch object is a large collection of API calls stored in a compact file.
Use this endpoint to retrieve the results or check the status of a batch.
When a batch is created, it is added to the AvaTax Batch Queue and will be processed as quickly as possible in the order it was received. To check the status of a batch, fetch the batch and retrieve the results of the batch operation.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
| 180 181 | # File 'lib/avatax/client/batches.rb', line 180 def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}" get(path, {}, AvaTax::VERSION) end | 
#list_batches_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve all batches for this company
List all batch objects attached to the specified company.
A batch object is a large collection of API calls stored in a compact file.
Search for specific objects using the criteria in the $filter parameter;
full documentation is available on Filtering in REST .
Paginate results using the $top, $skip, and $orderby parameters.
Use GetBatch to retrieve the results, or check the status, of an individual batch.
When a batch is created, it is added to the AvaTax Batch Queue and will be processed as quickly as possible in the order it was received. To check the status of a batch, fetch the batch and retrieve the results of the batch operation.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
| 218 219 | # File 'lib/avatax/client/batches.rb', line 218 def list_batches_by_company(companyId, ={}) path = "/api/v2/companies/#{companyId}/batches" get(path, , AvaTax::VERSION) end | 
#query_batches(options = {}) ⇒ FetchResult
Retrieve all batches
Get multiple batch objects across all companies.
A batch object is a large collection of API calls stored in a compact file.
Search for specific objects using the criteria in the $filter parameter;
full documentation is available on Filtering in REST .
Paginate results using the $top, $skip, and $orderby parameters.
When a batch is created, it is added to the AvaTax Batch Queue and will be processed as quickly as possible in the order it was received. To check the status of a batch, fetch the batch and retrieve the results of the batch operation.
Because the batch system processes with a degree of concurrency, and because of batch sizes in the queue vary, AvaTax API is unable to accurately predict when a batch will complete. If high performance processing is required, please use the CreateTransaction API.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
| 252 253 | # File 'lib/avatax/client/batches.rb', line 252 def query_batches(={}) path = "/api/v2/batches" get(path, , AvaTax::VERSION) end |