avatax 19.7.0 → 19.8.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.
@@ -3,6 +3,309 @@ module AvaTax
3
3
  module Filings
4
4
 
5
5
 
6
+ # Approve all filings for the specified company in the given filing period.
7
+ #
8
+ # This API is available by invitation only.
9
+ # Approving a return means the customer is ready to let Avalara file that return.
10
+ # Customer either approves themselves from admin console,
11
+ # else system auto-approves the night before the filing cycle.
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,
14
+ # based on filing frequency of filing.
15
+ #
16
+ # ### Security Policies
17
+ #
18
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
19
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
20
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
21
+ # @param companyId [Integer] The ID of the company that owns the filings.
22
+ # @param year [Integer] The year of the filing period to approve.
23
+ # @param month [Integer] The month of the filing period to approve.
24
+ # @param model [Object] The approve request you wish to execute.
25
+ # @return [FilingModel[]]
26
+ def approve_filings(companyId, year, month, model)
27
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/approve"
28
+ post(path, model)
29
+ end
30
+
31
+
32
+ # Approve all filings for the specified company in the given filing period and country.
33
+ #
34
+ # This API is available by invitation only.
35
+ # Approving a return means the customer is ready to let Avalara file that return.
36
+ # Customer either approves themselves from admin console,
37
+ # else system auto-approves the night before the filing cycle.
38
+ # Sometimes Compliance has to manually unapprove and reapprove to modify liability or filing for the customer.
39
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
40
+ # based on filing frequency of filing.
41
+ #
42
+ # ### Security Policies
43
+ #
44
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
45
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
46
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
47
+ # @param companyId [Integer] The ID of the company that owns the filings.
48
+ # @param year [Integer] The year of the filing period to approve.
49
+ # @param month [Integer] The month of the filing period to approve.
50
+ # @param country [String] The two-character ISO-3166 code for the country.
51
+ # @param model [Object] The approve request you wish to execute.
52
+ # @return [FilingModel[]]
53
+ def approve_filings_country(companyId, year, month, country, model)
54
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/approve"
55
+ post(path, model)
56
+ end
57
+
58
+
59
+ # Approve all filings for the specified company in the given filing period, country and region.
60
+ #
61
+ # This API is available by invitation only.
62
+ # Approving a return means the customer is ready to let Avalara file that return.
63
+ # Customer either approves themselves from admin console,
64
+ # else system auto-approves the night before the filing cycle
65
+ # Sometimes Compliance has to manually unapprove and reapprove to modify liability or filing for the customer.
66
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
67
+ # based on filing frequency of filing.
68
+ #
69
+ # ### Security Policies
70
+ #
71
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
72
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
73
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
74
+ # @param companyId [Integer] The ID of the company that owns the filings.
75
+ # @param year [Integer] The year of the filing period to approve.
76
+ # @param month [Integer] The month of the filing period to approve.
77
+ # @param country [String] The two-character ISO-3166 code for the country.
78
+ # @param region [String] The two or three character region code for the region.
79
+ # @param model [Object] The approve request you wish to execute.
80
+ # @return [FilingModel[]]
81
+ def approve_filings_country_region(companyId, year, month, country, region, model)
82
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/approve"
83
+ post(path, model)
84
+ end
85
+
86
+
87
+ # Add an adjustment to a given filing.
88
+ #
89
+ # This API is available by invitation only.
90
+ # An "Adjustment" is usually an increase or decrease to customer funding to Avalara,
91
+ # such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
92
+ # Sometimes may be a manual change in tax liability similar to an augmentation.
93
+ # This API creates a new adjustment for an existing tax filing.
94
+ # This API can only be used when the filing has not yet been approved.
95
+ #
96
+ # ### Security Policies
97
+ #
98
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
99
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
100
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
101
+ # @param companyId [Integer] The ID of the company that owns the filing being adjusted.
102
+ # @param year [Integer] The year of the filing's filing period being adjusted.
103
+ # @param month [Integer] The month of the filing's filing period being adjusted.
104
+ # @param country [String] The two-character ISO-3166 code for the country of the filing being adjusted.
105
+ # @param region [String] The two or three character region code for the region.
106
+ # @param formCode [String] The unique code of the form being adjusted.
107
+ # @param model [FilingAdjustmentModel[]] A list of Adjustments to be created for the specified filing.
108
+ # @return [FilingAdjustmentModel[]]
109
+ def create_return_adjustment(companyId, year, month, country, region, formCode, model)
110
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}/adjust"
111
+ post(path, model)
112
+ end
113
+
114
+
115
+ # Add an augmentation for a given filing.
116
+ #
117
+ # This API is available by invitation only.
118
+ # An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
119
+ # usually due to customer wanting to report tax Avatax does not support, e.g. bad debts, rental tax.
120
+ # This API creates a new augmentation for an existing tax filing.
121
+ # This API can only be used when the filing has not been approved.
122
+ #
123
+ # ### Security Policies
124
+ #
125
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
126
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
127
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
128
+ # @param companyId [Integer] The ID of the company that owns the filing being changed.
129
+ # @param year [Integer] The month of the filing's filing period being changed.
130
+ # @param month [Integer] The month of the filing's filing period being changed.
131
+ # @param country [String] The two-character ISO-3166 code for the country of the filing being changed.
132
+ # @param region [String] The two or three character region code for the region of the filing being changed.
133
+ # @param formCode [String] The unique code of the form being changed.
134
+ # @param model [FilingAugmentationModel[]] A list of augmentations to be created for the specified filing.
135
+ # @return [FilingAugmentationModel[]]
136
+ def create_return_augmentation(companyId, year, month, country, region, formCode, model)
137
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}/augment"
138
+ post(path, model)
139
+ end
140
+
141
+
142
+ # Add an payment to a given filing.
143
+ #
144
+ # This API is available by invitation only.
145
+ # An "Payment" is usually an increase or decrease to customer funding to Avalara,
146
+ # such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
147
+ # Sometimes may be a manual change in tax liability similar to an augmentation.
148
+ # This API creates a new payment for an existing tax filing.
149
+ # This API can only be used when the filing has not yet been approved.
150
+ #
151
+ # ### Security Policies
152
+ #
153
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
154
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
155
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
156
+ # @param companyId [Integer] The ID of the company that owns the filing being adjusted.
157
+ # @param year [Integer] The year of the filing's filing period being adjusted.
158
+ # @param month [Integer] The month of the filing's filing period being adjusted.
159
+ # @param country [String] The two-character ISO-3166 code for the country of the filing being adjusted.
160
+ # @param region [String] The two or three character region code for the region.
161
+ # @param formCode [String] The unique code of the form being adjusted.
162
+ # @param model [FilingPaymentModel[]] A list of Payments to be created for the specified filing.
163
+ # @return [FilingPaymentModel[]]
164
+ def create_return_payment(companyId, year, month, country, region, formCode, model)
165
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}/payment"
166
+ post(path, model)
167
+ end
168
+
169
+
170
+ # Delete an adjustment for a given filing.
171
+ #
172
+ # This API is available by invitation only.
173
+ # An "Adjustment" is usually an increase or decrease to customer funding to Avalara,
174
+ # such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
175
+ # Sometimes may be a manual change in tax liability similar to an augmentation.
176
+ # This API deletes an adjustment for an existing tax filing.
177
+ # This API can only be used when the filing has been unapproved.
178
+ #
179
+ # ### Security Policies
180
+ #
181
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
182
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
183
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
184
+ # @param companyId [Integer] The ID of the company that owns the filing being adjusted.
185
+ # @param id [Integer] The ID of the adjustment being deleted.
186
+ # @param type [String] The type of adjustment that you are trying to delete.
187
+ # @return [ErrorDetail[]]
188
+ def delete_return_adjustment(companyId, id, options={})
189
+ path = "/api/v2/companies/#{companyId}/filings/adjust/#{id}"
190
+ delete(path, options)
191
+ end
192
+
193
+
194
+ # Delete an augmentation for a given filing.
195
+ #
196
+ # This API is available by invitation only.
197
+ # An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
198
+ # usually due to customer wanting to report tax Avatax does not support, e.g. bad debts, rental tax.
199
+ # This API deletes an augmentation for an existing tax filing.
200
+ # This API can only be used when the filing has been unapproved.
201
+ #
202
+ # ### Security Policies
203
+ #
204
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
205
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
206
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
207
+ # @param companyId [Integer] The ID of the company that owns the filing being changed.
208
+ # @param id [Integer] The ID of the augmentation being added.
209
+ # @return [ErrorDetail[]]
210
+ def delete_return_augmentation(companyId, id)
211
+ path = "/api/v2/companies/#{companyId}/filings/augment/#{id}"
212
+ delete(path)
213
+ end
214
+
215
+
216
+ # Delete an payment for a given filing.
217
+ #
218
+ # This API is available by invitation only.
219
+ # An "Payment" is usually an increase or decrease to customer funding to Avalara,
220
+ # such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
221
+ # Sometimes may be a manual change in tax liability similar to an augmentation.
222
+ # This API deletes an payment for an existing tax filing.
223
+ # This API can only be used when the filing has been unapproved.
224
+ #
225
+ # ### Security Policies
226
+ #
227
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
228
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
229
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
230
+ # @param companyId [Integer] The ID of the company that owns the filing being adjusted.
231
+ # @param id [Integer] The ID of the payment being deleted.
232
+ # @return [ErrorDetail[]]
233
+ def delete_return_payment(companyId, id)
234
+ path = "/api/v2/companies/#{companyId}/filings/payment/#{id}"
235
+ delete(path)
236
+ end
237
+
238
+
239
+ # Retrieve worksheet checkup report for company and filing period.
240
+ #
241
+ # This API is available by invitation only.
242
+ #
243
+ # ### Security Policies
244
+ #
245
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
246
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
247
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
248
+ # @param filingsId [Integer] The unique id of the worksheet.
249
+ # @param companyId [Integer] The unique ID of the company that owns the worksheet.
250
+ # @return [Object]
251
+ def filings_checkup_report(filingsId, companyId)
252
+ path = "/api/v2/companies/#{companyId}/filings/#{filingsId}/checkup"
253
+ get(path)
254
+ end
255
+
256
+
257
+ # Retrieve worksheet checkup report for company and filing period.
258
+ #
259
+ # This API is available by invitation only.
260
+ #
261
+ # ### Security Policies
262
+ #
263
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
264
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
265
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
266
+ # @param companyId [Integer] The unique ID of the company that owns the worksheets object.
267
+ # @param year [Integer] The year of the filing period.
268
+ # @param month [Integer] The month of the filing period.
269
+ # @return [Object]
270
+ def filings_checkup_reports(companyId, year, month)
271
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/checkup"
272
+ get(path)
273
+ end
274
+
275
+
276
+ # Retrieve a list of filings for the specified accrual return.
277
+ #
278
+ # ### Security Policies
279
+ #
280
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
281
+ # @param companyId [Integer] The ID of the company that owns these batches
282
+ # @param filingReturnId [Integer] The ID of the accrual return
283
+ # @return [FetchResult]
284
+ def get_accrual_fillings(companyId, filingReturnId)
285
+ path = "/api/v2/companies/#{companyId}/filings/accrual/#{filingReturnId}"
286
+ get(path)
287
+ end
288
+
289
+
290
+ # Retrieve a single attachment for a filing
291
+ #
292
+ # This API is available by invitation only.
293
+ #
294
+ # ### Security Policies
295
+ #
296
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
297
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
298
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
299
+ # @param companyId [Integer] The ID of the company that owns the filings.
300
+ # @param filingReturnId [Integer] The unique id of the worksheet return.
301
+ # @param fileId [Integer] The unique id of the document you are downloading
302
+ # @return [Object]
303
+ def get_filing_attachment(companyId, filingReturnId, options={})
304
+ path = "/api/v2/companies/#{companyId}/filings/#{filingReturnId}/attachment"
305
+ get(path, options)
306
+ end
307
+
308
+
6
309
  # Retrieve a list of filings for the specified company in the year and month of a given filing period.
