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,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Settings
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new setting
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Settings
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new setting
|
7
|
+
#
|
8
8
|
# Create one or more new setting objects attached to this company.
|
9
9
|
#
|
10
10
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -23,15 +23,16 @@ module AvaTax
|
|
23
23
|
#
|
24
24
|
# ### Security Policies
|
25
25
|
#
|
26
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
26
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
27
|
+
# Swagger Name: AvaTaxClient
|
27
28
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
28
29
|
# @param model [SettingModel[]] The setting you wish to create.
|
29
|
-
# @return [SettingModel[]]
|
30
|
-
def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
|
31
|
-
post(path, model) end
|
32
|
-
|
33
|
-
# Delete a single setting
|
34
|
-
#
|
30
|
+
# @return [SettingModel[]]
|
31
|
+
def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
|
32
|
+
post(path, model, {}, "22.2.0") end
|
33
|
+
|
34
|
+
# Delete a single setting
|
35
|
+
#
|
35
36
|
# Mark the setting object at this URL as deleted.
|
36
37
|
#
|
37
38
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -45,15 +46,16 @@ module AvaTax
|
|
45
46
|
#
|
46
47
|
# ### Security Policies
|
47
48
|
#
|
48
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
49
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
50
|
+
# Swagger Name: AvaTaxClient
|
49
51
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
50
52
|
# @param id [Integer] The ID of the setting you wish to delete.
|
51
|
-
# @return [ErrorDetail[]]
|
52
|
-
def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
53
|
-
delete(path) end
|
54
|
-
|
55
|
-
# Retrieve a single setting
|
56
|
-
#
|
53
|
+
# @return [ErrorDetail[]]
|
54
|
+
def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
55
|
+
delete(path, {}, "22.2.0") end
|
56
|
+
|
57
|
+
# Retrieve a single setting
|
58
|
+
#
|
57
59
|
# Get a single setting object by its unique ID.
|
58
60
|
#
|
59
61
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -67,15 +69,16 @@ module AvaTax
|
|
67
69
|
#
|
68
70
|
# ### Security Policies
|
69
71
|
#
|
70
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
72
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
73
|
+
# Swagger Name: AvaTaxClient
|
71
74
|
# @param companyId [Integer] The ID of the company that owns this setting
|
72
75
|
# @param id [Integer] The primary key of this setting
|
73
|
-
# @return [Object]
|
74
|
-
def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
75
|
-
get(path) end
|
76
|
-
|
77
|
-
# Retrieve all settings for this company
|
78
|
-
#
|
76
|
+
# @return [Object]
|
77
|
+
def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
78
|
+
get(path, {}, "22.2.0") end
|
79
|
+
|
80
|
+
# Retrieve all settings for this company
|
81
|
+
#
|
79
82
|
# List all setting objects attached to this company.
|
80
83
|
#
|
81
84
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -92,19 +95,20 @@ module AvaTax
|
|
92
95
|
#
|
93
96
|
# ### Security Policies
|
94
97
|
#
|
95
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
98
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
99
|
+
# Swagger Name: AvaTaxClient
|
96
100
|
# @param companyId [Integer] The ID of the company that owns these settings
|
97
101
|
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* modifiedDate, ModifiedUserId
|
98
102
|
# @param include [String] A comma separated list of additional data to retrieve.
|
99
103
|
# @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.
|
100
104
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
101
105
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
102
|
-
# @return [FetchResult]
|
103
|
-
def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
|
104
|
-
get(path, options) end
|
105
|
-
|
106
|
-
# Retrieve all settings
|
107
|
-
#
|
106
|
+
# @return [FetchResult]
|
107
|
+
def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
|
108
|
+
get(path, options, "22.2.0") end
|
109
|
+
|
110
|
+
# Retrieve all settings
|
111
|
+
#
|
108
112
|
# Get multiple setting objects across all companies.
|
109
113
|
#
|
110
114
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -121,18 +125,19 @@ module AvaTax
|
|
121
125
|
#
|
122
126
|
# ### Security Policies
|
123
127
|
#
|
124
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
128
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
129
|
+
# Swagger Name: AvaTaxClient
|
125
130
|
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* modifiedDate, ModifiedUserId
|
126
131
|
# @param include [String] A comma separated list of additional data to retrieve.
|
127
132
|
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
128
133
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
129
134
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
130
|
-
# @return [FetchResult]
|
131
|
-
def query_settings(options={}) path = "/api/v2/settings"
|
132
|
-
get(path, options) end
|
133
|
-
|
134
|
-
# Update a single setting
|
135
|
-
#
|
135
|
+
# @return [FetchResult]
|
136
|
+
def query_settings(options={}) path = "/api/v2/settings"
|
137
|
+
get(path, options, "22.2.0") end
|
138
|
+
|
139
|
+
# Update a single setting
|
140
|
+
#
|
136
141
|
# Replace the existing setting object at this URL with an updated object.
|
137
142
|
#
|
138
143
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -150,13 +155,14 @@ module AvaTax
|
|
150
155
|
#
|
151
156
|
# ### Security Policies
|
152
157
|
#
|
153
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
158
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
159
|
+
# Swagger Name: AvaTaxClient
|
154
160
|
# @param companyId [Integer] The ID of the company that this setting belongs to.
|
155
161
|
# @param id [Integer] The ID of the setting you wish to update
|
156
162
|
# @param model [Object] The setting you wish to update.
|
157
|
-
# @return [Object]
|
158
|
-
def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
159
|
-
put(path, model) end
|
160
|
-
end
|
161
|
-
end
|
163
|
+
# @return [Object]
|
164
|
+
def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
165
|
+
put(path, model, {}, "22.2.0") end
|
166
|
+
end
|
167
|
+
end
|
162
168
|
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module ShippingVerification
|
4
|
+
|
5
|
+
|
6
|
+
# Removes the transaction from consideration when evaluating regulations that span multiple transactions.
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# Swagger Name: AvaTaxBeverageClient
|
10
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
11
|
+
# @param transactionCode [String] The transaction code to retrieve
|
12
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
13
|
+
# @return []
|
14
|
+
def deregister_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
|
15
|
+
delete(path, options, "") end
|
16
|
+
|
17
|
+
# Registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
|
18
|
+
#
|
19
|
+
#
|
20
|
+
# Swagger Name: AvaTaxBeverageClient
|
21
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
22
|
+
# @param transactionCode [String] The transaction code to retrieve
|
23
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
24
|
+
# @return []
|
25
|
+
def register_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
|
26
|
+
put(path, options, "") end
|
27
|
+
|
28
|
+
# Evaluates a transaction against a set of direct-to-consumer shipping regulations and, if compliant, registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
|
29
|
+
#
|
30
|
+
#
|
31
|
+
# Swagger Name: AvaTaxBeverageClient
|
32
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
33
|
+
# @param transactionCode [String] The transaction code to retrieve
|
34
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
35
|
+
# @return [Object]
|
36
|
+
def register_shipment_if_compliant(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registerIfCompliant"
|
37
|
+
put(path, options, "") end
|
38
|
+
|
39
|
+
# Evaluates a transaction against a set of direct-to-consumer shipping regulations.
|
40
|
+
#
|
41
|
+
# The transaction and its lines must meet the following criteria in order to be evaluated:
|
42
|
+
# * The transaction must be recorded. Using a type of *SalesInvoice* is recommended.
|
43
|
+
# * A parameter with the name *AlcoholRouteType* must be specified and the value must be one of the following: '*DTC*', '*Retailer DTC*'
|
44
|
+
# * A parameter with the name *RecipientName* must be specified and the value must be the name of the recipient.
|
45
|
+
# * Each alcohol line must include a *ContainerSize* parameter that describes the volume of a single container. Use the *unit* field to specify one of the following units: '*Litre*', '*Millilitre*', '*gallon (US fluid)*', '*quart (US fluid)*', '*ounce (fluid US customary)*'
|
46
|
+
# * Each alcohol line must include a *PackSize* parameter that describes the number of containers in a pack. Specify *Count* in the *unit* field.
|
47
|
+
#
|
48
|
+
# Optionally, the transaction and its lines may use the following parameters:
|
49
|
+
# * The *ShipDate* parameter may be used if the date of shipment is different than the date of the transaction. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
50
|
+
# * The *RecipientDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
51
|
+
# * The *PurchaserDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21).
|
52
|
+
# * The *SalesLocation* parameter may be used to describe whether the sale was made *OnSite* or *OffSite*. *OffSite* is the default value.
|
53
|
+
# * The *AlcoholContent* parameter may be used to describe the alcohol percentage by volume of the item. Specify *Percentage* in the *unit* field.
|
54
|
+
#
|
55
|
+
# **Security Policies**
|
56
|
+
# This API depends on all of the following active subscriptions: *AvaAlcohol, AutoAddress, AvaTaxPro*
|
57
|
+
# Swagger Name: AvaTaxBeverageClient
|
58
|
+
# @param companyCode [String] The company code of the company that recorded the transaction
|
59
|
+
# @param transactionCode [String] The transaction code to retrieve
|
60
|
+
# @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
|
61
|
+
# @return [Object]
|
62
|
+
def verify_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/verify"
|
63
|
+
get(path, options, "") end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -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, {}, "22.2.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, "22.2.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, "22.2.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, {}, "22.2.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, {}, "22.2.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, {}, "22.2.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, "22.2.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, "22.2.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, {}, "22.2.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, {}, "22.2.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, "22.2.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, "22.2.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, "22.2.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, "22.2.0") end
|
200
|
+
end
|
201
|
+
end
|
197
202
|
end
|