avatax 17.5.0 → 17.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 int companyId The ID of the company that owns the filings.
17
- # @param int year The year of the filing period to approve.
18
- # @param int month The month of the filing period to approve.
19
- # @param ApproveFilingsModel model The approve request you wish to execute.
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 int companyId The ID of the company that owns the filings.
39
- # @param int year The year of the filing period to approve.
40
- # @param int month The month of the filing period to approve.
41
- # @param string country The two-character ISO-3166 code for the country.
42
- # @param ApproveFilingsModel model The approve request you wish to execute.
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 int companyId The ID of the company that owns the filings.
62
- # @param int year The year of the filing period to approve.
63
- # @param int month The month of the filing period to approve.
64
- # @param string country The two-character ISO-3166 code for the country.
65
- # @param string region The two or three character region code for the region.
66
- # @param ApproveFilingsModel model The approve request you wish to execute.
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 int companyId The ID of the company that owns the filing being adjusted.
85
- # @param int year The year of the filing's filing period being adjusted.
86
- # @param int month The month of the filing's filing period being adjusted.
87
- # @param string country The two-character ISO-3166 code for the country of the filing being adjusted.
88
- # @param string region The two or three character region code for the region.
89
- # @param string formCode The unique code of the form being adjusted.
90
- # @param FilingAdjustmentModel[] model A list of Adjustments to be created for the specified filing.
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 int companyId The ID of the company that owns the filing being changed.
108
- # @param int year The month of the filing's filing period being changed.
109
- # @param int month The month of the filing's filing period being changed.
110
- # @param string country The two-character ISO-3166 code for the country of the filing being changed.
111
- # @param string region The two or three character region code for the region of the filing being changed.
112
- # @param string formCode The unique code of the form being changed.
113
- # @param FilingAugmentationModel[] model A list of augmentations to be created for the specified filing.
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 int companyId The ID of the company that owns the filing being adjusted.
132
- # @param int id The ID of the adjustment being deleted.
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 int companyId The ID of the company that owns the filing being changed.
150
- # @param int id The ID of the augmentation being added.
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 int worksheetId The unique id of the worksheet.
164
- # @param int companyId The unique ID of the company that owns the worksheet.
165
- # @return FilingsCheckupModel
166
- def filings_checkup_report(worksheetId, companyId)
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 int companyId The unique ID of the company that owns the worksheets object.
178
- # @param int year The year of the filing period.
179
- # @param int month The month of the filing period.
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 int companyId The ID of the company that owns the filings.
193
- # @param int filingId The unique id of the worksheet return.
194
- # @param int fileId The unique id of the document you are downloading
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 int companyId The ID of the company that owns the filings.
210
- # @param int year The year of the filing period.
211
- # @param int month The two digit month of the filing period.
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 int companyId The ID of the company that owns the filings.
227
- # @param int year The year of the filing period.
228
- # @param int month The two digit month of the filing period.
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 int companyId The ID of the company that owns the filings.
244
- # @param int year The year of the filing period.
245
- # @param int month The two digit month of the filing period.
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 int companyId The ID of the company that owns the filings.
261
- # @param int year The year of the filing period.
262
- # @param int month The two digit month of the filing period.
263
- # @param string country The two-character ISO-3166 code for the country.
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 int companyId The ID of the company that owns the filings.
279
- # @param int year The year of the filing period.
280
- # @param int month The two digit month of the filing period.
281
- # @param string country The two-character ISO-3166 code for the country.
282
- # @param string region The two or three character region code for the region.
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 int companyId The ID of the company that owns the filings.
298
- # @param int year The year of the filing period.
299
- # @param int month The two digit month of the filing period.
300
- # @param string country The two-character ISO-3166 code for the country.
301
- # @param string region The two or three character region code for the region.
302
- # @param string formCode The unique code of the form.
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 int companyId The ID of the company that owns the filings.
321
- # @param int year The year of the filing period to be rebuilt.
322
- # @param int month The month of the filing period to be rebuilt.
323
- # @param RebuildFilingsModel model The rebuild request you wish to execute.
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 int companyId The ID of the company that owns the filings.
342
- # @param int year The year of the filing period to be rebuilt.
343
- # @param int month The month of the filing period to be rebuilt.
344
- # @param string country The two-character ISO-3166 code for the country.
345
- # @param RebuildFilingsModel model The rebuild request you wish to execute.
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 int companyId The ID of the company that owns the filings.
364
- # @param int year The year of the filing period to be rebuilt.
365
- # @param int month The month of the filing period to be rebuilt.
366
- # @param string country The two-character ISO-3166 code for the country.
367
- # @param string region The two or three character region code for the region.
368
- # @param RebuildFilingsModel model The rebuild request you wish to execute.
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 int companyId The ID of the company that owns the filing being adjusted.
387
- # @param int id The ID of the adjustment being edited.
388
- # @param FilingAdjustmentModel model The updated Adjustment.
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 int companyId The ID of the company that owns the filing being changed.
406
- # @param int id The ID of the augmentation being edited.
407
- # @param FilingAugmentationModel model The updated Augmentation.
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