avatax 20.9.0 → 21.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vs/slnx.sqlite +0 -0
- data/lib/avatax/client/addresses.rb +3 -3
- data/lib/avatax/client/advancedrules.rb +0 -10
- data/lib/avatax/client/avafileforms.rb +5 -5
- data/lib/avatax/client/certexpressinvites.rb +15 -15
- data/lib/avatax/client/certificates.rb +67 -67
- data/lib/avatax/client/companies.rb +6 -5
- data/lib/avatax/client/customers.rb +61 -61
- data/lib/avatax/client/datasources.rb +6 -6
- data/lib/avatax/client/definitions.rb +62 -8
- data/lib/avatax/client/ecms.rb +26 -31
- data/lib/avatax/client/ecommercetoken.rb +1 -1
- data/lib/avatax/client/errortransactions.rb +27 -15
- data/lib/avatax/client/filingcalendars.rb +15 -0
- data/lib/avatax/client/filings.rb +2 -2
- data/lib/avatax/client/free.rb +0 -73
- data/lib/avatax/client/fundingrequests.rb +2 -2
- data/lib/avatax/client/items.rb +117 -3
- data/lib/avatax/client/locations.rb +2 -2
- data/lib/avatax/client/multidocument.rb +12 -12
- data/lib/avatax/client/nexus.rb +2 -2
- data/lib/avatax/client/notices.rb +28 -489
- data/lib/avatax/client/reports.rb +10 -1
- data/lib/avatax/client/settings.rb +7 -2
- data/lib/avatax/client/taxcontent.rb +65 -2
- data/lib/avatax/client/taxprofiles.rb +14 -10
- data/lib/avatax/client/transactions.rb +21 -21
- data/lib/avatax/client/upcs.rb +6 -6
- data/lib/avatax/client/users.rb +2 -2
- data/lib/avatax/configuration.rb +1 -1
- data/lib/avatax/request.rb +0 -2
- data/lib/avatax/version.rb +1 -1
- data/spec/avatax/request_spec.rb +25 -0
- metadata +3 -2
@@ -18,7 +18,7 @@ module AvaTax
|
|
18
18
|
# * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
|
19
19
|
# * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
|
20
20
|
#
|
21
|
-
#
|
21
|
+
# * We throttle this API. You can only call this API up to 5 times in a minute.
|
22
22
|
#
|
23
23
|
# ### Security Policies
|
24
24
|
#
|
@@ -60,6 +60,15 @@ module AvaTax
|
|
60
60
|
#
|
61
61
|
# The `ExportDocumentLine` report produces information about invoice lines recorded within your account.
|
62
62
|
#
|
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
|
+
#
|
63
72
|
# ### Security Policies
|
64
73
|
#
|
65
74
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
@@ -16,6 +16,11 @@ module AvaTax
|
|
16
16
|
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
17
17
|
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
18
18
|
#
|
19
|
+
# Use Set = Transactions, Name = TaxCodePrioritization/HSCodePrioritization and Value = Transaction/ItemMaster for prioritizing which TaxCodes/HsCodes should be used for calculating taxes.
|
20
|
+
#
|
21
|
+
# Example: To prioritize TaxCodes passed in a Transaction over values stored with Items when calculating tax, use
|
22
|
+
# Set = Transactions, Name = TaxCodePrioritization, Value = Transaction
|
23
|
+
#
|
19
24
|
# ### Security Policies
|
20
25
|
#
|
21
26
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
@@ -89,7 +94,7 @@ module AvaTax
|
|
89
94
|
#
|
90
95
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
91
96
|
# @param companyId [Integer] The ID of the company that owns these settings
|
92
|
-
# @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/)
|
97
|
+
# @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:* modifiedDate, ModifiedUserId
|
93
98
|
# @param include [String] A comma separated list of additional data to retrieve.
|
94
99
|
# @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.
|
95
100
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
@@ -117,7 +122,7 @@ module AvaTax
|
|
117
122
|
# ### Security Policies
|
118
123
|
#
|
119
124
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
120
|
-
# @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/)
|
125
|
+
# @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:* modifiedDate, ModifiedUserId
|
121
126
|
# @param include [String] A comma separated list of additional data to retrieve.
|
122
127
|
# @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.
|
123
128
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
@@ -32,7 +32,7 @@ module AvaTax
|
|
32
32
|
# ### Security Policies
|
33
33
|
#
|
34
34
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
35
|
-
# * This API depends on the following active services
|
35
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
36
36
|
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
37
37
|
# @return [Object]
|
38
38
|
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
@@ -67,7 +67,7 @@ module AvaTax
|
|
67
67
|
# ### Security Policies
|
68
68
|
#
|
69
69
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
70
|
-
# * This API depends on the following active services
|
70
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
71
71
|
# @param companyId [Integer] The ID number of the company that owns this location.
|
72
72
|
# @param id [Integer] The ID number of the location to retrieve point-of-sale data.
|
73
73
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
@@ -129,6 +129,69 @@ module AvaTax
|
|
129
129
|
# @return [Object]
|
130
130
|
def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
131
131
|
get(path, options) end
|
132
|
+
|
133
|
+
# Sales tax rates for a specified address
|
134
|
+
#
|
135
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
136
|
+
# response code 429 - `Too Many Requests`.
|
137
|
+
#
|
138
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
139
|
+
# location in the United States only.
|
140
|
+
#
|
141
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
142
|
+
# which supports features including, but not limited to:
|
143
|
+
#
|
144
|
+
# * Nexus declarations
|
145
|
+
# * Taxability based on product/service type
|
146
|
+
# * Sourcing rules affecting origin/destination states
|
147
|
+
# * Customers who are exempt from certain taxes
|
148
|
+
# * States that have dollar value thresholds for tax amounts
|
149
|
+
# * Refunds for products purchased on a different date
|
150
|
+
# * Detailed jurisdiction names and state assigned codes
|
151
|
+
# * And more!
|
152
|
+
#
|
153
|
+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
154
|
+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
155
|
+
# @param line1 [String] The street address of the location.
|
156
|
+
# @param line2 [String] The street address of the location.
|
157
|
+
# @param line3 [String] The street address of the location.
|
158
|
+
# @param city [String] The city name of the location.
|
159
|
+
# @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`.
|
160
|
+
# @param postalCode [String] The postal code of the location.
|
161
|
+
# @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`.
|
162
|
+
# @return [Object]
|
163
|
+
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
|
164
|
+
get(path, options) end
|
165
|
+
|
166
|
+
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
167
|
+
#
|
168
|
+
# This API is only available for a US postal codes.
|
169
|
+
#
|
170
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
171
|
+
# response code 429 - `Too Many Requests`.
|
172
|
+
#
|
173
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
174
|
+
# location in the United States only.
|
175
|
+
#
|
176
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
177
|
+
# which supports features including, but not limited to:
|
178
|
+
#
|
179
|
+
# * Nexus declarations
|
180
|
+
# * Taxability based on product/service type
|
181
|
+
# * Sourcing rules affecting origin/destination states
|
182
|
+
# * Customers who are exempt from certain taxes
|
183
|
+
# * States that have dollar value thresholds for tax amounts
|
184
|
+
# * Refunds for products purchased on a different date
|
185
|
+
# * Detailed jurisdiction names and state assigned codes
|
186
|
+
# * And more!
|
187
|
+
#
|
188
|
+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
189
|
+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
190
|
+
# @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`.
|
191
|
+
# @param postalCode [String] The postal code of the location.
|
192
|
+
# @return [Object]
|
193
|
+
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
|
194
|
+
get(path, options) end
|
132
195
|
end
|
133
196
|
end
|
134
197
|
end
|
@@ -12,28 +12,32 @@ module AvaTax
|
|
12
12
|
#
|
13
13
|
# This API can be used to export a complete zip file containing your company's current tax profile, and you can then restore this
|
14
14
|
# profile to a different company or compare it over time to see if your profile has been changed.
|
15
|
+
#
|
16
|
+
# ### Security Policies
|
17
|
+
#
|
18
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
19
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
15
20
|
# @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
|
16
21
|
# @return [Object]
|
17
|
-
def export_tax_profile(companyId)
|
18
|
-
path
|
19
|
-
get(path)
|
20
|
-
end
|
21
|
-
|
22
|
+
def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
|
23
|
+
get(path) end
|
22
24
|
|
23
25
|
# Import a tax profile.
|
24
26
|
#
|
25
27
|
# Imports a tax profile to a new company, along with the option to import account settings.
|
28
|
+
#
|
29
|
+
# ### Security Policies
|
30
|
+
#
|
31
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
32
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
26
33
|
# @param accountId [Integer] The account id of the account to which the tax profile will be imported.
|
27
34
|
# @param newCompanyCode [String] The companyCode to use for the imported company.
|
28
35
|
# @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
|
29
36
|
# @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
|
30
37
|
# @param taxProfile [Object] The taxProfile
|
31
38
|
# @return [Object]
|
32
|
-
def import_tax_profile()
|
33
|
-
path
|
34
|
-
post(path)
|
35
|
-
end
|
36
|
-
|
39
|
+
def import_tax_profile() path = "/api/v2/taxprofile"
|
40
|
+
post(path) end
|
37
41
|
end
|
38
42
|
end
|
39
43
|
end
|
@@ -29,7 +29,7 @@ module AvaTax
|
|
29
29
|
# ### Security Policies
|
30
30
|
#
|
31
31
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
32
|
-
# * This API depends on the following active services
|
32
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
33
33
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
34
34
|
# @param model [Object] information about the transaction and lines to be added
|
35
35
|
# @return [Object]
|
@@ -71,7 +71,7 @@ module AvaTax
|
|
71
71
|
# ### Security Policies
|
72
72
|
#
|
73
73
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
74
|
-
# * This API depends on the following active services
|
74
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
75
75
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
76
76
|
# @param transactionCode [String] The transaction code to adjust
|
77
77
|
# @param documentType [String] (Optional): The document type of the transaction to adjust. (See DocumentType::* for a list of allowable values)
|
@@ -110,7 +110,7 @@ module AvaTax
|
|
110
110
|
# ### Security Policies
|
111
111
|
#
|
112
112
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
113
|
-
# * This API depends on the following active services
|
113
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
114
114
|
# @param companyCode [String] The code identifying the company that owns this transaction
|
115
115
|
# @param transactionCode [String] The code identifying the transaction
|
116
116
|
# @return [Object]
|
@@ -146,7 +146,7 @@ module AvaTax
|
|
146
146
|
# ### Security Policies
|
147
147
|
#
|
148
148
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
149
|
-
# * This API depends on the following active services
|
149
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
150
150
|
# @param companyCode [String] The code identifying the company that owns this transaction
|
151
151
|
# @param transactionCode [String] The code identifying the transaction
|
152
152
|
# @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
|
@@ -167,7 +167,7 @@ module AvaTax
|
|
167
167
|
# ### Security Policies
|
168
168
|
#
|
169
169
|
# * This API requires the user role Compliance Root User.
|
170
|
-
# * This API depends on the following active services
|
170
|
+
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
171
171
|
# @param model [Object] bulk lock request
|
172
172
|
# @return [Object]
|
173
173
|
def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
|
@@ -208,7 +208,7 @@ module AvaTax
|
|
208
208
|
# ### Security Policies
|
209
209
|
#
|
210
210
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
211
|
-
# * This API depends on the following active services
|
211
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
212
212
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
213
213
|
# @param transactionCode [String] The transaction code to change
|
214
214
|
# @param documentType [String] (Optional): The document type of the transaction to change document code. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
@@ -300,7 +300,7 @@ module AvaTax
|
|
300
300
|
# ### Security Policies
|
301
301
|
#
|
302
302
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
303
|
-
# * This API depends on the following active services
|
303
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
304
304
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
305
305
|
# @param model [Object] The transaction you wish to create or adjust
|
306
306
|
# @return [Object]
|
@@ -353,7 +353,7 @@ module AvaTax
|
|
353
353
|
# ### Security Policies
|
354
354
|
#
|
355
355
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
356
|
-
# * This API depends on the following active services
|
356
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
357
357
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
358
358
|
# @param model [Object] The transaction you wish to create
|
359
359
|
# @return [Object]
|
@@ -383,7 +383,7 @@ module AvaTax
|
|
383
383
|
# ### Security Policies
|
384
384
|
#
|
385
385
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
386
|
-
# * This API depends on the following active services
|
386
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
387
387
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
388
388
|
# @param model [Object] information about the transaction and lines to be removed
|
389
389
|
# @return [Object]
|
@@ -422,7 +422,7 @@ module AvaTax
|
|
422
422
|
# ### Security Policies
|
423
423
|
#
|
424
424
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
425
|
-
# * This API depends on the following active services
|
425
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
426
426
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
427
427
|
# @param transactionCode [String] The transaction code to retrieve
|
428
428
|
# @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
|
@@ -446,7 +446,7 @@ module AvaTax
|
|
446
446
|
# ### Security Policies
|
447
447
|
#
|
448
448
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
449
|
-
# * This API depends on the following active services
|
449
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
450
450
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
451
451
|
# @param transactionCode [String] The transaction code to retrieve
|
452
452
|
# @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
|
@@ -478,7 +478,7 @@ module AvaTax
|
|
478
478
|
# ### Security Policies
|
479
479
|
#
|
480
480
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
481
|
-
# * This API depends on the following active services
|
481
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
482
482
|
# @param id [Integer] The unique ID number of the transaction to retrieve
|
483
483
|
# @param include [String] Specifies objects to include in this fetch call
|
484
484
|
# @return [Object]
|
@@ -520,11 +520,11 @@ module AvaTax
|
|
520
520
|
# ### Security Policies
|
521
521
|
#
|
522
522
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
523
|
-
# * This API depends on the following active services
|
523
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
524
524
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
525
525
|
# @param dataSourceId [Integer] Optionally filter transactions to those from a specific data source.
|
526
526
|
# @param include [String] Specifies objects to include in this fetch call
|
527
|
-
# @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:* totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, messages, invoiceMessages, isFakeTransaction
|
527
|
+
# @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:* exchangeRateCurrencyCode, totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, userDefinedFields, messages, invoiceMessages, isFakeTransaction, deliveryTerms
|
528
528
|
# @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.
|
529
529
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
530
530
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
@@ -536,7 +536,7 @@ module AvaTax
|
|
536
536
|
#
|
537
537
|
# Lock a transaction uniquely identified by this URL.
|
538
538
|
#
|
539
|
-
# This API is mainly used for connector
|
539
|
+
# This API is mainly used for connector developers to simulate what happens when the Returns product locks a document.
|
540
540
|
# After this API call succeeds, the document will be locked and can't be voided or adjusted.
|
541
541
|
#
|
542
542
|
# This API is only available to customers in Sandbox with AvaTaxPro subscription. On production servers, this API is available by invitation only.
|
@@ -567,7 +567,7 @@ module AvaTax
|
|
567
567
|
# ### Security Policies
|
568
568
|
#
|
569
569
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
570
|
-
# * This API depends on the following active services
|
570
|
+
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
571
571
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
572
572
|
# @param transactionCode [String] The transaction code to lock
|
573
573
|
# @param documentType [String] (Optional): The document type of the transaction to lock. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
@@ -622,7 +622,7 @@ module AvaTax
|
|
622
622
|
# ### Security Policies
|
623
623
|
#
|
624
624
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
625
|
-
# * This API depends on the following active services
|
625
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
626
626
|
# @param companyCode [String] The code of the company that made the original sale
|
627
627
|
# @param transactionCode [String] The transaction code of the original sale
|
628
628
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
@@ -704,7 +704,7 @@ module AvaTax
|
|
704
704
|
# ### Security Policies
|
705
705
|
#
|
706
706
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
707
|
-
# * This API depends on the following active services
|
707
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
708
708
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
709
709
|
# @param transactionCode [String] The transaction code to Uncommit
|
710
710
|
# @param documentType [String] (Optional): The document type of the transaction to Uncommit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
@@ -738,7 +738,7 @@ module AvaTax
|
|
738
738
|
# ### Security Policies
|
739
739
|
#
|
740
740
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
741
|
-
# * This API depends on the following active services
|
741
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
742
742
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
743
743
|
# @param transactionCode [String] The transaction code to commit
|
744
744
|
# @param documentType [String] (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
@@ -779,7 +779,7 @@ module AvaTax
|
|
779
779
|
# ### Security Policies
|
780
780
|
#
|
781
781
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
782
|
-
# * This API depends on the following active services
|
782
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
783
783
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
784
784
|
# @param transactionCode [String] The transaction code to settle
|
785
785
|
# @param documentType [String] (Optional): The document type of the transaction to verify. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
@@ -823,7 +823,7 @@ module AvaTax
|
|
823
823
|
# ### Security Policies
|
824
824
|
#
|
825
825
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
826
|
-
# * This API depends on the following active services
|
826
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
827
827
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
828
828
|
# @param transactionCode [String] The transaction code to void
|
829
829
|
# @param documentType [String] (Optional): The document type of the transaction to void. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
data/lib/avatax/client/upcs.rb
CHANGED
@@ -11,7 +11,7 @@ module AvaTax
|
|
11
11
|
# ### Security Policies
|
12
12
|
#
|
13
13
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
14
|
-
# * This API depends on the following active services
|
14
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
15
15
|
# @param companyId [Integer] The ID of the company that owns this UPC.
|
16
16
|
# @param model [UPCModel[]] The UPC you wish to create.
|
17
17
|
# @return [UPCModel[]]
|
@@ -25,7 +25,7 @@ module AvaTax
|
|
25
25
|
# ### Security Policies
|
26
26
|
#
|
27
27
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
28
|
-
# * This API depends on the following active services
|
28
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
29
29
|
# @param companyId [Integer] The ID of the company that owns this UPC.
|
30
30
|
# @param id [Integer] The ID of the UPC you wish to delete.
|
31
31
|
# @return [ErrorDetail[]]
|
@@ -40,7 +40,7 @@ module AvaTax
|
|
40
40
|
# ### Security Policies
|
41
41
|
#
|
42
42
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
43
|
-
# * This API depends on the following active services
|
43
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
44
44
|
# @param companyId [Integer] The ID of the company that owns this UPC
|
45
45
|
# @param id [Integer] The primary key of this UPC
|
46
46
|
# @return [Object]
|
@@ -58,7 +58,7 @@ module AvaTax
|
|
58
58
|
# ### Security Policies
|
59
59
|
#
|
60
60
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
61
|
-
# * This API depends on the following active services
|
61
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
62
62
|
# @param companyId [Integer] The ID of the company that owns these UPCs
|
63
63
|
# @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/).
|
64
64
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -80,7 +80,7 @@ module AvaTax
|
|
80
80
|
# ### Security Policies
|
81
81
|
#
|
82
82
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
83
|
-
# * This API depends on the following active services
|
83
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
84
84
|
# @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/).
|
85
85
|
# @param include [String] A comma separated list of additional data to retrieve.
|
86
86
|
# @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.
|
@@ -100,7 +100,7 @@ module AvaTax
|
|
100
100
|
# ### Security Policies
|
101
101
|
#
|
102
102
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
103
|
-
# * This API depends on the following active services
|
103
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
104
104
|
# @param companyId [Integer] The ID of the company that this UPC belongs to.
|
105
105
|
# @param id [Integer] The ID of the UPC you wish to update
|
106
106
|
# @param model [Object] The UPC you wish to update.
|
data/lib/avatax/client/users.rb
CHANGED
@@ -126,7 +126,7 @@ module AvaTax
|
|
126
126
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
127
127
|
# @param accountId [Integer] The accountID of the user you wish to list.
|
128
128
|
# @param include [String] Optional fetch commands.
|
129
|
-
# @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/)
|
129
|
+
# @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:* SuppressNewUserEmail
|
130
130
|
# @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.
|
131
131
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
132
132
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
@@ -155,7 +155,7 @@ module AvaTax
|
|
155
155
|
#
|
156
156
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
157
157
|
# @param include [String] Optional fetch commands.
|
158
|
-
# @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/)
|
158
|
+
# @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:* SuppressNewUserEmail
|
159
159
|
# @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.
|
160
160
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
161
161
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
data/lib/avatax/configuration.rb
CHANGED
@@ -29,7 +29,7 @@ module AvaTax
|
|
29
29
|
DEFAULT_USER_AGENT = "AvaTax Ruby Gem #{AvaTax::VERSION}".freeze
|
30
30
|
DEFAULT_USERNAME = nil
|
31
31
|
DEFAULT_PASSWORD = nil
|
32
|
-
DEFAULT_CONNECTION_OPTIONS = {}
|
32
|
+
DEFAULT_CONNECTION_OPTIONS = {request: {timeout: 1200}} # timeout in seconds
|
33
33
|
DEFAULT_LOGGER = false
|
34
34
|
DEFAULT_CUSTOM_LOGGER = nil
|
35
35
|
DEFAULT_CUSTOM_LOGGER_OPTIONS = {}
|
data/lib/avatax/request.rb
CHANGED
@@ -22,8 +22,6 @@ module AvaTax
|
|
22
22
|
|
23
23
|
def request(method, path, model, options={})
|
24
24
|
response = connection.send(method) do |request|
|
25
|
-
# timeout in seconds
|
26
|
-
request.options['timeout'] = 1200
|
27
25
|
case method
|
28
26
|
when :get, :delete
|
29
27
|
request.url("#{URI.encode(path)}?#{URI.encode_www_form(options)}")
|