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

Parameters:

  • companyId (Integer)

    The ID of the company that owns this UPC.

  • model (UPCModel[])

    The UPC you wish to create.

Returns:

  • (UPCModel[])


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

Parameters:

  • companyId (Integer)

    The ID of the company that owns this UPC.

  • id (Integer)

    The ID of the UPC you wish to delete.

Returns:

  • (ErrorDetail[])


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

Parameters:

  • companyId (Integer)

    The ID of the company that owns this UPC

  • id (Integer)

    The primary key of this UPC

Returns:

  • (Object)


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

Parameters:

  • companyId (Integer)

    The ID of the company that owns these UPCs

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.

  • include (String)

    A comma separated list of additional data to retrieve.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


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

Parameters:

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.

  • include (String)

    A comma separated list of additional data to retrieve.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


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

Parameters:

  • companyId (Integer)

    The ID of the company that this UPC belongs to.

  • id (Integer)

    The ID of the UPC you wish to update

  • model (Object)

    The UPC you wish to update.

Returns:

  • (Object)


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