avatax 20.1.0 → 20.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +180 -116
  3. data/lib/avatax/client/addresses.rb +34 -34
  4. data/lib/avatax/client/advancedrules.rb +33 -142
  5. data/lib/avatax/client/avafileforms.rb +37 -37
  6. data/lib/avatax/client/batches.rb +122 -122
  7. data/lib/avatax/client/certexpressinvites.rb +70 -70
  8. data/lib/avatax/client/certificates.rb +313 -313
  9. data/lib/avatax/client/companies.rb +234 -232
  10. data/lib/avatax/client/compliance.rb +2 -2
  11. data/lib/avatax/client/contacts.rb +58 -58
  12. data/lib/avatax/client/customers.rb +279 -279
  13. data/lib/avatax/client/datasources.rb +51 -51
  14. data/lib/avatax/client/definitions.rb +448 -435
  15. data/lib/avatax/client/distancethresholds.rb +74 -74
  16. data/lib/avatax/client/filingcalendars.rb +10 -498
  17. data/lib/avatax/client/filings.rb +13 -13
  18. data/lib/avatax/client/firmclientlinkages.rb +54 -54
  19. data/lib/avatax/client/free.rb +73 -73
  20. data/lib/avatax/client/fundingrequests.rb +32 -32
  21. data/lib/avatax/client/items.rb +284 -284
  22. data/lib/avatax/client/jurisdictionoverrides.rb +70 -70
  23. data/lib/avatax/client/locations.rb +87 -84
  24. data/lib/avatax/client/multidocument.rb +294 -234
  25. data/lib/avatax/client/nexus.rb +283 -143
  26. data/lib/avatax/client/notifications.rb +48 -48
  27. data/lib/avatax/client/provisioning.rb +29 -29
  28. data/lib/avatax/client/registrar.rb +122 -122
  29. data/lib/avatax/client/reports.rb +63 -63
  30. data/lib/avatax/client/settings.rb +108 -108
  31. data/lib/avatax/client/subscriptions.rb +35 -35
  32. data/lib/avatax/client/taxcodes.rb +72 -72
  33. data/lib/avatax/client/taxcontent.rb +106 -106
  34. data/lib/avatax/client/taxrules.rb +122 -122
  35. data/lib/avatax/client/transactions.rb +654 -639
  36. data/lib/avatax/client/upcs.rb +63 -63
  37. data/lib/avatax/client/users.rb +121 -121
  38. data/lib/avatax/client/utilities.rb +34 -34
  39. data/lib/avatax/connection.rb +1 -1
  40. data/lib/avatax/request.rb +2 -0
  41. data/lib/avatax/version.rb +1 -1
  42. metadata +3 -3
@@ -5,265 +5,266 @@ module AvaTax
5
5
 
6
6
  # Checks whether the integration being used to set up this company and run transactions onto this company is compliant to all requirements.
7
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
- #
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
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.
35
+ # @param id [Integer] The ID of the company to check if its integration is certified.
36
36
  # @return [String]
37
37
  def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
38
38
  get(path) end
39
39
 
40
40
  # Change the filing status of this company
41
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
- #
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
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]
59
+ # @param id [Integer]
60
+ # @param model [Object]
61
61
  # @return [String]
62
62
  def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
63
63
  post(path, model) end
64
64
 
65
65
  # Quick setup for a company with a single physical address
66
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
- #
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
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.
83
+ # @param model [Object] Information about the company you wish to create.
84
84
  # @return [Object]
85
85
  def company_initialize(model) path = "/api/v2/companies/initialize"
86
86
  post(path, model) end
87
87
 
88
88
  # Create new companies
89
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
- #
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
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
99
+ # @param model [CompanyModel[]] Either a single company object or an array of companies to create
100
100
  # @return [CompanyModel[]]
101
101
  def create_companies(model) path = "/api/v2/companies"
102
102
  post(path, model) end
103
103
 
104
104
  # Request managed returns funding setup for a company
105
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.
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
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
121
+ # @param id [Integer] The unique identifier of the company
122
+ # @param model [Object] The funding initialization request
123
123
  # @return [Object]
124
124
  def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
125
125
  post(path, model) end
126
126
 
127
127
  # Delete a single company
128
128
  #
129
- # Deleting a company will delete all child companies, and all users attached to this company.
130
- #
131
- # ### Security Policies
132
- #
129
+ # Deleting a company will delete all child companies, and all users attached to this company.
130
+ #
131
+ # ### Security Policies
132
+ #
133
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.
134
+ # @param id [Integer] The ID of the company you wish to delete.
135
135
  # @return [ErrorDetail[]]
136
136
  def delete_company(id) path = "/api/v2/companies/#{id}"
137
137
  delete(path) end
138
138
 
139
139
  # Check the funding configuration of a company
140
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.
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
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
150
+ # @param companyId [Integer] The unique identifier of the company
151
151
  # @return [Object]
152
152
  def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
153
153
  get(path) end
154
154
 
155
155
  # Check the funding configuration of a company
156
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.
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
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
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
168
  # @return [FundingConfigurationModel[]]
169
169
  def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
170
170
  get(path, options) end
171
171
 
172
172
  # Retrieve a single company
173
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
- #
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
+ # * Parameters
187
+ #
188
+ # ### Security Policies
189
+ #
189
190
  # * 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.
191
+ # @param id [Integer] The ID of the company to retrieve.
192
+ # @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
193
  # @return [Object]
193
194
  def get_company(id, options={}) path = "/api/v2/companies/#{id}"
194
195
  get(path, options) end
195
196
 
196
197
  # Get configuration settings for this company
