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
@@ -1,56 +1,56 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Onboarding
|
4
|
-
|
5
|
-
|
6
|
-
# Request a new Avalara account
|
7
|
-
#
|
8
|
-
# This API is for use by partner onboarding services customers only.
|
9
|
-
#
|
10
|
-
# Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features
|
11
|
-
# of AvaTax. These partners can create accounts for new customers using this API.
|
12
|
-
#
|
13
|
-
# Calling this API creates an account with the specified product subscriptions, but does not configure billing.
|
14
|
-
# The customer will receive information from Avalara about how to configure billing for their account.
|
15
|
-
# You should call this API when a customer has requested to begin using Avalara services.
|
16
|
-
#
|
17
|
-
# If the newly created account owner wishes, they can confirm that they have read and agree to the Avalara
|
18
|
-
# terms and conditions. If they do so, they can receive a license key as part of this API and their
|
19
|
-
# API will be created in `Active` status. If the customer has not yet read and accepted these terms and
|
20
|
-
# conditions, the account will be created in `New` status and they can receive a license key by logging
|
21
|
-
# onto the AvaTax website and reviewing terms and conditions online.
|
22
|
-
#
|
23
|
-
# ### Security Policies
|
24
|
-
#
|
25
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
26
|
-
# * This API is available by invitation only.
|
27
|
-
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
|
28
|
-
# @param model [Object] Information about the account you wish to create and the selected product offerings.
|
29
|
-
# @return [Object]
|
30
|
-
def request_new_account(model)
|
31
|
-
path = "/api/v2/accounts/request"
|
32
|
-
post(path, model)
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
# Request a new entitilement to an existing customer
|
37
|
-
#
|
38
|
-
# This API is for use by partner onboarding services customers only. This will allow the partners to allow
|
39
|
-
# the add new entitlement to an existing customer
|
40
|
-
#
|
41
|
-
# ### Security Policies
|
42
|
-
#
|
43
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
44
|
-
# * This API is available by invitation only.
|
45
|
-
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
|
46
|
-
# @param id [Integer] The avatax account id of the customer
|
47
|
-
# @param offer [String] The offer to be added to an already existing customer
|
48
|
-
# @return [Object]
|
49
|
-
def request_new_entitlement(id, offer)
|
50
|
-
path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
|
51
|
-
post(path)
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Onboarding
|
4
|
+
|
5
|
+
|
6
|
+
# Request a new Avalara account
|
7
|
+
#
|
8
|
+
# This API is for use by partner onboarding services customers only.
|
9
|
+
#
|
10
|
+
# Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features
|
11
|
+
# of AvaTax. These partners can create accounts for new customers using this API.
|
12
|
+
#
|
13
|
+
# Calling this API creates an account with the specified product subscriptions, but does not configure billing.
|
14
|
+
# The customer will receive information from Avalara about how to configure billing for their account.
|
15
|
+
# You should call this API when a customer has requested to begin using Avalara services.
|
16
|
+
#
|
17
|
+
# If the newly created account owner wishes, they can confirm that they have read and agree to the Avalara
|
18
|
+
# terms and conditions. If they do so, they can receive a license key as part of this API and their
|
19
|
+
# API will be created in `Active` status. If the customer has not yet read and accepted these terms and
|
20
|
+
# conditions, the account will be created in `New` status and they can receive a license key by logging
|
21
|
+
# onto the AvaTax website and reviewing terms and conditions online.
|
22
|
+
#
|
23
|
+
# ### Security Policies
|
24
|
+
#
|
25
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
26
|
+
# * This API is available by invitation only.
|
27
|
+
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
|
28
|
+
# @param model [Object] Information about the account you wish to create and the selected product offerings.
|
29
|
+
# @return [Object]
|
30
|
+
def request_new_account(model)
|
31
|
+
path = "/api/v2/accounts/request"
|
32
|
+
post(path, model)
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
# Request a new entitilement to an existing customer
|
37
|
+
#
|
38
|
+
# This API is for use by partner onboarding services customers only. This will allow the partners to allow
|
39
|
+
# the add new entitlement to an existing customer
|
40
|
+
#
|
41
|
+
# ### Security Policies
|
42
|
+
#
|
43
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
44
|
+
# * This API is available by invitation only.
|
45
|
+
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
|
46
|
+
# @param id [Integer] The avatax account id of the customer
|
47
|
+
# @param offer [String] The offer to be added to an already existing customer
|
48
|
+
# @return [Object]
|
49
|
+
def request_new_entitlement(id, offer)
|
50
|
+
path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
|
51
|
+
post(path)
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
56
|
end
|
@@ -1,22 +1,22 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module PointOfSale
|
4
|
-
|
5
|
-
|
6
|
-
# Point of sale data file generation
|
7
|
-
#
|
8
|
-
# Builds a point-of-sale data file containing tax rates and rules for items and locations that can be used
|
9
|
-
# to correctly calculate tax in the event a point-of-sale device is not able to reach AvaTax.
|
10
|
-
# This data file can be customized for specific partner devices and usage conditions.
|
11
|
-
# The result of this API is the file you requested in the format you requested using the 'responseType' field.
|
12
|
-
# This API builds the file on demand, and is limited to files with no more than 7500 scenarios.
|
13
|
-
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
14
|
-
# @return [Object]
|
15
|
-
def build_point_of_sale_data_file(model)
|
16
|
-
path = "/api/v2/pointofsaledata/build"
|
17
|
-
post(path, model)
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module PointOfSale
|
4
|
+
|
5
|
+
|
6
|
+
# Point of sale data file generation
|
7
|
+
#
|
8
|
+
# Builds a point-of-sale data file containing tax rates and rules for items and locations that can be used
|
9
|
+
# to correctly calculate tax in the event a point-of-sale device is not able to reach AvaTax.
|
10
|
+
# This data file can be customized for specific partner devices and usage conditions.
|
11
|
+
# The result of this API is the file you requested in the format you requested using the 'responseType' field.
|
12
|
+
# This API builds the file on demand, and is limited to files with no more than 7500 scenarios.
|
13
|
+
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
14
|
+
# @return [Object]
|
15
|
+
def build_point_of_sale_data_file(model)
|
16
|
+
path = "/api/v2/pointofsaledata/build"
|
17
|
+
post(path, model)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
22
|
end
|
@@ -25,10 +25,11 @@ module AvaTax
|
|
25
25
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
26
26
|
# * This API is available by invitation only.
|
27
27
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
|
28
|
+
# Swagger Name: AvaTaxClient
|
28
29
|
# @param model [Object] Information about the account you wish to create and the selected product offerings.
|
29
30
|
# @return [Object]
|
30
31
|
def request_new_account(model) path = "/api/v2/accounts/request"
|
31
|
-
post(path, model) end
|
32
|
+
post(path, model, {}, "22.2.0") end
|
32
33
|
|
33
34
|
# Request a new entitilement to an existing customer
|
34
35
|
#
|
@@ -40,11 +41,12 @@ module AvaTax
|
|
40
41
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
41
42
|
# * This API is available by invitation only.
|
42
43
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
|
44
|
+
# Swagger Name: AvaTaxClient
|
43
45
|
# @param id [Integer] The avatax account id of the customer
|
44
46
|
# @param offer [String] The offer to be added to an already existing customer
|
45
47
|
# @return [Object]
|
46
48
|
def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
|
47
|
-
post(path) end
|
49
|
+
post(path, {}, "22.2.0") end
|
48
50
|
end
|
49
51
|
end
|
50
52
|
end
|
@@ -14,10 +14,11 @@ module AvaTax
|
|
14
14
|
# ### Security Policies
|
15
15
|
#
|
16
16
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
17
|
+
# Swagger Name: AvaTaxClient
|
17
18
|
# @param model [Object] The account you wish to create.
|
18
19
|
# @return [AccountModel[]]
|
19
20
|
def create_account(model) path = "/api/v2/accounts"
|
20
|
-
post(path, model) end
|
21
|
+
post(path, model, {}, "22.2.0") end
|
21
22
|
|
22
23
|
# Create new notifications.
|
23
24
|
#
|
@@ -39,10 +40,11 @@ module AvaTax
|
|
39
40
|
#
|
40
41
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
41
42
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
|
43
|
+
# Swagger Name: AvaTaxClient
|
42
44
|
# @param model [NotificationModel[]] The notifications you wish to create.
|
43
45
|
# @return [NotificationModel[]]
|
44
46
|
def create_notifications(model) path = "/api/v2/notifications"
|
45
|
-
post(path, model) end
|
47
|
+
post(path, model, {}, "22.2.0") end
|
46
48
|
|
47
49
|
# Create a new subscription
|
48
50
|
#
|
@@ -55,11 +57,12 @@ module AvaTax
|
|
55
57
|
# ### Security Policies
|
56
58
|
#
|
57
59
|
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
60
|
+
# Swagger Name: AvaTaxClient
|
58
61
|
# @param accountId [Integer] The ID of the account that owns this subscription.
|
59
62
|
# @param model [SubscriptionModel[]] The subscription you wish to create.
|
60
63
|
# @return [SubscriptionModel[]]
|
61
64
|
def create_subscriptions(accountId, model) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
62
|
-
post(path, model) end
|
65
|
+
post(path, model, {}, "22.2.0") end
|
63
66
|
|
64
67
|
# Delete a single account
|
65
68
|
#
|
@@ -72,10 +75,11 @@ module AvaTax
|
|
72
75
|
# ### Security Policies
|
73
76
|
#
|
74
77
|
# * This API requires the user role SystemAdmin.
|
78
|
+
# Swagger Name: AvaTaxClient
|
75
79
|
# @param id [Integer] The ID of the account you wish to delete.
|
76
80
|
# @return [ErrorDetail[]]
|
77
81
|
def delete_account(id) path = "/api/v2/accounts/#{id}"
|
78
|
-
delete(path) end
|
82
|
+
delete(path, {}, "22.2.0") end
|
79
83
|
|
80
84
|
# Delete a single notification.
|
81
85
|
#
|
@@ -94,10 +98,11 @@ module AvaTax
|
|
94
98
|
#
|
95
99
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
96
100
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
|
101
|
+
# Swagger Name: AvaTaxClient
|
97
102
|
# @param id [Integer] The id of the notification you wish to delete.
|
98
103
|
# @return [ErrorDetail[]]
|
99
104
|
def delete_notification(id) path = "/api/v2/notifications/#{id}"
|
100
|
-
delete(path) end
|
105
|
+
delete(path, {}, "22.2.0") end
|
101
106
|
|
102
107
|
# Delete a single subscription
|
103
108
|
#
|
@@ -109,21 +114,23 @@ module AvaTax
|
|
109
114
|
# ### Security Policies
|
110
115
|
#
|
111
116
|
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
117
|
+
# Swagger Name: AvaTaxClient
|
112
118
|
# @param accountId [Integer] The ID of the account that owns this subscription.
|
113
119
|
# @param id [Integer] The ID of the subscription you wish to delete.
|
114
120
|
# @return [ErrorDetail[]]
|
115
121
|
def delete_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
116
|
-
delete(path) end
|
122
|
+
delete(path, {}, "22.2.0") end
|
117
123
|
|
118
124
|
# Retrieve List of Accounts by Account Migration Status
|
119
125
|
#
|
120
126
|
# ### Security Policies
|
121
127
|
#
|
122
128
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
129
|
+
# Swagger Name: AvaTaxClient
|
123
130
|
# @param writeMode [String] (See TssAccountMigrationId::* for a list of allowable values)
|
124
131
|
# @return [Object]
|
125
132
|
def list_accounts_by_tss_write_mode(writeMode) path = "/api/v2/accounts/ListAccountsByTssWriteMode/#{writeMode}"
|
126
|
-
get(path) end
|
133
|
+
get(path, {}, "22.2.0") end
|
127
134
|
|
128
135
|
# Reset a user's password programmatically
|
129
136
|
#
|
@@ -138,12 +145,13 @@ module AvaTax
|
|
138
145
|
#
|
139
146
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
140
147
|
# * This API is available to Avalara system-level (registrar-level) users only.
|
148
|
+
# Swagger Name: AvaTaxClient
|
141
149
|
# @param userId [Integer] The unique ID of the user whose password will be changed
|
142
150
|
# @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
|
143
151
|
# @param model [Object] The new password for this user
|
144
152
|
# @return [String]
|
145
153
|
def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
|
146
|
-
post(path, model, options) end
|
154
|
+
post(path, model, options, "22.2.0") end
|
147
155
|
|
148
156
|
# Update a single account
|
149
157
|
#
|
@@ -155,11 +163,12 @@ module AvaTax
|
|
155
163
|
# ### Security Policies
|
156
164
|
#
|
157
165
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
166
|
+
# Swagger Name: AvaTaxClient
|
158
167
|
# @param id [Integer] The ID of the account you wish to update.
|
159
168
|
# @param model [Object] The account object you wish to update.
|
160
169
|
# @return [Object]
|
161
170
|
def update_account(id, model) path = "/api/v2/accounts/#{id}"
|
162
|
-
put(path, model) end
|
171
|
+
put(path, model, {}, "22.2.0") end
|
163
172
|
|
164
173
|
# Update a single notification.
|
165
174
|
#
|
@@ -178,11 +187,12 @@ module AvaTax
|
|
178
187
|
#
|
179
188
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
180
189
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
|
190
|
+
# Swagger Name: AvaTaxClient
|
181
191
|
# @param id [Integer] The id of the notification you wish to update.
|
182
192
|
# @param model [Object] The notification object you wish to update.
|
183
193
|
# @return [Object]
|
184
194
|
def update_notification(id, model) path = "/api/v2/notifications/#{id}"
|
185
|
-
put(path, model) end
|
195
|
+
put(path, model, {}, "22.2.0") end
|
186
196
|
|
187
197
|
# Update a single subscription
|
188
198
|
#
|
@@ -198,12 +208,13 @@ module AvaTax
|
|
198
208
|
# ### Security Policies
|
199
209
|
#
|
200
210
|
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
211
|
+
# Swagger Name: AvaTaxClient
|
201
212
|
# @param accountId [Integer] The ID of the account that this subscription belongs to.
|
202
213
|
# @param id [Integer] The ID of the subscription you wish to update
|
203
214
|
# @param model [Object] The subscription you wish to update.
|
204
215
|
# @return [Object]
|
205
216
|
def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
206
|
-
put(path, model) end
|
217
|
+
put(path, model, {}, "22.2.0") end
|
207
218
|
end
|
208
219
|
end
|
209
220
|
end
|
@@ -23,10 +23,11 @@ module AvaTax
|
|
23
23
|
# ### Security Policies
|
24
24
|
#
|
25
25
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
26
|
+
# Swagger Name: AvaTaxClient
|
26
27
|
# @param id [Integer] The unique ID number of this report
|
27
28
|
# @return [Object]
|
28
29
|
def download_report(id) path = "/api/v2/reports/#{id}/attachment"
|
29
|
-
get(path) end
|
30
|
+
get(path, {}, "22.2.0") end
|
30
31
|
|
31
32
|
# Retrieve a single report
|
32
33
|
#
|
@@ -41,10 +42,11 @@ module AvaTax
|
|
41
42
|
# * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
|
42
43
|
#
|
43
44
|
# This API call returns information about any report type.
|
45
|
+
# Swagger Name: AvaTaxClient
|
44
46
|
# @param id [Integer] The unique ID number of the report to retrieve
|
45
47
|
# @return [Object]
|
46
48
|
def get_report(id) path = "/api/v2/reports/#{id}"
|
47
|
-
get(path) end
|
49
|
+
get(path, {}, "22.2.0") end
|
48
50
|
|
49
51
|
# Initiate an ExportDocumentLine report task
|
50
52
|
#
|
@@ -72,11 +74,12 @@ module AvaTax
|
|
72
74
|
# ### Security Policies
|
73
75
|
#
|
74
76
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
77
|
+
# Swagger Name: AvaTaxClient
|
75
78
|
# @param companyId [Integer] The unique ID number of the company to report on.
|
76
79
|
# @param model [Object] Options that may be configured to customize the report.
|
77
80
|
# @return [ReportModel[]]
|
78
81
|
def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
|
79
|
-
post(path, model) end
|
82
|
+
post(path, model, {}, "22.2.0") end
|
80
83
|
|
81
84
|
# List all report tasks for account
|
82
85
|
#
|
@@ -95,13 +98,14 @@ module AvaTax
|
|
95
98
|
# ### Security Policies
|
96
99
|
#
|
97
100
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
101
|
+
# Swagger Name: AvaTaxClient
|
98
102
|
# @param companyId [Integer] The id of the company for which to get reports.
|
99
103
|
# @param pageKey [String] Provide a page key to retrieve the next page of results.
|
100
104
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
101
105
|
# @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.
|
102
106
|
# @return [FetchResult]
|
103
107
|
def list_reports(options={}) path = "/api/v2/reports"
|
104
|
-
get(path, options) end
|
108
|
+
get(path, options, "22.2.0") end
|
105
109
|
end
|
106
110
|
end
|
107
111
|
end
|
@@ -24,11 +24,12 @@ module AvaTax
|
|
24
24
|
# ### Security Policies
|
25
25
|
#
|
26
26
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
27
|
+
# Swagger Name: AvaTaxClient
|
27
28
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
28
29
|
# @param model [SettingModel[]] The setting you wish to create.
|
29
30
|
# @return [SettingModel[]]
|
30
31
|
def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
|
31
|
-
post(path, model) end
|
32
|
+
post(path, model, {}, "22.2.0") end
|
32
33
|
|
33
34
|
# Delete a single setting
|
34
35
|
#
|
@@ -46,11 +47,12 @@ module AvaTax
|
|
46
47
|
# ### Security Policies
|
47
48
|
#
|
48
49
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
50
|
+
# Swagger Name: AvaTaxClient
|
49
51
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
50
52
|
# @param id [Integer] The ID of the setting you wish to delete.
|
51
53
|
# @return [ErrorDetail[]]
|
52
54
|
def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
53
|
-
delete(path) end
|
55
|
+
delete(path, {}, "22.2.0") end
|
54
56
|
|
55
57
|
# Retrieve a single setting
|
56
58
|
#
|
@@ -68,11 +70,12 @@ module AvaTax
|
|
68
70
|
# ### Security Policies
|
69
71
|
#
|
70
72
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
73
|
+
# Swagger Name: AvaTaxClient
|
71
74
|
# @param companyId [Integer] The ID of the company that owns this setting
|
72
75
|
# @param id [Integer] The primary key of this setting
|
73
76
|
# @return [Object]
|
74
77
|
def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
75
|
-
get(path) end
|
78
|
+
get(path, {}, "22.2.0") end
|
76
79
|
|
77
80
|
# Retrieve all settings for this company
|
78
81
|
#
|
@@ -93,6 +96,7 @@ module AvaTax
|
|
93
96
|
# ### Security Policies
|
94
97
|
#
|
95
98
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
99
|
+
# Swagger Name: AvaTaxClient
|
96
100
|
# @param companyId [Integer] The ID of the company that owns these settings
|
97
101
|
# @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:* modifiedDate, ModifiedUserId
|
98
102
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -101,7 +105,7 @@ module AvaTax
|
|
101
105
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
102
106
|
# @return [FetchResult]
|
103
107
|
def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
|
104
|
-
get(path, options) end
|
108
|
+
get(path, options, "22.2.0") end
|
105
109
|
|
106
110
|
# Retrieve all settings
|
107
111
|
#
|
@@ -122,6 +126,7 @@ module AvaTax
|
|
122
126
|
# ### Security Policies
|
123
127
|
#
|
124
128
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
129
|
+
# Swagger Name: AvaTaxClient
|
125
130
|
# @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:* modifiedDate, ModifiedUserId
|
126
131
|
# @param include [String] A comma separated list of additional data to retrieve.
|
127
132
|
# @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.
|
@@ -129,7 +134,7 @@ module AvaTax
|
|
129
134
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
130
135
|
# @return [FetchResult]
|
131
136
|
def query_settings(options={}) path = "/api/v2/settings"
|
132
|
-
get(path, options) end
|
137
|
+
get(path, options, "22.2.0") end
|
133
138
|
|
134
139
|
# Update a single setting
|
135
140
|
#
|
@@ -151,12 +156,13 @@ module AvaTax
|
|
151
156
|
# ### Security Policies
|
152
157
|
#
|
153
158
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
159
|
+
# Swagger Name: AvaTaxClient
|
154
160
|
# @param companyId [Integer] The ID of the company that this setting belongs to.
|
155
161
|
# @param id [Integer] The ID of the setting you wish to update
|
156
162
|
# @param model [Object] The setting you wish to update.
|
157
163
|
# @return [Object]
|
158
164
|
def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
159
|
-
put(path, model) end
|
165
|
+
put(path, model, {}, "22.2.0") end
|
160
166
|
end
|
161
167
|
end
|
162
168
|
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module ShippingVerification
|
4
|
+
|
5
|
+
|
6
|
+
# Removes the transaction from consideration when evaluating regulations that span multiple transactions.
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# Swagger Name: AvaTaxBeverageClient
|
10
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
11
|
+
# @param transactionCode [String] The transaction code to retrieve
|
12
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
13
|
+
# @return []
|
14
|
+
def deregister_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
|
15
|
+
delete(path, options, "") end
|
16
|
+
|
17
|
+
# Registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
|
18
|
+
#
|
19
|
+
#
|
20
|
+
# Swagger Name: AvaTaxBeverageClient
|
21
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
22
|
+
# @param transactionCode [String] The transaction code to retrieve
|
23
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
24
|
+
# @return []
|
25
|
+
def register_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
|
26
|
+
put(path, options, "") end
|
27
|
+
|
28
|
+
# Evaluates a transaction against a set of direct-to-consumer shipping regulations and, if compliant, registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
|
29
|
+
#
|
30
|
+
#
|
31
|
+
# Swagger Name: AvaTaxBeverageClient
|
32
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
33
|
+
# @param transactionCode [String] The transaction code to retrieve
|
34
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
35
|
+
# @return [Object]
|
36
|
+
def register_shipment_if_compliant(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registerIfCompliant"
|
37
|
+
put(path, options, "") end
|
38
|
+
|
39
|
+
# Evaluates a transaction against a set of direct-to-consumer shipping regulations.
|
40
|
+
#
|
41
|
+
# The transaction and its lines must meet the following criteria in order to be evaluated:
|
42
|
+
# * The transaction must be recorded. Using a type of *SalesInvoice* is recommended.
|
43
|
+
# * A parameter with the name *AlcoholRouteType* must be specified and the value must be one of the following: '*DTC*', '*Retailer DTC*'
|
44
|
+
# * A parameter with the name *RecipientName* must be specified and the value must be the name of the recipient.
|
45
|
+
# * Each alcohol line must include a *ContainerSize* parameter that describes the volume of a single container. Use the *unit* field to specify one of the following units: '*Litre*', '*Millilitre*', '*gallon (US fluid)*', '*quart (US fluid)*', '*ounce (fluid US customary)*'
|
46
|
+
# * Each alcohol line must include a *PackSize* parameter that describes the number of containers in a pack. Specify *Count* in the *unit* field.
|
47
|
+
#
|
48
|
+
# Optionally, the transaction and its lines may use the following parameters:
|
49
|
+
# * The *ShipDate* parameter may be used if the date of shipment is different than the date of the transaction. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
50
|
+
# * The *RecipientDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
51
|
+
# * The *PurchaserDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
52
|
+
# * The *SalesLocation* parameter may be used to describe whether the sale was made *OnSite* or *OffSite*. *OffSite* is the default value.
|
53
|
+
# * The *AlcoholContent* parameter may be used to describe the alcohol percentage by volume of the item. Specify *Percentage* in the *unit* field.
|
54
|
+
#
|
55
|
+
# **Security Policies**
|
56
|
+
# This API depends on all of the following active subscriptions: *AvaAlcohol, AutoAddress, AvaTaxPro*
|
57
|
+
# Swagger Name: AvaTaxBeverageClient
|
58
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
59
|
+
# @param transactionCode [String] The transaction code to retrieve
|
60
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
61
|
+
# @return [Object]
|
62
|
+
def verify_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/verify"
|
63
|
+
get(path, options, "") end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -12,11 +12,12 @@ module AvaTax
|
|
12
12
|
# ### Security Policies
|
13
13
|
#
|
14
14
|
# * 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.
|
15
|
+
# Swagger Name: AvaTaxClient
|
15
16
|
# @param accountId [Integer] The ID of the account that owns this subscription
|
16
17
|
# @param id [Integer] The primary key of this subscription
|
17
18
|
# @return [Object]
|
18
19
|
def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
19
|
-
get(path) end
|
20
|
+
get(path, {}, "22.2.0") end
|
20
21
|
|
21
22
|
# Retrieve subscriptions for this account
|
22
23
|
#
|
@@ -30,6 +31,7 @@ module AvaTax
|
|
30
31
|
# ### Security Policies
|
31
32
|
#
|
32
33
|
# * 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.
|
34
|
+
# Swagger Name: AvaTaxClient
|
33
35
|
# @param accountId [Integer] The ID of the account that owns these subscriptions
|
34
36
|
# @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:* subscriptionDescription
|
35
37
|
# @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.
|
@@ -37,7 +39,7 @@ module AvaTax
|
|
37
39
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
38
40
|
# @return [FetchResult]
|
39
41
|
def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
40
|
-
get(path, options) end
|
42
|
+
get(path, options, "22.2.0") end
|
41
43
|
|
42
44
|
# Retrieve all subscriptions
|
43
45
|
#
|
@@ -51,13 +53,14 @@ module AvaTax
|
|
51
53
|
# ### Security Policies
|
52
54
|
#
|
53
55
|
# * 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.
|
56
|
+
# Swagger Name: AvaTaxClient
|
54
57
|
# @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:* subscriptionDescription
|
55
58
|
# @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.
|
56
59
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
57
60
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
58
61
|
# @return [FetchResult]
|
59
62
|
def query_subscriptions(options={}) path = "/api/v2/subscriptions"
|
60
|
-
get(path, options) end
|
63
|
+
get(path, options, "22.2.0") end
|
61
64
|
end
|
62
65
|
end
|
63
66
|
end
|