checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA256:
3
- metadata.gz: 84e5af57881983a07a47bc4edf4f80952fc03655d04ffbdda0fd9ac1123d6bee
4
- data.tar.gz: 477b963fa3fdba9b2707e082eb4884d584ec651e791a877faa69565388eb0af1
3
+ metadata.gz: bb8f10b49682e45fdf31a4d133c20221f679e2f385717c04eb9fd3ef58a0a998
4
+ data.tar.gz: fadd3e37b607f12c071a4ce0fbeb789e14da605f0e179ee6051296a4815befec
5
5
SHA512:
6
- metadata.gz: f2881ca629ea60a47bef96885a1e87487bf2b79a6dd98c2a60b7f4d7bd83c6ccbd0501dfc11e9266e15c6c818440bc65ed62a9c30f3f9241b2c4aef3c48fd84a
7
- data.tar.gz: a2506d940ef9f8be009335cbcd83907815631cf1bb4540d2e1a3cc8ad1af6f2ee4c98f3bfc6a15393023e0e0d75c39952cb64599e30190b762a844dde1a746cb
6
+ metadata.gz: d7931a896e2a34828fdc2ba050dd78e242b35aa6a67ad1d22edf0aa351e17915ca1ea3df8f42dd35a7d8cb885a9a5376740d4745a2d4ebb98e123e8a28e73b20
7
+ data.tar.gz: 775389c619cabb591154437a28e158001206f63a2281c9390f72559c5ab8c6708a5773b37fc7f2d9d25470c5e0d324804115ad1ea7b6121fca79463cb8aac517
data/lib/avatax/client/avafileforms.rb CHANGED
@@ -11,8 +11,8 @@ module AvaTax
11
11
# ### Security Policies
12
12
#
13
13
# * This API requires the user role Compliance Root User.
14
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
15
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
14
+ # * 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.
15
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
16
16
# @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
17
17
# @return [AvaFileFormModel[]]
18
18
def create_ava_file_forms(model)
@@ -28,8 +28,8 @@ module AvaTax
28
28
# ### Security Policies
29
29
#
30
30
# * This API requires one of the following user roles: Compliance Root User, ComplianceUser, FirmAdmin.
31
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
32
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
31
+ # * 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.
32
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
33
33
# @param id [Integer] The ID of the AvaFileForm you wish to delete.
34
34
# @return [ErrorDetail[]]
35
35
def delete_ava_file_form(id)
@@ -45,8 +45,8 @@ module AvaTax
45
45
# ### Security Policies
46
46
#
47
47
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin.
48
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
49
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
48
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
49
+ # * 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.
50
50
# @param id [Integer] The primary key of this AvaFileForm
51
51
# @return [Object]
52
52
def get_ava_file_form(id)
@@ -63,10 +63,9 @@ module AvaTax
63
63
# ### Security Policies
64
64
#
65
65
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CompanyUser, Compliance Root User, Compliance Temp User, ComplianceAdmin, ComplianceUser, FirmAdmin, FirmUser, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin.
66
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
67
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
66
+ # * 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.
67
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
68
68
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* outletTypeId
69
- # @param include [String] A comma separated list of additional data to retrieve.
70
69
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
71
70
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
71
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -85,8 +84,8 @@ module AvaTax
85
84
# ### Security Policies
86
85
#
87
86
# * This API requires the user role Compliance Root User.
88
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
89
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
87
+ # * 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.
88
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
90
89
# @param id [Integer] The ID of the AvaFileForm you wish to update
91
90
# @param model [Object] The AvaFileForm model you wish to update.
92
91
# @return [Object]
data/lib/avatax/client/certificates.rb CHANGED
@@ -63,7 +63,7 @@ module AvaTax
63
63
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
64
64
# @param companyId [Integer] The unique ID number of the company that recorded this certificate
65
65
# @param id [Integer] The unique ID number of this certificate
66
- # @return [Object]
66
+ # @return [ErrorDetail[]]
67
67
def delete_certificate(companyId, id)
68
68
path = "/api/v2/companies/#{companyId}/certificates/#{id}"
69
69
delete(path)
@@ -308,7 +308,7 @@ module AvaTax
308
308
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
309
309
# @param companyId [Integer] The ID number of the company to search
310
310
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
311
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, pdf, pages
311
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
312
312
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
313
313
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
314
314
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
data/lib/avatax/client/compliance.rb CHANGED
@@ -3,112 +3,6 @@ module AvaTax
3
3
module Compliance
4
4
5
5
6
- # Retrieve a single tax rate.
7
- #
8
- # This API is available by invitation only.
9
- # @param id [Integer] The ID of the tax rate to retrieve.
10
- # @return [Object]
11
- def get_tax_rate(id)
12
- path = "/api/v2/compliance/taxrates/#{id}"
13
- get(path)
14
- end
15
-
16
-
17
- # Retrieve a single tax region.
18
- #
19
- # This API is available by invitation only.
20
- # @param id [Integer] The ID of the tax region to retrieve.
21
- # @return [Object]
22
- def get_tax_region(id)
23
- path = "/api/v2/compliance/taxregions/#{id}"
24
- get(path)
25
- end
26
-
27
-
28
- # Retrieve jurisdictions and rates in a combined format.
29
- #
30
- # This API is available by invitation only.
31
- # @param effectiveDate [DateTime] Used to limit the jurisdictions returned.
32
- # @param endDate [DateTime] Used to limit the jurisdictions returned.
33
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
34
- # @param include [String] A comma separated list of objects to fetch underneath this jurisdiction.
35
- # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
36
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
37
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
38
- # @return [Object]
39
- def query_jurisdiction_rates(options={})
40
- path = "/api/v2/compliance/jurisdictionrates"
41
- get(path, options)
42
- end
43
-
44
-
45
- # Retrieve all unique jurisdictions.
46
- #
47
- # This API is available by invitation only.
48
- #
49
- # You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
50
- #
51
- # * TaxRates
52
- # @param country [String] The two-character ISO-3166 code for the country.
53
- # @param region [String] The two or three character region code for the region.
54
- # @param effectiveDate [DateTime] Used to limit the jurisdictions or rates returned.
55
- # @param endDate [DateTime] Used to limit the jurisdictions or rates returned.
56
- # @param aggregationOption [String] Aggregation method used if rates are returned using the '$include' parameter. (See StackAggregationOption::* for a list of allowable values)
57
- # @param include [String] A comma separated list of objects to fetch underneath this tax rate.
58
- # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
59
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
60
- # @return [Object]
61
- def query_jurisdictions(country, region, options={})
62
- path = "/api/v2/compliance/jurisdictions/#{country}/#{region}"
63
- get(path, options)
64
- end
65
-
66
-
67
- # Retrieve all tax rates.
68
- #
69
- # This API is available by invitation only.
70
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
71
- # @param include [String] A comma separated list of objects to fetch underneath this tax rate.
72
- # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
73
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
74
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
75
- # @return [Object]
76
- def query_tax_rates(options={})
77
- path = "/api/v2/compliance/taxrates"
78
- get(path, options)
79
- end
80
-
81
-
82
- # Retrieve all tax region jurisdictions.
83
- #
84
- # This API is available by invitation only.
85
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
86
- # @param include [String] A comma separated list of objects to fetch underneath this tax region jurisdiction.
87
- # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
88
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
89
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
90
- # @return [Object]
91
- def query_tax_region_jurisdictions(options={})
92
- path = "/api/v2/compliance/taxregionjurisdictions"
93
- get(path, options)
94
- end
95
-
96
-
97
- # Retrieve all tax regions.
98
- #
99
- # This API is available by invitation only.
100
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
101
- # @param include [String] A comma separated list of objects to fetch underneath this tax region.
102
- # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
103
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
104
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
105
- # @return [Object]
106
- def query_tax_regions(options={})
107
- path = "/api/v2/compliance/taxregions"
108
- get(path, options)
109
- end
110
-
111
-
112
6
# API to modify the reference fields at the document and the line level.
113
7
#
114
8
#
data/lib/avatax/client/customers.rb CHANGED
@@ -76,6 +76,7 @@ module AvaTax
76
76
#
77
77
# * Certificates - Fetch a list of certificates linked to this customer.
78
78
# * CustomFields - Fetch a list of custom fields associated to this customer.
79
+ # * attributes - Retrieves all attributes applied to the customer.
79
80
#
80
81
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
81
82
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
@@ -96,6 +97,38 @@ module AvaTax
96
97
end
97
98
98
99
100
+ # Link attributes to a customer
101
+ #
102
+ # Link one or many attributes to a customer.
103
+ #
104
+ # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
105
+ # customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
106
+ #
107
+ # A customer object defines information about a person or business that purchases products from your
108
+ # company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
109
+ # record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
110
+ # identify any certificates linked to this customer object. If any certificate applies to the transaction,
111
+ # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
112
+ #
113
+ # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
114
+ # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
115
+ # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
116
+ # storage for this company, call `RequestCertificateSetup`.
117
+ #
118
+ # ### Security Policies
119
+ #
120
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
121
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
122
+ # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
123
+ # @param customerCode [String] The unique code representing the current customer
124
+ # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
125
+ # @return [FetchResult]
126
+ def link_attributes_to_customer(companyId, customerCode, model)
127
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
128
+ put(path, model)
129
+ end
130
+
131
+
99
132
# Link certificates to a customer
100
133
#
101
134
# Link one or more certificates to a customer.
@@ -155,6 +188,37 @@ module AvaTax
155
188
end
156
189
157
190
191
+ # Retrieve a customer's attributes
192
+ #
193
+ # Retrieve the attributes linked to the customer identified by this URL.
194
+ #
195
+ # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
196
+ # customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
197
+ #
198
+ # A customer object defines information about a person or business that purchases products from your
199
+ # company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
200
+ # record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
201
+ # identify any certificates linked to this customer object. If any certificate applies to the transaction,
202
+ # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
203
+ #
204
+ # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
205
+ # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
206
+ # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
207
+ # storage for this company, call `RequestCertificateSetup`.
208
+ #
209
+ # ### Security Policies
210
+ #
211
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
212
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
213
+ # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
214
+ # @param customerCode [String] The unique code representing the current customer
215
+ # @return [FetchResult]
216
+ def list_attributes_for_customer(companyId, customerCode)
217
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
218
+ get(path)
219
+ end
220
+
221
+
158
222
# List certificates linked to a customer
159
223
#
160
224
# List all certificates linked to a customer.
@@ -177,7 +241,7 @@ module AvaTax
177
241
# @param companyId [Integer] The unique ID number of the company that recorded this customer
178
242
# @param customerCode [String] The unique code representing this customer
179
243
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
180
- # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, pdf, pages
244
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
181
245
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
182
246
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
183
247
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -234,6 +298,7 @@ module AvaTax
234
298
# You can use the `$include` parameter to fetch the following additional objects for expansion:
235
299
#
236
300
# * Certificates - Fetch a list of certificates linked to this customer.
301
+ # * attributes - Retrieves all attributes applied to the customer.
237
302
#
238
303
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
239
304
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
@@ -257,6 +322,38 @@ module AvaTax
257
322
end
258
323
259
324
325
+ # Unlink attributes from a customer
326
+ #
327
+ # Unlink one or many attributes from a customer.
328
+ #
329
+ # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
330
+ # customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
331
+ #
332
+ # A customer object defines information about a person or business that purchases products from your
333
+ # company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
334
+ # record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
335
+ # identify any certificates linked to this customer object. If any certificate applies to the transaction,
336
+ # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
337
+ #
338
+ # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
339
+ # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
340
+ # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
341
+ # storage for this company, call `RequestCertificateSetup`.
342
+ #
343
+ # ### Security Policies
344
+ #
345
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
346
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
347
+ # @param companyId [Integer] The unique ID number of the company that recorded the customer
348
+ # @param customerCode [String] The unique code representing the current customer
349
+ # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
350
+ # @return [FetchResult]
351
+ def unlink_attributes_from_customer(companyId, customerCode, model)
352
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
353
+ put(path, model)
354
+ end
355
+
356
+
260
357
# Unlink certificates from a customer
261
358
#
262
359
# Remove one or more certificates to a customer.
data/lib/avatax/client/filingcalendars.rb CHANGED
@@ -24,6 +24,486 @@ module AvaTax
24
24
get(path, options)
25
25
end
26
26
27
+
28
+ # Approve existing Filing Request
29
+ #
30
+ # This API is available by invitation only.
31
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
32
+ # are reviewed and validated by Avalara Compliance before being implemented.
33
+ # The filing request must be in the "ChangeRequest" status to be approved.
34
+ #
35
+ # ### Security Policies
36
+ #
37
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
38
+ # * 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.
39
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
40
+ # @param companyId [Integer] The unique ID of the company that owns the filing request object
41
+ # @param id [Integer] The unique ID of the filing request object
42
+ # @return [Object]
43
+ def approve_filing_request(companyId, id)
44
+ path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/approve"
45
+ post(path)
46
+ end
47
+
48
+
49
+ # Cancel existing Filing Request
50
+ #
51
+ # This API is available by invitation only.
52
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
53
+ # are reviewed and validated by Avalara Compliance before being implemented.
54
+ #
55
+ # ### Security Policies
56
+ #
57
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
58
+ # * 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.
59
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
60
+ # @param companyId [Integer] The unique ID of the company that owns the filing request object
61
+ # @param id [Integer] The unique ID of the filing request object
62
+ # @return [Object]
63
+ def cancel_filing_request(companyId, id)
64
+ path = "/api/v2/companies/#{companyId}/filingrequests/#{id}/cancel"
65
+ post(path)
66
+ end
67
+
68
+
69
+ # Create a new filing request to cancel a filing calendar
70
+ #
71
+ # This API is available by invitation only.
72
+ #
73
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
74
+ # are reviewed and validated by Avalara Compliance before being implemented.
75
+ #
76
+ # ### Security Policies
77
+ #
78
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
79
+ # * 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.
80
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
81
+ # @param companyId [Integer] The unique ID of the company that owns the filing calendar object
82
+ # @param id [Integer] The unique ID number of the filing calendar to cancel
83
+ # @param model [FilingRequestModel[]] The cancellation request for this filing calendar
84
+ # @return [Object]
85
+ def cancel_filing_requests(companyId, id, model)
86
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/request"
87
+ post(path, model)
88
+ end
89
+
90
+
91
+ # Create a filing calendar
92
+ #
93
+ # This API is available by invitation only and only available for users with Compliance access
94
+ # A "filing request" represents information that compliance uses to file a return
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 unique ID of the company that will add the new filing calendar
102
+ # @param model [FilingCalendarModel[]] Filing calendars that will be added
103
+ # @return [FilingCalendarModel[]]
104
+ def create_filing_calendars(companyId, model)
105
+ path = "/api/v2/companies/#{companyId}/filingcalendars"
106
+ post(path, model)
107
+ end
108
+
109
+
110
+ # Create a new filing request to create a filing calendar
111
+ #
112
+ # This API is available by invitation only.
113
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
114
+ # are reviewed and validated by Avalara Compliance before being implemented.
115
+ #
116
+ # ### Security Policies
117
+ #
118
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
119
+ # * 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.
120
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
121
+ # @param companyId [Integer] The unique ID of the company that will add the new filing calendar
122
+ # @param model [FilingRequestModel[]] Information about the proposed new filing calendar
123
+ # @return [FilingRequestModel[]]
124
+ def create_filing_requests(companyId, model)
125
+ path = "/api/v2/companies/#{companyId}/filingcalendars/add/request"
126
+ post(path, model)
127
+ end
128
+
129
+
130
+ # Create a company return setting
131
+ #
132
+ # This API is available by invitation only and only available for users with Compliance access
133
+ #
134
+ # ### Security Policies
135
+ #
136
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
137
+ # @param companyId [Integer] The unique ID of the company that will add the new filing calendar
138
+ # @param filingCalendarId [Integer] The unique ID of the filing calendar that will add the new filing calendar setting
139
+ # @param model [CompanyReturnSettingModel[]] CompanyReturnSettings that will be added
140
+ # @return [CompanyReturnSettingModel[]]
141
+ def create_update_company_return_settings(companyId, filingCalendarId, model)
142
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/settings"
143
+ post(path, model)
144
+ end
145
+
146
+
147
+ # Returns a list of options for adding the specified form.
148
+ #
149
+ # This API is available by invitation only.
150
+ #
151
+ # ### Security Policies
152
+ #
153
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
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 unique ID of the company that owns the filing calendar object
157
+ # @param formCode [String] The unique code of the form
158
+ # @return [CycleAddOptionModel[]]
159
+ def cycle_safe_add(companyId, options={})
160
+ path = "/api/v2/companies/#{companyId}/filingcalendars/add/options"
161
+ get(path, options)
162
+ end
163
+
164
+
165
+ # Indicates when changes are allowed to be made to a filing calendar.
166
+ #
167
+ # This API is available by invitation only.
168
+ #
169
+ # ### Security Policies
170
+ #
171
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
172
+ # * 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.
173
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
174
+ # @param companyId [Integer] The unique ID of the company that owns the filing calendar object
175
+ # @param id [Integer] The unique ID of the filing calendar object
176
+ # @param model [FilingCalendarEditModel[]] A list of filing calendar edits to be made
177
+ # @return [Object]
178
+ def cycle_safe_edit(companyId, id, model)
179
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/options"
180
+ post(path, model)
181
+ end
182
+
183
+
184
+ # Returns a list of options for expiring a filing calendar
185
+ #
186
+ # This API is available by invitation only.
187
+ #
188
+ # ### Security Policies
189
+ #
190
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
191
+ # * 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.
192
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
193
+ # @param companyId [Integer] The unique ID of the company that owns the filing calendar object
194
+ # @param id [Integer] The unique ID of the filing calendar object
195
+ # @return [Object]
196
+ def cycle_safe_expiration(companyId, id)
197
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/cancel/options"
198
+ get(path)
199
+ end
200
+
201
+
202
+ # Delete a single filing calendar.
203
+ #
204
+ # This API is available by invitation only.
205
+ # Mark the existing notice object at this URL as deleted.
206
+ # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
207
+ # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
208
+ #
209
+ # ### Security Policies
210
+ #
211
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
212
+ # * 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.
213
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
214
+ # @param companyId [Integer] The ID of the company that owns this filing calendar.
215
+ # @param id [Integer] The ID of the filing calendar you wish to delete.
216
+ # @return [ErrorDetail[]]
217
+ def delete_filing_calendar(companyId, id)
218
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}"
219
+ delete(path)
220
+ end
221
+
222
+
223
+ # Retrieve a single filing calendar
224
+ #
225
+ # This API is available by invitation only.
226
+ #
227
+ # ### Security Policies
228
+ #
229
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
230
+ # * 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.
231
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
232
+ # @param companyId [Integer] The ID of the company that owns this filing calendar
233
+ # @param id [Integer] The primary key of this filing calendar
234
+ # @return [Object]
235
+ def get_filing_calendar(companyId, id)
236
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}"
237
+ get(path)
238
+ end
239
+
240
+
241
+ # Retrieve a single filing request
242
+ #
243
+ # This API is available by invitation only.
244
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
245
+ # are reviewed and validated by Avalara Compliance before being implemented.
246
+ #
247
+ # ### Security Policies
248
+ #
249
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
250
+ # * 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.
251
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
252
+ # @param companyId [Integer] The ID of the company that owns this filing calendar
253
+ # @param id [Integer] The primary key of this filing calendar
254
+ # @return [Object]
255
+ def get_filing_request(companyId, id)
256
+ path = "/api/v2/companies/#{companyId}/filingrequests/#{id}"
257
+ get(path)
258
+ end
259
+
260
+
261
+ # Retrieve all filing calendars for this company
262
+ #
263
+ # This API is available by invitation only.
264
+ #
265
+ # ### Security Policies
266
+ #
267
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
268
+ # * 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.
269
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
270
+ # @param companyId [Integer] The ID of the company that owns these batches
271
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxAuthorityId, taxAuthorityName, taxAuthorityType, settings
272
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
273
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
274
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
275
+ # @param returnCountry [String] A comma separated list of countries
276
+ # @param returnRegion [String] A comma separated list of regions
277
+ # @return [FetchResult]
278
+ def list_filing_calendars(companyId, options={})
279
+ path = "/api/v2/companies/#{companyId}/filingcalendars"
280
+ get(path, options)
281
+ end
282
+
283
+
284
+ # Retrieve all filing requests for this company
285
+ #
286
+ # This API is available by invitation only.
287
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
288
+ # are reviewed and validated by Avalara Compliance before being implemented.
289
+ #
290
+ # ### Security Policies
291
+ #
292
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
293
+ # * 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.
294
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
295
+ # @param companyId [Integer] The ID of the company that owns these batches
296
+ # @param filingCalendarId [Integer] Specific filing calendar id for the request
297
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
298
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
299
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
300
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
301
+ # @return [FetchResult]
302
+ def list_filing_requests(companyId, options={})
303
+ path = "/api/v2/companies/#{companyId}/filingrequests"
304
+ get(path, options)
305
+ end
306
+
307
+
308
+ # New request for getting for validating customer's login credentials
309
+ #
310
+ # This API is available by invitation only.
311
+ #
312
+ # This API verifies that a customer has submitted correct login credentials for a tax authority's online filing system.
313
+ #
314
+ # ### Security Policies
315
+ #
316
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
317
+ # * 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.
318
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
319
+ # @param model [Object] The model of the login information we are verifying
320
+ # @return [Object]
321
+ def login_verification_request(model)
322
+ path = "/api/v2/filingcalendars/credentials/verify"
323
+ post(path, model)
324
+ end
325
+
326
+
327
+ # Gets the request status and Login Result
328
+ #
329
+ # This API is available by invitation only.
330
+ #
331
+ # This API checks the status of a login verification request. It may only be called by authorized users from the account
332
+ # that initially requested the login verification.
333
+ #
334
+ # ### Security Policies
335
+ #
336
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
337
+ # * 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.
338
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
339
+ # @param jobId [Integer] The unique ID number of this login request
340
+ # @return [Object]
341
+ def login_verification_status(jobId)
342
+ path = "/api/v2/filingcalendars/credentials/#{jobId}"
343
+ get(path)
344
+ end
345
+
346
+
347
+ # Retrieve all filing calendars
348
+ #
349
+ # This API is available by invitation only.
350
+ #
351
+ # This API is deprecated - please use POST `/api/v2/filingrequests/query` API.
352
+ #
353
+ # ### Security Policies
354
+ #
355
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
356
+ # * 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.
357
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
358
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* taxAuthorityId, taxAuthorityName, taxAuthorityType, settings
359
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
360
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
361
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
362
+ # @param returnCountry [String] If specified, fetches only filing calendars that apply to tax filings in this specific country. Uses ISO 3166 country codes.
363
+ # @param returnRegion [String] If specified, fetches only filing calendars that apply to tax filings in this specific region. Uses ISO 3166 region codes.
364
+ # @return [FetchResult]
365
+ def query_filing_calendars(options={})
366
+ path = "/api/v2/filingcalendars"
367
+ get(path, options)
368
+ end
369
+
370
+
371
+ # Retrieve all filing calendars
372
+ #
373
+ # This API is available by invitation only.
374
+ #
375
+ # This API is intended to replace the GET `/api/v2/filingcalendars` API. The fetch request object is posted on the body of the request instead of the URI, so it's not limited by a set number of characters.
376
+ # The documentation of the GET API shows how filtering, sorting and pagination works.
377
+ #
378
+ # ### Security Policies
379
+ #
380
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
381
+ # * 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.
382
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
383
+ # @param returnCountry [String] If specified, fetches only filing calendars that apply to tax filings in this specific country. Uses ISO 3166 country codes.
384
+ # @param returnRegion [String] If specified, fetches only filing calendars that apply to tax filings in this specific region. Uses ISO 3166 region codes.
385
+ # @param model [Object] Query object to filter, sort and paginate the filing calendars.
386
+ # @return [FetchResult]
387
+ def query_filing_calendars_post(model, options={})
388
+ path = "/api/v2/filingcalendars/query"
389
+ post(path, model, options)
390
+ end
391
+
392
+
393
+ # Retrieve all filing requests
394
+ #
395
+ # This API is available by invitation only.
396
+ #
397
+ # This API is deprecated - please use POST `/api/v2/filingrequests/query` API.
398
+ #
399
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
400
+ # are reviewed and validated by Avalara Compliance before being implemented.
401
+ #
402
+ # Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
403
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
404
+ #
405
+ # ### Security Policies
406
+ #
407
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
408
+ # * 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.
409
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
410
+ # @param filingCalendarId [Integer] Specific filing calendar id for the request
411
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
412
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
413
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
414
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
415
+ # @return [FetchResult]
416
+ def query_filing_requests(options={})
417
+ path = "/api/v2/filingrequests"
418
+ get(path, options)
419
+ end
420
+
421
+
422
+ # Retrieve all filing requests
423
+ #
424
+ # This API is available by invitation only.
425
+ #
426
+ # This API is intended to replace the GET `/api/v2/filingrequests` API. The fetch request object is posted on the body of the request instead of the URI, so it's not limited by a set number of characters.
427
+ # The documentation of the GET API shows how filtering, sorting and pagination works.
428
+ #
429
+ # ### Security Policies
430
+ #
431
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
432
+ # * 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.
433
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
434
+ # @param filingCalendarId [Integer] Specific filing calendar id for the request
435
+ # @param model [Object] Query object to filter, sort and paginate the filing calendars.
436
+ # @return [FetchResult]
437
+ def query_filing_requests_post(model, options={})
438
+ path = "/api/v2/filingrequests/query"
439
+ post(path, model, options)
440
+ end
441
+
442
+
443
+ # Create a new filing request to edit a filing calendar
444
+ #
445
+ # This API is available by invitation only.
446
+ #
447
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
448
+ # are reviewed and validated by Avalara Compliance before being implemented.
449
+ #
450
+ # Certain users may not update filing calendars directly. Instead, they may submit an edit request
451
+ # to modify the value of a filing calendar using this API.
452
+ #
453
+ # ### Security Policies
454
+ #
455
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
456
+ # * 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.
457
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
458
+ # @param companyId [Integer] The unique ID of the company that owns the filing calendar object
459
+ # @param id [Integer] The unique ID number of the filing calendar to edit
460
+ # @param model [FilingRequestModel[]] A list of filing calendar edits to be made
461
+ # @return [Object]
462
+ def request_filing_calendar_update(companyId, id, model)
463
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}/edit/request"
464
+ post(path, model)
465
+ end
466
+
467
+
468
+ # Edit existing Filing Calendar
469
+ #
470
+ # This API is available by invitation only.
471
+ #
472
+ # ### Security Policies
473
+ #
474
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
475
+ # * 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.
476
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
477
+ # @param companyId [Integer] The unique ID of the company that owns the filing calendar object
478
+ # @param id [Integer] The unique ID of the filing calendar object
479
+ # @param model [Object] The filing calendar model you are wishing to update with.
480
+ # @return [Object]
481
+ def update_filing_calendar(companyId, id, model)
482
+ path = "/api/v2/companies/#{companyId}/filingcalendars/#{id}"
483
+ put(path, model)
484
+ end
485
+
486
+
487
+ # Edit existing Filing Request
488
+ #
489
+ # This API is available by invitation only.
490
+ # A "filing request" represents a request to change an existing filing calendar. Filing requests
491
+ # are reviewed and validated by Avalara Compliance before being implemented.
492
+ #
493
+ # ### Security Policies
494
+ #
495
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
496
+ # * 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.
497
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
498
+ # @param companyId [Integer] The unique ID of the company that owns the filing request object
499
+ # @param id [Integer] The unique ID of the filing request object
500
+ # @param model [Object] A list of filing calendar edits to be made
501
+ # @return [Object]
502
+ def update_filing_request(companyId, id, model)
503
+ path = "/api/v2/companies/#{companyId}/filingrequests/#{id}"
504
+ put(path, model)
505
+ end
506
+
27
507
end
28
508
end
29
509
end
data/lib/avatax/client/filings.rb CHANGED
@@ -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
data/lib/avatax/client/firmclientlinkages.rb ADDED
@@ -0,0 +1,151 @@
1
+ module AvaTax
2
+ class Client
3
+ module FirmClientLinkages
4
+
5
+
6
+ # Approves linkage to a firm for a client account
7
+ #
8
+ # This API enables the account admin of a client account to approve linkage request by a firm.
9
+ #
10
+ # ### Security Policies
11
+ #
12
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
+ # @param id [Integer]
14
+ # @return [Object]
15
+ def approve_firm_client_linkage(id)
16
+ path = "/api/v2/firmclientlinkages/#{id}/approve"
17
+ post(path)
18
+ end
19
+
20
+
21
+ # Request a new FirmClient account and create an approved linkage to it
22
+ #
23
+ # This API is for use by Firms only.
24
+ #
25
+ # Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
26
+ # Firms can create accounts of FirmClient for customers they are managing using this API.
27
+ #
28
+ # Calling this API creates an account with the specified product subscriptions, but without a new user for account.
29
+ # Account is then linked to the Firm so they can managed their returns.
30
+ # You should call this API when a customer does not have an AvaTax account and is to be managed only by the firm.
31
+ #
32
+ # The created account will be created in `Active` status but there will be no user or license key associated with account.
33
+ #
34
+ # ### Security Policies
35
+ #
36
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
37
+ # @param model [Object] Information about the account you wish to create.
38
+ # @return [Object]
39
+ def create_and_link_new_firm_client_account(model)
40
+ path = "/api/v2/firmclientlinkages/createandlinkclient"
41
+ post(path, model)
42
+ end
43
+
44
+
45
+ # Links a firm account with the client account
46
+ #
47
+ # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
48
+ #
49
+ # ### Security Policies
50
+ #
51
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
52
+ # @param model [Object] FirmClientLinkageInputModel
53
+ # @return [Object]
54
+ def create_firm_client_linkage(model)
55
+ path = "/api/v2/firmclientlinkages"
56
+ post(path, model)
57
+ end
58
+
59
+
60
+ # Delete a linkage
61
+ #
62
+ # This API marks a linkage between a firm and client as deleted.
63
+ #
64
+ # ### Security Policies
65
+ #
66
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
67
+ # @param id [Integer]
68
+ # @return [ErrorDetail[]]
69
+ def delete_firm_client_linkage(id)
70
+ path = "/api/v2/firmclientlinkages/#{id}"
71
+ delete(path)
72
+ end
73
+
74
+
75
+ # Get linkage between a firm and client by id
76
+ #
77
+ # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
78
+ #
79
+ # ### Security Policies
80
+ #
81
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
82
+ # @param id [Integer]
83
+ # @return [Object]
84
+ def get_firm_client_linkage(id)
85
+ path = "/api/v2/firmclientlinkages/#{id}"
86
+ get(path)
87
+ end
88
+
89
+
90
+ # List client linkages for a firm or client
91
+ #
92
+ # This API enables the firm or account users to request the associated linkages to the account.
93
+ #
94
+ # ### Security Policies
95
+ #
96
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
97
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* firmAccountName, clientAccountName
98
+ # @return [FetchResult]
99
+ def list_firm_client_linkage(options={})
100
+ path = "/api/v2/firmclientlinkages"
101
+ get(path, options)
102
+ end
103
+
104
+
105
+ # Rejects linkage to a firm for a client account
106
+ #
107
+ # This API enables the account admin of a client account to reject linkage request by a firm.
108
+ #
109
+ # ### Security Policies
110
+ #
111
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
112
+ # @param id [Integer]
113
+ # @return [Object]
114
+ def reject_firm_client_linkage(id)
115
+ path = "/api/v2/firmclientlinkages/#{id}/reject"
116
+ post(path)
117
+ end
118
+
119
+
120
+ # Reset linkage status between a client and firm back to requested
121
+ #
122
+ # This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
123
+ #
124
+ # ### Security Policies
125
+ #
126
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
127
+ # @param id [Integer]
128
+ # @return [Object]
129
+ def reset_firm_client_linkage(id)
130
+ path = "/api/v2/firmclientlinkages/#{id}/reset"
131
+ post(path)
132
+ end
133
+
134
+
135
+ # Revokes previously approved linkage to a firm for a client account
136
+ #
137
+ # This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
138
+ #
139
+ # ### Security Policies
140
+ #
141
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
142
+ # @param id [Integer]
143
+ # @return [Object]
144
+ def revoke_firm_client_linkage(id)
145
+ path = "/api/v2/firmclientlinkages/#{id}/revoke"
146
+ post(path)
147
+ end
148
+
149
+ end
150
+ end
151
+ end
data/lib/avatax/client/fundingrequests.rb CHANGED
@@ -21,8 +21,8 @@ module AvaTax
21
21
# ### Security Policies
22
22
#
23
23
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
24
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
25
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
24
+ # * 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.
25
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
26
26
# @param id [Integer] The unique ID number of this funding request
27
27
# @return [Object]
28
28
def activate_funding_request(id)
@@ -47,8 +47,8 @@ module AvaTax
47
47
# ### Security Policies
48
48
#
49
49
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
50
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
51
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request host address whitelisting for [Returns] for your servers.
50
+ # * 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.
51
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser.
52
52
# @param id [Integer] The unique ID number of this funding request
53
53
# @return [Object]
54
54
def funding_request_status(id)
data/lib/avatax/client/items.rb CHANGED
@@ -374,6 +374,33 @@ module AvaTax
374
374
end
375
375
376
376
377
+ # Sync items from a product catalog
378
+ #
379
+ # Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
380
+ # with AvaTax.
381
+ #
382
+ # Any invalid or duplicate items will be ignored. To diagnose why an item is not created, use the normal create transaction API to receive validation information.
383
+ #
384
+ # This API is currently limited to 1000 items per call (the limit is subject to change).
385
+ #
386
+ # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
387
+ # can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
388
+ # and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
389
+ # from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
390
+ # team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
391
+ #
392
+ # ### Security Policies
393
+ #
394
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
395
+ # @param companyId [Integer] The ID of the company that owns this item.
396
+ # @param model [Object] The request object.
397
+ # @return [Object]
398
+ def sync_items(companyId, model)
399
+ path = "/api/v2/companies/#{companyId}/items/sync"
400
+ post(path, model)
401
+ end
402
+
403
+
377
404
# Update a single item
378
405
#
379
406
# Replace the existing `Item` object at this URL with an updated object.
data/lib/avatax/client/notifications.rb CHANGED
@@ -18,6 +18,8 @@ module AvaTax
18
18
# dismissed. You can then later review which employees of your company dismissed notifications to
19
19
# determine if they were resolved appropriately.
20
20
#
21
+ # A Global notification with null accountId and companyId cannot be dismissed and will expire within a given time span.
22
+ #
21
23
# ### Security Policies
22
24
#
23
25
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
data/lib/avatax/client/registrar.rb CHANGED
@@ -32,6 +32,9 @@ module AvaTax
32
32
# to regularly review notifications and then dismiss them when you are certain that you have addressed
33
33
# any relevant concerns raised by this notification.
34
34
#
35
+ # A Global notification is a message which is directed to all the accounts and is set to expire within
36
+ # a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.
37
+ #
35
38
# An example of a notification would be a message about new software, or a change to AvaTax that may
36
39
# affect you, or a potential issue with your company's tax profile.
37
40
#
data/lib/avatax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
module AvaTax
2
- VERSION = '19.7.0'.freeze unless defined?(::AvaTax::VERSION)
2
+ VERSION = '19.8.0'.freeze unless defined?(::AvaTax::VERSION)
3
3
end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: avatax
3
3
version: !ruby/object:Gem::Version
4
- version: 19.7.0
4
+ version: 19.8.0
5
5
platform: ruby
6
6
authors:
7
7
- Marcus Vorwaller
8
8
autorequire:
9
9
bindir: bin
10
10
cert_chain: []
11
- date: 2019-07-16 00:00:00.000000000 Z
11
+ date: 2019-08-13 00:00:00.000000000 Z
12
12
dependencies:
13
13
- !ruby/object:Gem::Dependency
14
14
name: rake
@@ -149,6 +149,7 @@ files:
149
149
- lib/avatax/client/ecms.rb
150
150
- lib/avatax/client/filingcalendars.rb
151
151
- lib/avatax/client/filings.rb
152
+ - lib/avatax/client/firmclientlinkages.rb
152
153
- lib/avatax/client/free.rb
153
154
- lib/avatax/client/fundingrequests.rb
154
155
- lib/avatax/client/items.rb