avatax 21.12.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 +11 -11
- data/lib/avatax/client/addresses.rb +2 -2
- data/lib/avatax/client/advancedrules.rb +5 -5
- data/lib/avatax/client/avafileforms.rb +5 -5
- data/lib/avatax/client/batches.rb +8 -8
- data/lib/avatax/client/certexpressinvites.rb +3 -3
- data/lib/avatax/client/certificates.rb +15 -15
- data/lib/avatax/client/companies.rb +40 -21
- data/lib/avatax/client/compliance.rb +1 -1
- data/lib/avatax/client/contacts.rb +6 -6
- data/lib/avatax/client/customers.rb +13 -13
- data/lib/avatax/client/datasources.rb +6 -6
- data/lib/avatax/client/definitions.rb +70 -70
- data/lib/avatax/client/distancethresholds.rb +6 -6
- data/lib/avatax/client/ecms.rb +73 -73
- data/lib/avatax/client/ecommercetoken.rb +2 -2
- data/lib/avatax/client/errortransactions.rb +61 -61
- data/lib/avatax/client/filingcalendars.rb +3 -3
- data/lib/avatax/client/filings.rb +2 -2
- data/lib/avatax/client/firmclientlinkages.rb +9 -9
- data/lib/avatax/client/free.rb +1 -1
- data/lib/avatax/client/fundingrequests.rb +2 -2
- data/lib/avatax/client/items.rb +25 -25
- data/lib/avatax/client/jurisdictionoverrides.rb +6 -6
- data/lib/avatax/client/locations.rb +12 -12
- data/lib/avatax/client/multidocument.rb +10 -10
- data/lib/avatax/client/nexus.rb +15 -15
- data/lib/avatax/client/notices.rb +4 -4
- data/lib/avatax/client/notifications.rb +3 -3
- data/lib/avatax/client/onboarding.rb +55 -55
- data/lib/avatax/client/pointofsale.rb +21 -21
- data/lib/avatax/client/provisioning.rb +2 -2
- data/lib/avatax/client/registrar.rb +11 -11
- data/lib/avatax/client/reports.rb +4 -4
- data/lib/avatax/client/settings.rb +6 -6
- data/lib/avatax/client/subscriptions.rb +3 -3
- data/lib/avatax/client/taxcodes.rb +6 -6
- data/lib/avatax/client/taxcontent.rb +5 -5
- data/lib/avatax/client/taxprofiles.rb +42 -42
- data/lib/avatax/client/taxrules.rb +6 -6
- data/lib/avatax/client/transactions.rb +21 -21
- data/lib/avatax/client/upcs.rb +6 -6
- data/lib/avatax/client/userdefinedfields.rb +3 -3
- data/lib/avatax/client/users.rb +8 -8
- data/lib/avatax/client/utilities.rb +3 -3
- data/lib/avatax/client.rb +37 -37
- data/lib/avatax/configuration.rb +76 -76
- data/lib/avatax/connection.rb +49 -49
- data/lib/avatax/request.rb +50 -50
- 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 +6 -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
|
@@ -29,7 +29,7 @@ module AvaTax
|
|
29
29
|
# @param model [Object] Information about the account you wish to create and the selected product offerings.
|
30
30
|
# @return [Object]
|
31
31
|
def request_new_account(model) path = "/api/v2/accounts/request"
|
32
|
-
post(path, model, {}, "
|
32
|
+
post(path, model, {}, "22.2.0") end
|
33
33
|
|
34
34
|
# Request a new entitilement to an existing customer
|
35
35
|
#
|
@@ -46,7 +46,7 @@ module AvaTax
|
|
46
46
|
# @param offer [String] The offer to be added to an already existing customer
|
47
47
|
# @return [Object]
|
48
48
|
def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
|
49
|
-
post(path, {}, "
|
49
|
+
post(path, {}, "22.2.0") end
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -18,7 +18,7 @@ module AvaTax
|
|
18
18
|
# @param model [Object] The account you wish to create.
|
19
19
|
# @return [AccountModel[]]
|
20
20
|
def create_account(model) path = "/api/v2/accounts"
|
21
|
-
post(path, model, {}, "
|
21
|
+
post(path, model, {}, "22.2.0") end
|
22
22
|
|
23
23
|
# Create new notifications.
|
24
24
|
#
|
@@ -44,7 +44,7 @@ module AvaTax
|
|
44
44
|
# @param model [NotificationModel[]] The notifications you wish to create.
|
45
45
|
# @return [NotificationModel[]]
|
46
46
|
def create_notifications(model) path = "/api/v2/notifications"
|
47
|
-
post(path, model, {}, "
|
47
|
+
post(path, model, {}, "22.2.0") end
|
48
48
|
|
49
49
|
# Create a new subscription
|
50
50
|
#
|
@@ -62,7 +62,7 @@ module AvaTax
|
|
62
62
|
# @param model [SubscriptionModel[]] The subscription you wish to create.
|
63
63
|
# @return [SubscriptionModel[]]
|
64
64
|
def create_subscriptions(accountId, model) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
65
|
-
post(path, model, {}, "
|
65
|
+
post(path, model, {}, "22.2.0") end
|
66
66
|
|
67
67
|
# Delete a single account
|
68
68
|
#
|
@@ -79,7 +79,7 @@ module AvaTax
|
|
79
79
|
# @param id [Integer] The ID of the account you wish to delete.
|
80
80
|
# @return [ErrorDetail[]]
|
81
81
|
def delete_account(id) path = "/api/v2/accounts/#{id}"
|
82
|
-
delete(path, {}, "
|
82
|
+
delete(path, {}, "22.2.0") end
|
83
83
|
|
84
84
|
# Delete a single notification.
|
85
85
|
#
|
@@ -102,7 +102,7 @@ module AvaTax
|
|
102
102
|
# @param id [Integer] The id of the notification you wish to delete.
|
103
103
|
# @return [ErrorDetail[]]
|
104
104
|
def delete_notification(id) path = "/api/v2/notifications/#{id}"
|
105
|
-
delete(path, {}, "
|
105
|
+
delete(path, {}, "22.2.0") end
|
106
106
|
|
107
107
|
# Delete a single subscription
|
108
108
|
#
|
@@ -119,7 +119,7 @@ module AvaTax
|
|
119
119
|
# @param id [Integer] The ID of the subscription you wish to delete.
|
120
120
|
# @return [ErrorDetail[]]
|
121
121
|
def delete_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
122
|
-
delete(path, {}, "
|
122
|
+
delete(path, {}, "22.2.0") end
|
123
123
|
|
124
124
|
# Retrieve List of Accounts by Account Migration Status
|
125
125
|
#
|
@@ -130,7 +130,7 @@ module AvaTax
|
|
130
130
|
# @param writeMode [String] (See TssAccountMigrationId::* for a list of allowable values)
|
131
131
|
# @return [Object]
|
132
132
|
def list_accounts_by_tss_write_mode(writeMode) path = "/api/v2/accounts/ListAccountsByTssWriteMode/#{writeMode}"
|
133
|
-
get(path, {}, "
|
133
|
+
get(path, {}, "22.2.0") end
|
134
134
|
|
135
135
|
# Reset a user's password programmatically
|
136
136
|
#
|
@@ -151,7 +151,7 @@ module AvaTax
|
|
151
151
|
# @param model [Object] The new password for this user
|
152
152
|
# @return [String]
|
153
153
|
def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
|
154
|
-
post(path, model, options, "
|
154
|
+
post(path, model, options, "22.2.0") end
|
155
155
|
|
156
156
|
# Update a single account
|
157
157
|
#
|
@@ -168,7 +168,7 @@ module AvaTax
|
|
168
168
|
# @param model [Object] The account object you wish to update.
|
169
169
|
# @return [Object]
|
170
170
|
def update_account(id, model) path = "/api/v2/accounts/#{id}"
|
171
|
-
put(path, model, {}, "
|
171
|
+
put(path, model, {}, "22.2.0") end
|
172
172
|
|
173
173
|
# Update a single notification.
|
174
174
|
#
|
@@ -192,7 +192,7 @@ module AvaTax
|
|
192
192
|
# @param model [Object] The notification object you wish to update.
|
193
193
|
# @return [Object]
|
194
194
|
def update_notification(id, model) path = "/api/v2/notifications/#{id}"
|
195
|
-
put(path, model, {}, "
|
195
|
+
put(path, model, {}, "22.2.0") end
|
196
196
|
|
197
197
|
# Update a single subscription
|
198
198
|
#
|
@@ -214,7 +214,7 @@ module AvaTax
|
|
214
214
|
# @param model [Object] The subscription you wish to update.
|
215
215
|
# @return [Object]
|
216
216
|
def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
217
|
-
put(path, model, {}, "
|
217
|
+
put(path, model, {}, "22.2.0") end
|
218
218
|
end
|
219
219
|
end
|
220
220
|
end
|
@@ -27,7 +27,7 @@ module AvaTax
|
|
27
27
|
# @param id [Integer] The unique ID number of this report
|
28
28
|
# @return [Object]
|
29
29
|
def download_report(id) path = "/api/v2/reports/#{id}/attachment"
|
30
|
-
get(path, {}, "
|
30
|
+
get(path, {}, "22.2.0") end
|
31
31
|
|
32
32
|
# Retrieve a single report
|
33
33
|
#
|
@@ -46,7 +46,7 @@ module AvaTax
|
|
46
46
|
# @param id [Integer] The unique ID number of the report to retrieve
|
47
47
|
# @return [Object]
|
48
48
|
def get_report(id) path = "/api/v2/reports/#{id}"
|
49
|
-
get(path, {}, "
|
49
|
+
get(path, {}, "22.2.0") end
|
50
50
|
|
51
51
|
# Initiate an ExportDocumentLine report task
|
52
52
|
#
|
@@ -79,7 +79,7 @@ module AvaTax
|
|
79
79
|
# @param model [Object] Options that may be configured to customize the report.
|
80
80
|
# @return [ReportModel[]]
|
81
81
|
def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
|
82
|
-
post(path, model, {}, "
|
82
|
+
post(path, model, {}, "22.2.0") end
|
83
83
|
|
84
84
|
# List all report tasks for account
|
85
85
|
#
|
@@ -105,7 +105,7 @@ module AvaTax
|
|
105
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.
|
106
106
|
# @return [FetchResult]
|
107
107
|
def list_reports(options={}) path = "/api/v2/reports"
|
108
|
-
get(path, options, "
|
108
|
+
get(path, options, "22.2.0") end
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
@@ -29,7 +29,7 @@ module AvaTax
|
|
29
29
|
# @param model [SettingModel[]] The setting you wish to create.
|
30
30
|
# @return [SettingModel[]]
|
31
31
|
def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
|
32
|
-
post(path, model, {}, "
|
32
|
+
post(path, model, {}, "22.2.0") end
|
33
33
|
|
34
34
|
# Delete a single setting
|
35
35
|
#
|
@@ -52,7 +52,7 @@ module AvaTax
|
|
52
52
|
# @param id [Integer] The ID of the setting you wish to delete.
|
53
53
|
# @return [ErrorDetail[]]
|
54
54
|
def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
55
|
-
delete(path, {}, "
|
55
|
+
delete(path, {}, "22.2.0") end
|
56
56
|
|
57
57
|
# Retrieve a single setting
|
58
58
|
#
|
@@ -75,7 +75,7 @@ module AvaTax
|
|
75
75
|
# @param id [Integer] The primary key of this setting
|
76
76
|
# @return [Object]
|
77
77
|
def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
78
|
-
get(path, {}, "
|
78
|
+
get(path, {}, "22.2.0") end
|
79
79
|
|
80
80
|
# Retrieve all settings for this company
|
81
81
|
#
|
@@ -105,7 +105,7 @@ module AvaTax
|
|
105
105
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
106
106
|
# @return [FetchResult]
|
107
107
|
def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
|
108
|
-
get(path, options, "
|
108
|
+
get(path, options, "22.2.0") end
|
109
109
|
|
110
110
|
# Retrieve all settings
|
111
111
|
#
|
@@ -134,7 +134,7 @@ module AvaTax
|
|
134
134
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
135
135
|
# @return [FetchResult]
|
136
136
|
def query_settings(options={}) path = "/api/v2/settings"
|
137
|
-
get(path, options, "
|
137
|
+
get(path, options, "22.2.0") end
|
138
138
|
|
139
139
|
# Update a single setting
|
140
140
|
#
|
@@ -162,7 +162,7 @@ module AvaTax
|
|
162
162
|
# @param model [Object] The setting you wish to update.
|
163
163
|
# @return [Object]
|
164
164
|
def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
165
|
-
put(path, model, {}, "
|
165
|
+
put(path, model, {}, "22.2.0") end
|
166
166
|
end
|
167
167
|
end
|
168
168
|
end
|
@@ -17,7 +17,7 @@ module AvaTax
|
|
17
17
|
# @param id [Integer] The primary key of this subscription
|
18
18
|
# @return [Object]
|
19
19
|
def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
20
|
-
get(path, {}, "
|
20
|
+
get(path, {}, "22.2.0") end
|
21
21
|
|
22
22
|
# Retrieve subscriptions for this account
|
23
23
|
#
|
@@ -39,7 +39,7 @@ module AvaTax
|
|
39
39
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
40
40
|
# @return [FetchResult]
|
41
41
|
def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
42
|
-
get(path, options, "
|
42
|
+
get(path, options, "22.2.0") end
|
43
43
|
|
44
44
|
# Retrieve all subscriptions
|
45
45
|
#
|
@@ -60,7 +60,7 @@ module AvaTax
|
|
60
60
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
61
61
|
# @return [FetchResult]
|
62
62
|
def query_subscriptions(options={}) path = "/api/v2/subscriptions"
|
63
|
-
get(path, options, "
|
63
|
+
get(path, options, "22.2.0") end
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -19,7 +19,7 @@ module AvaTax
|
|
19
19
|
# @param model [TaxCodeModel[]] The tax code you wish to create.
|
20
20
|
# @return [TaxCodeModel[]]
|
21
21
|
def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
|
22
|
-
post(path, model, {}, "
|
22
|
+
post(path, model, {}, "22.2.0") end
|
23
23
|
|
24
24
|
# Delete a single tax code
|
25
25
|
#
|
@@ -33,7 +33,7 @@ module AvaTax
|
|
33
33
|
# @param id [Integer] The ID of the tax code you wish to delete.
|
34
34
|
# @return [ErrorDetail[]]
|
35
35
|
def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
36
|
-
delete(path, {}, "
|
36
|
+
delete(path, {}, "22.2.0") end
|
37
37
|
|
38
38
|
# Retrieve a single tax code
|
39
39
|
#
|
@@ -51,7 +51,7 @@ module AvaTax
|
|
51
51
|
# @param id [Integer] The primary key of this tax code
|
52
52
|
# @return [Object]
|
53
53
|
def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
54
|
-
get(path, {}, "
|
54
|
+
get(path, {}, "22.2.0") end
|
55
55
|
|
56
56
|
# Retrieve tax codes for this company
|
57
57
|
#
|
@@ -76,7 +76,7 @@ module AvaTax
|
|
76
76
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
77
77
|
# @return [FetchResult]
|
78
78
|
def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
|
79
|
-
get(path, options, "
|
79
|
+
get(path, options, "22.2.0") end
|
80
80
|
|
81
81
|
# Retrieve all tax codes
|
82
82
|
#
|
@@ -100,7 +100,7 @@ module AvaTax
|
|
100
100
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
101
101
|
# @return [FetchResult]
|
102
102
|
def query_tax_codes(options={}) path = "/api/v2/taxcodes"
|
103
|
-
get(path, options, "
|
103
|
+
get(path, options, "22.2.0") end
|
104
104
|
|
105
105
|
# Update a single tax code
|
106
106
|
#
|
@@ -121,7 +121,7 @@ module AvaTax
|
|
121
121
|
# @param model [Object] The tax code you wish to update.
|
122
122
|
# @return [Object]
|
123
123
|
def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
124
|
-
put(path, model, {}, "
|
124
|
+
put(path, model, {}, "22.2.0") end
|
125
125
|
end
|
126
126
|
end
|
127
127
|
end
|
@@ -37,7 +37,7 @@ module AvaTax
|
|
37
37
|
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
38
38
|
# @return [Object]
|
39
39
|
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
40
|
-
post(path, model, {}, "
|
40
|
+
post(path, model, {}, "22.2.0") end
|
41
41
|
|
42
42
|
# Build a tax content file for a single location
|
43
43
|
#
|
@@ -78,7 +78,7 @@ module AvaTax
|
|
78
78
|
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
79
79
|
# @return [Object]
|
80
80
|
def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
81
|
-
get(path, options, "
|
81
|
+
get(path, options, "22.2.0") end
|
82
82
|
|
83
83
|
# Download a file listing tax rates by postal code
|
84
84
|
#
|
@@ -131,7 +131,7 @@ module AvaTax
|
|
131
131
|
# @param region [String] A two character region code which limits results to a specific region.
|
132
132
|
# @return [Object]
|
133
133
|
def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
134
|
-
get(path, options, "
|
134
|
+
get(path, options, "22.2.0") end
|
135
135
|
|
136
136
|
# Sales tax rates for a specified address
|
137
137
|
#
|
@@ -165,7 +165,7 @@ module AvaTax
|
|
165
165
|
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
|
166
166
|
# @return [Object]
|
167
167
|
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
|
168
|
-
get(path, options, "
|
168
|
+
get(path, options, "22.2.0") end
|
169
169
|
|
170
170
|
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
171
171
|
#
|
@@ -196,7 +196,7 @@ module AvaTax
|
|
196
196
|
# @param postalCode [String] The postal code of the location.
|
197
197
|
# @return [Object]
|
198
198
|
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
|
199
|
-
get(path, options, "
|
199
|
+
get(path, options, "22.2.0") end
|
200
200
|
end
|
201
201
|
end
|
202
202
|
end
|
@@ -1,43 +1,43 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module TaxProfiles
|
4
|
-
|
5
|
-
|
6
|
-
# Export the tax profile of this company to a backup file
|
7
|
-
#
|
8
|
-
# Exports the tax profile of a company to a file, containing all information that affects tax calculation for this company.
|
9
|
-
#
|
10
|
-
# A tax profile is a series of decisions and configuration choices that affect your company's tax calculation. These decisions
|
11
|
-
# include your nexus declarations, your item catalog, your custom tax rules, and so on.
|
12
|
-
#
|
13
|
-
# This API can be used to export a complete zip file containing your company's current tax profile, and you can then restore this
|
14
|
-
# profile to a different company or compare it over time to see if your profile has been changed.
|
15
|
-
#
|
16
|
-
# ### Security Policies
|
17
|
-
#
|
18
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
19
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
20
|
-
# @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
|
21
|
-
# @return [Object]
|
22
|
-
def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
|
23
|
-
get(path) end
|
24
|
-
|
25
|
-
# Import a tax profile.
|
26
|
-
#
|
27
|
-
# Imports a tax profile to a new company, along with the option to import account settings.
|
28
|
-
#
|
29
|
-
# ### Security Policies
|
30
|
-
#
|
31
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
32
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
33
|
-
# @param accountId [Integer] The account id of the account to which the tax profile will be imported.
|
34
|
-
# @param newCompanyCode [String] The companyCode to use for the imported company.
|
35
|
-
# @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
|
36
|
-
# @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
|
37
|
-
# @param taxProfile [Object] The taxProfile
|
38
|
-
# @return [Object]
|
39
|
-
def import_tax_profile() path = "/api/v2/taxprofile"
|
40
|
-
post(path) end
|
41
|
-
end
|
42
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module TaxProfiles
|
4
|
+
|
5
|
+
|
6
|
+
# Export the tax profile of this company to a backup file
|
7
|
+
#
|
8
|
+
# Exports the tax profile of a company to a file, containing all information that affects tax calculation for this company.
|
9
|
+
#
|
10
|
+
# A tax profile is a series of decisions and configuration choices that affect your company's tax calculation. These decisions
|
11
|
+
# include your nexus declarations, your item catalog, your custom tax rules, and so on.
|
12
|
+
#
|
13
|
+
# This API can be used to export a complete zip file containing your company's current tax profile, and you can then restore this
|
14
|
+
# profile to a different company or compare it over time to see if your profile has been changed.
|
15
|
+
#
|
16
|
+
# ### Security Policies
|
17
|
+
#
|
18
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
19
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
20
|
+
# @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
|
21
|
+
# @return [Object]
|
22
|
+
def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
|
23
|
+
get(path) end
|
24
|
+
|
25
|
+
# Import a tax profile.
|
26
|
+
#
|
27
|
+
# Imports a tax profile to a new company, along with the option to import account settings.
|
28
|
+
#
|
29
|
+
# ### Security Policies
|
30
|
+
#
|
31
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
32
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
33
|
+
# @param accountId [Integer] The account id of the account to which the tax profile will be imported.
|
34
|
+
# @param newCompanyCode [String] The companyCode to use for the imported company.
|
35
|
+
# @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
|
36
|
+
# @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
|
37
|
+
# @param taxProfile [Object] The taxProfile
|
38
|
+
# @return [Object]
|
39
|
+
def import_tax_profile() path = "/api/v2/taxprofile"
|
40
|
+
post(path) end
|
41
|
+
end
|
42
|
+
end
|
43
43
|
end
|
@@ -27,7 +27,7 @@ module AvaTax
|
|
27
27
|
# @param model [TaxRuleModel[]] The tax rule you wish to create.
|
28
28
|
# @return [TaxRuleModel[]]
|
29
29
|
def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
|
30
|
-
post(path, model, {}, "
|
30
|
+
post(path, model, {}, "22.2.0") end
|
31
31
|
|
32
32
|
# Delete a single tax rule
|
33
33
|
#
|
@@ -53,7 +53,7 @@ module AvaTax
|
|
53
53
|
# @param id [Integer] The ID of the tax rule you wish to delete.
|
54
54
|
# @return [ErrorDetail[]]
|
55
55
|
def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
56
|
-
delete(path, {}, "
|
56
|
+
delete(path, {}, "22.2.0") end
|
57
57
|
|
58
58
|
# Retrieve a single tax rule
|
59
59
|
#
|
@@ -79,7 +79,7 @@ module AvaTax
|
|
79
79
|
# @param id [Integer] The primary key of this tax rule
|
80
80
|
# @return [Object]
|
81
81
|
def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
82
|
-
get(path, {}, "
|
82
|
+
get(path, {}, "22.2.0") end
|
83
83
|
|
84
84
|
# Retrieve tax rules for this company
|
85
85
|
#
|
@@ -112,7 +112,7 @@ module AvaTax
|
|
112
112
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
113
113
|
# @return [FetchResult]
|
114
114
|
def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
|
115
|
-
get(path, options, "
|
115
|
+
get(path, options, "22.2.0") end
|
116
116
|
|
117
117
|
# Retrieve all tax rules
|
118
118
|
#
|
@@ -144,7 +144,7 @@ module AvaTax
|
|
144
144
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
145
145
|
# @return [FetchResult]
|
146
146
|
def query_tax_rules(options={}) path = "/api/v2/taxrules"
|
147
|
-
get(path, options, "
|
147
|
+
get(path, options, "22.2.0") end
|
148
148
|
|
149
149
|
# Update a single tax rule
|
150
150
|
#
|
@@ -171,7 +171,7 @@ module AvaTax
|
|
171
171
|
# @param model [Object] The tax rule you wish to update.
|
172
172
|
# @return [Object]
|
173
173
|
def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
174
|
-
put(path, model, {}, "
|
174
|
+
put(path, model, {}, "22.2.0") end
|
175
175
|
end
|
176
176
|
end
|
177
177
|
end
|