Skip to content

Commit bf83d81

Browse files
Merge pull request #179 from avadev/25.6.2
25.6.2
2 parents 80acbaf + 87465cd commit bf83d81

File tree

5 files changed

+111
-10
lines changed

5 files changed

+111
-10
lines changed

lib/avatax/client/clerk.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module AvaTax
2+
class Client
3+
module Clerk
4+
5+
6+
# Retrieves a list of location records associated with the specified company.
7+
# This endpoint is secured and requires appropriate subscription and permission levels.
8+
#
9+
# ### Security Policies
10+
#
11+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
12+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms.
13+
# Swagger Name: AvaTaxClient
14+
# @param companyId [Integer] The unique identifier of the company whose locations are being requested.
15+
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following:
16+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* id
17+
# @param 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.
18+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
19+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
20+
# @return [FetchResult]
21+
def list_location_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/clerk/locations"
22+
get(path, options, AvaTax::VERSION) end
23+
end
24+
end
25+
end

lib/avatax/client/definitions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ def list_tax_authority_types(options={}) path = "/api/v2/definitions/taxa
10441044
# Retrieves the list of Avalara-supported system tax codes.
10451045
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
10461046
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
1047-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
1047+
# If you identify your products by tax code in your 'Create Transaction' API calls, Avalara will correctly calculate tax rates and
10481048
# taxability rules for this product in all supported jurisdictions.
10491049
#
10501050
# ### Security Policies

lib/avatax/client/items.rb

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,27 @@ def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/ite
236236
def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
237237
delete(path, {}, AvaTax::VERSION) end
238238

