avatax 21.7.1 → 21.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avatax/client/accounts.rb +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 +174 -153
- 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 +624 -450
- data/lib/avatax/client/distancethresholds.rb +54 -48
- data/lib/avatax/client/ecommercetoken.rb +20 -18
- 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 +209 -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 +148 -105
- data/lib/avatax/client/notices.rb +30 -26
- data/lib/avatax/client/notifications.rb +30 -27
- 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/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 +2 -0
- data/lib/avatax/connection.rb +1 -1
- data/lib/avatax/request.rb +21 -12
- data/lib/avatax/version.rb +1 -1
- metadata +6 -3
@@ -1,25 +1,26 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Subscriptions
|
4
|
-
|
5
|
-
|
6
|
-
# Retrieve a single subscription
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Subscriptions
|
4
|
+
|
5
|
+
|
6
|
+
# Retrieve a single subscription
|
7
|
+
#
|
8
8
|
# Get the subscription object identified by this URL.
|
9
9
|
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
10
10
|
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
11
11
|
#
|
12
12
|
# ### Security Policies
|
13
13
|
#
|
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.
|
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
|
-
# @return [Object]
|
18
|
-
def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
19
|
-
get(path) end
|
20
|
-
|
21
|
-
# Retrieve subscriptions for this account
|
22
|
-
#
|
18
|
+
# @return [Object]
|
19
|
+
def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
20
|
+
get(path, {}, "21.12.0") end
|
21
|
+
|
22
|
+
# Retrieve subscriptions for this account
|
23
|
+
#
|
23
24
|
# List all subscription objects attached to this account.
|
24
25
|
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
25
26
|
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
@@ -29,18 +30,19 @@ module AvaTax
|
|
29
30
|
#
|
30
31
|
# ### Security Policies
|
31
32
|
#
|
32
|
-
# * 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.
|
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.
|
36
38
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
37
39
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
38
|
-
# @return [FetchResult]
|
39
|
-
def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
40
|
-
get(path, options) end
|
41
|
-
|
42
|
-
# Retrieve all subscriptions
|
43
|
-
#
|
40
|
+
# @return [FetchResult]
|
41
|
+
def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
42
|
+
get(path, options, "21.12.0") end
|
43
|
+
|
44
|
+
# Retrieve all subscriptions
|
45
|
+
#
|
44
46
|
# Get multiple subscription objects across all accounts.
|
45
47
|
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
46
48
|
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
@@ -50,14 +52,15 @@ module AvaTax
|
|
50
52
|
#
|
51
53
|
# ### Security Policies
|
52
54
|
#
|
53
|
-
# * 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.
|
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
|
-
# @return [FetchResult]
|
59
|
-
def query_subscriptions(options={}) path = "/api/v2/subscriptions"
|
60
|
-
get(path, options) end
|
61
|
-
end
|
62
|
-
end
|
61
|
+
# @return [FetchResult]
|
62
|
+
def query_subscriptions(options={}) path = "/api/v2/subscriptions"
|
63
|
+
get(path, options, "21.12.0") end
|
64
|
+
end
|
65
|
+
end
|
63
66
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module TaxCodes
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new tax code
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module TaxCodes
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new tax code
|
7
|
+
#
|
8
8
|
# Create one or more new taxcode objects attached to this company.
|
9
9
|
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
10
10
|
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
@@ -13,28 +13,30 @@ module AvaTax
|
|
13
13
|
#
|
14
14
|
# ### Security Policies
|
15
15
|
#
|
16
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [TaxCodeModel[]]
|
20
|
-
def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
|
21
|
-
post(path, model) end
|
22
|
-
|
23
|
-
# Delete a single tax code
|
24
|
-
#
|
20
|
+
# @return [TaxCodeModel[]]
|
21
|
+
def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
|
22
|
+
post(path, model, {}, "21.12.0") end
|
23
|
+
|
24
|
+
# Delete a single tax code
|
25
|
+
#
|
25
26
|
# Marks the existing TaxCode object at this URL as deleted.
|
26
27
|
#
|
27
28
|
# ### Security Policies
|
28
29
|
#
|
29
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [ErrorDetail[]]
|
33
|
-
def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
34
|
-
delete(path) end
|
35
|
-
|
36
|
-
# Retrieve a single tax code
|
37
|
-
#
|
34
|
+
# @return [ErrorDetail[]]
|
35
|
+
def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
36
|
+
delete(path, {}, "21.12.0") end
|
37
|
+
|
38
|
+
# Retrieve a single tax code
|
39
|
+
#
|
38
40
|
# Get the taxcode object identified by this URL.
|
39
41
|
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
40
42
|
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
@@ -43,15 +45,16 @@ module AvaTax
|
|
43
45
|
#
|
44
46
|
# ### Security Policies
|
45
47
|
#
|
46
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
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
|
-
# @return [Object]
|
50
|
-
def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
51
|
-
get(path) end
|
52
|
-
|
53
|
-
# Retrieve tax codes for this company
|
54
|
-
#
|
52
|
+
# @return [Object]
|
53
|
+
def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
54
|
+
get(path, {}, "21.12.0") end
|
55
|
+
|
56
|
+
# Retrieve tax codes for this company
|
57
|
+
#
|
55
58
|
# List all taxcode objects attached to this company.
|
56
59
|
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
57
60
|
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
@@ -63,19 +66,20 @@ module AvaTax
|
|
63
66
|
#
|
64
67
|
# ### Security Policies
|
65
68
|
#
|
66
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
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.
|
70
74
|
# @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.
|
71
75
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
72
76
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
73
|
-
# @return [FetchResult]
|
74
|
-
def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
|
75
|
-
get(path, options) end
|
76
|
-
|
77
|
-
# Retrieve all tax codes
|
78
|
-
#
|
77
|
+
# @return [FetchResult]
|
78
|
+
def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
|
79
|
+
get(path, options, "21.12.0") end
|
80
|
+
|
81
|
+
# Retrieve all tax codes
|
82
|
+
#
|
79
83
|
# Get multiple taxcode objects across all companies.
|
80
84
|
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
81
85
|
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
@@ -87,18 +91,19 @@ module AvaTax
|
|
87
91
|
#
|
88
92
|
# ### Security Policies
|
89
93
|
#
|
90
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
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.
|
94
99
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
95
100
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
96
|
-
# @return [FetchResult]
|
97
|
-
def query_tax_codes(options={}) path = "/api/v2/taxcodes"
|
98
|
-
get(path, options) end
|
99
|
-
|
100
|
-
# Update a single tax code
|
101
|
-
#
|
101
|
+
# @return [FetchResult]
|
102
|
+
def query_tax_codes(options={}) path = "/api/v2/taxcodes"
|
103
|
+
get(path, options, "21.12.0") end
|
104
|
+
|
105
|
+
# Update a single tax code
|
106
|
+
#
|
102
107
|
# Replace the existing taxcode object at this URL with an updated object.
|
103
108
|
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
104
109
|
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
@@ -109,13 +114,14 @@ module AvaTax
|
|
109
114
|
#
|
110
115
|
# ### Security Policies
|
111
116
|
#
|
112
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [Object]
|
117
|
-
def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
118
|
-
put(path, model) end
|
119
|
-
end
|
120
|
-
end
|
122
|
+
# @return [Object]
|
123
|
+
def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
124
|
+
put(path, model, {}, "21.12.0") end
|
125
|
+
end
|
126
|
+
end
|
121
127
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module TaxContent
|
4
|
-
|
5
|
-
|
6
|
-
# Build a multi-location tax content file
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module TaxContent
|
4
|
+
|
5
|
+
|
6
|
+
# Build a multi-location tax content file
|
7
|
+
#
|
8
8
|
# Builds a tax content file containing information useful for a retail point-of-sale solution.
|
9
9
|
#
|
10
10
|
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
@@ -32,14 +32,15 @@ module AvaTax
|
|
32
32
|
# ### Security Policies
|
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
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
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
|
-
# @return [Object]
|
38
|
-
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
39
|
-
post(path, model) end
|
40
|
-
|
41
|
-
# Build a tax content file for a single location
|
42
|
-
#
|
38
|
+
# @return [Object]
|
39
|
+
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
40
|
+
post(path, model, {}, "21.12.0") end
|
41
|
+
|
42
|
+
# Build a tax content file for a single location
|
43
|
+
#
|
43
44
|
# Builds a tax content file containing information useful for a retail point-of-sale solution.
|
44
45
|
#
|
45
46
|
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
@@ -67,19 +68,20 @@ module AvaTax
|
|
67
68
|
# ### Security Policies
|
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
|
-
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
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)
|
74
76
|
# @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
|
75
77
|
# @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
|
76
78
|
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
77
|
-
# @return [Object]
|
78
|
-
def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
79
|
-
get(path, options) end
|
80
|
-
|
81
|
-
# Download a file listing tax rates by postal code
|
82
|
-
#
|
79
|
+
# @return [Object]
|
80
|
+
def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
81
|
+
get(path, options, "21.12.0") end
|
82
|
+
|
83
|
+
# Download a file listing tax rates by postal code
|
84
|
+
#
|
83
85
|
# Download a CSV file containing all five digit postal codes in the United States and their sales
|
84
86
|
# and use tax rates for tangible personal property.
|
85
87
|
#
|
@@ -123,15 +125,16 @@ module AvaTax
|
|
123
125
|
#
|
124
126
|
# ### Security Policies
|
125
127
|
#
|
126
|
-
# * 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.
|
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
|
-
# @return [Object]
|
130
|
-
def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
131
|
-
get(path, options) end
|
132
|
-
|
133
|
-
# Sales tax rates for a specified address
|
134
|
-
#
|
132
|
+
# @return [Object]
|
133
|
+
def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
134
|
+
get(path, options, "21.12.0") end
|
135
|
+
|
136
|
+
# Sales tax rates for a specified address
|
137
|
+
#
|
135
138
|
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
136
139
|
# response code 429 - `Too Many Requests`.
|
137
140
|
#
|
@@ -151,7 +154,8 @@ module AvaTax
|
|
151
154
|
# * And more!
|
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
|
-
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
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.
|
@@ -159,12 +163,12 @@ module AvaTax
|
|
159
163
|
# @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
|
160
164
|
# @param postalCode [String] The postal code of the location.
|
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
|
-
# @return [Object]
|
163
|
-
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
|
164
|
-
get(path, options) end
|
165
|
-
|
166
|
-
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
167
|
-
#
|
166
|
+
# @return [Object]
|
167
|
+
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
|
168
|
+
get(path, options, "21.12.0") end
|
169
|
+
|
170
|
+
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
171
|
+
#
|
168
172
|
# This API is only available for a US postal codes.
|
169
173
|
#
|
170
174
|
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
@@ -186,12 +190,13 @@ module AvaTax
|
|
186
190
|
# * And more!
|
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
|
-
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
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
|
-
# @return [Object]
|
193
|
-
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
|
194
|
-
get(path, options) end
|
195
|
-
end
|
196
|
-
end
|
197
|
+
# @return [Object]
|
198
|
+
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
|
199
|
+
get(path, options, "21.12.0") end
|
200
|
+
end
|
201
|
+
end
|
197
202
|
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, {}, "21.12.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, {}, "21.12.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, {}, "21.12.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, "21.12.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, "21.12.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, {}, "21.12.0") end
|
175
|
+
end
|
176
|
+
end
|
171
177
|
end
|