avatax 21.9.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 +22 -11
- data/lib/avatax/client/addresses.rb +4 -2
- data/lib/avatax/client/advancedrules.rb +10 -5
- data/lib/avatax/client/ageverification.rb +29 -0
- data/lib/avatax/client/avafileforms.rb +10 -5
- data/lib/avatax/client/batches.rb +16 -8
- data/lib/avatax/client/certexpressinvites.rb +6 -3
- data/lib/avatax/client/certificates.rb +30 -15
- data/lib/avatax/client/companies.rb +61 -21
- data/lib/avatax/client/compliance.rb +25 -14
- data/lib/avatax/client/contacts.rb +12 -6
- data/lib/avatax/client/customers.rb +26 -13
- data/lib/avatax/client/datasources.rb +12 -6
- data/lib/avatax/client/definitions.rb +140 -70
- data/lib/avatax/client/distancethresholds.rb +12 -6
- data/lib/avatax/client/ecms.rb +73 -73
- data/lib/avatax/client/ecommercetoken.rb +4 -2
- data/lib/avatax/client/errortransactions.rb +61 -61
- data/lib/avatax/client/filingcalendars.rb +9 -4
- data/lib/avatax/client/filings.rb +6 -2
- data/lib/avatax/client/firmclientlinkages.rb +18 -9
- data/lib/avatax/client/free.rb +2 -1
- data/lib/avatax/client/fundingrequests.rb +4 -2
- data/lib/avatax/client/items.rb +50 -25
- data/lib/avatax/client/jurisdictionoverrides.rb +12 -6
- data/lib/avatax/client/locations.rb +24 -12
- data/lib/avatax/client/multidocument.rb +20 -10
- data/lib/avatax/client/nexus.rb +30 -15
- data/lib/avatax/client/notices.rb +8 -4
- data/lib/avatax/client/notifications.rb +6 -3
- data/lib/avatax/client/onboarding.rb +55 -55
- data/lib/avatax/client/pointofsale.rb +21 -21
- data/lib/avatax/client/provisioning.rb +4 -2
- data/lib/avatax/client/registrar.rb +22 -11
- data/lib/avatax/client/reports.rb +8 -4
- data/lib/avatax/client/settings.rb +12 -6
- data/lib/avatax/client/shippingverification.rb +66 -0
- data/lib/avatax/client/subscriptions.rb +6 -3
- data/lib/avatax/client/taxcodes.rb +12 -6
- data/lib/avatax/client/taxcontent.rb +10 -5
- data/lib/avatax/client/taxprofiles.rb +42 -42
- data/lib/avatax/client/taxrules.rb +12 -6
- data/lib/avatax/client/transactions.rb +42 -21
- data/lib/avatax/client/upcs.rb +12 -6
- data/lib/avatax/client/userdefinedfields.rb +52 -0
- data/lib/avatax/client/users.rb +16 -8
- data/lib/avatax/client/utilities.rb +6 -3
- 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
@@ -6,49 +6,54 @@ module AvaTax
|
|
6
6
|
# Create a lookup file for a company
|
7
7
|
#
|
8
8
|
#
|
9
|
+
# Swagger Name: AvaTaxClient
|
9
10
|
# @param accountId [Integer] The ID of the account for the company
|
10
11
|
# @param companyId [Integer] The ID of the company for which the lookup file is to be created
|
11
12
|
# @param model [Object] The lookup file you wish to create
|
12
13
|
# @return [Object]
|
13
14
|
def create_company_lookup_file(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
|
14
|
-
post(path, model) end
|
15
|
+
post(path, model, {}, "22.2.0") end
|
15
16
|
|
16
17
|
# Delete a lookup file
|
17
18
|
#
|
18
19
|
#
|
20
|
+
# Swagger Name: AvaTaxClient
|
19
21
|
# @param accountId [Integer] The ID of the account for the company the lookup file is for
|
20
22
|
# @param id [String] The unique ID/GUID for the company lookup file to be deleted
|
21
23
|
# @return [ErrorDetail[]]
|
22
24
|
def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
23
|
-
delete(path) end
|
25
|
+
delete(path, {}, "22.2.0") end
|
24
26
|
|
25
27
|
# Get the lookup files for a company
|
26
28
|
#
|
27
29
|
#
|
30
|
+
# Swagger Name: AvaTaxClient
|
28
31
|
# @param accountId [Integer] The account ID for the company
|
29
32
|
# @param companyId [Integer] The ID of the company for which to retrieve lookup files
|
30
33
|
# @return [FetchResult]
|
31
34
|
def get_company_lookup_files(accountId, companyId) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
|
32
|
-
get(path) end
|
35
|
+
get(path, {}, "22.2.0") end
|
33
36
|
|
34
37
|
# Get a lookup file for an accountId and companyLookupFileId
|
35
38
|
#
|
36
39
|
#
|
40
|
+
# Swagger Name: AvaTaxClient
|
37
41
|
# @param accountId [Integer] The ID of the account for the lookup file
|
38
42
|
# @param id [String] The unique ID/GUID of the company lookup file to return
|
39
43
|
# @return [Object]
|
40
44
|
def get_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
41
|
-
get(path) end
|
45
|
+
get(path, {}, "22.2.0") end
|
42
46
|
|
43
47
|
# Update a lookup file
|
44
48
|
#
|
45
49
|
#
|
50
|
+
# Swagger Name: AvaTaxClient
|
46
51
|
# @param accountId [Integer] The ID of the account for the company the lookup file is for
|
47
52
|
# @param id [String] The unique ID/GUID of the company lookup file to be updated
|
48
53
|
# @param model [Object] The new values to update the lookup file
|
49
54
|
# @return [Object]
|
50
55
|
def update_lookup_file(accountId, id, model) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
51
|
-
put(path, model) end
|
56
|
+
put(path, model, {}, "22.2.0") end
|
52
57
|
end
|
53
58
|
end
|
54
59
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module AgeVerification
|
4
|
+
|
5
|
+
|
6
|
+
# Determines whether an individual meets or exceeds the minimum legal drinking age.
|
7
|
+
#
|
8
|
+
# The request must meet the following criteria in order to be evaluated:
|
9
|
+
# * *firstName*, *lastName*, and *address* are required fields.
|
10
|
+
# * One of the following sets of attributes are required for the *address*:
|
11
|
+
# * *line1, city, region*
|
12
|
+
# * *line1, postalCode*
|
13
|
+
#
|
14
|
+
# Optionally, the transaction and its lines may use the following parameters:
|
15
|
+
# * A *DOB* (Date of Birth) field. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
16
|
+
# * Beyond the required *address* fields above, a *country* field is permitted
|
17
|
+
# * The valid values for this attribute are [*US, USA*]
|
18
|
+
#
|
19
|
+
# **Security Policies**
|
20
|
+
# This API depends on the active subscription *AgeVerification*
|
21
|
+
# Swagger Name: AvaTaxBeverageClient
|
22
|
+
# @param simulatedFailureCode [String] (Optional) The failure code included in the simulated response of the endpoint. Note that this endpoint is only available in Sandbox for testing purposes.
|
23
|
+
# @param model [Object] Information about the individual whose age is being verified.
|
24
|
+
# @return [Object]
|
25
|
+
def verify_age(model, options={}) path = "/api/v2/ageverification/verify"
|
26
|
+
post(path, model, options, "") end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -12,10 +12,11 @@ module AvaTax
|
|
12
12
|
#
|
13
13
|
# * This API requires the user role Compliance Root User.
|
14
14
|
# * 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.
|
15
|
+
# Swagger Name: AvaTaxClient
|
15
16
|
# @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
|
16
17
|
# @return [AvaFileFormModel[]]
|
17
18
|
def create_ava_file_forms(model) path = "/api/v2/avafileforms"
|
18
|
-
post(path, model) end
|
19
|
+
post(path, model, {}, "22.2.0") end
|
19
20
|
|
20
21
|
# Delete a single AvaFileForm
|
21
22
|
#
|
@@ -25,10 +26,11 @@ module AvaTax
|
|
25
26
|
#
|
26
27
|
# * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin.
|
27
28
|
# * 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.
|
29
|
+
# Swagger Name: AvaTaxClient
|
28
30
|
# @param id [Integer] The ID of the AvaFileForm you wish to delete.
|
29
31
|
# @return [ErrorDetail[]]
|
30
32
|
def delete_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
|
31
|
-
delete(path) end
|
33
|
+
delete(path, {}, "22.2.0") end
|
32
34
|
|
33
35
|
# Retrieve a single AvaFileForm
|
34
36
|
#
|
@@ -38,10 +40,11 @@ module AvaTax
|
|
38
40
|
#
|
39
41
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin.
|
40
42
|
# * 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.
|
43
|
+
# Swagger Name: AvaTaxClient
|
41
44
|
# @param id [Integer] The primary key of this AvaFileForm
|
42
45
|
# @return [Object]
|
43
46
|
def get_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
|
44
|
-
get(path) end
|
47
|
+
get(path, {}, "22.2.0") end
|
45
48
|
|
46
49
|
# Retrieve all AvaFileForms
|
47
50
|
#
|
@@ -52,13 +55,14 @@ module AvaTax
|
|
52
55
|
#
|
53
56
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin.
|
54
57
|
# * 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.
|
58
|
+
# Swagger Name: AvaTaxClient
|
55
59
|
# @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:* outletTypeId
|
56
60
|
# @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.
|
57
61
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
58
62
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
59
63
|
# @return [FetchResult]
|
60
64
|
def query_ava_file_forms(options={}) path = "/api/v2/avafileforms"
|
61
|
-
get(path, options) end
|
65
|
+
get(path, options, "22.2.0") end
|
62
66
|
|
63
67
|
# Update a AvaFileForm
|
64
68
|
#
|
@@ -69,11 +73,12 @@ module AvaTax
|
|
69
73
|
#
|
70
74
|
# * This API requires the user role Compliance Root User.
|
71
75
|
# * 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.
|
76
|
+
# Swagger Name: AvaTaxClient
|
72
77
|
# @param id [Integer] The ID of the AvaFileForm you wish to update
|
73
78
|
# @param model [Object] The AvaFileForm model you wish to update.
|
74
79
|
# @return [Object]
|
75
80
|
def update_ava_file_form(id, model) path = "/api/v2/avafileforms/#{id}"
|
76
|
-
put(path, model) end
|
81
|
+
put(path, model, {}, "22.2.0") end
|
77
82
|
end
|
78
83
|
end
|
79
84
|
end
|
@@ -21,11 +21,12 @@ module AvaTax
|
|
21
21
|
# ### Security Policies
|
22
22
|
#
|
23
23
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
24
|
+
# Swagger Name: AvaTaxClient
|
24
25
|
# @param companyId [Integer] The ID of the company that owns this batch.
|
25
26
|
# @param id [Integer] The ID of the batch to cancel.
|
26
27
|
# @return [Object]
|
27
28
|
def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel"
|
28
|
-
post(path) end
|
29
|
+
post(path, {}, "22.2.0") end
|
29
30
|
|
30
31
|
# Create a new batch
|
31
32
|
#
|
@@ -52,11 +53,12 @@ module AvaTax
|
|
52
53
|
# ### Security Policies
|
53
54
|
#
|
54
55
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
56
|
+
# Swagger Name: AvaTaxClient
|
55
57
|
# @param companyId [Integer] The ID of the company that owns this batch.
|
56
58
|
# @param model [BatchModel[]] The batch you wish to create.
|
57
59
|
# @return [BatchModel[]]
|
58
60
|
def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches"
|
59
|
-
post(path, model) end
|
61
|
+
post(path, model, {}, "22.2.0") end
|
60
62
|
|
61
63
|
# Create a new transaction batch
|
62
64
|
#
|
@@ -81,11 +83,12 @@ module AvaTax
|
|
81
83
|
# ### Security Policies
|
82
84
|
#
|
83
85
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
86
|
+
# Swagger Name: AvaTaxClient
|
84
87
|
# @param companyId [Integer] The ID of the company that owns this batch.
|
85
88
|
# @param model [Object] The transaction batch you wish to create.
|
86
89
|
# @return [Object]
|
87
90
|
def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions"
|
88
|
-
post(path, model) end
|
91
|
+
post(path, model, {}, "22.2.0") end
|
89
92
|
|
90
93
|
# Delete a single batch
|
91
94
|
#
|
@@ -103,11 +106,12 @@ module AvaTax
|
|
103
106
|
# ### Security Policies
|
104
107
|
#
|
105
108
|
# * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
109
|
+
# Swagger Name: AvaTaxClient
|
106
110
|
# @param companyId [Integer] The ID of the company that owns this batch.
|
107
111
|
# @param id [Integer] The ID of the batch to delete.
|
108
112
|
# @return [ErrorDetail[]]
|
109
113
|
def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
|
110
|
-
delete(path) end
|
114
|
+
delete(path, {}, "22.2.0") end
|
111
115
|
|
112
116
|
# Download a single batch file
|
113
117
|
#
|
@@ -116,12 +120,13 @@ module AvaTax
|
|
116
120
|
# ### Security Policies
|
117
121
|
#
|
118
122
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
123
|
+
# Swagger Name: AvaTaxClient
|
119
124
|
# @param companyId [Integer] The ID of the company that owns this batch
|
120
125
|
# @param batchId [Integer] The ID of the batch object
|
121
126
|
# @param id [Integer] The primary key of this batch file object
|
122
127
|
# @return [Object]
|
123
128
|
def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
|
124
|
-
get(path) end
|
129
|
+
get(path, {}, "22.2.0") end
|
125
130
|
|
126
131
|
# Retrieve a single batch
|
127
132
|
#
|
@@ -144,11 +149,12 @@ module AvaTax
|
|
144
149
|
# ### Security Policies
|
145
150
|
#
|
146
151
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
152
|
+
# Swagger Name: AvaTaxClient
|
147
153
|
# @param companyId [Integer] The ID of the company that owns this batch
|
148
154
|
# @param id [Integer] The primary key of this batch
|
149
155
|
# @return [Object]
|
150
156
|
def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
|
151
|
-
get(path) end
|
157
|
+
get(path, {}, "22.2.0") end
|
152
158
|
|
153
159
|
# Retrieve all batches for this company
|
154
160
|
#
|
@@ -177,6 +183,7 @@ module AvaTax
|
|
177
183
|
# ### Security Policies
|
178
184
|
#
|
179
185
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
186
|
+
# Swagger Name: AvaTaxClient
|
180
187
|
# @param companyId [Integer] The ID of the company that owns these batches
|
181
188
|
# @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:* files
|
182
189
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -185,7 +192,7 @@ module AvaTax
|
|
185
192
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
186
193
|
# @return [FetchResult]
|
187
194
|
def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches"
|
188
|
-
get(path, options) end
|
195
|
+
get(path, options, "22.2.0") end
|
189
196
|
|
190
197
|
# Retrieve all batches
|
191
198
|
#
|
@@ -211,6 +218,7 @@ module AvaTax
|
|
211
218
|
# ### Security Policies
|
212
219
|
#
|
213
220
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
221
|
+
# Swagger Name: AvaTaxClient
|
214
222
|
# @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:* files
|
215
223
|
# @param include [String] A comma separated list of additional data to retrieve.
|
216
224
|
# @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.
|
@@ -218,7 +226,7 @@ module AvaTax
|
|
218
226
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
219
227
|
# @return [FetchResult]
|
220
228
|
def query_batches(options={}) path = "/api/v2/batches"
|
221
|
-
get(path, options) end
|
229
|
+
get(path, options, "22.2.0") end
|
222
230
|
end
|
223
231
|
end
|
224
232
|
end
|
@@ -25,12 +25,13 @@ module AvaTax
|
|
25
25
|
#
|
26
26
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
27
27
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
28
|
+
# Swagger Name: AvaTaxClient
|
28
29
|
# @param companyId [Integer] The unique ID number of the company that will record certificates
|
29
30
|
# @param customerCode [String] The number of the customer where the request is sent to
|
30
31
|
# @param model [CreateCertExpressInvitationModel[]] the requests to send out to customers
|
31
32
|
# @return [CertExpressInvitationStatusModel[]]
|
32
33
|
def create_cert_express_invitation(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites"
|
33
|
-
post(path, model) end
|
34
|
+
post(path, model, {}, "22.2.0") end
|
34
35
|
|
35
36
|
# Retrieve a single CertExpress invitation
|
36
37
|
#
|
@@ -54,13 +55,14 @@ module AvaTax
|
|
54
55
|
#
|
55
56
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
56
57
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
58
|
+
# Swagger Name: AvaTaxClient
|
57
59
|
# @param companyId [Integer] The unique ID number of the company that issued this invitation
|
58
60
|
# @param customerCode [String] The number of the customer where the request is sent to
|
59
61
|
# @param id [Integer] The unique ID number of this CertExpress invitation
|
60
62
|
# @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
|
61
63
|
# @return [Object]
|
62
64
|
def get_cert_express_invitation(companyId, customerCode, id, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}"
|
63
|
-
get(path, options) end
|
65
|
+
get(path, options, "22.2.0") end
|
64
66
|
|
65
67
|
# List CertExpress invitations
|
66
68
|
#
|
@@ -84,6 +86,7 @@ module AvaTax
|
|
84
86
|
#
|
85
87
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
86
88
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
89
|
+
# Swagger Name: AvaTaxClient
|
87
90
|
# @param companyId [Integer] The unique ID number of the company that issued this invitation
|
88
91
|
# @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
|
89
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/).<br />*Not filterable:* companyId, customer, coverLetter, exposureZones, exemptReasons, requestLink
|
@@ -92,7 +95,7 @@ module AvaTax
|
|
92
95
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
93
96
|
# @return [FetchResult]
|
94
97
|
def list_cert_express_invitations(companyId, options={}) path = "/api/v2/companies/#{companyId}/certexpressinvites"
|
95
|
-
get(path, options) end
|
98
|
+
get(path, options, "22.2.0") end
|
96
99
|
end
|
97
100
|
end
|
98
101
|
end
|
@@ -31,12 +31,13 @@ module AvaTax
|
|
31
31
|
#
|
32
32
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
33
33
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
34
|
+
# Swagger Name: AvaTaxClient
|
34
35
|
# @param companyId [Integer] The ID number of the company recording this certificate
|
35
36
|
# @param preValidatedExemptionReason [Boolean] If set to true, the certificate will bypass the human verification process.
|
36
37
|
# @param model [CertificateModel[]] Certificates to be created
|
37
38
|
# @return [CertificateModel[]]
|
38
39
|
def create_certificates(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/certificates"
|
39
|
-
post(path, model, options) end
|
40
|
+
post(path, model, options, "22.2.0") end
|
40
41
|
|
41
42
|
# Revoke and delete a certificate
|
42
43
|
#
|
@@ -58,11 +59,12 @@ module AvaTax
|
|
58
59
|
#
|
59
60
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
60
61
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
62
|
+
# Swagger Name: AvaTaxClient
|
61
63
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
62
64
|
# @param id [Integer] The unique ID number of this certificate
|
63
65
|
# @return [ErrorDetail[]]
|
64
66
|
def delete_certificate(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}"
|
65
|
-
delete(path) end
|
67
|
+
delete(path, {}, "22.2.0") end
|
66
68
|
|
67
69
|
# Download an image for this certificate
|
68
70
|
#
|
@@ -85,13 +87,14 @@ module AvaTax
|
|
85
87
|
#
|
86
88
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
87
89
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
90
|
+
# Swagger Name: AvaTaxClient
|
88
91
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
89
92
|
# @param id [Integer] The unique ID number of this certificate
|
90
93
|
# @param page [Integer] If you choose `$type`=`Jpeg`, you must specify which page number to retrieve.
|
91
94
|
# @param type [String] The data format in which to retrieve the certificate image (See CertificatePreviewType::* for a list of allowable values)
|
92
95
|
# @return [Object]
|
93
96
|
def download_certificate_image(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment"
|
94
|
-
get(path, options) end
|
97
|
+
get(path, options, "22.2.0") end
|
95
98
|
|
96
99
|
# Retrieve a single certificate
|
97
100
|
#
|
@@ -117,12 +120,13 @@ module AvaTax
|
|
117
120
|
#
|
118
121
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
119
122
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
123
|
+
# Swagger Name: AvaTaxClient
|
120
124
|
# @param companyId [Integer] The ID number of the company that recorded this certificate
|
121
125
|
# @param id [Integer] The unique ID number of this certificate
|
122
126
|
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
|
123
127
|
# @return [Object]
|
124
128
|
def get_certificate(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}"
|
125
|
-
get(path, options) end
|
129
|
+
get(path, options, "22.2.0") end
|
126
130
|
|
127
131
|
# Check a company's exemption certificate status.
|
128
132
|
#
|
@@ -138,10 +142,11 @@ module AvaTax
|
|
138
142
|
#
|
139
143
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
140
144
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
145
|
+
# Swagger Name: AvaTaxClient
|
141
146
|
# @param companyId [Integer] The company ID to check
|
142
147
|
# @return [Object]
|
143
148
|
def get_certificate_setup(companyId) path = "/api/v2/companies/#{companyId}/certificates/setup"
|
144
|
-
get(path) end
|
149
|
+
get(path, {}, "22.2.0") end
|
145
150
|
|
146
151
|
# Link attributes to a certificate
|
147
152
|
#
|
@@ -164,12 +169,13 @@ module AvaTax
|
|
164
169
|
#
|
165
170
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
166
171
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
172
|
+
# Swagger Name: AvaTaxClient
|
167
173
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
168
174
|
# @param id [Integer] The unique ID number of this certificate
|
169
175
|
# @param model [CertificateAttributeModel[]] The list of attributes to link to this certificate.
|
170
176
|
# @return [FetchResult]
|
171
177
|
def link_attributes_to_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/link"
|
172
|
-
post(path, model) end
|
178
|
+
post(path, model, {}, "22.2.0") end
|
173
179
|
|
174
180
|
# Link customers to a certificate
|
175
181
|
#
|
@@ -193,12 +199,13 @@ module AvaTax
|
|
193
199
|
#
|
194
200
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
195
201
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
202
|
+
# Swagger Name: AvaTaxClient
|
196
203
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
197
204
|
# @param id [Integer] The unique ID number of this certificate
|
198
205
|
# @param model [Object] The list of customers needed be added to the Certificate for exemption
|
199
206
|
# @return [FetchResult]
|
200
207
|
def link_customers_to_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/link"
|
201
|
-
post(path, model) end
|
208
|
+
post(path, model, {}, "22.2.0") end
|
202
209
|
|
203
210
|
# List all attributes applied to this certificate
|
204
211
|
#
|
@@ -221,11 +228,12 @@ module AvaTax
|
|
221
228
|
#
|
222
229
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
223
230
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
231
|
+
# Swagger Name: AvaTaxClient
|
224
232
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
225
233
|
# @param id [Integer] The unique ID number of this certificate
|
226
234
|
# @return [FetchResult]
|
227
235
|
def list_attributes_for_certificate(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes"
|
228
|
-
get(path) end
|
236
|
+
get(path, {}, "22.2.0") end
|
229
237
|
|
230
238
|
# List customers linked to this certificate
|
231
239
|
#
|
@@ -248,12 +256,13 @@ module AvaTax
|
|
248
256
|
#
|
249
257
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
250
258
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
259
|
+
# Swagger Name: AvaTaxClient
|
251
260
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
252
261
|
# @param id [Integer] The unique ID number of this certificate
|
253
262
|
# @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are currently available when fetching customers.
|
254
263
|
# @return [FetchResult]
|
255
264
|
def list_customers_for_certificate(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers"
|
256
|
-
get(path, options) end
|
265
|
+
get(path, options, "22.2.0") end
|
257
266
|
|
258
267
|
# List all certificates for a company
|
259
268
|
#
|
@@ -279,6 +288,7 @@ module AvaTax
|
|
279
288
|
#
|
280
289
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
281
290
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
291
|
+
# Swagger Name: AvaTaxClient
|
282
292
|
# @param companyId [Integer] The ID number of the company to search
|
283
293
|
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
|
284
294
|
# @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:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
|
@@ -287,7 +297,7 @@ module AvaTax
|
|
287
297
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
288
298
|
# @return [FetchResult]
|
289
299
|
def query_certificates(companyId, options={}) path = "/api/v2/companies/#{companyId}/certificates"
|
290
|
-
get(path, options) end
|
300
|
+
get(path, options, "22.2.0") end
|
291
301
|
|
292
302
|
# Request setup of exemption certificates for this company.
|
293
303
|
#
|
@@ -305,10 +315,11 @@ module AvaTax
|
|
305
315
|
#
|
306
316
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
307
317
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
318
|
+
# Swagger Name: AvaTaxClient
|
308
319
|
# @param companyId [Integer]
|
309
320
|
# @return [Object]
|
310
321
|
def request_certificate_setup(companyId) path = "/api/v2/companies/#{companyId}/certificates/setup"
|
311
|
-
post(path) end
|
322
|
+
post(path, {}, "22.2.0") end
|
312
323
|
|
313
324
|
# Unlink attributes from a certificate
|
314
325
|
#
|
@@ -331,12 +342,13 @@ module AvaTax
|
|
331
342
|
#
|
332
343
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
333
344
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
345
|
+
# Swagger Name: AvaTaxClient
|
334
346
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
335
347
|
# @param id [Integer] The unique ID number of this certificate
|
336
348
|
# @param model [CertificateAttributeModel[]] The list of attributes to unlink from this certificate.
|
337
349
|
# @return [FetchResult]
|
338
350
|
def unlink_attributes_from_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/unlink"
|
339
|
-
post(path, model) end
|
351
|
+
post(path, model, {}, "22.2.0") end
|
340
352
|
|
341
353
|
# Unlink customers from a certificate
|
342
354
|
#
|
@@ -361,12 +373,13 @@ module AvaTax
|
|
361
373
|
#
|
362
374
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
363
375
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
376
|
+
# Swagger Name: AvaTaxClient
|
364
377
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
365
378
|
# @param id [Integer] The unique ID number of this certificate
|
366
379
|
# @param model [Object] The list of customers to unlink from this certificate
|
367
380
|
# @return [FetchResult]
|
368
381
|
def unlink_customers_from_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/unlink"
|
369
|
-
post(path, model) end
|
382
|
+
post(path, model, {}, "22.2.0") end
|
370
383
|
|
371
384
|
# Update a single certificate
|
372
385
|
#
|
@@ -386,12 +399,13 @@ module AvaTax
|
|
386
399
|
#
|
387
400
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
388
401
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
402
|
+
# Swagger Name: AvaTaxClient
|
389
403
|
# @param companyId [Integer] The ID number of the company that recorded this certificate
|
390
404
|
# @param id [Integer] The unique ID number of this certificate
|
391
405
|
# @param model [Object] The new certificate object that will replace the existing one
|
392
406
|
# @return [Object]
|
393
407
|
def update_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}"
|
394
|
-
put(path, model) end
|
408
|
+
put(path, model, {}, "22.2.0") end
|
395
409
|
|
396
410
|
# Upload an image or PDF attachment for this certificate
|
397
411
|
#
|
@@ -414,12 +428,13 @@ module AvaTax
|
|
414
428
|
#
|
415
429
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
416
430
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
431
|
+
# Swagger Name: AvaTaxClient
|
417
432
|
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
|
418
433
|
# @param id [Integer] The unique ID number of this certificate
|
419
434
|
# @param file [Object] The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG.
|
420
435
|
# @return [String]
|
421
436
|
def upload_certificate_image(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment"
|
422
|
-
post(path) end
|
437
|
+
post(path, {}, "22.2.0") end
|
423
438
|
end
|
424
439
|
end
|
425
440
|
end
|