197
198
  #
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
- #
199
+ # Retrieve a list of all configuration settings tied to this company.
200
+ #
201
+ # Configuration settings provide you with the ability to control features of your account and of your
202
+ # tax software. The category name `AvaCertServiceConfig` is reserved for
203
+ # Avalara internal software configuration values; to store your own company-level settings, please
204
+ # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
205
+ #
206
+ # Company settings are permanent settings that cannot be deleted. You can set the value of a
207
+ # company setting to null if desired and if the particular setting supports it.
208
+ #
209
+ # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
210
+ # processing, and should be changed with care.
211
+ #
212
+ # ### Security Policies
213
+ #
213
214
  # * 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
+ # @param id [Integer]
215
216
  # @return [CompanyConfigurationModel[]]
216
217
  def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
217
218
  get(path) end
218
219
 
219
220
  # Get this company's filing status
220
221
  #
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
- #
222
+ # Retrieve the current filing status of this company.
223
+ #
224
+ # For customers using Avalara's Managed Returns Service, each company within their account can request
225
+ # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
226
+ # requested filing calendars prior to beginning filing tax returns on behalf of this company.
227
+ #
228
+ # A company's filing status can be one of the following values:
229
+ #
230
+ # * `NoReporting` - This company is not configured to report tax returns; instead, it reports through a parent company.
231
+ # * `NotYetFiling` - This company has not yet begun filing tax returns through Avalara's Managed Returns Service.
232
+ # * `FilingRequested` - The company has requested to begin filing tax returns, but Avalara's compliance team has not yet begun filing.
233
+ # * `FirstFiling` - The company has recently filing tax returns and is in a new status.
234
+ # * `Active` - The company is currently active and is filing tax returns via Avalara Managed Returns.
235
+ #
236
+ # ### Security Policies
237
+ #
237
238
  # * 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
+ # @param id [Integer]
239
240
  # @return [String]
240
241
  def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
241
242
  get(path) end
242
243
 
243
244
  # Check managed returns funding status for a company
244
245
  #
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.
246
+ # This API is available by invitation only.
247
+ # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
248
+ # Returns a list of funding setup requests and their current status.
249
+ # Each object in the result is a request that was made to setup or adjust funding status for this company.
250
+ #
251
+ # ### Security Policies
252
+ #
253
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
253
254
  # * 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
+ # @param id [Integer] The unique identifier of the company
255
256
  # @return [FundingStatusModel[]]
256
257
  def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
257
258
  get(path) end
258
259
 
259
260
  # Retrieve a list of MRS Companies with account
260
261
  #
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
- #
262
+ # This API is available by invitation only.
263
+ #
264
+ # Get a list of companies with an active MRS service.
265
+ #
266
+ # ### Security Policies
267
+ #
267
268
  # * 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
269
  # @return [FetchResult]
269
270
  def list_mrs_companies() path = "/api/v2/companies/mrs"
@@ -271,78 +272,79 @@ module AvaTax
271
272
 
272
273
  # Retrieve all companies
273
274
  #
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
- #
275
+ # Get multiple company objects.
276
+ #
277
+ # A `company` represents a single corporation or individual that is registered to handle transactional taxes.
278
+ #
279
+ # 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/) .
280
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
281
+ # 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:
282
+ #
283
+ # * Contacts
284
+ # * Items
285
+ # * Locations
286
+ # * Nexus
287
+ # * Settings
288
+ # * TaxCodes
289
+ # * TaxRules
290
+ # * UPC
291
+ # * Parameters
292
+ #
293
+ # ### Security Policies
294
+ #
293
295
  # * 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`.
296
+ # @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.
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/).<br />*Not filterable:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts, parameters
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`.
299
301
  # @return [FetchResult]
300
302
  def query_companies(options={}) path = "/api/v2/companies"
301
303
  get(path, options) end
302
304
 
303
305
  # Change configuration settings for this company
304
306
  #
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
- #
307
+ # Update configuration settings tied to this company.
308
+ #
309
+ # Configuration settings provide you with the ability to control features of your account and of your
310
+ # tax software. The category names `AvaCertServiceConfig` is reserved for
311
+ # Avalara internal software configuration values; to store your own company-level settings, please
312
+ # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
313
+ #
314
+ # Company settings are permanent settings that cannot be deleted. You can set the value of a
315
+ # company setting to null if desired and if the particular setting supports it.
316
+ #
317
+ # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
318
+ # processing, and should be changed with care.
319
+ #
320
+ # ### Security Policies
321
+ #
320
322
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
321
- # @param id [Integer]
322
- # @param model [CompanyConfigurationModel[]]
323
+ # @param id [Integer]
324
+ # @param model [CompanyConfigurationModel[]]
323
325
  # @return [CompanyConfigurationModel[]]
324
326
  def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
325
327
  post(path, model) end
326
328
 
327
329
  # Update a single company
328
330
  #
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
- #
331
+ # Replace the existing company object at this URL with an updated object.
332
+ #
333
+ # A `CompanyModel` represents a single corporation or individual that is registered to handle transactional taxes.
334
+ # All data from the existing object will be replaced with data in the object you PUT.
335
+ #
336
+ # When calling `UpdateCompany`, you are permitted to update the company itself. Updates to the nested objects
337
+ # such as contacts, locations, or settings are not permitted. To update the nested objects
338
+ #
339
+ # 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.
340
+ #
341
+ # NOTE: Please do not use these blacklisted characters in company name and code: ';', '\', '|'.
342
+ #
343
+ # ### Security Policies
344
+ #
343
345
  # * 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
+ # @param id [Integer] The ID of the company you wish to update.
347
+ # @param model [Object] The company object you wish to update.
346
348
  # @return [Object]
347
349
  def update_company(id, model) path = "/api/v2/companies/#{id}"
348
350
  put(path, model) end