7
310
  #
8
311
  # This API is available by invitation only.
@@ -44,6 +347,313 @@ module AvaTax
44
347
  get(path)
45
348
  end
46
349
 
350
+
351
+ # Retrieve a filing for the specified company and id.
352
+ #
353
+ # This API is available by invitation only.
354
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
355
+ # based on filing frequency of filing.
356
+ #
357
+ # ### Security Policies
358
+ #
359
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
360
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
361
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
362
+ # @param companyId [Integer] The ID of the company that owns the filings.
363
+ # @param id [Integer] The id of the filing return your retrieving
364
+ # @param details [Boolean] Indicates if you would like the credit details returned
365
+ # @return [Object]
366
+ def get_filing_return(companyId, id, options={})
367
+ path = "/api/v2/companies/#{companyId}/filings/returns/#{id}"
368
+ get(path, options)
369
+ end
370
+
371
+
372
+ # Retrieve a list of filings for the specified company in the year and month of a given filing period.
373
+ #
374
+ # This API is available by invitation only.
375
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
376
+ # based on filing frequency of filing.
377
+ #
378
+ # ### Security Policies
379
+ #
380
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
381
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
382
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
383
+ # @param companyId [Integer] The ID of the company that owns the filings.
384
+ # @param year [Integer] The year of the filing period.
385
+ # @param month [Integer] The two digit month of the filing period.
386
+ # @return [FetchResult]
387
+ def get_filings(companyId, year, month)
388
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}"
389
+ get(path)
390
+ end
391
+
392
+
393
+ # Retrieve a list of filings for the specified company in the given filing period and country.
394
+ #
395
+ # This API is available by invitation only.
396
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
397
+ # based on filing frequency of filing.
398
+ #
399
+ # ### Security Policies
400
+ #
401
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
402
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
403
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
404
+ # @param companyId [Integer] The ID of the company that owns the filings.
405
+ # @param year [Integer] The year of the filing period.
406
+ # @param month [Integer] The two digit month of the filing period.
407
+ # @param country [String] The two-character ISO-3166 code for the country.
408
+ # @return [FetchResult]
409
+ def get_filings_by_country(companyId, year, month, country)
410
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}"
411
+ get(path)
412
+ end
413
+
414
+
415
+ # Retrieve a list of filings for the specified company in the filing period, country and region.
416
+ #
417
+ # This API is available by invitation only.
418
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
419
+ # based on filing frequency of filing.
420
+ #
421
+ # ### Security Policies
422
+ #
423
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
424
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
425
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
426
+ # @param companyId [Integer] The ID of the company that owns the filings.
427
+ # @param year [Integer] The year of the filing period.
428
+ # @param month [Integer] The two digit month of the filing period.
429
+ # @param country [String] The two-character ISO-3166 code for the country.
430
+ # @param region [String] The two or three character region code for the region.
431
+ # @return [FetchResult]
432
+ def get_filings_by_country_region(companyId, year, month, country, region)
433
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}"
434
+ get(path)
435
+ end
436
+
437
+
438
+ # Retrieve a list of filings for the specified company in the given filing period, country, region and form.
439
+ #
440
+ # This API is available by invitation only.
441
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
442
+ # based on filing frequency of filing.
443
+ #
444
+ # ### Security Policies
445
+ #
446
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
447
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
448
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
449
+ # @param companyId [Integer] The ID of the company that owns the filings.
450
+ # @param year [Integer] The year of the filing period.
451
+ # @param month [Integer] The two digit month of the filing period.
452
+ # @param country [String] The two-character ISO-3166 code for the country.
453
+ # @param region [String] The two or three character region code for the region.
454
+ # @param formCode [String] The unique code of the form.
455
+ # @return [FetchResult]
456
+ def get_filings_by_return_name(companyId, year, month, country, region, formCode)
457
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/#{formCode}"
458
+ get(path)
459
+ end
460
+
461
+
462
+ # Retrieve a list of filings for the specified company in the year and month of a given filing period.
463
+ # This gets the basic information from the filings and doesn't include anything extra.
464
+ #
465
+ # ### Security Policies
466
+ #
467
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
468
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
469
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
470
+ # @param companyId [Integer] The ID of the company that owns these batches
471
+ # @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
472
+ # @param endPeriodYear [Integer] The year of the period you are trying to retrieve
473
+ # @param frequency [String] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values)
474
+ # @param status [String] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values)
475
+ # @param country [String] The country of the return(s) you are trying to retrieve
476
+ # @param region [String] The region of the return(s) you are trying to retrieve
477
+ # @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
478
+ # @return [FetchResult]
479
+ def get_filings_returns(companyId, options={})
480
+ path = "/api/v2/companies/#{companyId}/filings/returns"
481
+ get(path, options)
482
+ end
483
+
484
+
485
+ # Retrieve a list of filings for the specified company in the year and month of a given filing period.
486
+ #
487
+ # This API is available by invitation only.
488
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
489
+ # based on filing frequency of filing.
490
+ #
491
+ # ### Security Policies
492
+ #
493
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
494
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
495
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
496
+ # @param companyId [Integer] The ID of the company that owns the filings.
497
+ # @param year [Integer] The year of the filing period.
498
+ # @param month [Integer] The two digit month of the filing period.
499
+ # @param country [String] The two-character ISO-3166 code for the country.
500
+ # @param region [String] The two or three character region code for the region.
501
+ # @param formCode [String] The unique code of the form.
502
+ # @return [FetchResult]
503
+ def get_tax_filings(companyId, options={})
504
+ path = "/api/v2/companies/#{companyId}/filings"
505
+ get(path, options)
506
+ end
507
+
508
+
509
+ # Rebuild a set of filings for the specified company in the given filing period.
510
+ #
511
+ # This API is available by invitation only.
512
+ # Rebuilding a return means re-creating or updating the amounts to be filed (worksheet) for a filing.
513
+ # Rebuilding has to be done whenever a customer adds transactions to a filing.
514
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
515
+ # based on filing frequency of filing.
516
+ # This API requires filing to be unapproved.
517
+ #
518
+ # ### Security Policies
519
+ #
520
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
521
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
522
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
523
+ # @param companyId [Integer] The ID of the company that owns the filings.
524
+ # @param year [Integer] The year of the filing period to be rebuilt.
525
+ # @param month [Integer] The month of the filing period to be rebuilt.
526
+ # @param model [Object] The rebuild request you wish to execute.
527
+ # @return [FetchResult]
528
+ def rebuild_filings(companyId, year, month, model)
529
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/rebuild"
530
+ post(path, model)
531
+ end
532
+
533
+
534
+ # Rebuild a set of filings for the specified company in the given filing period and country.
535
+ #
536
+ # This API is available by invitation only.
537
+ # Rebuilding a return means re-creating or updating the amounts to be filed (worksheet) for a filing.
538
+ # Rebuilding has to be done whenever a customer adds transactions to a filing.
539
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
540
+ # based on filing frequency of filing.
541
+ # This API requires filing to be unapproved.
542
+ #
543
+ # ### Security Policies
544
+ #
545
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
546
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
547
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
548
+ # @param companyId [Integer] The ID of the company that owns the filings.
549
+ # @param year [Integer] The year of the filing period to be rebuilt.
550
+ # @param month [Integer] The month of the filing period to be rebuilt.
551
+ # @param country [String] The two-character ISO-3166 code for the country.
552
+ # @param model [Object] The rebuild request you wish to execute.
553
+ # @return [FetchResult]
554
+ def rebuild_filings_by_country(companyId, year, month, country, model)
555
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/rebuild"
556
+ post(path, model)
557
+ end
558
+
559
+
560
+ # Rebuild a set of filings for the specified company in the given filing period, country and region.
561
+ #
562
+ # This API is available by invitation only.audit.CheckAuthorizationReturns(null, companyId);
563
+ # Rebuilding a return means re-creating or updating the amounts to be filed for a filing.
564
+ # Rebuilding has to be done whenever a customer adds transactions to a filing.
565
+ # A "filing period" is the year and month of the date of the latest customer transaction allowed to be reported on a filing,
566
+ # based on filing frequency of filing.
567
+ # This API requires filing to be unapproved.
568
+ #
569
+ # ### Security Policies
570
+ #
571
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
572
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
573
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
574
+ # @param companyId [Integer] The ID of the company that owns the filings.
575
+ # @param year [Integer] The year of the filing period to be rebuilt.
576
+ # @param month [Integer] The month of the filing period to be rebuilt.
577
+ # @param country [String] The two-character ISO-3166 code for the country.
578
+ # @param region [String] The two or three character region code for the region.
579
+ # @param model [Object] The rebuild request you wish to execute.
580
+ # @return [FetchResult]
581
+ def rebuild_filings_by_country_region(companyId, year, month, country, region, model)
582
+ path = "/api/v2/companies/#{companyId}/filings/#{year}/#{month}/#{country}/#{region}/rebuild"
583
+ post(path, model)
584
+ end
585
+
586
+
587
+ # Edit an adjustment for a given filing.
588
+ #
589
+ # This API is available by invitation only.
590
+ # An "Adjustment" is usually an increase or decrease to customer funding to Avalara,
591
+ # such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
592
+ # Sometimes may be a manual change in tax liability similar to an augmentation.
593
+ # This API modifies an adjustment for an existing tax filing.
594
+ # This API can only be used when the filing has not yet been approved.
595
+ #
596
+ # ### Security Policies
597
+ #
598
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
599
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
600
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
601
+ # @param companyId [Integer] The ID of the company that owns the filing being adjusted.
602
+ # @param id [Integer] The ID of the adjustment being edited.
603
+ # @param model [Object] The updated Adjustment.
604
+ # @return [Object]
605
+ def update_return_adjustment(companyId, id, model)
606
+ path = "/api/v2/companies/#{companyId}/filings/adjust/#{id}"
607
+ put(path, model)
608
+ end
609
+
610
+
611
+ # Edit an augmentation for a given filing.
612
+ #
613
+ # This API is available by invitation only.
614
+ # An "Augmentation" is a manually added increase or decrease in tax liability, by either customer or Avalara
615
+ # usually due to customer wanting to report tax Avatax does not support, e.g. bad debts, rental tax.
616
+ # This API modifies an augmentation for an existing tax filing.
617
+ # This API can only be used when the filing has not been approved.
618
+ #
619
+ # ### Security Policies
620
+ #
621
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
622
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
623
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
624
+ # @param companyId [Integer] The ID of the company that owns the filing being changed.
625
+ # @param id [Integer] The ID of the augmentation being edited.
626
+ # @param model [Object] The updated Augmentation.
627
+ # @return [Object]
628
+ def update_return_augmentation(companyId, id, model)
629
+ path = "/api/v2/companies/#{companyId}/filings/augment/#{id}"
630
+ put(path, model)
631
+ end
632
+
633
+
634
+ # Edit an payment for a given filing.
635
+ #
636
+ # This API is available by invitation only.
637
+ # An "Payment" is usually an increase or decrease to customer funding to Avalara,
638
+ # such as early filer discount amounts that are refunded to the customer, or efile fees from websites.
639
+ # Sometimes may be a manual change in tax liability similar to an augmentation.
640
+ # This API modifies an payment for an existing tax filing.
641
+ # This API can only be used when the filing has not yet been approved.
642
+ #
643
+ # ### Security Policies
644
+ #
645
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, CSPTester, FirmUser, SSTAdmin, TechnicalSupportAdmin.
646
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
647
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
648
+ # @param companyId [Integer] The ID of the company that owns the filing being adjusted.
649
+ # @param id [Integer] The ID of the payment being edited.
650
+ # @param model [Object] The updated Payment.
651
+ # @return [Object]
652
+ def update_return_payment(companyId, id, model)
653
+ path = "/api/v2/companies/#{companyId}/filings/payment/#{id}"
654
+ put(path, model)
655
+ end
656
+
47
657
  end
48
658
  end
49
659
  end