Module: AvaTax::Client::CostCenter
- Defined in:
- lib/avatax/client/costcenter.rb
Instance Method Summary collapse
- 
  
    
      #bulk_upload_cost_centers(companyid, model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Bulk upload cost centers. 
- 
  
    
      #create_cost_center(companyid, model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Create new cost center. 
- 
  
    
      #delete_cost_center(companyid, costcenterid)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Delete cost center for the given id. 
- 
  
    
      #get_cost_center_by_id(companyid, costcenterid)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Retrieve a single cost center. 
- 
  
    
      #list_cost_centers_by_company(companyid, options = {})  ⇒ FetchResult 
    
    
  
  
  
  
  
  
  
  
  
    Retrieve cost centers for this company. 
- 
  
    
      #query_cost_centers(options = {})  ⇒ FetchResult 
    
    
  
  
  
  
  
  
  
  
  
    Retrieve all cost centers. 
- 
  
    
      #update_cost_center(companyid, costcenterid, model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update a single cost center. 
Instance Method Details
#bulk_upload_cost_centers(companyid, model) ⇒ Object
Bulk upload cost centers
Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded. Swagger Name: AvaTaxClient
| 13 14 | # File 'lib/avatax/client/costcenter.rb', line 13 def bulk_upload_cost_centers(companyid, model) path = "/api/v2/companies/#{companyid}/costcenters/$upload" post(path, model, {}, AvaTax::VERSION) end | 
#create_cost_center(companyid, model) ⇒ Object
Create new cost center
Creates one or more new item objects attached to this company.
Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations. Swagger Name: AvaTaxClient
| 25 26 | # File 'lib/avatax/client/costcenter.rb', line 25 def create_cost_center(companyid, model) path = "/api/v2/companies/#{companyid}/costcenters" post(path, model, {}, AvaTax::VERSION) end | 
#delete_cost_center(companyid, costcenterid) ⇒ Object
Delete cost center for the given id
Deletes a cost center with the specified costcenterId that belongs to the company. Swagger Name: AvaTaxClient
| 35 36 | # File 'lib/avatax/client/costcenter.rb', line 35 def delete_cost_center(companyid, costcenterid) path = "/api/v2/companies/#{companyid}/costcenters/#{costcenterid}" delete(path, {}, AvaTax::VERSION) end | 
#get_cost_center_by_id(companyid, costcenterid) ⇒ Object
Retrieve a single cost center
Retrieves details of a single cost center identified by costcenterId, which is owned by the company. Swagger Name: AvaTaxClient
| 45 46 | # File 'lib/avatax/client/costcenter.rb', line 45 def get_cost_center_by_id(companyid, costcenterid) path = "/api/v2/companies/#{companyid}/costcenters/#{costcenterid}" get(path, {}, AvaTax::VERSION) end | 
#list_cost_centers_by_company(companyid, options = {}) ⇒ FetchResult
Retrieve cost centers for this company
Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records. Swagger Name: AvaTaxClient
| 59 60 | # File 'lib/avatax/client/costcenter.rb', line 59 def list_cost_centers_by_company(companyid, ={}) path = "/api/v2/companies/#{companyid}/costcenters" get(path, , AvaTax::VERSION) end | 
#query_cost_centers(options = {}) ⇒ FetchResult
Retrieve all cost centers
Retrieves all cost centers available. You can apply filters to retrieve specific records. Swagger Name: AvaTaxClient
| 72 73 | # File 'lib/avatax/client/costcenter.rb', line 72 def query_cost_centers(={}) path = "/api/v2/costcenters" get(path, , AvaTax::VERSION) end | 
#update_cost_center(companyid, costcenterid, model) ⇒ Object
Update a single cost center
Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update. Swagger Name: AvaTaxClient
| 83 84 | # File 'lib/avatax/client/costcenter.rb', line 83 def update_cost_center(companyid, costcenterid, model) path = "/api/v2/companies/#{companyid}/costcenters/#{costcenterid}" put(path, model, {}, AvaTax::VERSION) end |