avatax 20.1.0 → 20.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +236 -172
- data/lib/avatax/client/addresses.rb +54 -54
- data/lib/avatax/client/advancedrules.rb +63 -162
- data/lib/avatax/client/avafileforms.rb +78 -78
- data/lib/avatax/client/batches.rb +223 -170
- data/lib/avatax/client/certexpressinvites.rb +97 -97
- data/lib/avatax/client/certificates.rb +424 -424
- data/lib/avatax/client/companies.rb +457 -350
- data/lib/avatax/client/compliance.rb +15 -15
- data/lib/avatax/client/contacts.rb +106 -106
- data/lib/avatax/client/customers.rb +376 -376
- data/lib/avatax/client/datasources.rb +99 -99
- data/lib/avatax/client/definitions.rb +862 -847
- data/lib/avatax/client/distancethresholds.rb +122 -122
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/filingcalendars.rb +20 -508
- data/lib/avatax/client/filings.rb +37 -26
- data/lib/avatax/client/firmclientlinkages.rb +123 -123
- data/lib/avatax/client/free.rb +100 -100
- data/lib/avatax/client/fundingrequests.rb +52 -52
- data/lib/avatax/client/items.rb +423 -423
- data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
- data/lib/avatax/client/locations.rb +253 -139
- data/lib/avatax/client/multidocument.rb +390 -310
- data/lib/avatax/client/nexus.rb +341 -201
- data/lib/avatax/client/notifications.rb +75 -75
- data/lib/avatax/client/provisioning.rb +49 -49
- data/lib/avatax/client/registrar.rb +198 -198
- data/lib/avatax/client/reports.rb +97 -97
- data/lib/avatax/client/settings.rb +156 -156
- data/lib/avatax/client/subscriptions.rb +62 -62
- data/lib/avatax/client/taxcodes.rb +120 -120
- data/lib/avatax/client/taxcontent.rb +133 -133
- data/lib/avatax/client/taxrules.rb +170 -170
- data/lib/avatax/client/transactions.rb +836 -791
- data/lib/avatax/client/upcs.rb +111 -111
- data/lib/avatax/client/users.rb +183 -183
- data/lib/avatax/client/utilities.rb +61 -61
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -17
@@ -1,163 +1,64 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module AdvancedRules
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# @param
|
12
|
-
# @
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# @param
|
29
|
-
# @
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
#
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
# @param accountId [Integer] The ID of the account
|
57
|
-
# @param
|
58
|
-
# @
|
59
|
-
|
60
|
-
path = "/api/v2/accounts/#{accountId}/
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
# Delete a lookup table for an advanced rule.
|
66
|
-
#
|
67
|
-
# This API is available by invite only and implementation support is required.
|
68
|
-
# Please contact your Customer Account Manager if you are interested in using
|
69
|
-
# Advanced Rules in your AvaTax integration.
|
70
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
71
|
-
# @param csvTableName [String] The name of the CSV lookup table to delete.
|
72
|
-
# @return [ErrorDetail[]]
|
73
|
-
def delete_advanced_rule_table(accountId, csvTableName)
|
74
|
-
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
75
|
-
delete(path)
|
76
|
-
end
|
77
|
-
|
78
|
-
|
79
|
-
# Disable an advanced rule so that it cannot be run.
|
80
|
-
#
|
81
|
-
# This API is available by invite only and implementation support is required.
|
82
|
-
# Please contact your Customer Account Manager if you are interested in using
|
83
|
-
# Advanced Rules in your AvaTax integration. ///
|
84
|
-
# @param accountId [Integer]
|
85
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
86
|
-
# @return [Object]
|
87
|
-
def disable_advanced_rule_script(accountId, scriptType)
|
88
|
-
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}/disable"
|
89
|
-
post(path)
|
90
|
-
end
|
91
|
-
|
92
|
-
|
93
|
-
# Enable an approved advanced rule so that it can be run.
|
94
|
-
#
|
95
|
-
# This API is available by invite only and implementation support is required.
|
96
|
-
# Please contact your Customer Account Manager if you are interested in using
|
97
|
-
# Advanced Rules in your AvaTax integration.
|
98
|
-
# @param accountId [Integer]
|
99
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
100
|
-
# @return [Object]
|
101
|
-
def enable_advanced_rule_script(accountId, scriptType)
|
102
|
-
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}/enable"
|
103
|
-
post(path)
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
# Get an account's advanced rule script.
|
108
|
-
#
|
109
|
-
# This API is available by invite only and implementation support is required.
|
110
|
-
# Please contact your Customer Account Manager if you are interested in using
|
111
|
-
# Advanced Rules in your AvaTax integration.
|
112
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
113
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
114
|
-
# @return [Object]
|
115
|
-
def get_advanced_rule_script(accountId, scriptType)
|
116
|
-
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}"
|
117
|
-
get(path)
|
118
|
-
end
|
119
|
-
|
120
|
-
|
121
|
-
# Get an advanced rule lookup table for an account
|
122
|
-
#
|
123
|
-
# This API is available by invite only and implementation support is required.
|
124
|
-
# Please contact your Customer Account Manager if you are interested in using
|
125
|
-
# Advanced Rules in your AvaTax integration.
|
126
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
127
|
-
# @param csvTableName [String] The name of the CSV lookup table to get.
|
128
|
-
# @return [Object]
|
129
|
-
def get_advanced_rule_table(accountId, csvTableName)
|
130
|
-
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
131
|
-
get(path)
|
132
|
-
end
|
133
|
-
|
134
|
-
|
135
|
-
# Get all advanced rule lookup tables for an account
|
136
|
-
#
|
137
|
-
# This API is available by invite only and implementation support is required.
|
138
|
-
# Please contact your Customer Account Manager if you are interested in using
|
139
|
-
# Advanced Rules in your AvaTax integration.
|
140
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
141
|
-
# @return [Object]
|
142
|
-
def get_advanced_rule_tables(accountId)
|
143
|
-
path = "/api/v2/accounts/#{accountId}/advancedruletables"
|
144
|
-
get(path)
|
145
|
-
end
|
146
|
-
|
147
|
-
|
148
|
-
# Unapprove an advanced rule script so that it cannot be run.
|
149
|
-
#
|
150
|
-
# This API is available by invite only and implementation support is required.
|
151
|
-
# Please contact your Customer Account Manager if you are interested in using
|
152
|
-
# Advanced Rules in your AvaTax integration.
|
153
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
154
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
155
|
-
# @return [Object]
|
156
|
-
def unapprove_advanced_rule_script(accountId, scriptType)
|
157
|
-
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}/unapprove"
|
158
|
-
post(path)
|
159
|
-
end
|
160
|
-
|
161
|
-
end
|
162
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module AdvancedRules
|
4
|
+
|
5
|
+
|
6
|
+
# Create a lookup file for a company
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# @param accountId [Integer] The ID of the account for the company
|
10
|
+
# @param companyId [Integer] The ID of the company for which the lookup file is to be created
|
11
|
+
# @param model [Object] The lookup file you wish to create
|
12
|
+
# @return [Object]
|
13
|
+
def create_company_lookup_file(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
|
14
|
+
post(path, model) end
|
15
|
+
|
16
|
+
# Delete a lookup file
|
17
|
+
#
|
18
|
+
#
|
19
|
+
# @param accountId [Integer] The ID of the account for the company the lookup file is for
|
20
|
+
# @param id [String] The unique ID/GUID for the company lookup file to be deleted
|
21
|
+
# @return [ErrorDetail[]]
|
22
|
+
def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
23
|
+
delete(path) end
|
24
|
+
|
25
|
+
# Get audit records by account id and date range.
|
26
|
+
#
|
27
|
+
#
|
28
|
+
# @param accountId [Integer] The ID of the account
|
29
|
+
# @param fromDate [String] Date
|
30
|
+
# @param toDate [String] Date
|
31
|
+
# @return [Object]
|
32
|
+
def get_audit_records(accountId, fromDate, toDate) path = "/api/v2/advancedrules/audits/accounts/#{accountId}/from/#{fromDate}/to/#{toDate}"
|
33
|
+
get(path) end
|
34
|
+
|
35
|
+
# Get the lookup files for a company
|
36
|
+
#
|
37
|
+
#
|
38
|
+
# @param accountId [Integer] The account ID for the company
|
39
|
+
# @param companyId [Integer] The ID of the company for which to retrieve lookup files
|
40
|
+
# @return [FetchResult]
|
41
|
+
def get_company_lookup_files(accountId, companyId) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
|
42
|
+
get(path) end
|
43
|
+
|
44
|
+
# Get a lookup file for an accountId and companyLookupFileId
|
45
|
+
#
|
46
|
+
#
|
47
|
+
# @param accountId [Integer] The ID of the account for the lookup file
|
48
|
+
# @param id [String] The unique ID/GUID of the company lookup file to return
|
49
|
+
# @return [Object]
|
50
|
+
def get_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
51
|
+
get(path) end
|
52
|
+
|
53
|
+
# Update a lookup file
|
54
|
+
#
|
55
|
+
#
|
56
|
+
# @param accountId [Integer] The ID of the account for the company the lookup file is for
|
57
|
+
# @param id [String] The unique ID/GUID of the company lookup file to be updated
|
58
|
+
# @param model [Object] The new values to update the lookup file
|
59
|
+
# @return [Object]
|
60
|
+
def update_lookup_file(accountId, id, model) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
61
|
+
put(path, model) end
|
62
|
+
end
|
63
|
+
end
|
163
64
|
end
|
@@ -1,79 +1,79 @@
|
|
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
|
-
#
|
11
|
-
# ### Security Policies
|
12
|
-
#
|
13
|
-
# * This API requires the user role Compliance Root User.
|
14
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
15
|
-
# @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
|
16
|
-
# @return [AvaFileFormModel[]]
|
17
|
-
def create_ava_file_forms(model) path = "/api/v2/avafileforms"
|
18
|
-
post(path, model) end
|
19
|
-
|
20
|
-
# Delete a single AvaFileForm
|
21
|
-
#
|
22
|
-
# Marks the existing AvaFileForm object at this URL as deleted.
|
23
|
-
#
|
24
|
-
# ### Security Policies
|
25
|
-
#
|
26
|
-
# * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin.
|
27
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
28
|
-
# @param id [Integer] The ID of the AvaFileForm you wish to delete.
|
29
|
-
# @return [ErrorDetail[]]
|
30
|
-
def delete_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
|
31
|
-
delete(path) end
|
32
|
-
|
33
|
-
# Retrieve a single AvaFileForm
|
34
|
-
#
|
35
|
-
# Get the AvaFileForm object identified by this URL.
|
36
|
-
#
|
37
|
-
# ### Security Policies
|
38
|
-
#
|
39
|
-
# * 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
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
41
|
-
# @param id [Integer] The primary key of this AvaFileForm
|
42
|
-
# @return [Object]
|
43
|
-
def get_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
|
44
|
-
get(path) end
|
45
|
-
|
46
|
-
# Retrieve all AvaFileForms
|
47
|
-
#
|
48
|
-
# 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/) .
|
49
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
50
|
-
#
|
51
|
-
# ### Security Policies
|
52
|
-
#
|
53
|
-
# * 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
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
55
|
-
# @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
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
58
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
59
|
-
# @return [FetchResult]
|
60
|
-
def query_ava_file_forms(options={}) path = "/api/v2/avafileforms"
|
61
|
-
get(path, options) end
|
62
|
-
|
63
|
-
# Update a AvaFileForm
|
64
|
-
#
|
65
|
-
# All data from the existing object will be replaced with data in the object you PUT.
|
66
|
-
# 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.
|
67
|
-
#
|
68
|
-
# ### Security Policies
|
69
|
-
#
|
70
|
-
# * This API requires the user role Compliance Root User.
|
71
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
72
|
-
# @param id [Integer] The ID of the AvaFileForm you wish to update
|
73
|
-
# @param model [Object] The AvaFileForm model you wish to update.
|
74
|
-
# @return [Object]
|
75
|
-
def update_ava_file_form(id, model) path = "/api/v2/avafileforms/#{id}"
|
76
|
-
put(path, model) end
|
77
|
-
end
|
78
|
-
end
|
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
|
+
#
|
11
|
+
# ### Security Policies
|
12
|
+
#
|
13
|
+
# * This API requires the user role Compliance Root User.
|
14
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
15
|
+
# @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
|
16
|
+
# @return [AvaFileFormModel[]]
|
17
|
+
def create_ava_file_forms(model) path = "/api/v2/avafileforms"
|
18
|
+
post(path, model) end
|
19
|
+
|
20
|
+
# Delete a single AvaFileForm
|
21
|
+
#
|
22
|
+
# Marks the existing AvaFileForm object at this URL as deleted.
|
23
|
+
#
|
24
|
+
# ### Security Policies
|
25
|
+
#
|
26
|
+
# * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin.
|
27
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
28
|
+
# @param id [Integer] The ID of the AvaFileForm you wish to delete.
|
29
|
+
# @return [ErrorDetail[]]
|
30
|
+
def delete_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
|
31
|
+
delete(path) end
|
32
|
+
|
33
|
+
# Retrieve a single AvaFileForm
|
34
|
+
#
|
35
|
+
# Get the AvaFileForm object identified by this URL.
|
36
|
+
#
|
37
|
+
# ### Security Policies
|
38
|
+
#
|
39
|
+
# * 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
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
41
|
+
# @param id [Integer] The primary key of this AvaFileForm
|
42
|
+
# @return [Object]
|
43
|
+
def get_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
|
44
|
+
get(path) end
|
45
|
+
|
46
|
+
# Retrieve all AvaFileForms
|
47
|
+
#
|
48
|
+
# 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/) .
|
49
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
50
|
+
#
|
51
|
+
# ### Security Policies
|
52
|
+
#
|
53
|
+
# * 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
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
55
|
+
# @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
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
58
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
59
|
+
# @return [FetchResult]
|
60
|
+
def query_ava_file_forms(options={}) path = "/api/v2/avafileforms"
|
61
|
+
get(path, options) end
|
62
|
+
|
63
|
+
# Update a AvaFileForm
|
64
|
+
#
|
65
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
66
|
+
# 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.
|
67
|
+
#
|
68
|
+
# ### Security Policies
|
69
|
+
#
|
70
|
+
# * This API requires the user role Compliance Root User.
|
71
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
72
|
+
# @param id [Integer] The ID of the AvaFileForm you wish to update
|
73
|
+
# @param model [Object] The AvaFileForm model you wish to update.
|
74
|
+
# @return [Object]
|
75
|
+
def update_ava_file_form(id, model) path = "/api/v2/avafileforms/#{id}"
|
76
|
+
put(path, model) end
|
77
|
+
end
|
78
|
+
end
|
79
79
|
end
|
@@ -1,171 +1,224 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Batches
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
# @
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
# [
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Batches
|
4
|
+
|
5
|
+
|
6
|
+
# Cancel an in progress batch
|
7
|
+
#
|
8
|
+
# Marks the in progress batch identified by this URL as cancelled.
|
9
|
+
#
|
10
|
+
# Only JSON batches can be cancelled. If you attempt to cancel a file batch, you will receive an error message.
|
11
|
+
#
|
12
|
+
# Only in progress batches can be cancelled. If you attempt to cancel a batch that its status is not Waiting or Processing, you will receive an error message.
|
13
|
+
# Cancelling an in progress batch does not delete any transactions that were created before the cancellation.
|
14
|
+
#
|
15
|
+
# Because the batch system processes with a degree of concurrency, and
|
16
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
17
|
+
# predict when a batch will complete. If high performance processing is
|
18
|
+
# required, please use the
|
19
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
20
|
+
#
|
21
|
+
# ### Security Policies
|
22
|
+
#
|
23
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
24
|
+
# @param companyId [Integer] The ID of the company that owns this batch.
|
25
|
+
# @param id [Integer] The ID of the batch to cancel.
|
26
|
+
# @return [Object]
|
27
|
+
def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel"
|
28
|
+
post(path) end
|
29
|
+
|
30
|
+
# Create a new batch
|
31
|
+
#
|
32
|
+
# Create one or more new batch objects attached to this company.
|
33
|
+
#
|
34
|
+
# Each batch object may have one or more file objects (currently only one file is supported).
|
35
|
+
#
|
36
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
37
|
+
# processed as quickly as possible in the order it was received. To check the
|
38
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
39
|
+
# operation.
|
40
|
+
#
|
41
|
+
# Because the batch system processes with a degree of concurrency, and
|
42
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
43
|
+
# predict when a batch will complete. If high performance processing is
|
44
|
+
# required, please use the
|
45
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
46
|
+
#
|
47
|
+
# The maximum content length of the request body is limited to 28.6 MB. If this limit
|
48
|
+
# is exceeded, a 404 Not Found status will be returned (possibly with a CORS error if
|
49
|
+
# the API is called from a browser). In this situation, please split the request into
|
50
|
+
# smaller batches.
|
51
|
+
#
|
52
|
+
# ### Security Policies
|
53
|
+
#
|
54
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
55
|
+
# @param companyId [Integer] The ID of the company that owns this batch.
|
56
|
+
# @param model [BatchModel[]] The batch you wish to create.
|
57
|
+
# @return [BatchModel[]]
|
58
|
+
def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches"
|
59
|
+
post(path, model) end
|
60
|
+
|
61
|
+
# Create a new transaction batch
|
62
|
+
#
|
63
|
+
# Create a new transaction batch objects attached to this company.
|
64
|
+
#
|
65
|
+
# When a transaction batch is created, it is added to the AvaTax Batch v2 Queue and will be
|
66
|
+
# processed as quickly as possible in the order it was received. To check the
|
67
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
68
|
+
# operation.
|
69
|
+
#
|
70
|
+
# Because the batch system processes with a degree of concurrency, and
|
71
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
72
|
+
# predict when a batch will complete. If high performance processing is
|
73
|
+
# required, please use the
|
74
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
75
|
+
#
|
76
|
+
# The maximum content length of the request body is limited to 28.6 MB. If this limit
|
77
|
+
# is exceeded, a 404 Not Found status will be returned (possibly with a CORS error if
|
78
|
+
# the API is called from a browser). In this situation, please split the request into
|
79
|
+
# smaller batches.
|
80
|
+
#
|
81
|
+
# ### Security Policies
|
82
|
+
#
|
83
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
84
|
+
# @param companyId [Integer] The ID of the company that owns this batch.
|
85
|
+
# @param model [Object] The transaction batch you wish to create.
|
86
|
+
# @return [Object]
|
87
|
+
def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions"
|
88
|
+
post(path, model) end
|
89
|
+
|
90
|
+
# Delete a single batch
|
91
|
+
#
|
92
|
+
# Marks the batch identified by this URL as deleted.
|
93
|
+
#
|
94
|
+
# If you attempt to delete a batch that is being processed, you will receive an error message.
|
95
|
+
# Deleting a batch does not delete any transactions that were created by importing the batch.
|
96
|
+
#
|
97
|
+
# Because the batch system processes with a degree of concurrency, and
|
98
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
99
|
+
# predict when a batch will complete. If high performance processing is
|
100
|
+
# required, please use the
|
101
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
102
|
+
#
|
103
|
+
# ### Security Policies
|
104
|
+
#
|
105
|
+
# * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
|
106
|
+
# @param companyId [Integer] The ID of the company that owns this batch.
|
107
|
+
# @param id [Integer] The ID of the batch to delete.
|
108
|
+
# @return [ErrorDetail[]]
|
109
|
+
def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
|
110
|
+
delete(path) end
|
111
|
+
|
112
|
+
# Download a single batch file
|
113
|
+
#
|
114
|
+
# Download a single batch file identified by this URL.
|
115
|
+
#
|
116
|
+
# ### Security Policies
|
117
|
+
#
|
118
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
119
|
+
# @param companyId [Integer] The ID of the company that owns this batch
|
120
|
+
# @param batchId [Integer] The ID of the batch object
|
121
|
+
# @param id [Integer] The primary key of this batch file object
|
122
|
+
# @return [Object]
|
123
|
+
def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
|
124
|
+
get(path) end
|
125
|
+
|
126
|
+
# Retrieve a single batch
|
127
|
+
#
|
128
|
+
# Get the batch object identified by this URL. A batch object is a large
|
129
|
+
# collection of API calls stored in a compact file.
|
130
|
+
#
|
131
|
+
# Use this endpoint to retrieve the results or check the status of a batch.
|
132
|
+
#
|
133
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
134
|
+
# processed as quickly as possible in the order it was received. To check the
|
135
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
136
|
+
# operation.
|
137
|
+
#
|
138
|
+
# Because the batch system processes with a degree of concurrency, and
|
139
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
140
|
+
# predict when a batch will complete. If high performance processing is
|
141
|
+
# required, please use the
|
142
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
143
|
+
#
|
144
|
+
# ### Security Policies
|
145
|
+
#
|
146
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
147
|
+
# @param companyId [Integer] The ID of the company that owns this batch
|
148
|
+
# @param id [Integer] The primary key of this batch
|
149
|
+
# @return [Object]
|
150
|
+
def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
|
151
|
+
get(path) end
|
152
|
+
|
153
|
+
# Retrieve all batches for this company
|
154
|
+
#
|
155
|
+
# List all batch objects attached to the specified company.
|
156
|
+
#
|
157
|
+
# A batch object is a large collection of API calls stored in a compact file.
|
158
|
+
#
|
159
|
+
# Search for specific objects using the criteria in the `$filter` parameter;
|
160
|
+
# full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
161
|
+
# Paginate results using the `$top`, `$skip`, and `$orderby` parameters.
|
162
|
+
#
|
163
|
+
# Use [GetBatch](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Batches/GetBatch/)
|
164
|
+
# to retrieve the results, or check the status, of an individual batch.
|
165
|
+
#
|
166
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
167
|
+
# processed as quickly as possible in the order it was received. To check the
|
168
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
169
|
+
# operation.
|
170
|
+
#
|
171
|
+
# Because the batch system processes with a degree of concurrency, and
|
172
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
173
|
+
# predict when a batch will complete. If high performance processing is
|
174
|
+
# required, please use the
|
175
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
176
|
+
#
|
177
|
+
# ### Security Policies
|
178
|
+
#
|
179
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
180
|
+
# @param companyId [Integer] The ID of the company that owns these batches
|
181
|
+
# @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
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
183
|
+
# @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.
|
184
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
185
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
186
|
+
# @return [FetchResult]
|
187
|
+
def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches"
|
188
|
+
get(path, options) end
|
189
|
+
|
190
|
+
# Retrieve all batches
|
191
|
+
#
|
192
|
+
# Get multiple batch objects across all companies.
|
193
|
+
#
|
194
|
+
# A batch object is a large collection of API calls stored in a compact file.
|
195
|
+
#
|
196
|
+
# Search for specific objects using the criteria in the `$filter` parameter;
|
197
|
+
# full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
198
|
+
# Paginate results using the `$top`, `$skip`, and `$orderby` parameters.
|
199
|
+
#
|
200
|
+
# When a batch is created, it is added to the AvaTax Batch Queue and will be
|
201
|
+
# processed as quickly as possible in the order it was received. To check the
|
202
|
+
# status of a batch, fetch the batch and retrieve the results of the batch
|
203
|
+
# operation.
|
204
|
+
#
|
205
|
+
# Because the batch system processes with a degree of concurrency, and
|
206
|
+
# because of batch sizes in the queue vary, AvaTax API is unable to accurately
|
207
|
+
# predict when a batch will complete. If high performance processing is
|
208
|
+
# required, please use the
|
209
|
+
# [CreateTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/).
|
210
|
+
#
|
211
|
+
# ### Security Policies
|
212
|
+
#
|
213
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
|
214
|
+
# @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
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
216
|
+
# @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.
|
217
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
218
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
219
|
+
# @return [FetchResult]
|
220
|
+
def query_batches(options={}) path = "/api/v2/batches"
|
221
|
+
get(path, options) end
|
222
|
+
end
|
223
|
+
end
|
171
224
|
end
|