239+
# Delete the image associated with an item.
240+
#
241+
# Delete the image associated with an item.
242+
#
243+
# Permanently deletes both the image and its association with the specified item.
244+
# This endpoint allows users to manage product visual representations by removing outdated or incorrect images,
245+
# and cleaning up unused resources in the system.
246+
# Once deleted, the image association cannot be recovered. To use the image again, it must be re-uploaded and
247+
# re-linked with the item.
248+
#
249+
# ### Security Policies
250+
#
251+
# * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
252+
# Swagger Name: AvaTaxClient
253+
# @param companyId [Integer] The unique ID of the company.
254+
# @param itemId [Integer] The unique ID of the item.
255+
# @param imageId [String] The unique ID of the image to delete.
256+
# @return [AssociatedObjectDeletedErrorDetailsModel[]]
257+
def delete_item_image(companyId, itemId, imageId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/images/#{imageId}"
258+
delete(path, {}, AvaTax::VERSION) end
259+
239260
# Delete a single item parameter
240261
#
241262
# Delete a single item parameter.
@@ -439,6 +460,24 @@ def get_item_tax_code_recommendations(companyId, itemId) path = "/api/v2/
439460
def get_premium_classification(companyId, itemCode, systemCode, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemCode}/premiumClassification/#{systemCode}"
440461
get(path, options, AvaTax::VERSION) end
441462

463+
# Get the image associated with an item.
464+
#
465+
# Get the image file for the specified image ID linked to the item.
466+
#
467+
# This endpoint allows users to retrieve and display product images in user interfaces or to verify the current
468+
# image associated with a specific item.
469+
#
470+
# ### Security Policies
471+
#
472+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
473+
# Swagger Name: AvaTaxClient
474+
# @param companyId [Integer] The unique ID of the company.
475+
# @param itemId [Integer] The unique ID of the item.
476+
# @param imageId [String] The unique ID of the image to retrieve.
477+
# @return [Object]
478+
def get_product_image(companyId, itemId, imageId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/images/#{imageId}"
479+
get(path, {}, AvaTax::VERSION) end
480+
442481
# Create an HS code classification request.
443482
#
444483
# ### Security Policies
@@ -598,7 +637,7 @@ def list_item_premium_classifications(companyId, itemCode, options={}) pa
598637
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
599638
# Swagger Name: AvaTaxClient
600639
# @param companyId [Integer] The ID of the company that defined these items
601-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus
640+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus, image
602641
# @param include [String] A comma separated list of additional data to retrieve.
603642
# @param 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.
604643
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -677,7 +716,7 @@ def patch_item(companyId, id, model) path = "/api/v2/companies/#{companyI
677716
#
678717
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
679718
# Swagger Name: AvaTaxClient
680-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus
719+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus, image
681720
# @param include [String] A comma separated list of additional data to retrieve.
682721
# @param 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.
683722
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -734,7 +773,7 @@ def query_items_by_system_code(companyId, systemCode, model, options={})
734773
# Swagger Name: AvaTaxClient
735774
# @param companyId [Integer] The ID of the company that defined these items.
736775
# @param tag [String] The master tag to be associated with item.
737-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus
776+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus, image
738777
# @param include [String] A comma separated list of additional data to retrieve.
739778
# @param 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.
740779
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -788,6 +827,25 @@ def sync_item_catalogue(companyId, model) path = "/api/v2/companies/#{com
788827
def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
789828
post(path, model, {}, AvaTax::VERSION) end
790829

830+
# Update an existing image for an item.
831+
#
832+
# This endpoint allows users to update the existing image associated with a specific item by uploading a new image file.
833+
#
834+
# The updated image serves as the item's visual representation and will be used for tax code recommendation purposes.
835+
#
836+
# Restrictions:
837+
# - Supported formats: JPEG, GIF, PNG
838+
# - Maximum file size: 10MB
839+
# - Maximum file name length allowed: 200 characters
840+
# Swagger Name: AvaTaxClient
841+
# @param companyId [Integer] The unique ID of the company.
842+
# @param itemId [Integer] The unique ID of the item.
843+
# @param imageId [String] The unique ID of the image to update.
844+
# @param imageFile [Object]
845+
# @return [Object]
846+
def update_image(companyId, itemId, imageId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/images/#{imageId}"
847+
put(path, {}, AvaTax::VERSION) end
848+
791849
# Update a single item
792850
#
793851
# Replace the existing `Item` object at this URL with an updated object.
@@ -860,6 +918,24 @@ def update_item_classification(companyId, itemId, id, model) path = "/api
860918
def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
861919
put(path, model, {}, AvaTax::VERSION) end
862920

921+
# Upload an image for an item.
922+
#
923+
# This endpoint allows users to upload an image file for a specific item.
924+
#
925+
# The uploaded image serves as the item's visual representation and will be used for tax code recommendation purposes.
926+
#
927+
# Restrictions:
928+
# - Supported formats: JPEG, GIF, PNG
929+
# - Maximum file size: 10MB
930+
# - Maximum file name length allowed: 200 characters
931+
# Swagger Name: AvaTaxClient
932+
# @param companyId [Integer] The unique ID of the company.
933+
# @param itemId [Integer] The unique ID of the item.
934+
# @param imageFile [Object]
935+
# @return [Object]
936+
def upload_image(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/images"
937+
post(path, {}, {}, AvaTax::VERSION) end
938+
863939
# Add/update item classifications.
864940
#
865941
# Add/update classifications to an item.

lib/avatax/client/taxcodes.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module TaxCodes
88
# Create one or more new taxcode objects attached to this company.
99
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
1010
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
11-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
11+
# If you identify your products by tax code in your 'Create Transaction' API calls, Avalara will correctly calculate tax rates and
1212
# taxability rules for this product in all supported jurisdictions.
1313
#
1414
# ### Security Policies
@@ -40,7 +40,7 @@ def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}
4040
# Get the taxcode object identified by this URL.
4141
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
4242
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
43-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
43+
# If you identify your products by tax code in your 'Create Transaction' API calls, Avalara will correctly calculate tax rates and
4444
# taxability rules for this product in all supported jurisdictions.
4545
#
4646
# ### Security Policies
@@ -58,7 +58,7 @@ def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/ta
5858
# List all taxcode objects attached to this company.
5959
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
6060
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
61-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
61+
# If you identify your products by tax code in your 'Create Transaction' API calls, Avalara will correctly calculate tax rates and
6262
# taxability rules for this product in all supported jurisdictions.
6363
#
6464
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
@@ -83,7 +83,7 @@ def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/comp
8383
# Get multiple taxcode objects across all companies.
8484
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
8585
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
86-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
86+
# If you identify your products by tax code in your 'Create Transaction' API calls, Avalara will correctly calculate tax rates and
8787
# taxability rules for this product in all supported jurisdictions.
8888
#
8989
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
@@ -107,7 +107,7 @@ def query_tax_codes(options={}) path = "/api/v2/taxcodes"
107107
# Replace the existing taxcode object at this URL with an updated object.
108108
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
109109
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
110-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
110+
# If you identify your products by tax code in your 'Create Transaction' API calls, Avalara will correctly calculate tax rates and
111111
# taxability rules for this product in all supported jurisdictions.
112112
# All data from the existing object will be replaced with data in the object you PUT.
113113
# 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.

lib/avatax/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module AvaTax
2-
VERSION = '25.5.1'.freeze unless defined?(::AvaTax::VERSION)
2+
VERSION = '25.6.2'.freeze unless defined?(::AvaTax::VERSION)
33
end

0 commit comments

Comments
 (0)