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
@@ -14,11 +14,12 @@ module AvaTax
|
|
14
14
|
# ### Security Policies
|
15
15
|
#
|
16
16
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
+
# Swagger Name: AvaTaxClient
|
17
18
|
# @param companyId [Integer] The ID of the company that owns this tax code.
|
18
19
|
# @param model [TaxCodeModel[]] The tax code you wish to create.
|
19
20
|
# @return [TaxCodeModel[]]
|
20
21
|
def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
|
21
|
-
post(path, model) end
|
22
|
+
post(path, model, {}, "22.2.0") end
|
22
23
|
|
23
24
|
# Delete a single tax code
|
24
25
|
#
|
@@ -27,11 +28,12 @@ module AvaTax
|
|
27
28
|
# ### Security Policies
|
28
29
|
#
|
29
30
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
31
|
+
# Swagger Name: AvaTaxClient
|
30
32
|
# @param companyId [Integer] The ID of the company that owns this tax code.
|
31
33
|
# @param id [Integer] The ID of the tax code you wish to delete.
|
32
34
|
# @return [ErrorDetail[]]
|
33
35
|
def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
34
|
-
delete(path) end
|
36
|
+
delete(path, {}, "22.2.0") end
|
35
37
|
|
36
38
|
# Retrieve a single tax code
|
37
39
|
#
|
@@ -44,11 +46,12 @@ module AvaTax
|
|
44
46
|
# ### Security Policies
|
45
47
|
#
|
46
48
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
49
|
+
# Swagger Name: AvaTaxClient
|
47
50
|
# @param companyId [Integer] The ID of the company that owns this tax code
|
48
51
|
# @param id [Integer] The primary key of this tax code
|
49
52
|
# @return [Object]
|
50
53
|
def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
51
|
-
get(path) end
|
54
|
+
get(path, {}, "22.2.0") end
|
52
55
|
|
53
56
|
# Retrieve tax codes for this company
|
54
57
|
#
|
@@ -64,6 +67,7 @@ module AvaTax
|
|
64
67
|
# ### Security Policies
|
65
68
|
#
|
66
69
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
70
|
+
# Swagger Name: AvaTaxClient
|
67
71
|
# @param companyId [Integer] The ID of the company that owns these tax codes
|
68
72
|
# @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/).
|
69
73
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -72,7 +76,7 @@ module AvaTax
|
|
72
76
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
73
77
|
# @return [FetchResult]
|
74
78
|
def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
|
75
|
-
get(path, options) end
|
79
|
+
get(path, options, "22.2.0") end
|
76
80
|
|
77
81
|
# Retrieve all tax codes
|
78
82
|
#
|
@@ -88,6 +92,7 @@ module AvaTax
|
|
88
92
|
# ### Security Policies
|
89
93
|
#
|
90
94
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
95
|
+
# Swagger Name: AvaTaxClient
|
91
96
|
# @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/).
|
92
97
|
# @param include [String] A comma separated list of additional data to retrieve.
|
93
98
|
# @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.
|
@@ -95,7 +100,7 @@ module AvaTax
|
|
95
100
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
96
101
|
# @return [FetchResult]
|
97
102
|
def query_tax_codes(options={}) path = "/api/v2/taxcodes"
|
98
|
-
get(path, options) end
|
103
|
+
get(path, options, "22.2.0") end
|
99
104
|
|
100
105
|
# Update a single tax code
|
101
106
|
#
|
@@ -110,12 +115,13 @@ module AvaTax
|
|
110
115
|
# ### Security Policies
|
111
116
|
#
|
112
117
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
118
|
+
# Swagger Name: AvaTaxClient
|
113
119
|
# @param companyId [Integer] The ID of the company that this tax code belongs to.
|
114
120
|
# @param id [Integer] The ID of the tax code you wish to update
|
115
121
|
# @param model [Object] The tax code you wish to update.
|
116
122
|
# @return [Object]
|
117
123
|
def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
118
|
-
put(path, model) end
|
124
|
+
put(path, model, {}, "22.2.0") end
|
119
125
|
end
|
120
126
|
end
|
121
127
|
end
|
@@ -33,10 +33,11 @@ module AvaTax
|
|
33
33
|
#
|
34
34
|
# * 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.
|
35
35
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
36
|
+
# Swagger Name: AvaTaxClient
|
36
37
|
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
37
38
|
# @return [Object]
|
38
39
|
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
39
|
-
post(path, model) end
|
40
|
+
post(path, model, {}, "22.2.0") end
|
40
41
|
|
41
42
|
# Build a tax content file for a single location
|
42
43
|
#
|
@@ -68,6 +69,7 @@ module AvaTax
|
|
68
69
|
#
|
69
70
|
# * 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.
|
70
71
|
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
72
|
+
# Swagger Name: AvaTaxClient
|
71
73
|
# @param companyId [Integer] The ID number of the company that owns this location.
|
72
74
|
# @param id [Integer] The ID number of the location to retrieve point-of-sale data.
|
73
75
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
@@ -76,7 +78,7 @@ module AvaTax
|
|
76
78
|
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
77
79
|
# @return [Object]
|
78
80
|
def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
79
|
-
get(path, options) end
|
81
|
+
get(path, options, "22.2.0") end
|
80
82
|
|
81
83
|
# Download a file listing tax rates by postal code
|
82
84
|
#
|
@@ -124,11 +126,12 @@ module AvaTax
|
|
124
126
|
# ### Security Policies
|
125
127
|
#
|
126
128
|
# * 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.
|
129
|
+
# Swagger Name: AvaTaxClient
|
127
130
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
|
128
131
|
# @param region [String] A two character region code which limits results to a specific region.
|
129
132
|
# @return [Object]
|
130
133
|
def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
131
|
-
get(path, options) end
|
134
|
+
get(path, options, "22.2.0") end
|
132
135
|
|
133
136
|
# Sales tax rates for a specified address
|
134
137
|
#
|
@@ -152,6 +155,7 @@ module AvaTax
|
|
152
155
|
#
|
153
156
|
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
154
157
|
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
158
|
+
# Swagger Name: AvaTaxClient
|
155
159
|
# @param line1 [String] The street address of the location.
|
156
160
|
# @param line2 [String] The street address of the location.
|
157
161
|
# @param line3 [String] The street address of the location.
|
@@ -161,7 +165,7 @@ module AvaTax
|
|
161
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`.
|
162
166
|
# @return [Object]
|
163
167
|
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
|
164
|
-
get(path, options) end
|
168
|
+
get(path, options, "22.2.0") end
|
165
169
|
|
166
170
|
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
167
171
|
#
|
@@ -187,11 +191,12 @@ module AvaTax
|
|
187
191
|
#
|
188
192
|
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
189
193
|
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
194
|
+
# Swagger Name: AvaTaxClient
|
190
195
|
# @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`.
|
191
196
|
# @param postalCode [String] The postal code of the location.
|
192
197
|
# @return [Object]
|
193
198
|
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
|
194
|
-
get(path, options) end
|
199
|
+
get(path, options, "22.2.0") end
|
195
200
|
end
|
196
201
|
end
|
197
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
|
@@ -22,11 +22,12 @@ module AvaTax
|
|
22
22
|
# ### Security Policies
|
23
23
|
#
|
24
24
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
25
|
+
# Swagger Name: AvaTaxClient
|
25
26
|
# @param companyId [Integer] The ID of the company that owns this tax rule.
|
26
27
|
# @param model [TaxRuleModel[]] The tax rule you wish to create.
|
27
28
|
# @return [TaxRuleModel[]]
|
28
29
|
def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
|
29
|
-
post(path, model) end
|
30
|
+
post(path, model, {}, "22.2.0") end
|
30
31
|
|
31
32
|
# Delete a single tax rule
|
32
33
|
#
|
@@ -47,11 +48,12 @@ module AvaTax
|
|
47
48
|
# ### Security Policies
|
48
49
|
#
|
49
50
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
51
|
+
# Swagger Name: AvaTaxClient
|
50
52
|
# @param companyId [Integer] The ID of the company that owns this tax rule.
|
51
53
|
# @param id [Integer] The ID of the tax rule you wish to delete.
|
52
54
|
# @return [ErrorDetail[]]
|
53
55
|
def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
54
|
-
delete(path) end
|
56
|
+
delete(path, {}, "22.2.0") end
|
55
57
|
|
56
58
|
# Retrieve a single tax rule
|
57
59
|
#
|
@@ -72,11 +74,12 @@ module AvaTax
|
|
72
74
|
# ### Security Policies
|
73
75
|
#
|
74
76
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
77
|
+
# Swagger Name: AvaTaxClient
|
75
78
|
# @param companyId [Integer] The ID of the company that owns this tax rule
|
76
79
|
# @param id [Integer] The primary key of this tax rule
|
77
80
|
# @return [Object]
|
78
81
|
def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
79
|
-
get(path) end
|
82
|
+
get(path, {}, "22.2.0") end
|
80
83
|
|
81
84
|
# Retrieve tax rules for this company
|
82
85
|
#
|
@@ -100,6 +103,7 @@ module AvaTax
|
|
100
103
|
# ### Security Policies
|
101
104
|
#
|
102
105
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
106
|
+
# Swagger Name: AvaTaxClient
|
103
107
|
# @param companyId [Integer] The ID of the company that owns these tax rules
|
104
108
|
# @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:* taxCode, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis
|
105
109
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -108,7 +112,7 @@ module AvaTax
|
|
108
112
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
109
113
|
# @return [FetchResult]
|
110
114
|
def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
|
111
|
-
get(path, options) end
|
115
|
+
get(path, options, "22.2.0") end
|
112
116
|
|
113
117
|
# Retrieve all tax rules
|
114
118
|
#
|
@@ -132,6 +136,7 @@ module AvaTax
|
|
132
136
|
# ### Security Policies
|
133
137
|
#
|
134
138
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
139
|
+
# Swagger Name: AvaTaxClient
|
135
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:* taxCode, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis
|
136
141
|
# @param include [String] A comma separated list of additional data to retrieve.
|
137
142
|
# @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.
|
@@ -139,7 +144,7 @@ module AvaTax
|
|
139
144
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
140
145
|
# @return [FetchResult]
|
141
146
|
def query_tax_rules(options={}) path = "/api/v2/taxrules"
|
142
|
-
get(path, options) end
|
147
|
+
get(path, options, "22.2.0") end
|
143
148
|
|
144
149
|
# Update a single tax rule
|
145
150
|
#
|
@@ -160,12 +165,13 @@ module AvaTax
|
|
160
165
|
# ### Security Policies
|
161
166
|
#
|
162
167
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
168
|
+
# Swagger Name: AvaTaxClient
|
163
169
|
# @param companyId [Integer] The ID of the company that this tax rule belongs to.
|
164
170
|
# @param id [Integer] The ID of the tax rule you wish to update
|
165
171
|
# @param model [Object] The tax rule you wish to update.
|
166
172
|
# @return [Object]
|
167
173
|
def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
168
|
-
put(path, model) end
|
174
|
+
put(path, model, {}, "22.2.0") end
|
169
175
|
end
|
170
176
|
end
|
171
177
|
end
|