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
@@ -4,411 +4,387 @@ module AvaTax
|
|
4
4
|
|
5
5
|
|
6
6
|
# Approve all filings for the specified company in the given filing period.
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# This API is available by invitation only.
|
9
9
|
# Approving a return means the customer is ready to let Avalara file that return.
|
10
|
-
# Customer either approves themselves from admin console,
|
10
|
+
# Customer either approves themselves from admin console,
|
11
11
|
# else system auto-approves the night before the filing cycle.
|
12
12
|
# Sometimes Compliance has to manually unapprove and reapprove to modify liability or filing for the customer.
|
13
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
13
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
14
14
|
# based on filing frequency of filing.
|
15
|
-
#
|
16
|
-
# @param
|
17
|
-
# @param
|
18
|
-
# @param
|
19
|
-
# @
|
20
|
-
# @return FilingModel[]
|
15
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
16
|
+
# @param year [Integer] The year of the filing period to approve.
|
17
|
+
# @param month [Integer] The month of the filing period to approve.
|
18
|
+
# @param model [Object] The approve request you wish to execute.
|
19
|
+
# @return [object[]]
|
21
20
|
def approve_filings(companyId, year, month, model)
|
22
21
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/approve"
|
23
|
-
|
24
22
|
post(path, model)
|
25
23
|
end
|
26
24
|
|
27
25
|
|
28
26
|
# Approve all filings for the specified company in the given filing period and country.
|
29
|
-
#
|
27
|
+
#
|
30
28
|
# This API is available by invitation only.
|
31
29
|
# Approving a return means the customer is ready to let Avalara file that return.
|
32
|
-
# Customer either approves themselves from admin console,
|
30
|
+
# Customer either approves themselves from admin console,
|
33
31
|
# else system auto-approves the night before the filing cycle.
|
34
32
|
# Sometimes Compliance has to manually unapprove and reapprove to modify liability or filing for the customer.
|
35
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
33
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
36
34
|
# based on filing frequency of filing.
|
37
|
-
#
|
38
|
-
# @param
|
39
|
-
# @param
|
40
|
-
# @param
|
41
|
-
# @param
|
42
|
-
# @
|
43
|
-
# @return FilingModel[]
|
35
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
36
|
+
# @param year [Integer] The year of the filing period to approve.
|
37
|
+
# @param month [Integer] The month of the filing period to approve.
|
38
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
39
|
+
# @param model [Object] The approve request you wish to execute.
|
40
|
+
# @return [object[]]
|
44
41
|
def approve_filings_country(companyId, year, month, country, model)
|
45
42
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/approve"
|
46
|
-
|
47
43
|
post(path, model)
|
48
44
|
end
|
49
45
|
|
50
46
|
|
51
47
|
# Approve all filings for the specified company in the given filing period, country and region.
|
52
|
-
#
|
48
|
+
#
|
53
49
|
# This API is available by invitation only.
|
54
50
|
# Approving a return means the customer is ready to let Avalara file that return.
|
55
|
-
# Customer either approves themselves from admin console,
|
51
|
+
# Customer either approves themselves from admin console,
|
56
52
|
# else system auto-approves the night before the filing cycle
|
57
53
|
# Sometimes Compliance has to manually unapprove and reapprove to modify liability or filing for the customer.
|
58
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
54
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
59
55
|
# based on filing frequency of filing.
|
60
|
-
#
|
61
|
-
# @param
|
62
|
-
# @param
|
63
|
-
# @param
|
64
|
-
# @param
|
65
|
-
# @param
|
66
|
-
# @
|
67
|
-
# @return FilingModel[]
|
56
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
57
|
+
# @param year [Integer] The year of the filing period to approve.
|
58
|
+
# @param month [Integer] The month of the filing period to approve.
|
59
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
60
|
+
# @param region [String] The two or three character region code for the region.
|
61
|
+
# @param model [Object] The approve request you wish to execute.
|
62
|
+
# @return [object[]]
|
68
63
|
def approve_filings_country_region(companyId, year, month, country, region, model)
|
69
64
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/approve"
|
70
|
-
|
71
65
|
post(path, model)
|
72
66
|
end
|
73
67
|
|
74
68
|
|
75
69
|
# Add an adjustment to a given filing.
|
76
|
-
#
|
70
|
+
#
|
77
71
|
# This API is available by invitation only.
|
78
72
|
# An "Adjustment" is usually an increase or decrease to customer funding to Avalara,
|
79
|
-
# such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
|
73
|
+
# such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
|
80
74
|
# Sometimes may be a manual change in tax liability similar to an augmentation.
|
81
75
|
# This API creates a new adjustment for an existing tax filing.
|
82
76
|
# This API can only be used when the filing has not yet been approved.
|
83
|
-
#
|
84
|
-
# @param
|
85
|
-
# @param
|
86
|
-
# @param
|
87
|
-
# @param
|
88
|
-
# @param
|
89
|
-
# @param
|
90
|
-
# @
|
91
|
-
# @return FilingAdjustmentModel[]
|
77
|
+
# @param companyId [Integer] The ID of the company that owns the filing being adjusted.
|
78
|
+
# @param year [Integer] The year of the filing's filing period being adjusted.
|
79
|
+
# @param month [Integer] The month of the filing's filing period being adjusted.
|
80
|
+
# @param country [String] The two-character ISO-3166 code for the country of the filing being adjusted.
|
81
|
+
# @param region [String] The two or three character region code for the region.
|
82
|
+
# @param formCode [String] The unique code of the form being adjusted.
|
83
|
+
# @param model [object[]] A list of Adjustments to be created for the specified filing.
|
84
|
+
# @return [object[]]
|
92
85
|
def create_return_adjustment(companyId, year, month, country, region, formCode, model)
|
93
86
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}/adjust"
|
94
|
-
|
95
87
|
post(path, model)
|
96
88
|
end
|
97
89
|
|
98
90
|
|
99
91
|
# Add an augmentation for a given filing.
|
100
|
-
#
|
92
|
+
#
|
101
93
|
# This API is available by invitation only.
|
102
|
-
# An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
|
94
|
+
# An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
|
103
95
|
# usually due to customer wanting to report tax Avatax does not support, e.g. bad debts, rental tax.
|
104
96
|
# This API creates a new augmentation for an existing tax filing.
|
105
97
|
# This API can only be used when the filing has not been approved.
|
106
|
-
#
|
107
|
-
# @param
|
108
|
-
# @param
|
109
|
-
# @param
|
110
|
-
# @param
|
111
|
-
# @param
|
112
|
-
# @param
|
113
|
-
# @
|
114
|
-
# @return FilingAugmentationModel[]
|
98
|
+
# @param companyId [Integer] The ID of the company that owns the filing being changed.
|
99
|
+
# @param year [Integer] The month of the filing's filing period being changed.
|
100
|
+
# @param month [Integer] The month of the filing's filing period being changed.
|
101
|
+
# @param country [String] The two-character ISO-3166 code for the country of the filing being changed.
|
102
|
+
# @param region [String] The two or three character region code for the region of the filing being changed.
|
103
|
+
# @param formCode [String] The unique code of the form being changed.
|
104
|
+
# @param model [object[]] A list of augmentations to be created for the specified filing.
|
105
|
+
# @return [object[]]
|
115
106
|
def create_return_augmentation(companyId, year, month, country, region, formCode, model)
|
116
107
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}/augment"
|
117
|
-
|
118
108
|
post(path, model)
|
119
109
|
end
|
120
110
|
|
121
111
|
|
122
112
|
# Delete an adjustment for a given filing.
|
123
|
-
#
|
113
|
+
#
|
124
114
|
# This API is available by invitation only.
|
125
115
|
# An "Adjustment" is usually an increase or decrease to customer funding to Avalara,
|
126
|
-
# such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
|
116
|
+
# such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
|
127
117
|
# Sometimes may be a manual change in tax liability similar to an augmentation.
|
128
118
|
# This API deletes an adjustment for an existing tax filing.
|
129
119
|
# This API can only be used when the filing has been unapproved.
|
130
|
-
#
|
131
|
-
# @param
|
132
|
-
# @
|
133
|
-
# @return ErrorDetail[]
|
120
|
+
# @param companyId [Integer] The ID of the company that owns the filing being adjusted.
|
121
|
+
# @param id [Integer] The ID of the adjustment being deleted.
|
122
|
+
# @return [object[]]
|
134
123
|
def delete_return_adjustment(companyId, id)
|
135
124
|
path = "/api/v2/companies/#{companyId}/filings/adjust/#{id}"
|
136
|
-
|
137
125
|
delete(path)
|
138
126
|
end
|
139
127
|
|
140
128
|
|
141
129
|
# Delete an augmentation for a given filing.
|
142
|
-
#
|
130
|
+
#
|
143
131
|
# This API is available by invitation only.
|
144
|
-
# An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
|
132
|
+
# An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
|
145
133
|
# usually due to customer wanting to report tax Avatax does not support, e.g. bad debts, rental tax.
|
146
134
|
# This API deletes an augmentation for an existing tax filing.
|
147
135
|
# This API can only be used when the filing has been unapproved.
|
148
|
-
#
|
149
|
-
# @param
|
150
|
-
# @
|
151
|
-
# @return ErrorDetail[]
|
136
|
+
# @param companyId [Integer] The ID of the company that owns the filing being changed.
|
137
|
+
# @param id [Integer] The ID of the augmentation being added.
|
138
|
+
# @return [object[]]
|
152
139
|
def delete_return_augmentation(companyId, id)
|
153
140
|
path = "/api/v2/companies/#{companyId}/filings/augment/#{id}"
|
154
|
-
|
155
141
|
delete(path)
|
156
142
|
end
|
157
143
|
|
158
144
|
|
159
145
|
# Retrieve worksheet checkup report for company and filing period.
|
160
|
-
#
|
146
|
+
#
|
161
147
|
# This API is available by invitation only.
|
162
|
-
#
|
163
|
-
# @param
|
164
|
-
# @
|
165
|
-
|
166
|
-
|
167
|
-
path = "/api/v2/companies/#{companyId}/filings/#{worksheetId}/checkup"
|
168
|
-
|
148
|
+
# @param filingsId [Integer] The unique id of the worksheet.
|
149
|
+
# @param companyId [Integer] The unique ID of the company that owns the worksheet.
|
150
|
+
# @return [Object]
|
151
|
+
def filings_checkup_report(filingsId, companyId)
|
152
|
+
path = "/api/v2/companies/#{companyId}/filings/#{filingsId}/checkup"
|
169
153
|
get(path)
|
170
154
|
end
|
171
155
|
|
172
156
|
|
173
157
|
# Retrieve worksheet checkup report for company and filing period.
|
174
|
-
#
|
158
|
+
#
|
175
159
|
# This API is available by invitation only.
|
176
|
-
#
|
177
|
-
# @param
|
178
|
-
# @param
|
179
|
-
# @
|
180
|
-
# @return FilingsCheckupModel
|
160
|
+
# @param companyId [Integer] The unique ID of the company that owns the worksheets object.
|
161
|
+
# @param year [Integer] The year of the filing period.
|
162
|
+
# @param month [Integer] The month of the filing period.
|
163
|
+
# @return [Object]
|
181
164
|
def filings_checkup_reports(companyId, year, month)
|
182
165
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/checkup"
|
183
|
-
|
184
166
|
get(path)
|
185
167
|
end
|
186
168
|
|
187
169
|
|
188
170
|
# Retrieve a single attachment for a filing
|
189
|
-
#
|
171
|
+
#
|
190
172
|
# This API is available by invitation only.
|
191
|
-
#
|
192
|
-
# @param
|
193
|
-
# @param
|
194
|
-
# @
|
195
|
-
# @return FileResult
|
173
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
174
|
+
# @param filingId [Integer] The unique id of the worksheet return.
|
175
|
+
# @param fileId [Integer] The unique id of the document you are downloading
|
176
|
+
# @return [Object]
|
196
177
|
def get_filing_attachment(companyId, filingId, options={})
|
197
178
|
path = "/api/v2/companies/#{companyId}/filings/#{filingId}/attachment"
|
198
|
-
|
199
179
|
get(path, options)
|
200
180
|
end
|
201
181
|
|
202
182
|
|
203
183
|
# Retrieve a list of filings for the specified company in the year and month of a given filing period.
|
204
|
-
#
|
184
|
+
#
|
205
185
|
# This API is available by invitation only.
|
206
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
186
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
207
187
|
# based on filing frequency of filing.
|
208
|
-
#
|
209
|
-
# @param
|
210
|
-
# @param
|
211
|
-
# @
|
212
|
-
# @return FileResult
|
188
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
189
|
+
# @param year [Integer] The year of the filing period.
|
190
|
+
# @param month [Integer] The two digit month of the filing period.
|
191
|
+
# @return [Object]
|
213
192
|
def get_filing_attachments(companyId, year, month)
|
214
193
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/attachments"
|
215
|
-
|
216
194
|
get(path)
|
217
195
|
end
|
218
196
|
|
219
197
|
|
220
198
|
# Retrieve a single trace file for a company filing period
|
221
|
-
#
|
199
|
+
#
|
222
200
|
# This API is available by invitation only.
|
223
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
201
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
224
202
|
# based on filing frequency of filing.
|
225
|
-
#
|
226
|
-
# @param
|
227
|
-
# @param
|
228
|
-
# @
|
229
|
-
# @return FileResult
|
203
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
204
|
+
# @param year [Integer] The year of the filing period.
|
205
|
+
# @param month [Integer] The two digit month of the filing period.
|
206
|
+
# @return [Object]
|
230
207
|
def get_filing_attachments_trace_file(companyId, year, month)
|
231
208
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/attachments/tracefile"
|
232
|
-
|
233
209
|
get(path)
|
234
210
|
end
|
235
211
|
|
236
212
|
|
237
213
|
# Retrieve a list of filings for the specified company in the year and month of a given filing period.
|
238
|
-
#
|
214
|
+
#
|
239
215
|
# This API is available by invitation only.
|
240
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
216
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
241
217
|
# based on filing frequency of filing.
|
242
|
-
#
|
243
|
-
# @param
|
244
|
-
# @param
|
245
|
-
# @
|
246
|
-
# @return FetchResult
|
218
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
219
|
+
# @param year [Integer] The year of the filing period.
|
220
|
+
# @param month [Integer] The two digit month of the filing period.
|
221
|
+
# @return [FetchResult]
|
247
222
|
def get_filings(companyId, year, month)
|
248
223
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}"
|
249
|
-
|
250
224
|
get(path)
|
251
225
|
end
|
252
226
|
|
253
227
|
|
254
228
|
# Retrieve a list of filings for the specified company in the given filing period and country.
|
255
|
-
#
|
229
|
+
#
|
256
230
|
# This API is available by invitation only.
|
257
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
231
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
258
232
|
# based on filing frequency of filing.
|
259
|
-
#
|
260
|
-
# @param
|
261
|
-
# @param
|
262
|
-
# @param
|
263
|
-
# @
|
264
|
-
# @return FetchResult
|
233
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
234
|
+
# @param year [Integer] The year of the filing period.
|
235
|
+
# @param month [Integer] The two digit month of the filing period.
|
236
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
237
|
+
# @return [FetchResult]
|
265
238
|
def get_filings_by_country(companyId, year, month, country)
|
266
239
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}"
|
267
|
-
|
268
240
|
get(path)
|
269
241
|
end
|
270
242
|
|
271
243
|
|
272
244
|
# Retrieve a list of filings for the specified company in the filing period, country and region.
|
273
|
-
#
|
245
|
+
#
|
274
246
|
# This API is available by invitation only.
|
275
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
247
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
276
248
|
# based on filing frequency of filing.
|
277
|
-
#
|
278
|
-
# @param
|
279
|
-
# @param
|
280
|
-
# @param
|
281
|
-
# @param
|
282
|
-
# @
|
283
|
-
# @return FetchResult
|
249
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
250
|
+
# @param year [Integer] The year of the filing period.
|
251
|
+
# @param month [Integer] The two digit month of the filing period.
|
252
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
253
|
+
# @param region [String] The two or three character region code for the region.
|
254
|
+
# @return [FetchResult]
|
284
255
|
def get_filings_by_country_region(companyId, year, month, country, region)
|
285
256
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}"
|
286
|
-
|
287
257
|
get(path)
|
288
258
|
end
|
289
259
|
|
290
260
|
|
291
261
|
# Retrieve a list of filings for the specified company in the given filing period, country, region and form.
|
292
|
-
#
|
262
|
+
#
|
293
263
|
# This API is available by invitation only.
|
294
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
264
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
295
265
|
# based on filing frequency of filing.
|
296
|
-
#
|
297
|
-
# @param
|
298
|
-
# @param
|
299
|
-
# @param
|
300
|
-
# @param
|
301
|
-
# @param
|
302
|
-
# @
|
303
|
-
# @return FetchResult
|
266
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
267
|
+
# @param year [Integer] The year of the filing period.
|
268
|
+
# @param month [Integer] The two digit month of the filing period.
|
269
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
270
|
+
# @param region [String] The two or three character region code for the region.
|
271
|
+
# @param formCode [String] The unique code of the form.
|
272
|
+
# @return [FetchResult]
|
304
273
|
def get_filings_by_return_name(companyId, year, month, country, region, formCode)
|
305
274
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}"
|
306
|
-
|
307
275
|
get(path)
|
308
276
|
end
|
309
277
|
|
310
278
|
|
279
|
+
# Retrieve a list of filings for the specified company in the year and month of a given filing period.
|
280
|
+
# This gets the basic information from the filings and doesn't include anything extra.
|
281
|
+
#
|
282
|
+
#
|
283
|
+
# @param companyId [Integer] The ID of the company that owns these batches
|
284
|
+
# @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
|
285
|
+
# @param endPeriodYear [Integer] The year of the period you are trying to retrieve
|
286
|
+
# @param frequency [String] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values)
|
287
|
+
# @param status [String] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values)
|
288
|
+
# @param country [String] The country of the return(s) you are trying to retrieve
|
289
|
+
# @param region [String] The region of the return(s) you are trying to retrieve
|
290
|
+
# @return [FetchResult]
|
291
|
+
def get_filings_returns(companyId, options={})
|
292
|
+
path = "/api/v2/companies/#{companyId}/filings/returns"
|
293
|
+
get(path, options)
|
294
|
+
end
|
295
|
+
|
296
|
+
|
311
297
|
# Rebuild a set of filings for the specified company in the given filing period.
|
312
|
-
#
|
298
|
+
#
|
313
299
|
# This API is available by invitation only.
|
314
300
|
# Rebuilding a return means re-creating or updating the amounts to be filed (worksheet) for a filing.
|
315
301
|
# Rebuilding has to be done whenever a customer adds transactions to a filing.
|
316
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
302
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
317
303
|
# based on filing frequency of filing.
|
318
304
|
# This API requires filing to be unapproved.
|
319
|
-
#
|
320
|
-
# @param
|
321
|
-
# @param
|
322
|
-
# @param
|
323
|
-
# @
|
324
|
-
# @return FetchResult
|
305
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
306
|
+
# @param year [Integer] The year of the filing period to be rebuilt.
|
307
|
+
# @param month [Integer] The month of the filing period to be rebuilt.
|
308
|
+
# @param model [Object] The rebuild request you wish to execute.
|
309
|
+
# @return [FetchResult]
|
325
310
|
def rebuild_filings(companyId, year, month, model)
|
326
311
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/rebuild"
|
327
|
-
|
328
312
|
post(path, model)
|
329
313
|
end
|
330
314
|
|
331
315
|
|
332
316
|
# Rebuild a set of filings for the specified company in the given filing period and country.
|
333
|
-
#
|
317
|
+
#
|
334
318
|
# This API is available by invitation only.
|
335
319
|
# Rebuilding a return means re-creating or updating the amounts to be filed (worksheet) for a filing.
|
336
320
|
# Rebuilding has to be done whenever a customer adds transactions to a filing.
|
337
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
321
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
338
322
|
# based on filing frequency of filing.
|
339
323
|
# This API requires filing to be unapproved.
|
340
|
-
#
|
341
|
-
# @param
|
342
|
-
# @param
|
343
|
-
# @param
|
344
|
-
# @param
|
345
|
-
# @
|
346
|
-
# @return FetchResult
|
324
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
325
|
+
# @param year [Integer] The year of the filing period to be rebuilt.
|
326
|
+
# @param month [Integer] The month of the filing period to be rebuilt.
|
327
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
328
|
+
# @param model [Object] The rebuild request you wish to execute.
|
329
|
+
# @return [FetchResult]
|
347
330
|
def rebuild_filings_by_country(companyId, year, month, country, model)
|
348
331
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/rebuild"
|
349
|
-
|
350
332
|
post(path, model)
|
351
333
|
end
|
352
334
|
|
353
335
|
|
354
336
|
# Rebuild a set of filings for the specified company in the given filing period, country and region.
|
355
|
-
#
|
337
|
+
#
|
356
338
|
# This API is available by invitation only.
|
357
339
|
# Rebuilding a return means re-creating or updating the amounts to be filed for a filing.
|
358
|
-
# Rebuilding has to be done whenever a customer adds transactions to a filing.
|
359
|
-
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
340
|
+
# Rebuilding has to be done whenever a customer adds transactions to a filing.
|
341
|
+
# A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
|
360
342
|
# based on filing frequency of filing.
|
361
343
|
# This API requires filing to be unapproved.
|
362
|
-
#
|
363
|
-
# @param
|
364
|
-
# @param
|
365
|
-
# @param
|
366
|
-
# @param
|
367
|
-
# @param
|
368
|
-
# @
|
369
|
-
# @return FetchResult
|
344
|
+
# @param companyId [Integer] The ID of the company that owns the filings.
|
345
|
+
# @param year [Integer] The year of the filing period to be rebuilt.
|
346
|
+
# @param month [Integer] The month of the filing period to be rebuilt.
|
347
|
+
# @param country [String] The two-character ISO-3166 code for the country.
|
348
|
+
# @param region [String] The two or three character region code for the region.
|
349
|
+
# @param model [Object] The rebuild request you wish to execute.
|
350
|
+
# @return [FetchResult]
|
370
351
|
def rebuild_filings_by_country_region(companyId, year, month, country, region, model)
|
371
352
|
path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/rebuild"
|
372
|
-
|
373
353
|
post(path, model)
|
374
354
|
end
|
375
355
|
|
376
356
|
|
377
357
|
# Edit an adjustment for a given filing.
|
378
|
-
#
|
358
|
+
#
|
379
359
|
# This API is available by invitation only.
|
380
360
|
# An "Adjustment" is usually an increase or decrease to customer funding to Avalara,
|
381
|
-
# such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
|
361
|
+
# such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
|
382
362
|
# Sometimes may be a manual change in tax liability similar to an augmentation.
|
383
363
|
# This API modifies an adjustment for an existing tax filing.
|
384
364
|
# This API can only be used when the filing has not yet been approved.
|
385
|
-
#
|
386
|
-
# @param
|
387
|
-
# @param
|
388
|
-
# @
|
389
|
-
# @return FilingAdjustmentModel
|
365
|
+
# @param companyId [Integer] The ID of the company that owns the filing being adjusted.
|
366
|
+
# @param id [Integer] The ID of the adjustment being edited.
|
367
|
+
# @param model [Object] The updated Adjustment.
|
368
|
+
# @return [Object]
|
390
369
|
def update_return_adjustment(companyId, id, model)
|
391
370
|
path = "/api/v2/companies/#{companyId}/filings/adjust/#{id}"
|
392
|
-
|
393
371
|
put(path, model)
|
394
372
|
end
|
395
373
|
|
396
374
|
|
397
375
|
# Edit an augmentation for a given filing.
|
398
|
-
#
|
376
|
+
#
|
399
377
|
# This API is available by invitation only.
|
400
|
-
# An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
|
378
|
+
# An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
|
401
379
|
# usually due to customer wanting to report tax Avatax does not support, e.g. bad debts, rental tax.
|
402
380
|
# This API modifies an augmentation for an existing tax filing.
|
403
381
|
# This API can only be used when the filing has not been approved.
|
404
|
-
#
|
405
|
-
# @param
|
406
|
-
# @param
|
407
|
-
# @
|
408
|
-
# @return FilingModel
|
382
|
+
# @param companyId [Integer] The ID of the company that owns the filing being changed.
|
383
|
+
# @param id [Integer] The ID of the augmentation being edited.
|
384
|
+
# @param model [Object] The updated Augmentation.
|
385
|
+
# @return [Object]
|
409
386
|
def update_return_augmentation(companyId, id, model)
|
410
387
|
path = "/api/v2/companies/#{companyId}/filings/augment/#{id}"
|
411
|
-
|
412
388
|
put(path, model)
|
413
389
|
end
|
414
390
|
|