avatax 18.2.0 → 18.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/avatax/client/avafileforms.rb +70 -0
- data/lib/avatax/client/batches.rb +62 -15
- data/lib/avatax/client/customers.rb +1 -0
- data/lib/avatax/client/definitions.rb +6 -2
- data/lib/avatax/client/transactions.rb +9 -14
- data/lib/avatax/client/users.rb +23 -1
- data/lib/avatax/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e958b89aba3505f4199e21ec24f221dae29901786ec82b44e200cbb472fc9f3b
|
4
|
+
data.tar.gz: 21c69e8f8af01a8d9757fd7af0783ca13fd17295654cde54bdb175ca85d81102
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e573d0641296e7a4da87756eae0b6f7d7b5133a4d45001df07d70865855d0166be6984f1f1467c1f71cec0e47e21eee57d1a6f44a59c69622406c00b7537fcdc
|
7
|
+
data.tar.gz: a5bb454a18e0f6568013907a2a0d90cfba8b15bb295f8603312ebb2ee0955d16450b82c299aa4017cc4ac94b709fc481a126c7ae613e7930064a170a154cea9a
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module AvaFileForms
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new AvaFileForm
|
7
|
+
#
|
8
|
+
# Create one or more AvaFileForms
|
9
|
+
# A 'AvaFileForm' represents a form supported by our returns team
|
10
|
+
# @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
|
11
|
+
# @return [AvaFileFormModel[]]
|
12
|
+
def create_ava_file_forms(model)
|
13
|
+
path = "/api/v2/avafileforms"
|
14
|
+
post(path, model)
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
# Delete a single AvaFileForm
|
19
|
+
#
|
20
|
+
# Marks the existing AvaFileForm object at this URL as deleted.
|
21
|
+
# @param id [Integer] The ID of the AvaFileForm you wish to delete.
|
22
|
+
# @return [ErrorDetail[]]
|
23
|
+
def delete_ava_file_form(id)
|
24
|
+
path = "/api/v2/avafileforms/#{id}"
|
25
|
+
delete(path)
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
# Retrieve a single AvaFileForm
|
30
|
+
#
|
31
|
+
# Get the AvaFileForm object identified by this URL.
|
32
|
+
# @param id [String] The primary key of this AvaFileForm
|
33
|
+
# @return [Object]
|
34
|
+
def get_ava_file_form(id)
|
35
|
+
path = "/api/v2/avafileforms/#{id}"
|
36
|
+
get(path)
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
# Retrieve all AvaFileForms
|
41
|
+
#
|
42
|
+
# 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/) .
|
43
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
44
|
+
# @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/) .
|
45
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
46
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
47
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
48
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
49
|
+
# @return [FetchResult]
|
50
|
+
def query_ava_file_forms(options={})
|
51
|
+
path = "/api/v2/avafileforms"
|
52
|
+
get(path, options)
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
# Update a AvaFileForm
|
57
|
+
#
|
58
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
59
|
+
# 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.
|
60
|
+
# @param id [Integer] The ID of the AvaFileForm you wish to update
|
61
|
+
# @param model [Object] The AvaFileForm model you wish to update.
|
62
|
+
# @return [Object]
|
63
|
+
def update_ava_file_form(id, model)
|
64
|
+
path = "/api/v2/avafileforms/#{id}"
|
65
|
+
put(path, model)
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -6,9 +6,19 @@ module AvaTax
|
|
6
6
|
# Create a new batch
|
7
7
|
#
|
8
8
|
# Create one or more new batch objects attached to this company.
|
9
|
-
#
|
10
|
-
# You may fetch a batch to check on its status and retrieve the results of the batch operation.
|
9
|
+
#
|
11
10
|
# Each batch object may have one or more file objects (currently only one file is supported).
|
11
|
+
#
|
12
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
13
|
+
# processed as quickly as possible in the order it was received. To check the
|
14
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
15
|
+
# operation.
|
16
|
+
#
|
17
|
+
# Because the batch system processes with a degree of concurrency, and
|
18
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
19
|
+
# predict when a batch will complete. If high performance processing is
|
20
|
+
# required, please use the
|
21
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
12
22
|
# @param companyId [Integer] The ID of the company that owns this batch.
|
13
23
|
# @param model [BatchModel[]] The batch you wish to create.
|
14
24
|
# @return [BatchModel[]]
|
@@ -22,7 +32,7 @@ module AvaTax
|
|
22
32
|
#
|
23
33
|
#
|
24
34
|
# @param companyId [Integer] The ID of the company that owns this batch.
|
25
|
-
# @param id [Integer] The ID of the batch
|
35
|
+
# @param id [Integer] The ID of the batch to delete.
|
26
36
|
# @return [ErrorDetail[]]
|
27
37
|
def delete_batch(companyId, id)
|
28
38
|
path = "/api/v2/companies/#{companyId}/batches/#{id}"
|
@@ -45,10 +55,21 @@ module AvaTax
|
|
45
55
|
|
46
56
|
# Retrieve a single batch
|
47
57
|
#
|
48
|
-
# Get the batch object identified by this URL.
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
58
|
+
# Get the batch object identified by this URL. A batch object is a large
|
59
|
+
# collection of API calls stored in a compact file.
|
60
|
+
#
|
61
|
+
# Use this endpoint to retrieve the results or check the status of a batch.
|
62
|
+
#
|
63
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
64
|
+
# processed as quickly as possible in the order it was received. To check the
|
65
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
66
|
+
# operation.
|
67
|
+
#
|
68
|
+
# Because the batch system processes with a degree of concurrency, and
|
69
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
70
|
+
# predict when a batch will complete. If high performance processing is
|
71
|
+
# required, please use the
|
72
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
52
73
|
# @param companyId [Integer] The ID of the company that owns this batch
|
53
74
|
# @param id [Integer] The primary key of this batch
|
54
75
|
# @return [Object]
|
@@ -61,11 +82,26 @@ module AvaTax
|
|
61
82
|
# Retrieve all batches for this company
|
62
83
|
#
|
63
84
|
# List all batch objects attached to the specified company.
|
85
|
+
#
|
64
86
|
# A batch object is a large collection of API calls stored in a compact file.
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
# Paginate
|
87
|
+
#
|
88
|
+
# Search for specific objects using the criteria in the `$filter` parameter;
|
89
|
+
# full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
90
|
+
# Paginate results using the `$top`, `$skip`, and `$orderby` parameters.
|
91
|
+
#
|
92
|
+
# Use [GetBatch](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Batches/GetBatch/)
|
93
|
+
# to retrieve the results, or check the status, of an individual batch.
|
94
|
+
#
|
95
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
96
|
+
# processed as quickly as possible in the order it was received. To check the
|
97
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
98
|
+
# operation.
|
99
|
+
#
|
100
|
+
# Because the batch system processes with a degree of concurrency, and
|
101
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
102
|
+
# predict when a batch will complete. If high performance processing is
|
103
|
+
# required, please use the
|
104
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
69
105
|
# @param companyId [Integer] The ID of the company that owns these batches
|
70
106
|
# @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/) .
|
71
107
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -82,12 +118,23 @@ module AvaTax
|
|
82
118
|
# Retrieve all batches
|
83
119
|
#
|
84
120
|
# Get multiple batch objects across all companies.
|
121
|
+
#
|
85
122
|
# A batch object is a large collection of API calls stored in a compact file.
|
86
|
-
# When you create a batch, it is added to the AvaTax Batch Queue and will be processed in the order it was received.
|
87
|
-
# You may fetch a batch to check on its status and retrieve the results of the batch operation.
|
88
123
|
#
|
89
|
-
# Search for specific objects using the criteria in the `$filter` parameter;
|
90
|
-
#
|
124
|
+
# Search for specific objects using the criteria in the `$filter` parameter;
|
125
|
+
# full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
126
|
+
# Paginate results using the `$top`, `$skip`, and `$orderby` parameters.
|
127
|
+
#
|
128
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
129
|
+
# processed as quickly as possible in the order it was received. To check the
|
130
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
131
|
+
# operation.
|
132
|
+
#
|
133
|
+
# Because the batch system processes with a degree of concurrency, and
|
134
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
135
|
+
# predict when a batch will complete. If high performance processing is
|
136
|
+
# required, please use the
|
137
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
91
138
|
# @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/) .
|
92
139
|
# @param include [String] A comma separated list of additional data to retrieve.
|
93
140
|
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
@@ -62,6 +62,7 @@ module AvaTax
|
|
62
62
|
# You can use the `$include` parameter to fetch the following additional objects for expansion:
|
63
63
|
#
|
64
64
|
# * Certificates - Fetch a list of certificates linked to this customer.
|
65
|
+
# * CustomFields - Fetch a list of custom fields associated to this customer.
|
65
66
|
#
|
66
67
|
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
67
68
|
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
@@ -214,10 +214,14 @@ module AvaTax
|
|
214
214
|
# This API is intended to be useful to identify the correct HS Code to use for your item.
|
215
215
|
# @param country [String] The name or code of the destination country.
|
216
216
|
# @param hsCode [String] The Section or partial HS Code for which you would like to view the next level of HS Code detail, if more detail is available.
|
217
|
+
# @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/) .
|
218
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
219
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
220
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
217
221
|
# @return [FetchResult]
|
218
|
-
def list_cross_border_codes(country, hsCode)
|
222
|
+
def list_cross_border_codes(country, hsCode, options={})
|
219
223
|
path = "/api/v2/definitions/crossborder/#{country}/#{hsCode}"
|
220
|
-
get(path)
|
224
|
+
get(path, options)
|
221
225
|
end
|
222
226
|
|
223
227
|
|
@@ -289,9 +289,13 @@ module AvaTax
|
|
289
289
|
|
290
290
|
# Retrieve a single transaction by code
|
291
291
|
#
|
292
|
-
# Get the current
|
292
|
+
# Get the current transaction identified by this company code, transaction code, and document type.
|
293
293
|
#
|
294
|
-
#
|
294
|
+
# A transaction is uniquely identified by `companyCode`, `code` (often called Transaction Code), and `documentType`.
|
295
|
+
#
|
296
|
+
# For compatibility purposes, when this API finds multiple transactions with the same transaction code, and if you have not specified
|
297
|
+
# the `type` parameter to this API, it will default to selecting the `SalesInvoices` transaction. To change this behavior, use the
|
298
|
+
# optional `documentType` parameter to specify the specific document type you wish to find.
|
295
299
|
#
|
296
300
|
# If this transaction was adjusted, the return value of this API will be the current transaction with this code.
|
297
301
|
#
|
@@ -305,6 +309,7 @@ module AvaTax
|
|
305
309
|
# * LinesOnly (omit details - reduces API response size)
|
306
310
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
307
311
|
# @param transactionCode [String] The transaction code to retrieve
|
312
|
+
# @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
|
308
313
|
# @param include [String] Specifies objects to include in this fetch call
|
309
314
|
# @return [Object]
|
310
315
|
def get_transaction_by_code(companyCode, transactionCode, options={})
|
@@ -315,18 +320,7 @@ module AvaTax
|
|
315
320
|
|
316
321
|
# Retrieve a single transaction by code
|
317
322
|
#
|
318
|
-
#
|
319
|
-
#
|
320
|
-
# If this transaction was adjusted, the return value of this API will be the current transaction with this code.
|
321
|
-
#
|
322
|
-
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
323
|
-
#
|
324
|
-
# * Lines
|
325
|
-
# * Details (implies lines)
|
326
|
-
# * Summary (implies details)
|
327
|
-
# * Addresses
|
328
|
-
# * SummaryOnly (omit lines and details - reduces API response size)
|
329
|
-
# * LinesOnly (omit details - reduces API response size)
|
323
|
+
# DEPRECATED: Please use the `GetTransactionByCode` API instead.
|
330
324
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
331
325
|
# @param transactionCode [String] The transaction code to retrieve
|
332
326
|
# @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
|
@@ -462,6 +456,7 @@ module AvaTax
|
|
462
456
|
# @param transactionCode [String] The transaction code of the original sale
|
463
457
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
464
458
|
# @param documentType [String] (Optional): The document type of the transaction to refund. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
459
|
+
# @param useTaxDateOverride [object] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
|
465
460
|
# @param model [Object] Information about the refund to create
|
466
461
|
# @return [Object]
|
467
462
|
def refund_transaction(companyCode, transactionCode, model, options={})
|
data/lib/avatax/client/users.rb
CHANGED
@@ -63,11 +63,28 @@ module AvaTax
|
|
63
63
|
end
|
64
64
|
|
65
65
|
|
66
|
+
# Get information about a username.
|
67
|
+
#
|
68
|
+
# You may call this API prior to creating a user, to check if a particular username is available for use. Using this API, you can
|
69
|
+
# present a friendly experience prior to attempting to create a new user object.
|
70
|
+
#
|
71
|
+
# Please ensure that the query string is url encoded if you wish to check information for a user that contains url-sensitive characters.
|
72
|
+
# @param username [String] The username to search.
|
73
|
+
# @return [Object]
|
74
|
+
def get_username(options={})
|
75
|
+
path = "/api/v2/usernames"
|
76
|
+
get(path, options)
|
77
|
+
end
|
78
|
+
|
79
|
+
|
66
80
|
# Retrieve users for this account
|
67
81
|
#
|
68
82
|
# List all user objects attached to this account.
|
69
83
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
70
84
|
#
|
85
|
+
# When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key.
|
86
|
+
# By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
|
87
|
+
#
|
71
88
|
# 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/) .
|
72
89
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
73
90
|
# @param accountId [Integer] The accountID of the user you wish to list.
|
@@ -86,7 +103,12 @@ module AvaTax
|
|
86
103
|
# Retrieve all users
|
87
104
|
#
|
88
105
|
# Get multiple user objects across all accounts.
|
89
|
-
#
|
106
|
+
#
|
107
|
+
# A user represents one person or set of credentials with access privileges to make API calls and work with a specific account. A user can be authenticated
|
108
|
+
# via either username / password authentication, an OpenID / OAuth Bearer Token, or a legacy AvaTax License Key.
|
109
|
+
#
|
110
|
+
# When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key.
|
111
|
+
# By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
|
90
112
|
#
|
91
113
|
# 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/) .
|
92
114
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
data/lib/avatax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 18.
|
4
|
+
version: 18.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Vorwaller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- lib/avatax/client.rb
|
146
146
|
- lib/avatax/client/accounts.rb
|
147
147
|
- lib/avatax/client/addresses.rb
|
148
|
+
- lib/avatax/client/avafileforms.rb
|
148
149
|
- lib/avatax/client/batches.rb
|
149
150
|
- lib/avatax/client/certexpressinvites.rb
|
150
151
|
- lib/avatax/client/certificates.rb
|