Module: AvaTax::Client::Upcs

Included in:
AvaTax::Client
Defined in:
lib/avatax/client/upcs.rb

Instance Method Summary collapse

Instance Method Details

#create_u_p_cs(companyId, model) ⇒ UPCModel[]

Create a new UPC

Create one or more new UPC objects attached to this company. A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.

Security Policies

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


19
20
# File 'lib/avatax/client/upcs.rb', line 19

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

#delete_u_p_c(companyId, id) ⇒ ErrorDetail[]

Delete a single UPC

Marks the UPC object identified by this URL as deleted.

Security Policies

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


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

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

#get_u_p_c(companyId, id) ⇒ Object

Retrieve a single UPC

Get the UPC object identified by this URL. A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
  • This API depends on the following active services:Required (all): AvaUpc. Swagger Name: AvaTaxClient


50
51
# File 'lib/avatax/client/upcs.rb', line 50

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

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

Retrieve UPCs for this company

List all UPC objects attached to this company. A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.

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, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
  • This API depends on the following active services:Required (all): AvaUpc. Swagger Name: AvaTaxClient


73
74
# File 'lib/avatax/client/upcs.rb', line 73

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

#query_u_p_cs(options = {}) ⇒ FetchResult

Retrieve all UPCs

Get multiple UPC objects across all companies. A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.

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, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
  • This API depends on the following active services:Required (all): AvaUpc. Swagger Name: AvaTaxClient


95
96
# File 'lib/avatax/client/upcs.rb', line 95

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

#update_u_p_c(companyId, id, model) ⇒ Object

Update a single UPC

Replace the existing UPC object at this URL with an updated object. A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC. All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null, you may either set its value to null or omit that field from the object you post.

Security Policies

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


114
115
# File 'lib/avatax/client/upcs.rb', line 114

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