avatax 17.5.0 → 17.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/avatax/client/accounts.rb +29 -39
- data/lib/avatax/client/addresses.rb +21 -25
- data/lib/avatax/client/batches.rb +33 -45
- data/lib/avatax/client/companies.rb +101 -72
- data/lib/avatax/client/contacts.rb +35 -47
- data/lib/avatax/client/definitions.rb +176 -218
- data/lib/avatax/client/filingcalendars.rb +172 -200
- data/lib/avatax/client/filings.rb +170 -194
- data/lib/avatax/client/free.rb +43 -41
- data/lib/avatax/client/fundingrequests.rb +11 -15
- data/lib/avatax/client/items.rb +36 -48
- data/lib/avatax/client/jurisdictionoverrides.rb +38 -50
- data/lib/avatax/client/locations.rb +39 -76
- data/lib/avatax/client/nexus.rb +43 -57
- data/lib/avatax/client/notices.rb +111 -111
- data/lib/avatax/client/onboarding.rb +3 -5
- data/lib/avatax/client/pointofsale.rb +3 -5
- data/lib/avatax/client/registrar.rb +60 -82
- data/lib/avatax/client/settings.rb +40 -52
- data/lib/avatax/client/subscriptions.rb +19 -25
- data/lib/avatax/client/taxcodes.rb +35 -47
- data/lib/avatax/client/taxcontent.rb +54 -0
- data/lib/avatax/client/taxrules.rb +35 -47
- data/lib/avatax/client/transactions.rb +141 -179
- data/lib/avatax/client/upcs.rb +35 -47
- data/lib/avatax/client/users.rb +36 -46
- data/lib/avatax/client/utilities.rb +8 -14
- data/lib/avatax/version.rb +1 -1
- metadata +3 -2
@@ -3,309 +3,281 @@ module AvaTax
|
|
3
3
|
module FilingCalendars
|
4
4
|
|
5
5
|
|
6
|
-
#
|
7
|
-
#
|
6
|
+
# Approve existing Filing Request
|
7
|
+
#
|
8
8
|
# This API is available by invitation only.
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# @
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
10
|
+
# are reviewed and validated by Avalara Compliance before being implemented.
|
11
|
+
# The filing request must be in the "ChangeRequest" status to be approved.
|
12
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing request object
|
13
|
+
# @param id [Integer] The unique ID of the filing request object
|
14
|
+
# @return [Object]
|
15
|
+
def approve_filing_request(companyId, id)
|
16
|
+
path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/approve"
|
17
|
+
post(path)
|
17
18
|
end
|
18
19
|
|
19
20
|
|
20
|
-
#
|
21
|
-
#
|
21
|
+
# Cancel existing Filing Request
|
22
|
+
#
|
22
23
|
# This API is available by invitation only.
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# @param
|
26
|
-
# @param
|
27
|
-
# @
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
path = "/api/v2/companies/#{companyId}/filingcalendars"
|
32
|
-
|
33
|
-
get(path, options)
|
24
|
+
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
25
|
+
# are reviewed and validated by Avalara Compliance before being implemented.
|
26
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing request object
|
27
|
+
# @param id [Integer] The unique ID of the filing request object
|
28
|
+
# @return [Object]
|
29
|
+
def cancel_filing_request(companyId, id)
|
30
|
+
path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/cancel"
|
31
|
+
post(path)
|
34
32
|
end
|
35
33
|
|
36
34
|
|
37
|
-
#
|
38
|
-
#
|
35
|
+
# Create a new filing request to cancel a filing calendar
|
36
|
+
#
|
39
37
|
# This API is available by invitation only.
|
38
|
+
#
|
40
39
|
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
41
40
|
# are reviewed and validated by Avalara Compliance before being implemented.
|
42
|
-
#
|
43
|
-
# @param
|
44
|
-
# @param
|
45
|
-
# @
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
41
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing calendar object
|
42
|
+
# @param id [Integer] The unique ID number of the filing calendar to cancel
|
43
|
+
# @param model [object[]] The cancellation request for this filing calendar
|
44
|
+
# @return [Object]
|
45
|
+
def cancel_filing_requests(companyId, id, model)
|
46
|
+
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/request"
|
47
|
+
post(path, model)
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
# Create a new filing request to create a filing calendar
|
52
|
+
#
|
53
|
+
# This API is available by invitation only.
|
54
|
+
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
55
|
+
# are reviewed and validated by Avalara Compliance before being implemented.
|
56
|
+
# @param companyId [Integer] The unique ID of the company that will add the new filing calendar
|
57
|
+
# @param model [object[]] Information about the proposed new filing calendar
|
58
|
+
# @return [Object]
|
59
|
+
def create_filing_requests(companyId, model)
|
60
|
+
path = "/api/v2/companies/#{companyId}/filingcalendars/add/request"
|
61
|
+
post(path, model)
|
53
62
|
end
|
54
63
|
|
55
64
|
|
56
65
|
# Returns a list of options for adding the specified form.
|
57
|
-
#
|
66
|
+
#
|
58
67
|
# This API is available by invitation only.
|
59
|
-
#
|
60
|
-
# @param
|
61
|
-
# @
|
62
|
-
# @return CycleAddOptionModel[]
|
68
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing calendar object
|
69
|
+
# @param formCode [String] The unique code of the form
|
70
|
+
# @return [object[]]
|
63
71
|
def cycle_safe_add(companyId, options={})
|
64
72
|
path = "/api/v2/companies/#{companyId}/filingcalendars/add/options"
|
65
|
-
|
66
73
|
get(path, options)
|
67
74
|
end
|
68
75
|
|
69
76
|
|
70
77
|
# Indicates when changes are allowed to be made to a filing calendar.
|
71
|
-
#
|
78
|
+
#
|
72
79
|
# This API is available by invitation only.
|
73
|
-
#
|
74
|
-
# @param
|
75
|
-
# @param
|
76
|
-
# @
|
77
|
-
# @return CycleEditOptionModel
|
80
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing calendar object
|
81
|
+
# @param id [Integer] The unique ID of the filing calendar object
|
82
|
+
# @param model [object[]] A list of filing calendar edits to be made
|
83
|
+
# @return [Object]
|
78
84
|
def cycle_safe_edit(companyId, id, model)
|
79
85
|
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/options"
|
80
|
-
|
81
86
|
post(path, model)
|
82
87
|
end
|
83
88
|
|
84
89
|
|
85
90
|
# Returns a list of options for expiring a filing calendar
|
86
|
-
#
|
91
|
+
#
|
87
92
|
# This API is available by invitation only.
|
88
|
-
#
|
89
|
-
# @param
|
90
|
-
# @
|
91
|
-
# @return CycleExpireModel
|
93
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing calendar object
|
94
|
+
# @param id [Integer] The unique ID of the filing calendar object
|
95
|
+
# @return [Object]
|
92
96
|
def cycle_safe_expiration(companyId, id)
|
93
97
|
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/options"
|
94
|
-
|
95
98
|
get(path)
|
96
99
|
end
|
97
100
|
|
98
101
|
|
99
102
|
# Delete a single filing calendar.
|
100
|
-
#
|
103
|
+
#
|
101
104
|
# This API is available by invitation only.
|
102
105
|
# Mark the existing notice object at this URL as deleted.
|
103
106
|
# A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
|
104
107
|
# Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
|
105
|
-
#
|
106
|
-
# @param
|
107
|
-
# @
|
108
|
-
# @return ErrorDetail[]
|
108
|
+
# @param companyId [Integer] The ID of the company that owns this filing calendar.
|
109
|
+
# @param id [Integer] The ID of the filing calendar you wish to delete.
|
110
|
+
# @return [object[]]
|
109
111
|
def delete_filing_calendar(companyId, id)
|
110
112
|
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}"
|
111
|
-
|
112
113
|
delete(path)
|
113
114
|
end
|
114
115
|
|
115
116
|
|
116
|
-
#
|
117
|
-
#
|
117
|
+
# Retrieve a single filing calendar
|
118
|
+
#
|
118
119
|
# This API is available by invitation only.
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
|
123
|
-
# @param int id The unique ID of the filing calendar object
|
124
|
-
# @param FilingCalendarModel model The filing calendar model you are wishing to update with.
|
125
|
-
# @return FilingCalendarModel
|
126
|
-
def filing_calendar_update(companyId, id, model)
|
120
|
+
# @param companyId [Integer] The ID of the company that owns this filing calendar
|
121
|
+
# @param id [Integer] The primary key of this filing calendar
|
122
|
+
# @return [Object]
|
123
|
+
def get_filing_calendar(companyId, id)
|
127
124
|
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}"
|
128
|
-
|
129
|
-
put(path, model)
|
125
|
+
get(path)
|
130
126
|
end
|
131
127
|
|
132
128
|
|
133
129
|
# Retrieve a single filing request
|
134
|
-
#
|
130
|
+
#
|
135
131
|
# This API is available by invitation only.
|
136
132
|
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
137
133
|
# are reviewed and validated by Avalara Compliance before being implemented.
|
138
|
-
#
|
139
|
-
# @param
|
140
|
-
# @
|
141
|
-
|
142
|
-
def filing_requests(companyId, id)
|
134
|
+
# @param companyId [Integer] The ID of the company that owns this filing calendar
|
135
|
+
# @param id [Integer] The primary key of this filing calendar
|
136
|
+
# @return [Object]
|
137
|
+
def get_filing_request(companyId, id)
|
143
138
|
path = "/api/v2/companies/#{companyId}/filingrequests/#{id}"
|
144
|
-
|
145
139
|
get(path)
|
146
140
|
end
|
147
141
|
|
148
142
|
|
149
|
-
#
|
150
|
-
#
|
143
|
+
# Retrieve all filing calendars for this company
|
144
|
+
#
|
151
145
|
# This API is available by invitation only.
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
# @param
|
156
|
-
# @param
|
157
|
-
# @return
|
158
|
-
def
|
159
|
-
path = "/api/v2/companies/#{companyId}/filingcalendars
|
160
|
-
|
161
|
-
post(path, model)
|
146
|
+
# @param companyId [Integer] The ID of the company that owns these batches
|
147
|
+
# @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/) .
|
148
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
149
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
150
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
151
|
+
# @return [FetchResult]
|
152
|
+
def list_filing_calendars(companyId, options={})
|
153
|
+
path = "/api/v2/companies/#{companyId}/filingcalendars"
|
154
|
+
get(path, options)
|
162
155
|
end
|
163
156
|
|
164
157
|
|
165
|
-
#
|
166
|
-
#
|
158
|
+
# Retrieve all filing requests for this company
|
159
|
+
#
|
167
160
|
# This API is available by invitation only.
|
168
161
|
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
169
162
|
# are reviewed and validated by Avalara Compliance before being implemented.
|
170
|
-
#
|
171
|
-
#
|
172
|
-
# @param
|
173
|
-
# @param
|
174
|
-
# @
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
163
|
+
# @param companyId [Integer] The ID of the company that owns these batches
|
164
|
+
# @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/) .
|
165
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
166
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
167
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
168
|
+
# @return [FetchResult]
|
169
|
+
def list_filing_requests(companyId, options={})
|
170
|
+
path = "/api/v2/companies/#{companyId}/filingrequests"
|
171
|
+
get(path, options)
|
179
172
|
end
|
180
173
|
|
181
174
|
|
182
|
-
#
|
183
|
-
#
|
175
|
+
# New request for getting for validating customer's login credentials
|
176
|
+
#
|
184
177
|
# This API is available by invitation only.
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
# @
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/cancel"
|
193
|
-
|
194
|
-
post(path)
|
178
|
+
#
|
179
|
+
# This API verifies that a customer has submitted correct login credentials for a tax authority's online filing system.
|
180
|
+
# @param model [Object] The model of the login information we are verifying
|
181
|
+
# @return [Object]
|
182
|
+
def login_verification_request(model)
|
183
|
+
path = "/api/v2/filingcalendars/credentials/verify"
|
184
|
+
post(path, model)
|
195
185
|
end
|
196
186
|
|
197
187
|
|
198
|
-
#
|
199
|
-
#
|
188
|
+
# Gets the request status and Login Result
|
189
|
+
#
|
200
190
|
# This API is available by invitation only.
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
# @param
|
205
|
-
# @
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/request"
|
210
|
-
|
211
|
-
post(path, model)
|
191
|
+
#
|
192
|
+
# This API checks the status of a login verification request. It may only be called by authorized users from the account
|
193
|
+
# that initially requested the login verification.
|
194
|
+
# @param jobId [Integer] The unique ID number of this login request
|
195
|
+
# @return [Object]
|
196
|
+
def login_verification_status(jobId)
|
197
|
+
path = "/api/v2/filingcalendars/credentials/#{jobId}"
|
198
|
+
get(path)
|
212
199
|
end
|
213
200
|
|
214
201
|
|
215
|
-
#
|
216
|
-
#
|
202
|
+
# Retrieve all filing calendars
|
203
|
+
#
|
217
204
|
# This API is available by invitation only.
|
218
|
-
# A
|
219
|
-
#
|
220
|
-
#
|
221
|
-
# @param
|
222
|
-
# @
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/request"
|
227
|
-
|
228
|
-
post(path, model)
|
205
|
+
# @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/) .
|
206
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
207
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
208
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
209
|
+
# @return [FetchResult]
|
210
|
+
def query_filing_calendars(options={})
|
211
|
+
path = "/api/v2/filingcalendars"
|
212
|
+
get(path, options)
|
229
213
|
end
|
230
214
|
|
231
215
|
|
232
|
-
#
|
233
|
-
#
|
216
|
+
# Retrieve all filing requests
|
217
|
+
#
|
234
218
|
# This API is available by invitation only.
|
235
219
|
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
236
220
|
# are reviewed and validated by Avalara Compliance before being implemented.
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
# @param
|
241
|
-
# @return
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
# Gets the request status and Login Result
|
250
|
-
#
|
251
|
-
# This API is available by invitation only.
|
252
|
-
#
|
253
|
-
# @param int jobId The unique ID number of this login request
|
254
|
-
# @return LoginVerificationOutputModel
|
255
|
-
def login_verification_get(jobId)
|
256
|
-
path = "/api/v2/filingcalendars/credentials/#{jobId}"
|
257
|
-
|
258
|
-
get(path)
|
221
|
+
#
|
222
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
223
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
224
|
+
# @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/) .
|
225
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
226
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
227
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
228
|
+
# @return [FetchResult]
|
229
|
+
def query_filing_requests(options={})
|
230
|
+
path = "/api/v2/filingrequests"
|
231
|
+
get(path, options)
|
259
232
|
end
|
260
233
|
|
261
234
|
|
262
|
-
#
|
263
|
-
#
|
235
|
+
# Create a new filing request to edit a filing calendar
|
236
|
+
#
|
264
237
|
# This API is available by invitation only.
|
265
|
-
#
|
266
|
-
#
|
267
|
-
#
|
268
|
-
|
269
|
-
|
270
|
-
|
238
|
+
#
|
239
|
+
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
240
|
+
# are reviewed and validated by Avalara Compliance before being implemented.
|
241
|
+
#
|
242
|
+
# Certain users may not update filing calendars directly. Instead, they may submit an edit request
|
243
|
+
# to modify the value of a filing calendar using this API.
|
244
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing calendar object
|
245
|
+
# @param id [Integer] The unique ID number of the filing calendar to edit
|
246
|
+
# @param model [object[]] A list of filing calendar edits to be made
|
247
|
+
# @return [Object]
|
248
|
+
def request_filing_calendar_update(companyId, id, model)
|
249
|
+
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/request"
|
271
250
|
post(path, model)
|
272
251
|
end
|
273
252
|
|
274
253
|
|
275
|
-
#
|
276
|
-
#
|
254
|
+
# Edit existing Filing Calendar's Notes
|
255
|
+
#
|
277
256
|
# This API is available by invitation only.
|
278
|
-
#
|
279
|
-
#
|
280
|
-
# @param
|
281
|
-
# @param
|
282
|
-
# @param
|
283
|
-
# @return
|
284
|
-
def
|
285
|
-
path = "/api/v2/filingcalendars"
|
286
|
-
|
287
|
-
get(path, options)
|
257
|
+
# This API only allows updating of internal notes and company filing instructions.
|
258
|
+
# All other updates must go through a filing request at this time.
|
259
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing request object
|
260
|
+
# @param id [Integer] The unique ID of the filing calendar object
|
261
|
+
# @param model [Object] The filing calendar model you are wishing to update with.
|
262
|
+
# @return [Object]
|
263
|
+
def update_filing_calendar(companyId, id, model)
|
264
|
+
path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}"
|
265
|
+
put(path, model)
|
288
266
|
end
|
289
267
|
|
290
268
|
|
291
|
-
#
|
292
|
-
#
|
269
|
+
# Edit existing Filing Request
|
270
|
+
#
|
293
271
|
# This API is available by invitation only.
|
294
272
|
# A "filing request" represents a request to change an existing filing calendar. Filing requests
|
295
273
|
# are reviewed and validated by Avalara Compliance before being implemented.
|
296
|
-
#
|
297
|
-
#
|
298
|
-
#
|
299
|
-
#
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
# @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
304
|
-
# @return FetchResult
|
305
|
-
def query_filing_requests(options={})
|
306
|
-
path = "/api/v2/filingrequests"
|
307
|
-
|
308
|
-
get(path, options)
|
274
|
+
# @param companyId [Integer] The unique ID of the company that owns the filing request object
|
275
|
+
# @param id [Integer] The unique ID of the filing request object
|
276
|
+
# @param model [Object] A list of filing calendar edits to be made
|
277
|
+
# @return [Object]
|
278
|
+
def update_filing_request(companyId, id, model)
|
279
|
+
path = "/api/v2/companies/#{companyId}/filingrequests/#{id}"
|
280
|
+
put(path, model)
|
309
281
|
end
|
310
282
|
|
311
283
|
end
|