avatax 20.1.0 → 20.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +236 -172
  4. data/lib/avatax/client/addresses.rb +54 -54
  5. data/lib/avatax/client/advancedrules.rb +63 -162
  6. data/lib/avatax/client/avafileforms.rb +78 -78
  7. data/lib/avatax/client/batches.rb +223 -170
  8. data/lib/avatax/client/certexpressinvites.rb +97 -97
  9. data/lib/avatax/client/certificates.rb +424 -424
  10. data/lib/avatax/client/companies.rb +457 -350
  11. data/lib/avatax/client/compliance.rb +15 -15
  12. data/lib/avatax/client/contacts.rb +106 -106
  13. data/lib/avatax/client/customers.rb +376 -376
  14. data/lib/avatax/client/datasources.rb +99 -99
  15. data/lib/avatax/client/definitions.rb +862 -847
  16. data/lib/avatax/client/distancethresholds.rb +122 -122
  17. data/lib/avatax/client/ecommercetoken.rb +37 -0
  18. data/lib/avatax/client/filingcalendars.rb +20 -508
  19. data/lib/avatax/client/filings.rb +37 -26
  20. data/lib/avatax/client/firmclientlinkages.rb +123 -123
  21. data/lib/avatax/client/free.rb +100 -100
  22. data/lib/avatax/client/fundingrequests.rb +52 -52
  23. data/lib/avatax/client/items.rb +423 -423
  24. data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
  25. data/lib/avatax/client/locations.rb +253 -139
  26. data/lib/avatax/client/multidocument.rb +390 -310
  27. data/lib/avatax/client/nexus.rb +341 -201
  28. data/lib/avatax/client/notifications.rb +75 -75
  29. data/lib/avatax/client/provisioning.rb +49 -49
  30. data/lib/avatax/client/registrar.rb +198 -198
  31. data/lib/avatax/client/reports.rb +97 -97
  32. data/lib/avatax/client/settings.rb +156 -156
  33. data/lib/avatax/client/subscriptions.rb +62 -62
  34. data/lib/avatax/client/taxcodes.rb +120 -120
  35. data/lib/avatax/client/taxcontent.rb +133 -133
  36. data/lib/avatax/client/taxrules.rb +170 -170
  37. data/lib/avatax/client/transactions.rb +836 -791
  38. data/lib/avatax/client/upcs.rb +111 -111
  39. data/lib/avatax/client/users.rb +183 -183
  40. data/lib/avatax/client/utilities.rb +61 -61
  41. data/lib/avatax/connection.rb +3 -3
  42. data/lib/avatax/request.rb +2 -0
  43. data/lib/avatax/version.rb +1 -1
  44. metadata +4 -17
