Skip to content

Commit fcdc865

Browse files
committed
Revert " update"
This reverts commit eed2a4a.
1 parent c2ef436 commit fcdc865

File tree

7 files changed

+90
-79
lines changed

7 files changed

+90
-79
lines changed

lib/avatax/client/advancedrules.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ def create_company_lookup_file(accountId, companyId, model) path = "/api/
2222
def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
2323
delete(path) end
2424

25+
# Get audit records by account id and date range.
26+
#
27+
#
28+
# @param accountId [Integer] The ID of the account
29+
# @param fromDate [String] Date
30+
# @param toDate [String] Date
31+
# @return [Object]
32+
def get_audit_records(accountId, fromDate, toDate) path = "/api/v2/advancedrules/audits/accounts/#{accountId}/from/#{fromDate}/to/#{toDate}"
33+
get(path) end
34+
2535
# Get the lookup files for a company
2636
#
2737
#

lib/avatax/client/definitions.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def list_marketplace_locations(options={}) path = "/api/v2/definitions/ma
348348
# Returns the full list of all Avalara-supported nexus for all countries and regions.
349349
#
350350
# This API is intended to be useful if your user interface needs to display a selectable list of nexus.
351-
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
351+
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
352352
# @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.
353353
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
354354
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -370,7 +370,7 @@ def list_nexus(options={}) path = "/api/v2/definitions/nexus"
370370
# @param region [String] Name or ISO 3166 code identifying the region portion of the address. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
371371
# @param postalCode [String] The postal code or zip code portion of this address.
372372
# @param country [String] Name or ISO 3166 code identifying the country portion of this address. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
373-
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
373+
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
374374
# @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.
375375
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
376376
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -384,7 +384,7 @@ def list_nexus_by_address(options={}) path = "/api/v2/definitions/nexus/b
384384
#
385385
# This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country.
386386
# @param country [String] The country in which you want to fetch the system nexus
387-
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
387+
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
388388
# @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.
389389
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
390390
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -399,7 +399,7 @@ def list_nexus_by_country(country, options={}) path = "/api/v2/definition
399399
# This API is intended to be useful if your user interface needs to display a selectable list of nexus filtered by country and region.
400400
# @param country [String] The two-character ISO-3166 code for the country.
401401
# @param region [String] The two or three character region code for the region.
402-
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
402+
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
403403
# @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.
404404
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
405405
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.

lib/avatax/client/free.rb

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,79 @@ module Free
2323
# @return [Object]
2424
def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
2525
post(path, model) end
26+
27+
# FREE API - Sales tax rates for a specified address
28+
#
29+
# # Free-To-Use
30+
#
31+
# The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
32+
# Any customer can request a free AvaTax account and make use of the TaxRates API.
33+
#
34+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
35+
# response code 429 - `Too Many Requests`.
36+
#
37+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
38+
# location in the United States only.
39+
#
40+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
41+
# which supports features including, but not limited to:
42+
#
43+
# * Nexus declarations
44+
# * Taxability based on product/service type
45+
# * Sourcing rules affecting origin/destination states
46+
# * Customers who are exempt from certain taxes
47+
# * States that have dollar value thresholds for tax amounts
48+
# * Refunds for products purchased on a different date
49+
# * Detailed jurisdiction names and state assigned codes
50+
# * And more!
51+
#
52+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
53+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
54+
# @param line1 [String] The street address of the location.
55+
# @param line2 [String] The street address of the location.
56+
# @param line3 [String] The street address of the location.
57+
# @param city [String] The city name of the location.
58+
# @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
59+
# @param postalCode [String] The postal code of the location.
60+
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
61+
# @return [Object]
62+
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
63+
get(path, options) end
64+
65+
# FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
66+
#
67+
# # Free-To-Use
68+
#
69+
# This API is only available for a US postal codes.
70+
#
71+
# The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
72+
# Any customer can request a free AvaTax account and make use of the TaxRates API.
73+
#
74+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
75+
# response code 429 - `Too Many Requests`.
76+
#
77+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
78+
# location in the United States only.
79+
#
80+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
81+
# which supports features including, but not limited to:
82+
#
83+
# * Nexus declarations
84+
# * Taxability based on product/service type
85+
# * Sourcing rules affecting origin/destination states
86+
# * Customers who are exempt from certain taxes
87+
# * States that have dollar value thresholds for tax amounts
88+
# * Refunds for products purchased on a different date
89+
# * Detailed jurisdiction names and state assigned codes
90+
# * And more!
91+
#
92+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
93+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
94+
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
95+
# @param postalCode [String] The postal code of the location.
96+
# @return [Object]
97+
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
98+
get(path, options) end
2699
end
27100
end
28101
end

lib/avatax/client/nexus.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies
225225
#
226226
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
227227
# @param companyId [Integer] The ID of the company that owns these nexus objects
228-
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
228+
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
229229
# @param include [String] A comma separated list of additional data to retrieve.
230230
# @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.
231231
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -276,7 +276,7 @@ def list_nexus_parameters(companyId, nexusId, options={}) path = "/api/v2
276276
# ### Security Policies
277277
#
278278
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
279-
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
279+
# @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
280280
# @param include [String] A comma separated list of additional data to retrieve.
281281
# @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.
282282
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.

lib/avatax/client/reports.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ def get_report(id) path = "/api/v2/reports/#{id}"
6060
#
6161
# The `ExportDocumentLine` report produces information about invoice lines recorded within your account.
6262
#
63-
# To split large reports into multiple smaller partitions, use the numberOfPartitions and partition properties on ExportDocumentLineModel.
64-
#
65-
# Example - split a report into three partitions
66-
#
67-
# * Follow the steps above with numberOfPartitions = 3 and partition = 0
68-
# * Follow the steps above with numberOfPartitions = 3 and partition = 1
69-
# * Follow the steps above with numberOfPartitions = 3 and partition = 2
70-
# * Once all three reports are downloaded merge the files on the client side.
71-
#
7263
# ### Security Policies
7364
#
7465
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.

0 commit comments

Comments
 (0)