avatax 20.5.0 → 20.6.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 +116 -83
- data/lib/avatax/client/addresses.rb +26 -20
- data/lib/avatax/client/advancedrules.rb +56 -41
- data/lib/avatax/client/avafileforms.rb +56 -41
- data/lib/avatax/client/batches.rb +125 -48
- data/lib/avatax/client/certexpressinvites.rb +36 -27
- data/lib/avatax/client/certificates.rb +156 -111
- data/lib/avatax/client/companies.rb +166 -118
- data/lib/avatax/client/compliance.rb +16 -13
- data/lib/avatax/client/contacts.rb +66 -48
- data/lib/avatax/client/customers.rb +136 -97
- data/lib/avatax/client/datasources.rb +66 -48
- data/lib/avatax/client/definitions.rb +596 -419
- data/lib/avatax/client/distancethresholds.rb +66 -48
- data/lib/avatax/client/filingcalendars.rb +16 -13
- data/lib/avatax/client/filings.rb +16 -13
- data/lib/avatax/client/firmclientlinkages.rb +96 -69
- data/lib/avatax/client/free.rb +36 -27
- data/lib/avatax/client/fundingrequests.rb +26 -20
- data/lib/avatax/client/items.rb +196 -139
- data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
- data/lib/avatax/client/locations.rb +76 -55
- data/lib/avatax/client/multidocument.rb +106 -76
- data/lib/avatax/client/nexus.rb +82 -183
- data/lib/avatax/client/notifications.rb +36 -27
- data/lib/avatax/client/provisioning.rb +26 -20
- data/lib/avatax/client/registrar.rb +106 -76
- data/lib/avatax/client/reports.rb +46 -34
- data/lib/avatax/client/settings.rb +66 -48
- data/lib/avatax/client/subscriptions.rb +36 -27
- data/lib/avatax/client/taxcodes.rb +66 -48
- data/lib/avatax/client/taxcontent.rb +36 -27
- data/lib/avatax/client/taxrules.rb +66 -48
- data/lib/avatax/client/transactions.rb +216 -153
- data/lib/avatax/client/upcs.rb +66 -48
- data/lib/avatax/client/users.rb +86 -62
- data/lib/avatax/client/utilities.rb +36 -27
- data/lib/avatax/version.rb +1 -1
- metadata +2 -2
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Registrar
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new account
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Registrar
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new account
|
7
|
+
#
|
8
8
|
# # For Registrar Use Only
|
9
9
|
# This API is for use by Avalara Registrar administrative users only.
|
10
10
|
#
|
@@ -13,14 +13,17 @@ module AvaTax
|
|
13
13
|
#
|
14
14
|
# ### Security Policies
|
15
15
|
#
|
16
|
-
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [AccountModel[]]
|
19
|
-
def create_account(model)
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
# @return [AccountModel[]]
|
19
|
+
def create_account(model)
|
20
|
+
path = "/api/v2/accounts"
|
21
|
+
post(path, model)
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
# Create new notifications.
|
26
|
+
#
|
24
27
|
# This API is available by invitation only.
|
25
28
|
#
|
26
29
|
# Create a single notification.
|
@@ -38,14 +41,17 @@ module AvaTax
|
|
38
41
|
# ### Security Policies
|
39
42
|
#
|
40
43
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
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].
|
44
|
+
# * 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].
|
42
45
|
# @param model [NotificationModel[]] The notifications you wish to create.
|
43
|
-
# @return [NotificationModel[]]
|
44
|
-
def create_notifications(model)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
# @return [NotificationModel[]]
|
47
|
+
def create_notifications(model)
|
48
|
+
path = "/api/v2/notifications"
|
49
|
+
post(path, model)
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
# Create a new subscription
|
54
|
+
#
|
49
55
|
# This API is for use by Avalara Registrar administrative users only.
|
50
56
|
#
|
51
57
|
# Create one or more new subscription objects attached to this account.
|
@@ -54,15 +60,18 @@ module AvaTax
|
|
54
60
|
#
|
55
61
|
# ### Security Policies
|
56
62
|
#
|
57
|
-
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
63
|
+
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
58
64
|
# @param accountId [Integer] The ID of the account that owns this subscription.
|
59
65
|
# @param model [SubscriptionModel[]] The subscription you wish to create.
|
60
|
-
# @return [SubscriptionModel[]]
|
61
|
-
def create_subscriptions(accountId, model)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
+
# @return [SubscriptionModel[]]
|
67
|
+
def create_subscriptions(accountId, model)
|
68
|
+
path = "/api/v2/accounts/#{accountId}/subscriptions"
|
69
|
+
post(path, model)
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
# Delete a single account
|
74
|
+
#
|
66
75
|
# # For Registrar Use Only
|
67
76
|
# This API is for use by Avalara Registrar administrative users only.
|
68
77
|
#
|
@@ -71,14 +80,17 @@ module AvaTax
|
|
71
80
|
#
|
72
81
|
# ### Security Policies
|
73
82
|
#
|
74
|
-
# * This API requires the user role SystemAdmin.
|
83
|
+
# * This API requires the user role SystemAdmin.
|
75
84
|
# @param id [Integer] The ID of the account you wish to delete.
|
76
|
-
# @return [ErrorDetail[]]
|
77
|
-
def delete_account(id)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
85
|
+
# @return [ErrorDetail[]]
|
86
|
+
def delete_account(id)
|
87
|
+
path = "/api/v2/accounts/#{id}"
|
88
|
+
delete(path)
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
# Delete a single notification.
|
93
|
+
#
|
82
94
|
# This API is available by invitation only.
|
83
95
|
#
|
84
96
|
# Delete the existing notification identified by this URL.
|
@@ -93,14 +105,17 @@ module AvaTax
|
|
93
105
|
# ### Security Policies
|
94
106
|
#
|
95
107
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
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].
|
108
|
+
# * 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].
|
97
109
|
# @param id [Integer] The id of the notification you wish to delete.
|
98
|
-
# @return [ErrorDetail[]]
|
99
|
-
def delete_notification(id)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
110
|
+
# @return [ErrorDetail[]]
|
111
|
+
def delete_notification(id)
|
112
|
+
path = "/api/v2/notifications/#{id}"
|
113
|
+
delete(path)
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
# Delete a single subscription
|
118
|
+
#
|
104
119
|
# # For Registrar Use Only
|
105
120
|
# This API is for use by Avalara Registrar administrative users only.
|
106
121
|
#
|
@@ -108,15 +123,18 @@ module AvaTax
|
|
108
123
|
#
|
109
124
|
# ### Security Policies
|
110
125
|
#
|
111
|
-
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
126
|
+
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
112
127
|
# @param accountId [Integer] The ID of the account that owns this subscription.
|
113
128
|
# @param id [Integer] The ID of the subscription you wish to delete.
|
114
|
-
# @return [ErrorDetail[]]
|
115
|
-
def delete_subscription(accountId, id)
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
129
|
+
# @return [ErrorDetail[]]
|
130
|
+
def delete_subscription(accountId, id)
|
131
|
+
path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
132
|
+
delete(path)
|
133
|
+
end
|
134
|
+
|
135
|
+
|
136
|
+
# Reset a user's password programmatically
|
137
|
+
#
|
120
138
|
# # For Registrar Use Only
|
121
139
|
# This API is for use by Avalara Registrar administrative users only.
|
122
140
|
#
|
@@ -127,16 +145,19 @@ module AvaTax
|
|
127
145
|
# ### Security Policies
|
128
146
|
#
|
129
147
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
130
|
-
# * This API is available to Avalara system-level (registrar-level) users only.
|
148
|
+
# * This API is available to Avalara system-level (registrar-level) users only.
|
131
149
|
# @param userId [Integer] The unique ID of the user whose password will be changed
|
132
150
|
# @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
|
133
151
|
# @param model [Object] The new password for this user
|
134
|
-
# @return [String]
|
135
|
-
def reset_password(userId, model, options={})
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
152
|
+
# @return [String]
|
153
|
+
def reset_password(userId, model, options={})
|
154
|
+
path = "/api/v2/passwords/#{userId}/reset"
|
155
|
+
post(path, model, options)
|
156
|
+
end
|
157
|
+
|
158
|
+
|
159
|
+
# Update a single account
|
160
|
+
#
|
140
161
|
# # For Registrar Use Only
|
141
162
|
# This API is for use by Avalara Registrar administrative users only.
|
142
163
|
#
|
@@ -144,15 +165,18 @@ module AvaTax
|
|
144
165
|
#
|
145
166
|
# ### Security Policies
|
146
167
|
#
|
147
|
-
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
168
|
+
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
148
169
|
# @param id [Integer] The ID of the account you wish to update.
|
149
170
|
# @param model [Object] The account object you wish to update.
|
150
|
-
# @return [Object]
|
151
|
-
def update_account(id, model)
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
171
|
+
# @return [Object]
|
172
|
+
def update_account(id, model)
|
173
|
+
path = "/api/v2/accounts/#{id}"
|
174
|
+
put(path, model)
|
175
|
+
end
|
176
|
+
|
177
|
+
|
178
|
+
# Update a single notification.
|
179
|
+
#
|
156
180
|
# This API is available by invitation only.
|
157
181
|
#
|
158
182
|
# Replaces the notification identified by this URL with a new notification.
|
@@ -167,15 +191,18 @@ module AvaTax
|
|
167
191
|
# ### Security Policies
|
168
192
|
#
|
169
193
|
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
170
|
-
# * 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].
|
194
|
+
# * 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].
|
171
195
|
# @param id [Integer] The id of the notification you wish to update.
|
172
196
|
# @param model [Object] The notification object you wish to update.
|
173
|
-
# @return [Object]
|
174
|
-
def update_notification(id, model)
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
197
|
+
# @return [Object]
|
198
|
+
def update_notification(id, model)
|
199
|
+
path = "/api/v2/notifications/#{id}"
|
200
|
+
put(path, model)
|
201
|
+
end
|
202
|
+
|
203
|
+
|
204
|
+
# Update a single subscription
|
205
|
+
#
|
179
206
|
# # For Registrar Use Only
|
180
207
|
# This API is for use by Avalara Registrar administrative users only.
|
181
208
|
#
|
@@ -187,13 +214,16 @@ module AvaTax
|
|
187
214
|
#
|
188
215
|
# ### Security Policies
|
189
216
|
#
|
190
|
-
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
217
|
+
# * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
191
218
|
# @param accountId [Integer] The ID of the account that this subscription belongs to.
|
192
219
|
# @param id [Integer] The ID of the subscription you wish to update
|
193
220
|
# @param model [Object] The subscription you wish to update.
|
194
|
-
# @return [Object]
|
195
|
-
def update_subscription(accountId, id, model)
|
196
|
-
|
197
|
-
|
198
|
-
|
221
|
+
# @return [Object]
|
222
|
+
def update_subscription(accountId, id, model)
|
223
|
+
path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
224
|
+
put(path, model)
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
end
|
199
229
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Reports
|
4
|
-
|
5
|
-
|
6
|
-
# Download a report
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Reports
|
4
|
+
|
5
|
+
|
6
|
+
# Download a report
|
7
|
+
#
|
8
8
|
# This API downloads the file associated with a report.
|
9
9
|
#
|
10
10
|
# If the report is not yet complete, you will receive a `ReportNotFinished` error. To check if a report is complete,
|
@@ -22,14 +22,17 @@ module AvaTax
|
|
22
22
|
#
|
23
23
|
# ### Security Policies
|
24
24
|
#
|
25
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
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
|
-
# @return [Object]
|
28
|
-
def download_report(id)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
# @return [Object]
|
28
|
+
def download_report(id)
|
29
|
+
path = "/api/v2/reports/#{id}/attachment"
|
30
|
+
get(path)
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
# Retrieve a single report
|
35
|
+
#
|
33
36
|
# Retrieve a single report by its unique ID number.
|
34
37
|
#
|
35
38
|
# Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
|
@@ -40,14 +43,17 @@ module AvaTax
|
|
40
43
|
# * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
|
41
44
|
# * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
|
42
45
|
#
|
43
|
-
# This API call returns information about any report type.
|
46
|
+
# This API call returns information about any report type.
|
44
47
|
# @param id [Integer] The unique ID number of the report to retrieve
|
45
|
-
# @return [Object]
|
46
|
-
def get_report(id)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
# @return [Object]
|
49
|
+
def get_report(id)
|
50
|
+
path = "/api/v2/reports/#{id}"
|
51
|
+
get(path)
|
52
|
+
end
|
53
|
+
|
54
|
+
|
55
|
+
# Initiate an ExportDocumentLine report task
|
56
|
+
#
|
51
57
|
# Begins running an `ExportDocumentLine` report task and returns the identity of the report.
|
52
58
|
#
|
53
59
|
# Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
|
@@ -62,15 +68,18 @@ module AvaTax
|
|
62
68
|
#
|
63
69
|
# ### Security Policies
|
64
70
|
#
|
65
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
71
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
66
72
|
# @param companyId [Integer] The unique ID number of the company to report on.
|
67
73
|
# @param model [Object] Options that may be configured to customize the report.
|
68
|
-
# @return [ReportModel[]]
|
69
|
-
def initiate_export_document_line_report(companyId, model)
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
+
# @return [ReportModel[]]
|
75
|
+
def initiate_export_document_line_report(companyId, model)
|
76
|
+
path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
|
77
|
+
post(path, model)
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
# List all report tasks for account
|
82
|
+
#
|
74
83
|
# List all report tasks for your account.
|
75
84
|
#
|
76
85
|
# Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
|
@@ -85,14 +94,17 @@ module AvaTax
|
|
85
94
|
#
|
86
95
|
# ### Security Policies
|
87
96
|
#
|
88
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
97
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
89
98
|
# @param companyId [Integer] The id of the company for which to get reports.
|
90
99
|
# @param pageKey [String] Provide a page key to retrieve the next page of results.
|
91
100
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
92
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.
|
93
|
-
# @return [FetchResult]
|
94
|
-
def list_reports(options={})
|
95
|
-
|
96
|
-
|
97
|
-
|
102
|
+
# @return [FetchResult]
|
103
|
+
def list_reports(options={})
|
104
|
+
path = "/api/v2/reports"
|
105
|
+
get(path, options)
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
98
110
|
end
|
@@ -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
|
@@ -18,15 +18,18 @@ module AvaTax
|
|
18
18
|
#
|
19
19
|
# ### Security Policies
|
20
20
|
#
|
21
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
21
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
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
|
-
# @return [SettingModel[]]
|
25
|
-
def create_settings(companyId, model)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
# @return [SettingModel[]]
|
25
|
+
def create_settings(companyId, model)
|
26
|
+
path = "/api/v2/companies/#{companyId}/settings"
|
27
|
+
post(path, model)
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
# Delete a single setting
|
32
|
+
#
|
30
33
|
# Mark the setting object at this URL as deleted.
|
31
34
|
#
|
32
35
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -40,15 +43,18 @@ module AvaTax
|
|
40
43
|
#
|
41
44
|
# ### Security Policies
|
42
45
|
#
|
43
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
46
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
44
47
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
45
48
|
# @param id [Integer] The ID of the setting you wish to delete.
|
46
|
-
# @return [ErrorDetail[]]
|
47
|
-
def delete_setting(companyId, id)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
# @return [ErrorDetail[]]
|
50
|
+
def delete_setting(companyId, id)
|
51
|
+
path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
52
|
+
delete(path)
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
# Retrieve a single setting
|
57
|
+
#
|
52
58
|
# Get a single setting object by its unique ID.
|
53
59
|
#
|
54
60
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -62,15 +68,18 @@ module AvaTax
|
|
62
68
|
#
|
63
69
|
# ### Security Policies
|
64
70
|
#
|
65
|
-
# * 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.
|
71
|
+
# * 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.
|
66
72
|
# @param companyId [Integer] The ID of the company that owns this setting
|
67
73
|
# @param id [Integer] The primary key of this setting
|
68
|
-
# @return [Object]
|
69
|
-
def get_setting(companyId, id)
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
+
# @return [Object]
|
75
|
+
def get_setting(companyId, id)
|
76
|
+
path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
77
|
+
get(path)
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
# Retrieve all settings for this company
|
82
|
+
#
|
74
83
|
# List all setting objects attached to this company.
|
75
84
|
#
|
76
85
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -87,19 +96,22 @@ module AvaTax
|
|
87
96
|
#
|
88
97
|
# ### Security Policies
|
89
98
|
#
|
90
|
-
# * 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
|
+
# * 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.
|
91
100
|
# @param companyId [Integer] The ID of the company that owns these settings
|
92
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/).
|
93
102
|
# @param include [String] A comma separated list of additional data to retrieve.
|
94
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.
|
95
104
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
96
105
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
97
|
-
# @return [FetchResult]
|
98
|
-
def list_settings_by_company(companyId, options={})
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
106
|
+
# @return [FetchResult]
|
107
|
+
def list_settings_by_company(companyId, options={})
|
108
|
+
path = "/api/v2/companies/#{companyId}/settings"
|
109
|
+
get(path, options)
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
# Retrieve all settings
|
114
|
+
#
|
103
115
|
# Get multiple setting objects across all companies.
|
104
116
|
#
|
105
117
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -116,18 +128,21 @@ module AvaTax
|
|
116
128
|
#
|
117
129
|
# ### Security Policies
|
118
130
|
#
|
119
|
-
# * 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.
|
131
|
+
# * 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.
|
120
132
|
# @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/).
|
121
133
|
# @param include [String] A comma separated list of additional data to retrieve.
|
122
134
|
# @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.
|
123
135
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
124
136
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
125
|
-
# @return [FetchResult]
|
126
|
-
def query_settings(options={})
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
137
|
+
# @return [FetchResult]
|
138
|
+
def query_settings(options={})
|
139
|
+
path = "/api/v2/settings"
|
140
|
+
get(path, options)
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
# Update a single setting
|
145
|
+
#
|
131
146
|
# Replace the existing setting object at this URL with an updated object.
|
132
147
|
#
|
133
148
|
# The company settings system is a metadata system that you can use to store extra information
|
@@ -145,13 +160,16 @@ module AvaTax
|
|
145
160
|
#
|
146
161
|
# ### Security Policies
|
147
162
|
#
|
148
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
163
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
149
164
|
# @param companyId [Integer] The ID of the company that this setting belongs to.
|
150
165
|
# @param id [Integer] The ID of the setting you wish to update
|
151
166
|
# @param model [Object] The setting you wish to update.
|
152
|
-
# @return [Object]
|
153
|
-
def update_setting(companyId, id, model)
|
154
|
-
|
155
|
-
|
156
|
-
|
167
|
+
# @return [Object]
|
168
|
+
def update_setting(companyId, id, model)
|
169
|
+
path = "/api/v2/companies/#{companyId}/settings/#{id}"
|
170
|
+
put(path, model)
|
171
|
+
end
|
172
|
+
|
173
|
+
end
|
174
|
+
end
|
157
175
|
end
|