avatax 21.8.0 → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +94 -83
- data/lib/avatax/client/addresses.rb +22 -20
- data/lib/avatax/client/advancedrules.rb +46 -41
- data/lib/avatax/client/ageverification.rb +29 -0
- data/lib/avatax/client/avafileforms.rb +46 -41
- data/lib/avatax/client/batches.rb +70 -62
- data/lib/avatax/client/certexpressinvites.rb +30 -27
- data/lib/avatax/client/certificates.rb +126 -111
- data/lib/avatax/client/companies.rb +192 -152
- data/lib/avatax/client/compliance.rb +25 -14
- data/lib/avatax/client/contacts.rb +54 -48
- data/lib/avatax/client/customers.rb +110 -97
- data/lib/avatax/client/datasources.rb +54 -48
- data/lib/avatax/client/definitions.rb +620 -446
- data/lib/avatax/client/distancethresholds.rb +54 -48
- data/lib/avatax/client/ecms.rb +73 -73
- data/lib/avatax/client/ecommercetoken.rb +20 -18
- data/lib/avatax/client/errortransactions.rb +61 -61
- data/lib/avatax/client/filingcalendars.rb +44 -20
- data/lib/avatax/client/filings.rb +24 -20
- data/lib/avatax/client/firmclientlinkages.rb +78 -69
- data/lib/avatax/client/free.rb +14 -13
- data/lib/avatax/client/fundingrequests.rb +22 -20
- data/lib/avatax/client/items.rb +206 -181
- data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
- data/lib/avatax/client/locations.rb +102 -90
- data/lib/avatax/client/multidocument.rb +86 -76
- data/lib/avatax/client/nexus.rb +146 -103
- data/lib/avatax/client/notices.rb +30 -26
- data/lib/avatax/client/notifications.rb +30 -27
- data/lib/avatax/client/onboarding.rb +55 -55
- data/lib/avatax/client/pointofsale.rb +21 -21
- data/lib/avatax/client/provisioning.rb +22 -20
- data/lib/avatax/client/registrar.rb +94 -83
- data/lib/avatax/client/reports.rb +38 -34
- data/lib/avatax/client/settings.rb +54 -48
- data/lib/avatax/client/shippingverification.rb +66 -0
- data/lib/avatax/client/subscriptions.rb +30 -27
- data/lib/avatax/client/taxcodes.rb +54 -48
- data/lib/avatax/client/taxcontent.rb +46 -41
- data/lib/avatax/client/taxprofiles.rb +42 -42
- data/lib/avatax/client/taxrules.rb +56 -50
- data/lib/avatax/client/transactions.rb +174 -153
- data/lib/avatax/client/upcs.rb +54 -48
- data/lib/avatax/client/userdefinedfields.rb +52 -0
- data/lib/avatax/client/users.rb +70 -62
- data/lib/avatax/client/utilities.rb +30 -27
- 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,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
|
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module TaxRules
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new tax rule
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module TaxRules
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new tax rule
|
7
|
+
#
|
8
8
|
# Create one or more custom tax rules attached to this company.
|
9
9
|
#
|
10
10
|
# A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
|
@@ -21,15 +21,16 @@ module AvaTax
|
|
21
21
|
#
|
22
22
|
# ### Security Policies
|
23
23
|
#
|
24
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [TaxRuleModel[]]
|
28
|
-
def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
|
29
|
-
post(path, model) end
|
30
|
-
|
31
|
-
# Delete a single tax rule
|
32
|
-
#
|
28
|
+
# @return [TaxRuleModel[]]
|
29
|
+
def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
|
30
|
+
post(path, model, {}, "22.2.0") end
|
31
|
+
|
32
|
+
# Delete a single tax rule
|
33
|
+
#
|
33
34
|
# Mark the custom tax rule identified by this URL as deleted.
|
34
35
|
#
|
35
36
|
# A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
|
@@ -46,15 +47,16 @@ module AvaTax
|
|
46
47
|
#
|
47
48
|
# ### Security Policies
|
48
49
|
#
|
49
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [ErrorDetail[]]
|
53
|
-
def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
54
|
-
delete(path) end
|
55
|
-
|
56
|
-
# Retrieve a single tax rule
|
57
|
-
#
|
54
|
+
# @return [ErrorDetail[]]
|
55
|
+
def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
56
|
+
delete(path, {}, "22.2.0") end
|
57
|
+
|
58
|
+
# Retrieve a single tax rule
|
59
|
+
#
|
58
60
|
# Get the taxrule object identified by this URL.
|
59
61
|
#
|
60
62
|
# A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
|
@@ -71,15 +73,16 @@ module AvaTax
|
|
71
73
|
#
|
72
74
|
# ### Security Policies
|
73
75
|
#
|
74
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
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
|
-
# @return [Object]
|
78
|
-
def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
79
|
-
get(path) end
|
80
|
-
|
81
|
-
# Retrieve tax rules for this company
|
82
|
-
#
|
80
|
+
# @return [Object]
|
81
|
+
def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
82
|
+
get(path, {}, "22.2.0") end
|
83
|
+
|
84
|
+
# Retrieve tax rules for this company
|
85
|
+
#
|
83
86
|
# List all taxrule objects attached to this company.
|
84
87
|
#
|
85
88
|
# A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
|
@@ -99,19 +102,20 @@ module AvaTax
|
|
99
102
|
#
|
100
103
|
# ### Security Policies
|
101
104
|
#
|
102
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
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
|
-
# @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, rateTypeCode, taxTypeGroup, taxSubType
|
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.
|
106
110
|
# @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.
|
107
111
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
108
112
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
109
|
-
# @return [FetchResult]
|
110
|
-
def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
|
111
|
-
get(path, options) end
|
112
|
-
|
113
|
-
# Retrieve all tax rules
|
114
|
-
#
|
113
|
+
# @return [FetchResult]
|
114
|
+
def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
|
115
|
+
get(path, options, "22.2.0") end
|
116
|
+
|
117
|
+
# Retrieve all tax rules
|
118
|
+
#
|
115
119
|
# Get multiple taxrule objects across all companies.
|
116
120
|
#
|
117
121
|
# A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
|
@@ -131,18 +135,19 @@ module AvaTax
|
|
131
135
|
#
|
132
136
|
# ### Security Policies
|
133
137
|
#
|
134
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
135
|
-
#
|
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
|
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.
|
138
143
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
139
144
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
140
|
-
# @return [FetchResult]
|
141
|
-
def query_tax_rules(options={}) path = "/api/v2/taxrules"
|
142
|
-
get(path, options) end
|
143
|
-
|
144
|
-
# Update a single tax rule
|
145
|
-
#
|
145
|
+
# @return [FetchResult]
|
146
|
+
def query_tax_rules(options={}) path = "/api/v2/taxrules"
|
147
|
+
get(path, options, "22.2.0") end
|
148
|
+
|
149
|
+
# Update a single tax rule
|
150
|
+
#
|
146
151
|
# Replace the existing custom tax rule object at this URL with an updated object.
|
147
152
|
#
|
148
153
|
# A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
|
@@ -159,13 +164,14 @@ module AvaTax
|
|
159
164
|
#
|
160
165
|
# ### Security Policies
|
161
166
|
#
|
162
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [Object]
|
167
|
-
def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
168
|
-
put(path, model) end
|
169
|
-
end
|
170
|
-
end
|
172
|
+
# @return [Object]
|
173
|
+
def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
174
|
+
put(path, model, {}, "22.2.0") end
|
175
|
+
end
|
176
|
+
end
|
171
177
|
end
|