avatax 20.7.0 → 21.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vs/slnx.sqlite +0 -0
- data/lib/avatax/client/accounts.rb +22 -55
- data/lib/avatax/client/addresses.rb +7 -13
- data/lib/avatax/client/advancedrules.rb +10 -38
- data/lib/avatax/client/avafileforms.rb +15 -30
- data/lib/avatax/client/batches.rb +16 -40
- data/lib/avatax/client/certexpressinvites.rb +21 -30
- data/lib/avatax/client/certificates.rb +97 -142
- data/lib/avatax/client/companies.rb +137 -80
- data/lib/avatax/client/compliance.rb +2 -5
- data/lib/avatax/client/contacts.rb +12 -30
- data/lib/avatax/client/customers.rb +87 -126
- data/lib/avatax/client/datasources.rb +18 -36
- data/lib/avatax/client/definitions.rb +126 -303
- data/lib/avatax/client/distancethresholds.rb +12 -30
- data/lib/avatax/client/ecms.rb +26 -31
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/errortransactions.rb +27 -15
- data/lib/avatax/client/filingcalendars.rb +17 -5
- data/lib/avatax/client/filings.rb +15 -7
- data/lib/avatax/client/firmclientlinkages.rb +18 -45
- data/lib/avatax/client/free.rb +2 -84
- data/lib/avatax/client/fundingrequests.rb +6 -12
- data/lib/avatax/client/items.rb +38 -95
- data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
- data/lib/avatax/client/locations.rb +128 -38
- data/lib/avatax/client/multidocument.rb +32 -62
- data/lib/avatax/client/nexus.rb +138 -37
- data/lib/avatax/client/notices.rb +47 -139
- data/lib/avatax/client/notifications.rb +6 -15
- data/lib/avatax/client/provisioning.rb +4 -10
- data/lib/avatax/client/registrar.rb +20 -50
- data/lib/avatax/client/reports.rb +17 -20
- data/lib/avatax/client/settings.rb +12 -30
- data/lib/avatax/client/subscriptions.rb +6 -15
- data/lib/avatax/client/taxcodes.rb +12 -30
- data/lib/avatax/client/taxcontent.rb +70 -16
- data/lib/avatax/client/taxprofiles.rb +14 -10
- data/lib/avatax/client/taxrules.rb +12 -30
- data/lib/avatax/client/transactions.rb +63 -126
- data/lib/avatax/client/upcs.rb +18 -36
- data/lib/avatax/client/users.rb +16 -40
- data/lib/avatax/client/utilities.rb +6 -15
- data/lib/avatax/configuration.rb +1 -1
- data/lib/avatax/request.rb +0 -2
- data/lib/avatax/version.rb +1 -1
- data/spec/avatax/request_spec.rb +25 -0
- metadata +4 -2
@@ -27,11 +27,8 @@ module AvaTax
|
|
27
27
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
|
28
28
|
# @param model [Object] Information about the account you wish to create and the selected product offerings.
|
29
29
|
# @return [Object]
|
30
|
-
def request_new_account(model)
|
31
|
-
path
|
32
|
-
post(path, model)
|
33
|
-
end
|
34
|
-
|
30
|
+
def request_new_account(model) path = "/api/v2/accounts/request"
|
31
|
+
post(path, model) end
|
35
32
|
|
36
33
|
# Request a new entitilement to an existing customer
|
37
34
|
#
|
@@ -46,11 +43,8 @@ module AvaTax
|
|
46
43
|
# @param id [Integer] The avatax account id of the customer
|
47
44
|
# @param offer [String] The offer to be added to an already existing customer
|
48
45
|
# @return [Object]
|
49
|
-
def request_new_entitlement(id, offer)
|
50
|
-
path
|
51
|
-
post(path)
|
52
|
-
end
|
53
|
-
|
46
|
+
def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
|
47
|
+
post(path) end
|
54
48
|
end
|
55
49
|
end
|
56
50
|
end
|
@@ -16,11 +16,8 @@ module AvaTax
|
|
16
16
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
17
17
|
# @param model [Object] The account you wish to create.
|
18
18
|
# @return [AccountModel[]]
|
19
|
-
def create_account(model)
|
20
|
-
path
|
21
|
-
post(path, model)
|
22
|
-
end
|
23
|
-
|
19
|
+
def create_account(model) path = "/api/v2/accounts"
|
20
|
+
post(path, model) end
|
24
21
|
|
25
22
|
# Create new notifications.
|
26
23
|
#
|
@@ -44,11 +41,8 @@ module AvaTax
|
|
44
41
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
|
45
42
|
# @param model [NotificationModel[]] The notifications you wish to create.
|
46
43
|
# @return [NotificationModel[]]
|
47
|
-
def create_notifications(model)
|
48
|
-
path
|
49
|
-
post(path, model)
|
50
|
-
end
|
51
|
-
|
44
|
+
def create_notifications(model) path = "/api/v2/notifications"
|
45
|
+
post(path, model) end
|
52
46
|
|
53
47
|
# Create a new subscription
|
54
48
|
#
|
@@ -64,11 +58,8 @@ module AvaTax
|
|
64
58
|
# @param accountId [Integer] The ID of the account that owns this subscription.
|
65
59
|
# @param model [SubscriptionModel[]] The subscription you wish to create.
|
66
60
|
# @return [SubscriptionModel[]]
|
67
|
-
def create_subscriptions(accountId, model)
|
68
|
-
path
|
69
|
-
post(path, model)
|
70
|
-
end
|
71
|
-
|
61
|
+
def create_subscriptions(accountId, model) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
62
|
+
post(path, model) end
|
72
63
|
|
73
64
|
# Delete a single account
|
74
65
|
#
|
@@ -83,11 +74,8 @@ module AvaTax
|
|
83
74
|
# * This API requires the user role SystemAdmin.
|
84
75
|
# @param id [Integer] The ID of the account you wish to delete.
|
85
76
|
# @return [ErrorDetail[]]
|
86
|
-
def delete_account(id)
|
87
|
-
path
|
88
|
-
delete(path)
|
89
|
-
end
|
90
|
-
|
77
|
+
def delete_account(id) path = "/api/v2/accounts/#{id}"
|
78
|
+
delete(path) end
|
91
79
|
|
92
80
|
# Delete a single notification.
|
93
81
|
#
|
@@ -108,11 +96,8 @@ module AvaTax
|
|
108
96
|
# * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
|
109
97
|
# @param id [Integer] The id of the notification you wish to delete.
|
110
98
|
# @return [ErrorDetail[]]
|
111
|
-
def delete_notification(id)
|
112
|
-
path
|
113
|
-
delete(path)
|
114
|
-
end
|
115
|
-
|
99
|
+
def delete_notification(id) path = "/api/v2/notifications/#{id}"
|
100
|
+
delete(path) end
|
116
101
|
|
117
102
|
# Delete a single subscription
|
118
103
|
#
|
@@ -127,11 +112,8 @@ module AvaTax
|
|
127
112
|
# @param accountId [Integer] The ID of the account that owns this subscription.
|
128
113
|
# @param id [Integer] The ID of the subscription you wish to delete.
|
129
114
|
# @return [ErrorDetail[]]
|
130
|
-
def delete_subscription(accountId, id)
|
131
|
-
path
|
132
|
-
delete(path)
|
133
|
-
end
|
134
|
-
|
115
|
+
def delete_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
116
|
+
delete(path) end
|
135
117
|
|
136
118
|
# Reset a user's password programmatically
|
137
119
|
#
|
@@ -150,11 +132,8 @@ module AvaTax
|
|
150
132
|
# @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
|
151
133
|
# @param model [Object] The new password for this user
|
152
134
|
# @return [String]
|
153
|
-
def reset_password(userId, model, options={})
|
154
|
-
path
|
155
|
-
post(path, model, options)
|
156
|
-
end
|
157
|
-
|
135
|
+
def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
|
136
|
+
post(path, model, options) end
|
158
137
|
|
159
138
|
# Update a single account
|
160
139
|
#
|
@@ -169,11 +148,8 @@ module AvaTax
|
|
169
148
|
# @param id [Integer] The ID of the account you wish to update.
|
170
149
|
# @param model [Object] The account object you wish to update.
|
171
150
|
# @return [Object]
|
172
|
-
def update_account(id, model)
|
173
|
-
path
|
174
|
-
put(path, model)
|
175
|
-
end
|
176
|
-
|
151
|
+
def update_account(id, model) path = "/api/v2/accounts/#{id}"
|
152
|
+
put(path, model) end
|
177
153
|
|
178
154
|
# Update a single notification.
|
179
155
|
#
|
@@ -195,11 +171,8 @@ module AvaTax
|
|
195
171
|
# @param id [Integer] The id of the notification you wish to update.
|
196
172
|
# @param model [Object] The notification object you wish to update.
|
197
173
|
# @return [Object]
|
198
|
-
def update_notification(id, model)
|
199
|
-
path
|
200
|
-
put(path, model)
|
201
|
-
end
|
202
|
-
|
174
|
+
def update_notification(id, model) path = "/api/v2/notifications/#{id}"
|
175
|
+
put(path, model) end
|
203
176
|
|
204
177
|
# Update a single subscription
|
205
178
|
#
|
@@ -219,11 +192,8 @@ module AvaTax
|
|
219
192
|
# @param id [Integer] The ID of the subscription you wish to update
|
220
193
|
# @param model [Object] The subscription you wish to update.
|
221
194
|
# @return [Object]
|
222
|
-
def update_subscription(accountId, id, model)
|
223
|
-
path
|
224
|
-
put(path, model)
|
225
|
-
end
|
226
|
-
|
195
|
+
def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
196
|
+
put(path, model) end
|
227
197
|
end
|
228
198
|
end
|
229
199
|
end
|
@@ -25,11 +25,8 @@ module AvaTax
|
|
25
25
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
26
26
|
# @param id [Integer] The unique ID number of this report
|
27
27
|
# @return [Object]
|
28
|
-
def download_report(id)
|
29
|
-
path
|
30
|
-
get(path)
|
31
|
-
end
|
32
|
-
|
28
|
+
def download_report(id) path = "/api/v2/reports/#{id}/attachment"
|
29
|
+
get(path) end
|
33
30
|
|
34
31
|
# Retrieve a single report
|
35
32
|
#
|
@@ -46,11 +43,8 @@ module AvaTax
|
|
46
43
|
# This API call returns information about any report type.
|
47
44
|
# @param id [Integer] The unique ID number of the report to retrieve
|
48
45
|
# @return [Object]
|
49
|
-
def get_report(id)
|
50
|
-
path
|
51
|
-
get(path)
|
52
|
-
end
|
53
|
-
|
46
|
+
def get_report(id) path = "/api/v2/reports/#{id}"
|
47
|
+
get(path) end
|
54
48
|
|
55
49
|
# Initiate an ExportDocumentLine report task
|
56
50
|
#
|
@@ -66,17 +60,23 @@ module AvaTax
|
|
66
60
|
#
|
67
61
|
# The `ExportDocumentLine` report produces information about invoice lines recorded within your account.
|
68
62
|
#
|
63
|
+
# To split large reports into multiple smaller partitions, use the numberOfPartitions and partition properties on ExportDocumentLineModel.
|
64
|
+
#
|
65
|
+
# Example - split a report into three partitions
|
66
|
+
#
|
67
|
+
# * Follow the steps above with numberOfPartitions = 3 and partition = 0
|
68
|
+
# * Follow the steps above with numberOfPartitions = 3 and partition = 1
|
69
|
+
# * Follow the steps above with numberOfPartitions = 3 and partition = 2
|
70
|
+
# * Once all three reports are downloaded merge the files on the client side.
|
71
|
+
#
|
69
72
|
# ### Security Policies
|
70
73
|
#
|
71
74
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
72
75
|
# @param companyId [Integer] The unique ID number of the company to report on.
|
73
76
|
# @param model [Object] Options that may be configured to customize the report.
|
74
77
|
# @return [ReportModel[]]
|
75
|
-
def initiate_export_document_line_report(companyId, model)
|
76
|
-
path
|
77
|
-
post(path, model)
|
78
|
-
end
|
79
|
-
|
78
|
+
def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
|
79
|
+
post(path, model) end
|
80
80
|
|
81
81
|
# List all report tasks for account
|
82
82
|
#
|
@@ -100,11 +100,8 @@ module AvaTax
|
|
100
100
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
101
101
|
# @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.
|
102
102
|
# @return [FetchResult]
|
103
|
-
def list_reports(options={})
|
104
|
-
path
|
105
|
-
get(path, options)
|
106
|
-
end
|
107
|
-
|
103
|
+
def list_reports(options={}) path = "/api/v2/reports"
|
104
|
+
get(path, options) end
|
108
105
|
end
|
109
106
|
end
|
110
107
|
end
|
@@ -22,11 +22,8 @@ module AvaTax
|
|
22
22
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
23
23
|
# @param model [SettingModel[]] The setting you wish to create.
|
24
24
|
# @return [SettingModel[]]
|
25
|
-
def create_settings(companyId, model)
|
26
|
-
path
|
27
|
-
post(path, model)
|
28
|
-
end
|
29
|
-
|
25
|
+
def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
|
26
|
+
post(path, model) end
|
30
27
|
|
31
28
|
# Delete a single setting
|
32
29
|
#
|
@@ -47,11 +44,8 @@ module AvaTax
|
|
47
44
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
48
45
|
# @param id [Integer] The ID of the setting you wish to delete.
|
49
46
|
# @return [ErrorDetail[]]
|
50
|
-
def delete_setting(companyId, id)
|
51
|
-
path
|
52
|
-
delete(path)
|
53
|
-
end
|
54
|
-
|
47
|
+
def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
48
|
+
delete(path) end
|
55
49
|
|
56
50
|
# Retrieve a single setting
|
57
51
|
#
|
@@ -72,11 +66,8 @@ module AvaTax
|
|
72
66
|
# @param companyId [Integer] The ID of the company that owns this setting
|
73
67
|
# @param id [Integer] The primary key of this setting
|
74
68
|
# @return [Object]
|
75
|
-
def get_setting(companyId, id)
|
76
|
-
path
|
77
|
-
get(path)
|
78
|
-
end
|
79
|
-
|
69
|
+
def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
70
|
+
get(path) end
|
80
71
|
|
81
72
|
# Retrieve all settings for this company
|
82
73
|
#
|
@@ -104,11 +95,8 @@ module AvaTax
|
|
104
95
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
105
96
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
106
97
|
# @return [FetchResult]
|
107
|
-
def list_settings_by_company(companyId, options={})
|
108
|
-
path
|
109
|
-
get(path, options)
|
110
|
-
end
|
111
|
-
|
98
|
+
def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
|
99
|
+
get(path, options) end
|
112
100
|
|
113
101
|
# Retrieve all settings
|
114
102
|
#
|
@@ -135,11 +123,8 @@ module AvaTax
|
|
135
123
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
136
124
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
137
125
|
# @return [FetchResult]
|
138
|
-
def query_settings(options={})
|
139
|
-
path
|
140
|
-
get(path, options)
|
141
|
-
end
|
142
|
-
|
126
|
+
def query_settings(options={}) path = "/api/v2/settings"
|
127
|
+
get(path, options) end
|
143
128
|
|
144
129
|
# Update a single setting
|
145
130
|
#
|
@@ -165,11 +150,8 @@ module AvaTax
|
|
165
150
|
# @param id [Integer] The ID of the setting you wish to update
|
166
151
|
# @param model [Object] The setting you wish to update.
|
167
152
|
# @return [Object]
|
168
|
-
def update_setting(companyId, id, model)
|
169
|
-
path
|
170
|
-
put(path, model)
|
171
|
-
end
|
172
|
-
|
153
|
+
def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
154
|
+
put(path, model) end
|
173
155
|
end
|
174
156
|
end
|
175
157
|
end
|
@@ -15,11 +15,8 @@ module AvaTax
|
|
15
15
|
# @param accountId [Integer] The ID of the account that owns this subscription
|
16
16
|
# @param id [Integer] The primary key of this subscription
|
17
17
|
# @return [Object]
|
18
|
-
def get_subscription(accountId, id)
|
19
|
-
path
|
20
|
-
get(path)
|
21
|
-
end
|
22
|
-
|
18
|
+
def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
19
|
+
get(path) end
|
23
20
|
|
24
21
|
# Retrieve subscriptions for this account
|
25
22
|
#
|
@@ -39,11 +36,8 @@ module AvaTax
|
|
39
36
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
40
37
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
41
38
|
# @return [FetchResult]
|
42
|
-
def list_subscriptions_by_account(accountId, options={})
|
43
|
-
path
|
44
|
-
get(path, options)
|
45
|
-
end
|
46
|
-
|
39
|
+
def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
|
40
|
+
get(path, options) end
|
47
41
|
|
48
42
|
# Retrieve all subscriptions
|
49
43
|
#
|
@@ -62,11 +56,8 @@ module AvaTax
|
|
62
56
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
63
57
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
64
58
|
# @return [FetchResult]
|
65
|
-
def query_subscriptions(options={})
|
66
|
-
path
|
67
|
-
get(path, options)
|
68
|
-
end
|
69
|
-
|
59
|
+
def query_subscriptions(options={}) path = "/api/v2/subscriptions"
|
60
|
+
get(path, options) end
|
70
61
|
end
|
71
62
|
end
|
72
63
|
end
|
@@ -17,11 +17,8 @@ module AvaTax
|
|
17
17
|
# @param companyId [Integer] The ID of the company that owns this tax code.
|
18
18
|
# @param model [TaxCodeModel[]] The tax code you wish to create.
|
19
19
|
# @return [TaxCodeModel[]]
|
20
|
-
def create_tax_codes(companyId, model)
|
21
|
-
path
|
22
|
-
post(path, model)
|
23
|
-
end
|
24
|
-
|
20
|
+
def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
|
21
|
+
post(path, model) end
|
25
22
|
|
26
23
|
# Delete a single tax code
|
27
24
|
#
|
@@ -33,11 +30,8 @@ module AvaTax
|
|
33
30
|
# @param companyId [Integer] The ID of the company that owns this tax code.
|
34
31
|
# @param id [Integer] The ID of the tax code you wish to delete.
|
35
32
|
# @return [ErrorDetail[]]
|
36
|
-
def delete_tax_code(companyId, id)
|
37
|
-
path
|
38
|
-
delete(path)
|
39
|
-
end
|
40
|
-
|
33
|
+
def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
34
|
+
delete(path) end
|
41
35
|
|
42
36
|
# Retrieve a single tax code
|
43
37
|
#
|
@@ -53,11 +47,8 @@ module AvaTax
|
|
53
47
|
# @param companyId [Integer] The ID of the company that owns this tax code
|
54
48
|
# @param id [Integer] The primary key of this tax code
|
55
49
|
# @return [Object]
|
56
|
-
def get_tax_code(companyId, id)
|
57
|
-
path
|
58
|
-
get(path)
|
59
|
-
end
|
60
|
-
|
50
|
+
def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
51
|
+
get(path) end
|
61
52
|
|
62
53
|
# Retrieve tax codes for this company
|
63
54
|
#
|
@@ -80,11 +71,8 @@ module AvaTax
|
|
80
71
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
81
72
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
82
73
|
# @return [FetchResult]
|
83
|
-
def list_tax_codes_by_company(companyId, options={})
|
84
|
-
path
|
85
|
-
get(path, options)
|
86
|
-
end
|
87
|
-
|
74
|
+
def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
|
75
|
+
get(path, options) end
|
88
76
|
|
89
77
|
# Retrieve all tax codes
|
90
78
|
#
|
@@ -106,11 +94,8 @@ module AvaTax
|
|
106
94
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
107
95
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
108
96
|
# @return [FetchResult]
|
109
|
-
def query_tax_codes(options={})
|
110
|
-
path
|
111
|
-
get(path, options)
|
112
|
-
end
|
113
|
-
|
97
|
+
def query_tax_codes(options={}) path = "/api/v2/taxcodes"
|
98
|
+
get(path, options) end
|
114
99
|
|
115
100
|
# Update a single tax code
|
116
101
|
#
|
@@ -129,11 +114,8 @@ module AvaTax
|
|
129
114
|
# @param id [Integer] The ID of the tax code you wish to update
|
130
115
|
# @param model [Object] The tax code you wish to update.
|
131
116
|
# @return [Object]
|
132
|
-
def update_tax_code(companyId, id, model)
|
133
|
-
path
|
134
|
-
put(path, model)
|
135
|
-
end
|
136
|
-
|
117
|
+
def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
118
|
+
put(path, model) end
|
137
119
|
end
|
138
120
|
end
|
139
121
|
end
|
@@ -32,14 +32,11 @@ 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
|
35
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
36
36
|
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
37
37
|
# @return [Object]
|
38
|
-
def build_tax_content_file(model)
|
39
|
-
path
|
40
|
-
post(path, model)
|
41
|
-
end
|
42
|
-
|
38
|
+
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
39
|
+
post(path, model) end
|
43
40
|
|
44
41
|
# Build a tax content file for a single location
|
45
42
|
#
|
@@ -70,7 +67,7 @@ module AvaTax
|
|
70
67
|
# ### Security Policies
|
71
68
|
#
|
72
69
|
# * 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.
|
73
|
-
# * This API depends on the following active services
|
70
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
74
71
|
# @param companyId [Integer] The ID number of the company that owns this location.
|
75
72
|
# @param id [Integer] The ID number of the location to retrieve point-of-sale data.
|
76
73
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
@@ -78,11 +75,8 @@ module AvaTax
|
|
78
75
|
# @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
|
79
76
|
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
80
77
|
# @return [Object]
|
81
|
-
def build_tax_content_file_for_location(companyId, id, options={})
|
82
|
-
path
|
83
|
-
get(path, options)
|
84
|
-
end
|
85
|
-
|
78
|
+
def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
79
|
+
get(path, options) end
|
86
80
|
|
87
81
|
# Download a file listing tax rates by postal code
|
88
82
|
#
|
@@ -133,11 +127,71 @@ module AvaTax
|
|
133
127
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
|
134
128
|
# @param region [String] A two character region code which limits results to a specific region.
|
135
129
|
# @return [Object]
|
136
|
-
def download_tax_rates_by_zip_code(date, options={})
|
137
|
-
path
|
138
|
-
|
139
|
-
|
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
|
+
#
|
135
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
136
|
+
# response code 429 - `Too Many Requests`.
|
137
|
+
#
|
138
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
139
|
+
# location in the United States only.
|
140
|
+
#
|
141
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
142
|
+
# which supports features including, but not limited to:
|
143
|
+
#
|
144
|
+
# * Nexus declarations
|
145
|
+
# * Taxability based on product/service type
|
146
|
+
# * Sourcing rules affecting origin/destination states
|
147
|
+
# * Customers who are exempt from certain taxes
|
148
|
+
# * States that have dollar value thresholds for tax amounts
|
149
|
+
# * Refunds for products purchased on a different date
|
150
|
+
# * Detailed jurisdiction names and state assigned codes
|
151
|
+
# * And more!
|
152
|
+
#
|
153
|
+
# 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.
|
155
|
+
# @param line1 [String] The street address of the location.
|
156
|
+
# @param line2 [String] The street address of the location.
|
157
|
+
# @param line3 [String] The street address of the location.
|
158
|
+
# @param city [String] The city name of the location.
|
159
|
+
# @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
|
+
# @param postalCode [String] The postal code of the location.
|
161
|
+
# @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
|
140
165
|
|
166
|
+
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
167
|
+
#
|
168
|
+
# This API is only available for a US postal codes.
|
169
|
+
#
|
170
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
171
|
+
# response code 429 - `Too Many Requests`.
|
172
|
+
#
|
173
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
174
|
+
# location in the United States only.
|
175
|
+
#
|
176
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
177
|
+
# which supports features including, but not limited to:
|
178
|
+
#
|
179
|
+
# * Nexus declarations
|
180
|
+
# * Taxability based on product/service type
|
181
|
+
# * Sourcing rules affecting origin/destination states
|
182
|
+
# * Customers who are exempt from certain taxes
|
183
|
+
# * States that have dollar value thresholds for tax amounts
|
184
|
+
# * Refunds for products purchased on a different date
|
185
|
+
# * Detailed jurisdiction names and state assigned codes
|
186
|
+
# * And more!
|
187
|
+
#
|
188
|
+
# 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.
|
190
|
+
# @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
|
+
# @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
|
141
195
|
end
|
142
196
|
end
|
143
197
|
end
|