avatax 20.1.0 → 20.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avatax/client/accounts.rb +180 -116
- data/lib/avatax/client/addresses.rb +34 -34
- data/lib/avatax/client/advancedrules.rb +33 -142
- data/lib/avatax/client/avafileforms.rb +37 -37
- data/lib/avatax/client/batches.rb +122 -122
- data/lib/avatax/client/certexpressinvites.rb +70 -70
- data/lib/avatax/client/certificates.rb +313 -313
- data/lib/avatax/client/companies.rb +234 -232
- data/lib/avatax/client/compliance.rb +2 -2
- data/lib/avatax/client/contacts.rb +58 -58
- data/lib/avatax/client/customers.rb +279 -279
- data/lib/avatax/client/datasources.rb +51 -51
- data/lib/avatax/client/definitions.rb +448 -435
- data/lib/avatax/client/distancethresholds.rb +74 -74
- data/lib/avatax/client/filingcalendars.rb +10 -498
- data/lib/avatax/client/filings.rb +13 -13
- data/lib/avatax/client/firmclientlinkages.rb +54 -54
- data/lib/avatax/client/free.rb +73 -73
- data/lib/avatax/client/fundingrequests.rb +32 -32
- data/lib/avatax/client/items.rb +284 -284
- data/lib/avatax/client/jurisdictionoverrides.rb +70 -70
- data/lib/avatax/client/locations.rb +87 -84
- data/lib/avatax/client/multidocument.rb +294 -234
- data/lib/avatax/client/nexus.rb +283 -143
- data/lib/avatax/client/notifications.rb +48 -48
- data/lib/avatax/client/provisioning.rb +29 -29
- data/lib/avatax/client/registrar.rb +122 -122
- data/lib/avatax/client/reports.rb +63 -63
- data/lib/avatax/client/settings.rb +108 -108
- data/lib/avatax/client/subscriptions.rb +35 -35
- data/lib/avatax/client/taxcodes.rb +72 -72
- data/lib/avatax/client/taxcontent.rb +106 -106
- data/lib/avatax/client/taxrules.rb +122 -122
- data/lib/avatax/client/transactions.rb +654 -639
- data/lib/avatax/client/upcs.rb +63 -63
- data/lib/avatax/client/users.rb +121 -121
- data/lib/avatax/client/utilities.rb +34 -34
- data/lib/avatax/connection.rb +1 -1
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 919361911b2c607af6a9f0e004c164e68f3a66ae2bcb2617a5dc40b0aa881dc8
|
4
|
+
data.tar.gz: 971f945593297cd7b5084b231b93e1b2916e21e5584778cd2035bb39eec1f2d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb706706f40d263e52744854ef1dea8ef62094bfa525b5ba65e4a1b9fae2f9f06f344f80fd723b196a1f3ed6156c6dff1c5018eb5b2f07c400fbebaadbc08f9d
|
7
|
+
data.tar.gz: 87f68816e16ae20f3079bd9c27a058c484f98c90f976a1a636b67fb294888b9b76802669b62caddc7fa6ff050b3e84a6fd237be0c498715a6e7b39d19feddfff
|
@@ -5,166 +5,230 @@ module AvaTax
|
|
5
5
|
|
6
6
|
# Reset this account's license key
|
7
7
|
#
|
8
|
-
# Resets the existing license key for this account to a new key.
|
9
|
-
#
|
10
|
-
# To reset your account, you must specify the ID of the account you wish to reset and confirm the action.
|
11
|
-
#
|
12
|
-
# This API is only available to account administrators for the account in question, and may only be called after
|
13
|
-
# an account has been activated by reading and accepting Avalara's terms and conditions. To activate your account
|
14
|
-
# please log onto the AvaTax website or call the `ActivateAccount` API.
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
8
|
+
# Resets the existing license key for this account to a new key.
|
9
|
+
#
|
10
|
+
# To reset your account, you must specify the ID of the account you wish to reset and confirm the action.
|
11
|
+
#
|
12
|
+
# This API is only available to account administrators for the account in question, and may only be called after
|
13
|
+
# an account has been activated by reading and accepting Avalara's terms and conditions. To activate your account
|
14
|
+
# please log onto the AvaTax website or call the `ActivateAccount` API.
|
15
|
+
#
|
16
|
+
# You can only reset license with 'Default' license key name.
|
17
|
+
# Resetting a license key cannot be undone. Any previous license keys will immediately cease to work when a new key is created.
|
18
|
+
#
|
19
|
+
# When you call this API, all account administrators for this account will receive an email with the newly updated license key.
|
20
|
+
# The email will specify which user reset the license key and it will contain the new key to use to update your connectors.
|
21
|
+
# Note: The reset license key functionality will only be available for existing active license key i.e. when you reset license key for the account, the Default license key will be reset.The reset license key functionality is not available for newly created license keys i.e. license keys other than Default
|
22
|
+
#
|
23
|
+
# ### Security Policies
|
24
|
+
#
|
23
25
|
# * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
24
|
-
# @param id [Integer] The ID of the account you wish to update.
|
25
|
-
# @param model [Object] A request confirming that you wish to reset the license key of this account.
|
26
|
+
# @param id [Integer] The ID of the account you wish to update.
|
27
|
+
# @param model [Object] A request confirming that you wish to reset the license key of this account.
|
26
28
|
# @return [Object]
|
27
29
|
def account_reset_license_key(id, model) path = "/api/v2/accounts/#{id}/resetlicensekey"
|
28
30
|
post(path, model) end
|
29
31
|
|
30
32
|
# Activate an account by accepting terms and conditions
|
31
33
|
#
|
32
|
-
# Activate the account specified by the unique accountId number.
|
33
|
-
#
|
34
|
-
# This activation request can only be called by account administrators. You must indicate
|
35
|
-
# that you have read and accepted Avalara's terms and conditions to call this API.
|
36
|
-
#
|
37
|
-
# Once you have activated your account, use the `AccountResetLicenseKey` API to generate
|
38
|
-
# a license key for your account.
|
39
|
-
#
|
40
|
-
# If you have not read or accepted the terms and conditions, this API call will return the
|
41
|
-
# unchanged account model.
|
42
|
-
#
|
43
|
-
# ### Security Policies
|
44
|
-
#
|
34
|
+
# Activate the account specified by the unique accountId number.
|
35
|
+
#
|
36
|
+
# This activation request can only be called by account administrators. You must indicate
|
37
|
+
# that you have read and accepted Avalara's terms and conditions to call this API.
|
38
|
+
#
|
39
|
+
# Once you have activated your account, use the `AccountResetLicenseKey` API to generate
|
40
|
+
# a license key for your account.
|
41
|
+
#
|
42
|
+
# If you have not read or accepted the terms and conditions, this API call will return the
|
43
|
+
# unchanged account model.
|
44
|
+
#
|
45
|
+
# ### Security Policies
|
46
|
+
#
|
45
47
|
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
46
|
-
# @param id [Integer] The ID of the account to activate
|
47
|
-
# @param model [Object] The activation request
|
48
|
+
# @param id [Integer] The ID of the account to activate
|
49
|
+
# @param model [Object] The activation request
|
48
50
|
# @return [Object]
|
49
51
|
def activate_account(id, model) path = "/api/v2/accounts/#{id}/activate"
|
50
52
|
post(path, model) end
|
51
53
|
|
52
54
|
# Retrieve audit history for an account.
|
53
55
|
#
|
54
|
-
# Retrieve audit trace history for an account.
|
55
|
-
#
|
56
|
-
# Your audit trace history contains a record of all API calls made against the AvaTax REST API. You can use this API to investigate
|
57
|
-
# problems and see exactly what information was sent back and forth between your code and AvaTax.
|
58
|
-
#
|
59
|
-
# When specifying a start and end datetime, please include a valid timezone indicator, such as the "Z" present in the examples for the start and end query parameters.
|
60
|
-
# You can learn more about valid time zone designators at https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators.
|
61
|
-
#
|
62
|
-
# This API enforces limits to the amount of data retrieved. These limits are subject to change.
|
63
|
-
#
|
64
|
-
# * You may request data from a maximum of a one-hour time period.
|
65
|
-
# * The amount of data and number of API calls returned by this API are limited and may be adjusted at any time.
|
66
|
-
# * Old records may be migrated out of immediately available storage. To request older data, please contact your account manager.
|
67
|
-
# * New records must migrate to available storage before they can be retrieved. You may need to wait a period of time before newly created records can be fetched.
|
68
|
-
#
|
69
|
-
# ### Security Policies
|
70
|
-
#
|
56
|
+
# Retrieve audit trace history for an account.
|
57
|
+
#
|
58
|
+
# Your audit trace history contains a record of all API calls made against the AvaTax REST API that returned an error. You can use this API to investigate
|
59
|
+
# problems and see exactly what information was sent back and forth between your code and AvaTax.
|
60
|
+
#
|
61
|
+
# When specifying a start and end datetime, please include a valid timezone indicator, such as the "Z" present in the examples for the start and end query parameters.
|
62
|
+
# You can learn more about valid time zone designators at https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators.
|
63
|
+
#
|
64
|
+
# This API enforces limits to the amount of data retrieved. These limits are subject to change.
|
65
|
+
#
|
66
|
+
# * You may request data from a maximum of a one-hour time period.
|
67
|
+
# * The amount of data and number of API calls returned by this API are limited and may be adjusted at any time.
|
68
|
+
# * Old records may be migrated out of immediately available storage. To request older data, please contact your account manager.
|
69
|
+
# * New records must migrate to available storage before they can be retrieved. You may need to wait a period of time before newly created records can be fetched.
|
70
|
+
#
|
71
|
+
# ### Security Policies
|
72
|
+
#
|
71
73
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
72
|
-
# @param id [Integer] The ID of the account you wish to audit.
|
73
|
-
# @param start [DateTime] The start datetime of audit history you with to retrieve, e.g. "2018-06-08T17:00:00Z". Defaults to the past 15 minutes.
|
74
|
-
# @param end [DateTime] The end datetime of audit history you with to retrieve, e.g. "2018-06-08T17:15:00Z. Defaults to the current time. Maximum of an hour after the start time.
|
75
|
-
# @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.
|
76
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
74
|
+
# @param id [Integer] The ID of the account you wish to audit.
|
75
|
+
# @param start [DateTime] The start datetime of audit history you with to retrieve, e.g. "2018-06-08T17:00:00Z". Defaults to the past 15 minutes.
|
76
|
+
# @param end [DateTime] The end datetime of audit history you with to retrieve, e.g. "2018-06-08T17:15:00Z. Defaults to the current time. Maximum of an hour after the start time.
|
77
|
+
# @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.
|
78
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
77
79
|
# @return [FetchResult]
|
78
80
|
def audit_account(id, options={}) path = "/api/v2/accounts/#{id}/audit"
|
79
81
|
get(path, options) end
|
80
82
|
|
83
|
+
# Create license key for this account
|
84
|
+
#
|
85
|
+
# Creates a new license key for this account.
|
86
|
+
#
|
87
|
+
# To create a license key for your account, you must specify the ID of the account and license key name.
|
88
|
+
#
|
89
|
+
# This API is only available to account administrators for the account in question, and may only be called after
|
90
|
+
# an account has been activated by reading and accepting Avalara's terms and conditions. To activate your account
|
91
|
+
# please log onto the AvaTax website or call the `ActivateAccount` API.
|
92
|
+
#
|
93
|
+
# You will reference this key using license key name. The existing license key will be using 'Default' as license key name.
|
94
|
+
# Hence make sure that the license key name is unique per account considering the existing license key name 'Default'
|
95
|
+
#
|
96
|
+
# ### Security Policies
|
97
|
+
#
|
98
|
+
# * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
99
|
+
# @param id [Integer] The ID of the account you wish to update.
|
100
|
+
# @param model [Object]
|
101
|
+
# @return [Object]
|
102
|
+
def create_license_key(id, model) path = "/api/v2/accounts/#{id}/licensekey"
|
103
|
+
post(path, model) end
|
104
|
+
|
105
|
+
# Delete license key for this account by license key name
|
106
|
+
#
|
107
|
+
# Deletes the license key for this account using license key name.
|
108
|
+
#
|
109
|
+
# To delete a license key for your account, you must specify the accountID of the account and license key name.
|
110
|
+
#
|
111
|
+
# This API is only available to account administrators for the account in question.
|
112
|
+
#
|
113
|
+
# ### Security Policies
|
114
|
+
#
|
115
|
+
# * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
116
|
+
# @param id [Integer] The ID of the account you wish to update.
|
117
|
+
# @param licensekeyname [String] The license key name you wish to update.
|
118
|
+
# @return [ErrorDetail[]]
|
119
|
+
def delete_license_key(id, licensekeyname) path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
|
120
|
+
delete(path) end
|
121
|
+
|
81
122
|
# Retrieve a single account
|
82
123
|
#
|
83
|
-
# Get the account object identified by this URL.
|
84
|
-
# You may use the '$include' parameter to fetch additional nested data:
|
85
|
-
#
|
86
|
-
# * Subscriptions
|
87
|
-
# * Users
|
88
|
-
#
|
89
|
-
# ### Security Policies
|
90
|
-
#
|
124
|
+
# Get the account object identified by this URL.
|
125
|
+
# You may use the '$include' parameter to fetch additional nested data:
|
126
|
+
#
|
127
|
+
# * Subscriptions
|
128
|
+
# * Users
|
129
|
+
#
|
130
|
+
# ### Security Policies
|
131
|
+
#
|
91
132
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
92
|
-
# @param id [Integer] The ID of the account to retrieve
|
93
|
-
# @param include [String] A comma separated list of special fetch options
|
133
|
+
# @param id [Integer] The ID of the account to retrieve
|
134
|
+
# @param include [String] A comma separated list of special fetch options
|
94
135
|
# @return [Object]
|
95
136
|
def get_account(id, options={}) path = "/api/v2/accounts/#{id}"
|
96
137
|
get(path, options) end
|
97
138
|
|
98
139
|
# Get configuration settings for this account
|
99
140
|
#
|
100
|
-
# Retrieve a list of all configuration settings tied to this account.
|
101
|
-
#
|
102
|
-
# Configuration settings provide you with the ability to control features of your account and of your
|
103
|
-
# tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
|
104
|
-
# Avalara internal software configuration values; to store your own account-level settings, please
|
105
|
-
# create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
|
106
|
-
#
|
107
|
-
# Account settings are permanent settings that cannot be deleted. You can set the value of an
|
108
|
-
# account setting to null if desired.
|
109
|
-
#
|
110
|
-
# Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
|
111
|
-
# tax calculation and address resolution, and should only be changed with care.
|
112
|
-
#
|
113
|
-
# ### Security Policies
|
114
|
-
#
|
141
|
+
# Retrieve a list of all configuration settings tied to this account.
|
142
|
+
#
|
143
|
+
# Configuration settings provide you with the ability to control features of your account and of your
|
144
|
+
# tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
|
145
|
+
# Avalara internal software configuration values; to store your own account-level settings, please
|
146
|
+
# create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
|
147
|
+
#
|
148
|
+
# Account settings are permanent settings that cannot be deleted. You can set the value of an
|
149
|
+
# account setting to null if desired.
|
150
|
+
#
|
151
|
+
# Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
|
152
|
+
# tax calculation and address resolution, and should only be changed with care.
|
153
|
+
#
|
154
|
+
# ### Security Policies
|
155
|
+
#
|
115
156
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
116
|
-
# @param id [Integer]
|
157
|
+
# @param id [Integer]
|
117
158
|
# @return [AccountConfigurationModel[]]
|
118
159
|
def get_account_configuration(id) path = "/api/v2/accounts/#{id}/configuration"
|
119
160
|
get(path) end
|
120
161
|
|
121
|
-
# Retrieve
|
122
|
-
#
|
123
|
-
# List all account objects that can be seen by the current user.
|
124
|
-
#
|
125
|
-
# This API lists all accounts you are allowed to see. In general, most users will only be able to see their own account.
|
162
|
+
# Retrieve license key by license key name
|
126
163
|
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
|
134
|
-
|
164
|
+
# ### Security Policies
|
165
|
+
#
|
166
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
167
|
+
# @param id [Integer] The ID of the account to retrieve
|
168
|
+
# @param licensekeyname [String] The ID of the account to retrieve
|
169
|
+
# @return [Object]
|
170
|
+
def get_license_key(id, licensekeyname) path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
|
171
|
+
get(path) end
|
172
|
+
|
173
|
+
# Retrieve all license keys for this account
|
135
174
|
#
|
136
|
-
#
|
175
|
+
# Gets list of all the license keys used by the account.
|
176
|
+
#
|
177
|
+
# ### Security Policies
|
178
|
+
#
|
179
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
180
|
+
# @param id [Integer] The ID of the account to retrieve
|
181
|
+
# @return [AccountLicenseKeyModel[]]
|
182
|
+
def get_license_keys(id) path = "/api/v2/accounts/#{id}/licensekeys"
|
183
|
+
get(path) end
|
184
|
+
|
185
|
+
# Retrieve all accounts
|
137
186
|
#
|
187
|
+
# List all account objects that can be seen by the current user.
|
188
|
+
#
|
189
|
+
# This API lists all accounts you are allowed to see. In general, most users will only be able to see their own account.
|
190
|
+
#
|
191
|
+
# 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/) .
|
192
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
193
|
+
# 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:
|
194
|
+
#
|
195
|
+
# * Subscriptions
|
196
|
+
# * Users
|
197
|
+
#
|
198
|
+
# For more information about filtering in REST, please see the documentation at http://developer.avalara.com/avatax/filtering-in-rest/ .
|
199
|
+
#
|
200
|
+
# ### Security Policies
|
201
|
+
#
|
138
202
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
139
|
-
# @param include [String] A comma separated list of objects to fetch underneath this account. Any object with a URL path underneath this account can be fetched by specifying its name.
|
140
|
-
# @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:* subscriptions, users
|
141
|
-
# @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.
|
142
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
143
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
203
|
+
# @param include [String] A comma separated list of objects to fetch underneath this account. Any object with a URL path underneath this account can be fetched by specifying its name.
|
204
|
+
# @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:* subscriptions, users
|
205
|
+
# @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.
|
206
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
207
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
144
208
|
# @return [FetchResult]
|
145
209
|
def query_accounts(options={}) path = "/api/v2/accounts"
|
146
210
|
get(path, options) end
|
147
211
|
|
148
212
|
# Change configuration settings for this account
|
149
213
|
#
|
150
|
-
# Update configuration settings tied to this account.
|
151
|
-
#
|
152
|
-
# Configuration settings provide you with the ability to control features of your account and of your
|
153
|
-
# tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
|
154
|
-
# Avalara internal software configuration values; to store your own account-level settings, please
|
155
|
-
# create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
|
156
|
-
#
|
157
|
-
# Account settings are permanent settings that cannot be deleted. You can set the value of an
|
158
|
-
# account setting to null if desired.
|
159
|
-
#
|
160
|
-
# Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
|
161
|
-
# tax calculation and address resolution, and should only be changed with care.
|
162
|
-
#
|
163
|
-
# ### Security Policies
|
164
|
-
#
|
214
|
+
# Update configuration settings tied to this account.
|
215
|
+
#
|
216
|
+
# Configuration settings provide you with the ability to control features of your account and of your
|
217
|
+
# tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
|
218
|
+
# Avalara internal software configuration values; to store your own account-level settings, please
|
219
|
+
# create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
|
220
|
+
#
|
221
|
+
# Account settings are permanent settings that cannot be deleted. You can set the value of an
|
222
|
+
# account setting to null if desired.
|
223
|
+
#
|
224
|
+
# Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
|
225
|
+
# tax calculation and address resolution, and should only be changed with care.
|
226
|
+
#
|
227
|
+
# ### Security Policies
|
228
|
+
#
|
165
229
|
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
166
|
-
# @param id [Integer]
|
167
|
-
# @param model [AccountConfigurationModel[]]
|
230
|
+
# @param id [Integer]
|
231
|
+
# @param model [AccountConfigurationModel[]]
|
168
232
|
# @return [AccountConfigurationModel[]]
|
169
233
|
def set_account_configuration(id, model) path = "/api/v2/accounts/#{id}/configuration"
|
170
234
|
post(path, model) end
|
@@ -5,48 +5,48 @@ module AvaTax
|
|
5
5
|
|
6
6
|
# Retrieve geolocation information for a specified address
|
7
7
|
#
|
8
|
-
# Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
|
9
|
-
# provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
|
10
|
-
# to identify how closely this address can be located. If the address cannot be clearly located, use the
|
11
|
-
# 'messages' structure to learn more about problems with this address.
|
12
|
-
# This is the same API as the POST /api/v2/addresses/resolve endpoint.
|
13
|
-
# Both verbs are supported to provide for flexible implementation.
|
14
|
-
#
|
15
|
-
# Inorder to get any evaluation for an address please provide atleast one of the following fields/pairs:
|
16
|
-
# 1. postal code
|
17
|
-
# 2. line1 + city + region
|
18
|
-
# 3. line1 + postal code
|
19
|
-
#
|
20
|
-
# ### Security Policies
|
21
|
-
#
|
22
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
8
|
+
# Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
|
9
|
+
# provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
|
10
|
+
# to identify how closely this address can be located. If the address cannot be clearly located, use the
|
11
|
+
# 'messages' structure to learn more about problems with this address.
|
12
|
+
# This is the same API as the POST /api/v2/addresses/resolve endpoint.
|
13
|
+
# Both verbs are supported to provide for flexible implementation.
|
14
|
+
#
|
15
|
+
# Inorder to get any evaluation for an address please provide atleast one of the following fields/pairs:
|
16
|
+
# 1. postal code
|
17
|
+
# 2. line1 + city + region
|
18
|
+
# 3. line1 + postal code
|
19
|
+
#
|
20
|
+
# ### Security Policies
|
21
|
+
#
|
22
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
23
23
|
# * This API depends on the following active services<br />*Required* (all): AutoAddress.
|
24
|
-
# @param line1 [String] Line 1
|
25
|
-
# @param line2 [String] Line 2
|
26
|
-
# @param line3 [String] Line 3
|
27
|
-
# @param city [String] City
|
28
|
-
# @param region [String] State / Province / Region
|
29
|
-
# @param postalCode [String] Postal Code / Zip Code
|
30
|
-
# @param country [String] Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)
|
31
|
-
# @param textCase [String] selectable text case for address validation (See TextCase::* for a list of allowable values)
|
24
|
+
# @param line1 [String] Line 1
|
25
|
+
# @param line2 [String] Line 2
|
26
|
+
# @param line3 [String] Line 3
|
27
|
+
# @param city [String] City
|
28
|
+
# @param region [String] State / Province / Region
|
29
|
+
# @param postalCode [String] Postal Code / Zip Code
|
30
|
+
# @param country [String] Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)
|
31
|
+
# @param textCase [String] selectable text case for address validation (See TextCase::* for a list of allowable values)
|
32
32
|
# @return [Object]
|
33
33
|
def resolve_address(options={}) path = "/api/v2/addresses/resolve"
|
34
34
|
get(path, options) end
|
35
35
|
|
36
36
|
# Retrieve geolocation information for a specified address
|
37
37
|
#
|
38
|
-
# Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
|
39
|
-
# provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
|
40
|
-
# to identify how closely this address can be located. If the address cannot be clearly located, use the
|
41
|
-
# 'messages' structure to learn more about problems with this address.
|
42
|
-
# This is the same API as the GET /api/v2/addresses/resolve endpoint.
|
43
|
-
# Both verbs are supported to provide for flexible implementation.
|
44
|
-
#
|
45
|
-
# ### Security Policies
|
46
|
-
#
|
47
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
38
|
+
# Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
|
39
|
+
# provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
|
40
|
+
# to identify how closely this address can be located. If the address cannot be clearly located, use the
|
41
|
+
# 'messages' structure to learn more about problems with this address.
|
42
|
+
# This is the same API as the GET /api/v2/addresses/resolve endpoint.
|
43
|
+
# Both verbs are supported to provide for flexible implementation.
|
44
|
+
#
|
45
|
+
# ### Security Policies
|
46
|
+
#
|
47
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
48
48
|
# * This API depends on the following active services<br />*Required* (all): AutoAddress.
|
49
|
-
# @param model [Object] The address to resolve
|
49
|
+
# @param model [Object] The address to resolve
|
50
50
|
# @return [Object]
|
51
51
|
def resolve_address_post(model) path = "/api/v2/addresses/resolve"
|
52
52
|
post(path, model) end
|
@@ -3,161 +3,52 @@ module AvaTax
|
|
3
3
|
module AdvancedRules
|
4
4
|
|
5
5
|
|
6
|
-
#
|
6
|
+
# Create a lookup file for a company
|
7
7
|
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# @param
|
12
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
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
|
13
12
|
# @return [Object]
|
14
|
-
def
|
15
|
-
path
|
16
|
-
post(path)
|
17
|
-
end
|
13
|
+
def create_company_lookup_file(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
|
14
|
+
post(path, model) end
|
18
15
|
|
19
|
-
|
20
|
-
# Create an advanced rule.
|
21
|
-
#
|
22
|
-
# This API is available by invite only and implementation support is required.
|
23
|
-
# Please contact your Customer Account Manager if you are interested in using
|
24
|
-
# Advanced Rules in your AvaTax integration.
|
25
|
-
# @param accountId [Integer] The ID of the account that will own the Advanced Rule.
|
26
|
-
# @param scriptType [String] The script transform type, Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
27
|
-
# @param crashBehavior [String] The behavior the script should take if it crashes: Fail or Proceed. (See AdvancedRuleCrashBehavior::* for a list of allowable values)
|
28
|
-
# @param file [Object] The JavaScript file containing the advanced rule.
|
29
|
-
# @return [String]
|
30
|
-
def create_advanced_rule_script(accountId, scriptType, options={})
|
31
|
-
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}"
|
32
|
-
post(path, options)
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
# Create a lookup table for an advanced rule
|
37
|
-
#
|
38
|
-
# This API is available by invite only and implementation support is required.
|
39
|
-
# Please contact your Customer Account Manager if you are interested in using
|
40
|
-
# Advanced Rules in your AvaTax integration.
|
41
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
42
|
-
# @param csvTableName [String] The name to assign the CSV lookup table.
|
43
|
-
# @param file [Object] A CSV file containing lookup data for an advanced rule.
|
44
|
-
# @return [String]
|
45
|
-
def create_advanced_rule_table(accountId, csvTableName)
|
46
|
-
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
47
|
-
post(path)
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
# Delete an account's active advanced rule
|
16
|
+
# Delete a lookup file
|
52
17
|
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
57
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
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
|
58
21
|
# @return [ErrorDetail[]]
|
59
|
-
def
|
60
|
-
path
|
61
|
-
delete(path)
|
62
|
-
end
|
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
|
22
|
+
def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
23
|
+
delete(path) end
|
119
24
|
|
120
|
-
|
121
|
-
# Get an advanced rule lookup table for an account
|
25
|
+
# Get the lookup files for a company
|
122
26
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
# @
|
127
|
-
|
128
|
-
|
129
|
-
def get_advanced_rule_table(accountId, csvTableName)
|
130
|
-
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
131
|
-
get(path)
|
132
|
-
end
|
27
|
+
#
|
28
|
+
# @param accountId [Integer] The account ID for the company
|
29
|
+
# @param companyId [Integer] The ID of the company for which to retrieve lookup files
|
30
|
+
# @return [FetchResult]
|
31
|
+
def get_company_lookup_files(accountId, companyId) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
|
32
|
+
get(path) end
|
133
33
|
|
134
|
-
|
135
|
-
# Get all advanced rule lookup tables for an account
|
34
|
+
# Get a lookup file for an accountId and companyLookupFileId
|
136
35
|
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
36
|
+
#
|
37
|
+
# @param accountId [Integer] The ID of the account for the lookup file
|
38
|
+
# @param id [String] The unique ID/GUID of the company lookup file to return
|
141
39
|
# @return [Object]
|
142
|
-
def
|
143
|
-
path
|
144
|
-
get(path)
|
145
|
-
end
|
146
|
-
|
40
|
+
def get_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
41
|
+
get(path) end
|
147
42
|
|
148
|
-
#
|
43
|
+
# Update a lookup file
|
149
44
|
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
# @param
|
154
|
-
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
45
|
+
#
|
46
|
+
# @param accountId [Integer] The ID of the account for the company the lookup file is for
|
47
|
+
# @param id [String] The unique ID/GUID of the company lookup file to be updated
|
48
|
+
# @param model [Object] The new values to update the lookup file
|
155
49
|
# @return [Object]
|
156
|
-
def
|
157
|
-
path
|
158
|
-
post(path)
|
159
|
-
end
|
160
|
-
|
50
|
+
def update_lookup_file(accountId, id, model) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
|
51
|
+
put(path, model) end
|
161
52
|
end
|
162
53
|
end
|
163
54
|
end
|