@@ -1,351 +1,458 @@
1
- module AvaTax
2
- class Client
3
- module Companies
4
-
5
-
6
- # Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.
7
- #
8
- # Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations.
9
- # For partners who write integrations against AvaTax for many clients, this API is a way to do a quick self testing to verify whether the
10
- # written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
11
- #
12
- # This API provides messages specific enough (through predefined checks) to guide the partner on what integrations are still missing from the company to get fully certified.
13
- # The API makes the following checks to conclude if the company is NOT fully certified:
14
- # 1. Any past month items contains generic tax code of P0000000.
15
- # 2. All the companies on the requesting account are test companies.
16
- # 3. No Voided/Cancelled documents in the past 30 days.
17
- # 4. There are less than 2 committed documents.
18
- # 5. Any documentCode is a generic GUID string.
19
- # 6. Any customerCode on document is a generic GUID string.
20
- # 7. No document has more than 1 documentLine.
21
- # 8. All of the documents have missing exemptionNo, customerUsageType, taxDateOverride or negative amount.
22
- # 9. Any document quantity is a negative number.
23
- # 10. Any document have repeated lines.
24
- # 11. No document has shipping charge.
25
- # 12. All documents have same ItemCodes, descriptions and taxCodes.
26
- # 13. Less than 2 addresses used across all documents.
27
- # 14. Whether locationCode was used in documents.
28
- # 15. Account with AvaGlobal subscription and no documents have VATBuyerId.
29
- # 16. Any document has currencyCode not being USD for accounts with AvaGlobal subscription.
30
- # 17. All documents have countryCode used for accounts with AvaGlobal subscription.
31
- #
32
- # ### Security Policies
33
- #
34
- # * 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.
35
- # @param id [Integer] The ID of the company to check if its integration is certified.
36
- # @return [String]
37
- def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
38
- get(path) end
39
-
40
- # Change the filing status of this company
41
- #
42
- # Changes the current filing status of this company.
43
- #
44
- # For customers using Avalara's Managed Returns Service, each company within their account can request
45
- # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
46
- # requested filing calendars prior to beginning filing tax returns on behalf of this company.
47
- #
48
- # The following changes may be requested through this API:
49
- #
50
- # * If a company is in `NotYetFiling` status, the customer may request this be changed to `FilingRequested`.
51
- # * Avalara compliance team members may change a company from `FilingRequested` to `FirstFiling`.
52
- # * Avalara compliance team members may change a company from `FirstFiling` to `Active`.
53
- #
54
- # All other status changes must be requested through the Avalara customer support team.
55
- #
56
- # ### Security Policies
57
- #
58
- # * 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.
59
- # @param id [Integer]
60
- # @param model [Object]
61
- # @return [String]
62
- def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
63
- post(path, model) end
64
-
65
- # Quick setup for a company with a single physical address
66
- #
67
- # Shortcut to quickly setup a single-physical-location company with critical information and activate it.
68
- # This API provides quick and simple company setup functionality and does the following things:
69
- #
70
- # * Create a company object with its own tax profile
71
- # * Add a key contact person for the company
72
- # * Set up one physical location for the main office
73
- # * Declare nexus in all taxing jurisdictions for that main office address
74
- # * Activate the company
75
- #
76
- # This API only provides a limited subset of functionality compared to the 'Create Company' API call.
77
- # If you need additional features or options not present in this 'Quick Setup' API call, please use the full 'Create Company' call instead.
78
- # Please allow 1 minute before making transactions using the company.
79
- #
80
- # ### Security Policies
81
- #
82
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
83
- # @param model [Object] Information about the company you wish to create.
84
- # @return [Object]
85
- def company_initialize(model) path = "/api/v2/companies/initialize"
86
- post(path, model) end
87
-
88
- # Create new companies
89
- #
90
- # Create one or more new company objects.
91
- # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
92
- # You may attach nested data objects such as contacts, locations, and nexus with this CREATE call, and those objects will be created with the company.
93
- #
94
- # NOTE: Please do not use these blacklisted characters in company name and code: ';', '\', '|'.
95
- #
96
- # ### Security Policies
97
- #
98
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
99
- # @param model [CompanyModel[]] Either a single company object or an array of companies to create
100
- # @return [CompanyModel[]]
101
- def create_companies(model) path = "/api/v2/companies"
102
- post(path, model) end
103
-
104
- # Request managed returns funding setup for a company
105
- #
106
- # This API is available by invitation only.
107
- # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
108
- # required to setup their funding configuration before Avalara can begin filing tax returns on their
109
- # behalf.
110
- # Funding configuration for each company is set up by submitting a funding setup request, which can
111
- # be sent either via email or via an embedded HTML widget.
112
- # When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
113
- # before approval.
114
- # This API records that an ambedded HTML funding setup widget was activated.
115
- # This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
116
- #
117
- # ### Security Policies
118
- #
119
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
120
- # * 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.
121
- # @param id [Integer] The unique identifier of the company
122
- # @param model [Object] The funding initialization request
123
- # @return [Object]
124
- def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
125
- post(path, model) end
126
-
127
- # Delete a single company
128
- #
129
- # Deleting a company will delete all child companies, and all users attached to this company.
130
- #
131
- # ### Security Policies
132
- #
133
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
134
- # @param id [Integer] The ID of the company you wish to delete.
135
- # @return [ErrorDetail[]]
136
- def delete_company(id) path = "/api/v2/companies/#{id}"
137
- delete(path) end
138
-
139
- # Check the funding configuration of a company
140
- #
141
- # This API is available by invitation only.
142
- # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
143
- # Returns the funding configuration of the requested company.
144
- # .
145
- #
146
- # ### Security Policies
147
- #
148
- # * 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.
149
- # * 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.
150
- # @param companyId [Integer] The unique identifier of the company
151
- # @return [Object]
152
- def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
153
- get(path) end
154
-
155
- # Check the funding configuration of a company
156
- #
157
- # This API is available by invitation only.
158
- # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
159
- # Returns the funding configuration of the requested company.
160
- # .
161
- #
162
- # ### Security Policies
163
- #
164
- # * 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.
165
- # * 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.
166
- # @param companyId [Integer] The unique identifier of the company
167
- # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies
168
- # @return [FundingConfigurationModel[]]
169
- def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
170
- get(path, options) end
171
-
172
- # Retrieve a single company
173
- #
174
- # Get the company object identified by this URL.
175
- # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
176
- # 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:
177
- #
178
- # * Contacts
179
- # * Items
180
- # * Locations
181
- # * Nexus
182
- # * Settings
183
- # * TaxCodes
184
- # * TaxRules
185
- # * UPC
186
- #
187
- # ### Security Policies
188
- #
189
- # * 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.
190
- # @param id [Integer] The ID of the company to retrieve.
191
- # @param include [String] OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects.
192
- # @return [Object]
193
- def get_company(id, options={}) path = "/api/v2/companies/#{id}"
194
- get(path, options) end
195
-
196
- # Get configuration settings for this company
197
- #
198
- # Retrieve a list of all configuration settings tied to this company.
199
- #
200
- # Configuration settings provide you with the ability to control features of your account and of your
201
- # tax software. The category name `AvaCertServiceConfig` is reserved for
202
- # Avalara internal software configuration values; to store your own company-level settings, please
203
- # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
204
- #
205
- # Company settings are permanent settings that cannot be deleted. You can set the value of a
206
- # company setting to null if desired and if the particular setting supports it.
207
- #
208
- # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
209
- # processing, and should be changed with care.
210
- #
211
- # ### Security Policies
212
- #
213
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
214
- # @param id [Integer]
215
- # @return [CompanyConfigurationModel[]]
216
- def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
217
- get(path) end
218
-
219
- # Get this company's filing status
220
- #
221
- # Retrieve the current filing status of this company.
222
- #
223
- # For customers using Avalara's Managed Returns Service, each company within their account can request
224
- # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
225
- # requested filing calendars prior to beginning filing tax returns on behalf of this company.
226
- #
227
- # A company's filing status can be one of the following values:
228
- #
229
- # * `NoReporting` - This company is not configured to report tax returns; instead, it reports through a parent company.
230
- # * `NotYetFiling` - This company has not yet begun filing tax returns through Avalara's Managed Returns Service.
231
- # * `FilingRequested` - The company has requested to begin filing tax returns, but Avalara's compliance team has not yet begun filing.
232
- # * `FirstFiling` - The company has recently filing tax returns and is in a new status.
233
- # * `Active` - The company is currently active and is filing tax returns via Avalara Managed Returns.
234
- #
235
- # ### Security Policies
236
- #
237
- # * 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.
238
- # @param id [Integer]
239
- # @return [String]
240
- def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
241
- get(path) end
242
-
243
- # Check managed returns funding status for a company
244
- #
245
- # This API is available by invitation only.
246
- # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
247
- # Returns a list of funding setup requests and their current status.
248
- # Each object in the result is a request that was made to setup or adjust funding status for this company.
249
- #
250
- # ### Security Policies
251
- #
252
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
253
- # * 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.
254
- # @param id [Integer] The unique identifier of the company
255
- # @return [FundingStatusModel[]]
256
- def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
257
- get(path) end
258
-
259
- # Retrieve a list of MRS Companies with account
260
- #
261
- # This API is available by invitation only.
262
- #
263
- # Get a list of companies with an active MRS service.
264
- #
265
- # ### Security Policies
266
- #
267
- # * 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.
268
- # @return [FetchResult]
269
- def list_mrs_companies() path = "/api/v2/companies/mrs"
270
- get(path) end
271
-
272
- # Retrieve all companies
273
- #
274
- # Get multiple company objects.
275
- #
276
- # A `company` represents a single corporation or individual that is registered to handle transactional taxes.
277
- #
278
- # 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/) .
279
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
280
- # 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:
281
- #
282
- # * Contacts
283
- # * Items
284
- # * Locations
285
- # * Nexus
286
- # * Settings
287
- # * TaxCodes
288
- # * TaxRules
289
- # * UPC
290
- #
291
- # ### Security Policies
292
- #
293
- # * 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.
294
- # @param include [String] A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name.
295
- # @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:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts
296
- # @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.
297
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
298
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
299
- # @return [FetchResult]
300
- def query_companies(options={}) path = "/api/v2/companies"
301
- get(path, options) end
302
-
303
- # Change configuration settings for this company
304
- #
305
- # Update configuration settings tied to this company.
306
- #
307
- # Configuration settings provide you with the ability to control features of your account and of your
308
- # tax software. The category names `AvaCertServiceConfig` is reserved for
309
- # Avalara internal software configuration values; to store your own company-level settings, please
310
- # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
311
- #
312
- # Company settings are permanent settings that cannot be deleted. You can set the value of a
313
- # company setting to null if desired and if the particular setting supports it.
314
- #
315
- # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
316
- # processing, and should be changed with care.
317
- #
318
- # ### Security Policies
319
- #
320
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
321
- # @param id [Integer]
322
- # @param model [CompanyConfigurationModel[]]
323
- # @return [CompanyConfigurationModel[]]
324
- def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
325
- post(path, model) end
326
-
327
- # Update a single company
328
- #
329
- # Replace the existing company object at this URL with an updated object.
330
- #
331
- # A `CompanyModel` represents a single corporation or individual that is registered to handle transactional taxes.
332
- # All data from the existing object will be replaced with data in the object you PUT.
333
- #
334
- # When calling `UpdateCompany`, you are permitted to update the company itself. Updates to the nested objects
335
- # such as contacts, locations, or settings are not permitted. To update the nested objects
336
- #
337
- # To set a field's value to `null`, you may either set its value to `null` or omit that field from the object you PUT.
338
- #
339
- # NOTE: Please do not use these blacklisted characters in company name and code: ';', '\', '|'.
340
- #
341
- # ### Security Policies
342
- #
343
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
344
- # @param id [Integer] The ID of the company you wish to update.
345
- # @param model [Object] The company object you wish to update.
346
- # @return [Object]
347
- def update_company(id, model) path = "/api/v2/companies/#{id}"
348
- put(path, model) end
349
- end
350
- end
1
+ module AvaTax
2
+ class Client
3
+ module Companies
4
+
5
+
6
+ # Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.
7
+ #
8
+ # Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations.
9
+ # For partners who write integrations against AvaTax for many clients, this API is a way to do a quick self testing to verify whether the
10
+ # written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
11
+ #
12
+ # This API provides messages specific enough (through predefined checks) to guide the partner on what integrations are still missing from the company to get fully certified.
13
+ # The API makes the following checks to conclude if the company is NOT fully certified:
14
+ # 1. Any past month items contains generic tax code of P0000000.
15
+ # 2. All the companies on the requesting account are test companies.
16
+ # 3. No Voided/Cancelled documents in the past 30 days.
17
+ # 4. There are less than 2 committed documents.
18
+ # 5. Any documentCode is a generic GUID string.
19
+ # 6. Any customerCode on document is a generic GUID string.
20
+ # 7. No document has more than 1 documentLine.
21
+ # 8. All of the documents have missing exemptionNo, customerUsageType, taxDateOverride or negative amount.
22
+ # 9. Any document quantity is a negative number.
23
+ # 10. Any document have repeated lines.
24
+ # 11. No document has shipping charge.
25
+ # 12. All documents have same ItemCodes, descriptions and taxCodes.
26
+ # 13. Less than 2 addresses used across all documents.
27
+ # 14. Whether locationCode was used in documents.
28
+ # 15. Account with AvaGlobal subscription and no documents have VATBuyerId.
29
+ # 16. Any document has currencyCode not being USD for accounts with AvaGlobal subscription.
30
+ # 17. All documents have countryCode used for accounts with AvaGlobal subscription.
31
+ #
32
+ # ### Security Policies
33
+ #
34
+ # * 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.
35
+ # @param id [Integer] The ID of the company to check if its integration is certified.
36
+ # @return [String]
37
+ def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
38
+ get(path) end
39
+
40
+ # Change the filing status of this company
41
+ #
42
+ # Changes the current filing status of this company.
43
+ #
44
+ # For customers using Avalara's Managed Returns Service, each company within their account can request
45
+ # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
46
+ # requested filing calendars prior to beginning filing tax returns on behalf of this company.
47
+ #
48
+ # The following changes may be requested through this API:
49
+ #
50
+ # * If a company is in `NotYetFiling` status, the customer may request this be changed to `FilingRequested`.
51
+ # * Avalara compliance team members may change a company from `FilingRequested` to `FirstFiling`.
52
+ # * Avalara compliance team members may change a company from `FirstFiling` to `Active`.
53
+ #
54
+ # All other status changes must be requested through the Avalara customer support team.
55
+ #
56
+ # ### Security Policies
57
+ #
58
+ # * 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.
59
+ # @param id [Integer]
60
+ # @param model [Object]
61
+ # @return [String]
62
+ def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
63
+ post(path, model) end
64
+
65
+ # Quick setup for a company with a single physical address
66
+ #
67
+ # Shortcut to quickly setup a single-physical-location company with critical information and activate it.
68
+ # This API provides quick and simple company setup functionality and does the following things:
69
+ #
70
+ # * Create a company object with its own tax profile
71
+ # * Add a key contact person for the company
72
+ # * Set up one physical location for the main office
73
+ # * Declare nexus in all taxing jurisdictions for that main office address
74
+ # * Activate the company
75
+ #
76
+ # This API only provides a limited subset of functionality compared to the 'Create Company' API call.
77
+ # If you need additional features or options not present in this 'Quick Setup' API call, please use the full 'Create Company' call instead.
78
+ # Please allow 1 minute before making transactions using the company.
79
+ #
80
+ # ### Security Policies
81
+ #
82
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
83
+ # @param model [Object] Information about the company you wish to create.
84
+ # @return [Object]
85
+ def company_initialize(model) path = "/api/v2/companies/initialize"
86
+ post(path, model) end
87
+
88
+ # Create new companies
89
+ #
90
+ # Create one or more new company objects.
91
+ # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
92
+ # You may attach nested data objects such as contacts, locations, and nexus with this CREATE call, and those objects will be created with the company.
93
+ #
94
+ # NOTE: Please do not use these blacklisted characters in company name and code: ';', '\', '|'.
95
+ #
96
+ # ### Security Policies
97
+ #
98
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
99
+ # @param model [CompanyModel[]] Either a single company object or an array of companies to create
100
+ # @return [CompanyModel[]]
101
+ def create_companies(model) path = "/api/v2/companies"
102
+ post(path, model) end
103
+
104
+ # Add parameters to a company.
105
+ #
106
+ # Add parameters to a company.
107
+ #
108
+ # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
109
+ #
110
+ # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
111
+ #
112
+ # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
113
+ #
114
+ # To see available parameters for this company, call `/api/v2/definitions/parameters?$filter=attributeType eq Company`
115
+ #
116
+ # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
117
+ #
118
+ # ### Security Policies
119
+ #
120
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
121
+ # @param companyId [Integer] The ID of the company that owns this company parameter.
122
+ # @param model [CompanyParameterDetailModel[]] The company parameters you wish to create.
123
+ # @return [CompanyParameterDetailModel[]]
124
+ def create_company_parameters(companyId, model) path = "/api/v2/companies/#{companyId}/parameters"
125
+ post(path, model) end
126
+
127
+ # Request managed returns funding setup for a company
128
+ #
129
+ # This API is available by invitation only.
130
+ # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
131
+ # required to setup their funding configuration before Avalara can begin filing tax returns on their
132
+ # behalf.
133
+ # Funding configuration for each company is set up by submitting a funding setup request, which can
134
+ # be sent either via email or via an embedded HTML widget.
135
+ # When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
136
+ # before approval.
137
+ # This API records that an ambedded HTML funding setup widget was activated.
138
+ # This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
139
+ #
140
+ # ### Security Policies
141
+ #
142
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
143
+ # * 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.
144
+ # @param id [Integer] The unique identifier of the company
145
+ # @param model [Object] The funding initialization request
146
+ # @return [Object]
147
+ def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
148
+ post(path, model) end
149
+
150
+ # Delete a single company
151
+ #
152
+ # Deleting a company will delete all child companies, and all users attached to this company.
153
+ #
154
+ # ### Security Policies
155
+ #
156
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
157
+ # @param id [Integer] The ID of the company you wish to delete.
158
+ # @return [ErrorDetail[]]
159
+ def delete_company(id) path = "/api/v2/companies/#{id}"
160
+ delete(path) end
161
+
162
+ # Delete a single company parameter
163
+ #
164
+ # Delete a parameter of a company.
165
+ # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
166
+ #
167
+ # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
168
+ #
169
+ # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
170
+ #
171
+ # ### Security Policies
172
+ #
173
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
174
+ # @param companyId [Integer] The company id
175
+ # @param id [Integer] The parameter id
176
+ # @return [ErrorDetail[]]
177
+ def delete_company_parameter(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
178
+ delete(path) end
179
+
180
+ # Check the funding configuration of a company
181
+ #
182
+ # This API is available by invitation only.
183
+ # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
184
+ # Returns the funding configuration of the requested company.
185
+ # .
186
+ #
187
+ # ### Security Policies
188
+ #
189
+ # * 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.
190
+ # * 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.
191
+ # @param companyId [Integer] The unique identifier of the company
192
+ # @return [Object]
193
+ def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
194
+ get(path) end
195
+
196
+ # Check the funding configuration of a company
197
+ #
198
+ # This API is available by invitation only.
199
+ # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
200
+ # Returns the funding configuration of the requested company.
201
+ # .
202
+ #
203
+ # ### Security Policies
204
+ #
205
+ # * 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.
206
+ # * 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.
207
+ # @param companyId [Integer] The unique identifier of the company
208
+ # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies
209
+ # @return [FundingConfigurationModel[]]
210
+ def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
211
+ get(path, options) end
212
+
213
+ # Retrieve a single company
214
+ #
215
+ # Get the company object identified by this URL.
216
+ # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
217
+ # 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:
218
+ #
219
+ # * Contacts
220
+ # * Items
221
+ # * Locations
222
+ # * Nexus
223
+ # * Settings
224
+ # * TaxCodes
225
+ # * TaxRules
226
+ # * UPC
227
+ # * Parameters
228
+ #
229
+ # ### Security Policies
230
+ #
231
+ # * 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.
232
+ # @param id [Integer] The ID of the company to retrieve.
233
+ # @param include [String] OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects.
234
+ # @return [Object]
235
+ def get_company(id, options={}) path = "/api/v2/companies/#{id}"
236
+ get(path, options) end
237
+
238
+ # Get configuration settings for this company
239
+ #
240
+ # Retrieve a list of all configuration settings tied to this company.
241
+ #
242
+ # Configuration settings provide you with the ability to control features of your account and of your
243
+ # tax software. The category name `AvaCertServiceConfig` is reserved for
244
+ # Avalara internal software configuration values; to store your own company-level settings, please
245
+ # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
246
+ #
247
+ # Company settings are permanent settings that cannot be deleted. You can set the value of a
248
+ # company setting to null if desired and if the particular setting supports it.
249
+ #
250
+ # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
251
+ # processing, and should be changed with care.
252
+ #
253
+ # ### Security Policies
254
+ #
255
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
256
+ # @param id [Integer]
257
+ # @return [CompanyConfigurationModel[]]
258
+ def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
259
+ get(path) end
260
+
261
+ # Retrieve a single company parameter
262
+ #
263
+ # Retrieves a single parameter of a company.
264
+ #
265
+ # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
266
+ #
267
+ # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
268
+ #
269
+ # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
270
+ #
271
+ # ### Security Policies
272
+ #
273
+ # * 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.
274
+ # @param companyId [Integer]
275
+ # @param id [Integer]
276
+ # @return [Object]
277
+ def get_company_parameter_detail(companyId, id) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
278
+ get(path) end
279
+
280
+ # Get this company's filing status
281
+ #
282
+ # Retrieve the current filing status of this company.
283
+ #
284
+ # For customers using Avalara's Managed Returns Service, each company within their account can request
285
+ # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
286
+ # requested filing calendars prior to beginning filing tax returns on behalf of this company.
287
+ #
288
+ # A company's filing status can be one of the following values:
289
+ #
290
+ # * `NoReporting` - This company is not configured to report tax returns; instead, it reports through a parent company.
291
+ # * `NotYetFiling` - This company has not yet begun filing tax returns through Avalara's Managed Returns Service.
292
+ # * `FilingRequested` - The company has requested to begin filing tax returns, but Avalara's compliance team has not yet begun filing.
293
+ # * `FirstFiling` - The company has recently filing tax returns and is in a new status.
294
+ # * `Active` - The company is currently active and is filing tax returns via Avalara Managed Returns.
295
+ #
296
+ # ### Security Policies
297
+ #
298
+ # * 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.
299
+ # @param id [Integer]
300
+ # @return [String]
301
+ def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
302
+ get(path) end
303
+
304
+ # Retrieve parameters for a company
305
+ #
306
+ # Retrieve all parameters of a company.
307
+ #
308
+ # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
309
+ #
310
+ # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
311
+ #
312
+ # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
313
+ #
314
+ # 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/) .
315
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
316
+ #
317
+ # ### Security Policies
318
+ #
319
+ # * 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.
320
+ # @param companyId [Integer] The company id
321
+ # @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:* name, unit
322
+ # @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.
323
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
324
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
325
+ # @return [FetchResult]
326
+ def list_company_parameter_details(companyId, options={}) path = "/api/v2/companies/#{companyId}/parameters"
327
+ get(path, options) end
328
+
329
+ # Check managed returns funding status for a company
330
+ #
331
+ # This API is available by invitation only.
332
+ # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
333
+ # Returns a list of funding setup requests and their current status.
334
+ # Each object in the result is a request that was made to setup or adjust funding status for this company.
335
+ #
336
+ # ### Security Policies
337
+ #
338
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
339
+ # * 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.
340
+ # @param id [Integer] The unique identifier of the company
341
+ # @return [FundingStatusModel[]]
342
+ def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
343
+ get(path) end
344
+
345
+ # Retrieve a list of MRS Companies with account
346
+ #
347
+ # This API is available by invitation only.
348
+ #
349
+ # Get a list of companies with an active MRS service.
350
+ #
351
+ # ### Security Policies
352
+ #
353
+ # * 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.
354
+ # @return [FetchResult]
355
+ def list_mrs_companies() path = "/api/v2/companies/mrs"
356
+ get(path) end
357
+
358
+ # Retrieve all companies
359
+ #
360
+ # Get multiple company objects.
361
+ #
362
+ # A `company` represents a single corporation or individual that is registered to handle transactional taxes.
363
+ #
364
+ # 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/) .
365
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
366
+ # 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:
367
+ #
368
+ # * Contacts
369
+ # * Items
370
+ # * Locations
371
+ # * Nexus
372
+ # * Settings
373
+ # * TaxCodes
374
+ # * TaxRules
375
+ # * UPC
376
+ # * Parameters
377
+ #
378
+ # ### Security Policies
379
+ #
380
+ # * 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.
381
+ # @param include [String] A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name.
382
+ # @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:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts, parameters
383
+ # @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.
384
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
385
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
386
+ # @return [FetchResult]
387
+ def query_companies(options={}) path = "/api/v2/companies"
388
+ get(path, options) end
389
+
390
+ # Change configuration settings for this company
391
+ #
392
+ # Update configuration settings tied to this company.
393
+ #
394
+ # Configuration settings provide you with the ability to control features of your account and of your
395
+ # tax software. The category names `AvaCertServiceConfig` is reserved for
396
+ # Avalara internal software configuration values; to store your own company-level settings, please
397
+ # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
398
+ #
399
+ # Company settings are permanent settings that cannot be deleted. You can set the value of a
400
+ # company setting to null if desired and if the particular setting supports it.
401
+ #
402
+ # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
403
+ # processing, and should be changed with care.
404
+ #
405
+ # ### Security Policies
406
+ #
407
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
408
+ # @param id [Integer]
409
+ # @param model [CompanyConfigurationModel[]]
410
+ # @return [CompanyConfigurationModel[]]
411
+ def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
412
+ post(path, model) end
413
+
414
+ # Update a single company
415
+ #
416
+ # Replace the existing company object at this URL with an updated object.
417
+ #
418
+ # A `CompanyModel` represents a single corporation or individual that is registered to handle transactional taxes.
419
+ # All data from the existing object will be replaced with data in the object you PUT.
420
+ #
421
+ # When calling `UpdateCompany`, you are permitted to update the company itself. Updates to the nested objects
422
+ # such as contacts, locations, or settings are not permitted. To update the nested objects
423
+ #
424
+ # To set a field's value to `null`, you may either set its value to `null` or omit that field from the object you PUT.
425
+ #
426
+ # NOTE: Please do not use these blacklisted characters in company name and code: ';', '\', '|'.
427
+ #
428
+ # ### Security Policies
429
+ #
430
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
431
+ # @param id [Integer] The ID of the company you wish to update.
432
+ # @param model [Object] The company object you wish to update.
433
+ # @return [Object]
434
+ def update_company(id, model) path = "/api/v2/companies/#{id}"
435
+ put(path, model) end
436
+
437
+ # Update a company parameter
438
+ #
439
+ # Update a parameter of a company.
440
+ #
441
+ # Some companies can be taxed and reported differently depending on the properties of the company, such as IsPrimaryAddress. In AvaTax, these tax-affecting properties are called "parameters".
442
+ #
443
+ # A parameter added to a company will be used by default in tax calculation but will not show on the transaction line referencing the company.
444
+ #
445
+ # A company location parameter specified on a transaction line will override a company parameter if they share the same parameter name.
446
+ #
447
+ # ### Security Policies
448
+ #
449
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
450
+ # @param companyId [Integer] The company id.
451
+ # @param id [Integer] The company parameter id
452
+ # @param model [Object] The company parameter object you wish to update.
453
+ # @return [Object]
454
+ def update_company_parameter_detail(companyId, id, model) path = "/api/v2/companies/#{companyId}/parameters/#{id}"
455
+ put(path, model) end
456
+ end
457
+ end
351
458
  end