avatax 20.5.0 → 20.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vs/slnx.sqlite +0 -0
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +83 -83
- data/lib/avatax/client/addresses.rb +21 -21
- data/lib/avatax/client/advancedrules.rb +51 -41
- data/lib/avatax/client/avafileforms.rb +41 -41
- data/lib/avatax/client/batches.rb +101 -48
- data/lib/avatax/client/certexpressinvites.rb +39 -39
- data/lib/avatax/client/certificates.rb +163 -163
- data/lib/avatax/client/companies.rb +226 -121
- data/lib/avatax/client/compliance.rb +13 -13
- data/lib/avatax/client/contacts.rb +48 -48
- data/lib/avatax/client/customers.rb +145 -145
- data/lib/avatax/client/datasources.rb +48 -48
- data/lib/avatax/client/definitions.rb +422 -420
- data/lib/avatax/client/distancethresholds.rb +48 -48
- data/lib/avatax/client/ecms.rb +26 -31
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/errortransactions.rb +27 -15
- data/lib/avatax/client/filingcalendars.rb +28 -13
- data/lib/avatax/client/filings.rb +25 -14
- data/lib/avatax/client/firmclientlinkages.rb +69 -69
- data/lib/avatax/client/free.rb +27 -27
- data/lib/avatax/client/fundingrequests.rb +20 -20
- data/lib/avatax/client/items.rb +139 -139
- data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
- data/lib/avatax/client/locations.rb +168 -57
- data/lib/avatax/client/multidocument.rb +98 -78
- data/lib/avatax/client/nexus.rb +104 -104
- data/lib/avatax/client/notices.rb +47 -139
- data/lib/avatax/client/notifications.rb +27 -27
- data/lib/avatax/client/provisioning.rb +20 -20
- data/lib/avatax/client/registrar.rb +76 -76
- data/lib/avatax/client/reports.rb +34 -34
- data/lib/avatax/client/settings.rb +48 -48
- data/lib/avatax/client/subscriptions.rb +27 -27
- data/lib/avatax/client/taxcodes.rb +48 -48
- data/lib/avatax/client/taxcontent.rb +27 -27
- data/lib/avatax/client/taxprofiles.rb +14 -10
- data/lib/avatax/client/taxrules.rb +48 -48
- data/lib/avatax/client/transactions.rb +185 -155
- data/lib/avatax/client/upcs.rb +48 -48
- data/lib/avatax/client/users.rb +62 -62
- data/lib/avatax/client/utilities.rb +27 -27
- data/lib/avatax/connection.rb +2 -2
- data/lib/avatax/version.rb +1 -1
- metadata +3 -16
@@ -1,10 +1,10 @@
|
|
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
|
-
#
|
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
8
|
# Examines the most recent 100 transactions or data from the last month when verifying transaction-related integrations.
|
9
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
10
|
# written integrations for a company are sufficient enough to be delivered to the respective customers to start using it.
|
@@ -31,14 +31,14 @@ module AvaTax
|
|
31
31
|
#
|
32
32
|
# ### Security Policies
|
33
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.
|
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
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
|
-
#
|
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
42
|
# Changes the current filing status of this company.
|
43
43
|
#
|
44
44
|
# For customers using Avalara's Managed Returns Service, each company within their account can request
|
@@ -55,15 +55,15 @@ module AvaTax
|
|
55
55
|
#
|
56
56
|
# ### Security Policies
|
57
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.
|
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
59
|
# @param id [Integer]
|
60
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
|
-
#
|
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
67
|
# Shortcut to quickly setup a single-physical-location company with critical information and activate it.
|
68
68
|
# This API provides quick and simple company setup functionality and does the following things:
|
69
69
|
#
|
@@ -79,14 +79,14 @@ module AvaTax
|
|
79
79
|
#
|
80
80
|
# ### Security Policies
|
81
81
|
#
|
82
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
82
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
83
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
|
-
#
|
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
90
|
# Create one or more new company objects.
|
91
91
|
# A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
|
92
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.
|
@@ -95,14 +95,37 @@ module AvaTax
|
|
95
95
|
#
|
96
96
|
# ### Security Policies
|
97
97
|
#
|
98
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
98
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
99
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
|
-
#
|
105
|
-
#
|
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
|
+
#
|
106
129
|
# This API is available by invitation only.
|
107
130
|
# Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
|
108
131
|
# required to setup their funding configuration before Avalara can begin filing tax returns on their
|
@@ -116,28 +139,46 @@ module AvaTax
|
|
116
139
|
#
|
117
140
|
# ### Security Policies
|
118
141
|
#
|
119
|
-
# * This API depends on the following active services
|
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.
|
142
|
+
# * This API depends on the following active services:*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.
|
121
144
|
# @param id [Integer] The unique identifier of the company
|
122
145
|
# @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
|
-
#
|
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
|
+
#
|
129
152
|
# Deleting a company will delete all child companies, and all users attached to this company.
|
130
153
|
#
|
131
154
|
# ### Security Policies
|
132
155
|
#
|
133
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
|
156
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
|
134
157
|
# @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
|
-
#
|
140
|
-
#
|
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
|
+
#
|
141
182
|
# This API is available by invitation only.
|
142
183
|
# Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
143
184
|
# Returns the funding configuration of the requested company.
|
@@ -146,14 +187,14 @@ module AvaTax
|
|
146
187
|
# ### Security Policies
|
147
188
|
#
|
148
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.
|
149
|
-
# * This API depends on the following active services
|
190
|
+
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
150
191
|
# @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
|
-
#
|
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
|
+
#
|
157
198
|
# This API is available by invitation only.
|
158
199
|
# Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
159
200
|
# Returns the funding configuration of the requested company.
|
@@ -162,15 +203,15 @@ module AvaTax
|
|
162
203
|
# ### Security Policies
|
163
204
|
#
|
164
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.
|
165
|
-
# * This API depends on the following active services
|
206
|
+
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
166
207
|
# @param companyId [Integer] The unique identifier of the company
|
167
208
|
# @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
|
-
#
|
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
|
+
#
|
174
215
|
# Get the company object identified by this URL.
|
175
216
|
# A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
|
176
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:
|
@@ -187,15 +228,15 @@ module AvaTax
|
|
187
228
|
#
|
188
229
|
# ### Security Policies
|
189
230
|
#
|
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.
|
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.
|
191
232
|
# @param id [Integer] The ID of the company to retrieve.
|
192
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.
|
193
|
-
# @return [Object]
|
194
|
-
def get_company(id, options={}) path = "/api/v2/companies/#{id}"
|
195
|
-
get(path, options) end
|
196
|
-
|
197
|
-
# Get configuration settings for this company
|
198
|
-
#
|
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
|
+
#
|
199
240
|
# Retrieve a list of all configuration settings tied to this company.
|
200
241
|
#
|
201
242
|
# Configuration settings provide you with the ability to control features of your account and of your
|
@@ -211,14 +252,33 @@ module AvaTax
|
|
211
252
|
#
|
212
253
|
# ### Security Policies
|
213
254
|
#
|
214
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
255
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
215
256
|
# @param id [Integer]
|
216
|
-
# @return [CompanyConfigurationModel[]]
|
217
|
-
def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
|
218
|
-
get(path) end
|
219
|
-
|
220
|
-
#
|
221
|
-
#
|
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
|
+
#
|
222
282
|
# Retrieve the current filing status of this company.
|
223
283
|
#
|
224
284
|
# For customers using Avalara's Managed Returns Service, each company within their account can request
|
@@ -235,14 +295,39 @@ module AvaTax
|
|
235
295
|
#
|
236
296
|
# ### Security Policies
|
237
297
|
#
|
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.
|
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.
|
239
299
|
# @param id [Integer]
|
240
|
-
# @return [String]
|
241
|
-
def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
|
242
|
-
get(path) end
|
243
|
-
|
244
|
-
#
|
245
|
-
#
|
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
|
+
#
|
246
331
|
# This API is available by invitation only.
|
247
332
|
# Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
248
333
|
# Returns a list of funding setup requests and their current status.
|
@@ -250,28 +335,28 @@ module AvaTax
|
|
250
335
|
#
|
251
336
|
# ### Security Policies
|
252
337
|
#
|
253
|
-
# * This API depends on the following active services
|
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.
|
338
|
+
# * This API depends on the following active services:*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.
|
255
340
|
# @param id [Integer] The unique identifier of the company
|
256
|
-
# @return [FundingStatusModel[]]
|
257
|
-
def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
|
258
|
-
get(path) end
|
259
|
-
|
260
|
-
# Retrieve a list of MRS Companies with account
|
261
|
-
#
|
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
|
+
#
|
262
347
|
# This API is available by invitation only.
|
263
348
|
#
|
264
349
|
# Get a list of companies with an active MRS service.
|
265
350
|
#
|
266
351
|
# ### Security Policies
|
267
352
|
#
|
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.
|
269
|
-
# @return [FetchResult]
|
270
|
-
def list_mrs_companies() path = "/api/v2/companies/mrs"
|
271
|
-
get(path) end
|
272
|
-
|
273
|
-
# Retrieve all companies
|
274
|
-
#
|
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
|
+
#
|
275
360
|
# Get multiple company objects.
|
276
361
|
#
|
277
362
|
# A `company` represents a single corporation or individual that is registered to handle transactional taxes.
|
@@ -292,18 +377,18 @@ module AvaTax
|
|
292
377
|
#
|
293
378
|
# ### Security Policies
|
294
379
|
#
|
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.
|
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.
|
296
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.
|
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
|
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, supplierandcustomers
|
298
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.
|
299
384
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
300
385
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
301
|
-
# @return [FetchResult]
|
302
|
-
def query_companies(options={}) path = "/api/v2/companies"
|
303
|
-
get(path, options) end
|
304
|
-
|
305
|
-
# Change configuration settings for this company
|
306
|
-
#
|
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
|
+
#
|
307
392
|
# Update configuration settings tied to this company.
|
308
393
|
#
|
309
394
|
# Configuration settings provide you with the ability to control features of your account and of your
|
@@ -319,15 +404,15 @@ module AvaTax
|
|
319
404
|
#
|
320
405
|
# ### Security Policies
|
321
406
|
#
|
322
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
407
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
323
408
|
# @param id [Integer]
|
324
409
|
# @param model [CompanyConfigurationModel[]]
|
325
|
-
# @return [CompanyConfigurationModel[]]
|
326
|
-
def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
|
327
|
-
post(path, model) end
|
328
|
-
|
329
|
-
# Update a single company
|
330
|
-
#
|
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
|
+
#
|
331
416
|
# Replace the existing company object at this URL with an updated object.
|
332
417
|
#
|
333
418
|
# A `CompanyModel` represents a single corporation or individual that is registered to handle transactional taxes.
|
@@ -342,12 +427,32 @@ module AvaTax
|
|
342
427
|
#
|
343
428
|
# ### Security Policies
|
344
429
|
#
|
345
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
430
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
346
431
|
# @param id [Integer] The ID of the company you wish to update.
|
347
432
|
# @param model [Object] The company object you wish to update.
|
348
|
-
# @return [Object]
|
349
|
-
def update_company(id, model) path = "/api/v2/companies/#{id}"
|
350
|
-
put(path, model) end
|
351
|
-
|
352
|
-
|
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
|
353
458
|
end
|