avatax 21.8.0 → 22.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +55 -55
- data/.rspec +1 -1
- data/.travis.yml +18 -18
- data/.vs/VSWorkspaceState.json +5 -5
- data/.yardopts +4 -4
- data/Gemfile +2 -2
- data/LICENSE +201 -201
- data/README.md +98 -98
- data/Rakefile +9 -9
- data/avatax.gemspec +38 -38
- data/example/avatax.rb +47 -47
- data/example/credentials.example.yaml +5 -5
- data/lib/avatax/api.rb +27 -27
- data/lib/avatax/client/accounts.rb +94 -83
- data/lib/avatax/client/addresses.rb +22 -20
- data/lib/avatax/client/advancedrules.rb +46 -41
- data/lib/avatax/client/ageverification.rb +29 -0
- data/lib/avatax/client/avafileforms.rb +46 -41
- data/lib/avatax/client/batches.rb +70 -62
- data/lib/avatax/client/certexpressinvites.rb +30 -27
- data/lib/avatax/client/certificates.rb +126 -111
- data/lib/avatax/client/companies.rb +192 -152
- data/lib/avatax/client/compliance.rb +25 -14
- data/lib/avatax/client/contacts.rb +54 -48
- data/lib/avatax/client/customers.rb +110 -97
- data/lib/avatax/client/datasources.rb +54 -48
- data/lib/avatax/client/definitions.rb +620 -446
- data/lib/avatax/client/distancethresholds.rb +54 -48
- data/lib/avatax/client/ecms.rb +73 -73
- data/lib/avatax/client/ecommercetoken.rb +20 -18
- data/lib/avatax/client/errortransactions.rb +61 -61
- data/lib/avatax/client/filingcalendars.rb +44 -20
- data/lib/avatax/client/filings.rb +24 -20
- data/lib/avatax/client/firmclientlinkages.rb +78 -69
- data/lib/avatax/client/free.rb +14 -13
- data/lib/avatax/client/fundingrequests.rb +22 -20
- data/lib/avatax/client/items.rb +206 -181
- data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
- data/lib/avatax/client/locations.rb +102 -90
- data/lib/avatax/client/multidocument.rb +86 -76
- data/lib/avatax/client/nexus.rb +146 -103
- data/lib/avatax/client/notices.rb +30 -26
- data/lib/avatax/client/notifications.rb +30 -27
- data/lib/avatax/client/onboarding.rb +55 -55
- data/lib/avatax/client/pointofsale.rb +21 -21
- data/lib/avatax/client/provisioning.rb +22 -20
- data/lib/avatax/client/registrar.rb +94 -83
- data/lib/avatax/client/reports.rb +38 -34
- data/lib/avatax/client/settings.rb +54 -48
- data/lib/avatax/client/shippingverification.rb +66 -0
- data/lib/avatax/client/subscriptions.rb +30 -27
- data/lib/avatax/client/taxcodes.rb +54 -48
- data/lib/avatax/client/taxcontent.rb +46 -41
- data/lib/avatax/client/taxprofiles.rb +42 -42
- data/lib/avatax/client/taxrules.rb +56 -50
- data/lib/avatax/client/transactions.rb +174 -153
- data/lib/avatax/client/upcs.rb +54 -48
- data/lib/avatax/client/userdefinedfields.rb +52 -0
- data/lib/avatax/client/users.rb +70 -62
- data/lib/avatax/client/utilities.rb +30 -27
- data/lib/avatax/client.rb +37 -35
- data/lib/avatax/configuration.rb +76 -76
- data/lib/avatax/connection.rb +49 -49
- data/lib/avatax/request.rb +51 -42
- data/lib/avatax/version.rb +3 -3
- data/lib/avatax.rb +26 -26
- data/spec/avatax/client/accounts_spec.rb +13 -13
- data/spec/avatax/client/transactions_spec.rb +80 -80
- data/spec/avatax/request_spec.rb +25 -25
- data/spec/avatax_spec.rb +45 -45
- data/spec/credentials.yaml.example +4 -4
- data/spec/fixtures/accounts.json +15 -15
- data/spec/spec_helper.rb +27 -27
- metadata +9 -13
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module MultiDocument
|
4
|
-
|
5
|
-
|
6
|
-
# Adjust a MultiDocument transaction
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module MultiDocument
|
4
|
+
|
5
|
+
|
6
|
+
# Adjust a MultiDocument transaction
|
7
|
+
#
|
8
8
|
# Adjusts the current MultiDocument transaction uniquely identified by this URL.
|
9
9
|
#
|
10
10
|
# A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
|
@@ -27,17 +27,18 @@ module AvaTax
|
|
27
27
|
# ### Security Policies
|
28
28
|
#
|
29
29
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
30
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
30
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
31
|
+
# Swagger Name: AvaTaxClient
|
31
32
|
# @param code [String] The transaction code for this MultiDocument transaction
|
32
33
|
# @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
33
34
|
# @param include [String] Specifies objects to include in this fetch call
|
34
35
|
# @param model [Object] The adjust request you wish to execute
|
35
|
-
# @return [Object]
|
36
|
-
def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
|
37
|
-
post(path, model, options) end
|
38
|
-
|
39
|
-
# Get audit information about a MultiDocument transaction
|
40
|
-
#
|
36
|
+
# @return [Object]
|
37
|
+
def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
|
38
|
+
post(path, model, options, "22.2.0") end
|
39
|
+
|
40
|
+
# Get audit information about a MultiDocument transaction
|
41
|
+
#
|
41
42
|
# Retrieve audit information about a MultiDocument transaction stored in AvaTax.
|
42
43
|
#
|
43
44
|
# The audit API retrieves audit information related to a specific MultiDocument transaction. This audit
|
@@ -64,15 +65,16 @@ module AvaTax
|
|
64
65
|
# ### Security Policies
|
65
66
|
#
|
66
67
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
67
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
68
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
69
|
+
# Swagger Name: AvaTaxClient
|
68
70
|
# @param code [String] The transaction code for this MultiDocument transaction
|
69
71
|
# @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
70
|
-
# @return [Object]
|
71
|
-
def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
|
72
|
-
get(path) end
|
73
|
-
|
74
|
-
# Commit a MultiDocument transaction
|
75
|
-
#
|
72
|
+
# @return [Object]
|
73
|
+
def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
|
74
|
+
get(path, {}, "22.2.0") end
|
75
|
+
|
76
|
+
# Commit a MultiDocument transaction
|
77
|
+
#
|
76
78
|
# Marks a list of transactions by changing its status to `Committed`.
|
77
79
|
#
|
78
80
|
# Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
|
@@ -93,14 +95,15 @@ module AvaTax
|
|
93
95
|
# ### Security Policies
|
94
96
|
#
|
95
97
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
96
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
98
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
99
|
+
# Swagger Name: AvaTaxClient
|
97
100
|
# @param model [Object] The commit request you wish to execute
|
98
|
-
# @return [Object]
|
99
|
-
def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
|
100
|
-
post(path, model) end
|
101
|
-
|
102
|
-
# Create a new MultiDocument transaction
|
103
|
-
#
|
101
|
+
# @return [Object]
|
102
|
+
def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
|
103
|
+
post(path, model, {}, "22.2.0") end
|
104
|
+
|
105
|
+
# Create a new MultiDocument transaction
|
106
|
+
#
|
104
107
|
# Records a new MultiDocument transaction in AvaTax.
|
105
108
|
#
|
106
109
|
# A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
|
@@ -145,15 +148,16 @@ module AvaTax
|
|
145
148
|
# ### Security Policies
|
146
149
|
#
|
147
150
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
148
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
151
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
152
|
+
# Swagger Name: AvaTaxClient
|
149
153
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
150
154
|
# @param model [Object] the multi document transaction model
|
151
|
-
# @return [Object]
|
152
|
-
def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
|
153
|
-
post(path, model, options) end
|
154
|
-
|
155
|
-
# Retrieve a MultiDocument transaction
|
156
|
-
#
|
155
|
+
# @return [Object]
|
156
|
+
def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
|
157
|
+
post(path, model, options, "22.2.0") end
|
158
|
+
|
159
|
+
# Retrieve a MultiDocument transaction
|
160
|
+
#
|
157
161
|
# Get the current MultiDocument transaction identified by this URL.
|
158
162
|
#
|
159
163
|
# If this transaction was adjusted, the return value of this API will be the current transaction with this code.
|
@@ -178,16 +182,17 @@ module AvaTax
|
|
178
182
|
# ### Security Policies
|
179
183
|
#
|
180
184
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
181
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
185
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
186
|
+
# Swagger Name: AvaTaxClient
|
182
187
|
# @param code [String] The multidocument code to retrieve
|
183
188
|
# @param type [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
|
184
189
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
185
|
-
# @return [Object]
|
186
|
-
def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
|
187
|
-
get(path, options) end
|
188
|
-
|
189
|
-
# Retrieve a MultiDocument transaction by ID
|
190
|
-
#
|
190
|
+
# @return [Object]
|
191
|
+
def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
|
192
|
+
get(path, options, "22.2.0") end
|
193
|
+
|
194
|
+
# Retrieve a MultiDocument transaction by ID
|
195
|
+
#
|
191
196
|
# Get the unique MultiDocument transaction identified by this URL.
|
192
197
|
#
|
193
198
|
# A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
|
@@ -221,15 +226,16 @@ module AvaTax
|
|
221
226
|
# ### Security Policies
|
222
227
|
#
|
223
228
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
224
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
229
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
230
|
+
# Swagger Name: AvaTaxClient
|
225
231
|
# @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve
|
226
232
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
227
|
-
# @return [Object]
|
228
|
-
def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
|
229
|
-
get(path, options) end
|
230
|
-
|
231
|
-
# Retrieve all MultiDocument transactions
|
232
|
-
#
|
233
|
+
# @return [Object]
|
234
|
+
def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
|
235
|
+
get(path, options, "22.2.0") end
|
236
|
+
|
237
|
+
# Retrieve all MultiDocument transactions
|
238
|
+
#
|
233
239
|
# List all MultiDocument transactions within this account.
|
234
240
|
#
|
235
241
|
# This endpoint is limited to returning 1,000 MultiDocument transactions at a time. To retrieve more than 1,000 MultiDocument
|
@@ -261,18 +267,19 @@ module AvaTax
|
|
261
267
|
# ### Security Policies
|
262
268
|
#
|
263
269
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
264
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
270
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
271
|
+
# Swagger Name: AvaTaxClient
|
265
272
|
# @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:* documents
|
266
273
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
267
274
|
# @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.
|
268
275
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
269
276
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
270
|
-
# @return [FetchResult]
|
271
|
-
def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
|
272
|
-
get(path, options) end
|
273
|
-
|
274
|
-
# Create a refund for a MultiDocument transaction
|
275
|
-
#
|
277
|
+
# @return [FetchResult]
|
278
|
+
def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
|
279
|
+
get(path, options, "22.2.0") end
|
280
|
+
|
281
|
+
# Create a refund for a MultiDocument transaction
|
282
|
+
#
|
276
283
|
# Create a refund for a MultiDocument transaction.
|
277
284
|
#
|
278
285
|
# A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
|
@@ -321,17 +328,18 @@ module AvaTax
|
|
321
328
|
# ### Security Policies
|
322
329
|
#
|
323
330
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
324
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
331
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
332
|
+
# Swagger Name: AvaTaxClient
|
325
333
|
# @param code [String] The code of this MultiDocument transaction
|
326
334
|
# @param type [String] The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
327
335
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
328
336
|
# @param model [Object] Information about the refund to create
|
329
|
-
# @return [Object]
|
330
|
-
def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
|
331
|
-
post(path, model, options) end
|
332
|
-
|
333
|
-
# Verify a MultiDocument transaction
|
334
|
-
#
|
337
|
+
# @return [Object]
|
338
|
+
def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
|
339
|
+
post(path, model, options, "22.2.0") end
|
340
|
+
|
341
|
+
# Verify a MultiDocument transaction
|
342
|
+
#
|
335
343
|
# Verifies that the MultiDocument transaction uniquely identified by this URL matches certain expected values.
|
336
344
|
#
|
337
345
|
# If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
|
@@ -350,14 +358,15 @@ module AvaTax
|
|
350
358
|
# ### Security Policies
|
351
359
|
#
|
352
360
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
353
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
361
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
362
|
+
# Swagger Name: AvaTaxClient
|
354
363
|
# @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
|
355
|
-
# @return [Object]
|
356
|
-
def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
|
357
|
-
post(path, model) end
|
358
|
-
|
359
|
-
# Void a MultiDocument transaction
|
360
|
-
#
|
364
|
+
# @return [Object]
|
365
|
+
def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
|
366
|
+
post(path, model, {}, "22.2.0") end
|
367
|
+
|
368
|
+
# Void a MultiDocument transaction
|
369
|
+
#
|
361
370
|
# Voids the current transaction uniquely identified by this URL.
|
362
371
|
#
|
363
372
|
# A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
|
@@ -379,13 +388,14 @@ module AvaTax
|
|
379
388
|
# ### Security Policies
|
380
389
|
#
|
381
390
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
382
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
391
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
392
|
+
# Swagger Name: AvaTaxClient
|
383
393
|
# @param code [String] The transaction code for this MultiDocument transaction
|
384
394
|
# @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
385
395
|
# @param model [Object] The void request you wish to execute
|
386
|
-
# @return [Object]
|
387
|
-
def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
|
388
|
-
post(path, model) end
|
389
|
-
end
|
390
|
-
end
|
396
|
+
# @return [Object]
|
397
|
+
def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
|
398
|
+
post(path, model, {}, "22.2.0") end
|
399
|
+
end
|
400
|
+
end
|
391
401
|
end
|