avatax 20.7.0 → 21.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.vs/slnx.sqlite +0 -0
  3. data/lib/avatax/client/accounts.rb +22 -55
  4. data/lib/avatax/client/addresses.rb +7 -13
  5. data/lib/avatax/client/advancedrules.rb +10 -38
  6. data/lib/avatax/client/avafileforms.rb +15 -30
  7. data/lib/avatax/client/batches.rb +16 -40
  8. data/lib/avatax/client/certexpressinvites.rb +21 -30
  9. data/lib/avatax/client/certificates.rb +97 -142
  10. data/lib/avatax/client/companies.rb +137 -80
  11. data/lib/avatax/client/compliance.rb +2 -5
  12. data/lib/avatax/client/contacts.rb +12 -30
  13. data/lib/avatax/client/customers.rb +87 -126
  14. data/lib/avatax/client/datasources.rb +18 -36
  15. data/lib/avatax/client/definitions.rb +126 -303
  16. data/lib/avatax/client/distancethresholds.rb +12 -30
  17. data/lib/avatax/client/ecms.rb +26 -31
  18. data/lib/avatax/client/ecommercetoken.rb +37 -0
  19. data/lib/avatax/client/errortransactions.rb +27 -15
  20. data/lib/avatax/client/filingcalendars.rb +17 -5
  21. data/lib/avatax/client/filings.rb +15 -7
  22. data/lib/avatax/client/firmclientlinkages.rb +18 -45
  23. data/lib/avatax/client/free.rb +2 -84
  24. data/lib/avatax/client/fundingrequests.rb +6 -12
  25. data/lib/avatax/client/items.rb +38 -95
  26. data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
  27. data/lib/avatax/client/locations.rb +128 -38
  28. data/lib/avatax/client/multidocument.rb +32 -62
  29. data/lib/avatax/client/nexus.rb +138 -37
  30. data/lib/avatax/client/notices.rb +47 -139
  31. data/lib/avatax/client/notifications.rb +6 -15
  32. data/lib/avatax/client/provisioning.rb +4 -10
  33. data/lib/avatax/client/registrar.rb +20 -50
  34. data/lib/avatax/client/reports.rb +17 -20
  35. data/lib/avatax/client/settings.rb +12 -30
  36. data/lib/avatax/client/subscriptions.rb +6 -15
  37. data/lib/avatax/client/taxcodes.rb +12 -30
  38. data/lib/avatax/client/taxcontent.rb +70 -16
  39. data/lib/avatax/client/taxprofiles.rb +14 -10
  40. data/lib/avatax/client/taxrules.rb +12 -30
  41. data/lib/avatax/client/transactions.rb +63 -126
  42. data/lib/avatax/client/upcs.rb +18 -36
  43. data/lib/avatax/client/users.rb +16 -40
  44. data/lib/avatax/client/utilities.rb +6 -15
  45. data/lib/avatax/configuration.rb +1 -1
  46. data/lib/avatax/request.rb +0 -2
  47. data/lib/avatax/version.rb +1 -1
  48. data/spec/avatax/request_spec.rb +25 -0
  49. metadata +4 -2
@@ -34,11 +34,8 @@ module AvaTax
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
35
  # @param id [Integer] The ID of the company to check if its integration is certified.
36
36
  # @return [String]
37
- def certify_integration(id)
38
- path = "/api/v2/companies/#{id}/certify"
39
- get(path)
40
- end
41
-
37
+ def certify_integration(id) path = "/api/v2/companies/#{id}/certify"
38
+ get(path) end
42
39
 
43
40
  # Change the filing status of this company
44
41
  #
@@ -62,11 +59,8 @@ module AvaTax
62
59
  # @param id [Integer]
63
60
  # @param model [Object]
64
61
  # @return [String]
65
- def change_filing_status(id, model)
66
- path = "/api/v2/companies/#{id}/filingstatus"
67
- post(path, model)
68
- end
69
-
62
+ def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus"
63
+ post(path, model) end
70
64
 
71
65
  # Quick setup for a company with a single physical address
72
66
  #
@@ -88,11 +82,8 @@ module AvaTax
88
82
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
89
83
  # @param model [Object] Information about the company you wish to create.
90
84
  # @return [Object]
91
- def company_initialize(model)
92
- path = "/api/v2/companies/initialize"
93
- post(path, model)
94
- end
95
-
85
+ def company_initialize(model) path = "/api/v2/companies/initialize"
86
+ post(path, model) end
96
87
 
97
88
  # Create new companies
98
89
  #
@@ -107,11 +98,31 @@ module AvaTax
107
98
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
108
99
  # @param model [CompanyModel[]] Either a single company object or an array of companies to create
109
100
  # @return [CompanyModel[]]
110
- def create_companies(model)
111
- path = "/api/v2/companies"
112
- post(path, model)
113
- end
101
+ def create_companies(model) path = "/api/v2/companies"
102
+ post(path, model) end
114
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
115
126
 
116
127
  # Request managed returns funding setup for a company
117
128
  #
@@ -128,16 +139,13 @@ module AvaTax
128
139
  #
129
140
  # ### Security Policies
130
141
  #
131
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
142
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
132
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.
133
144
  # @param id [Integer] The unique identifier of the company
134
145
  # @param model [Object] The funding initialization request
135
146
  # @return [Object]
136
- def create_funding_request(id, model)
137
- path = "/api/v2/companies/#{id}/funding/setup"
138
- post(path, model)
139
- end
140
-
147
+ def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
148
+ post(path, model) end
141
149
 
142
150
  # Delete a single company
143
151
  #
@@ -148,11 +156,26 @@ module AvaTax
148
156
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
149
157
  # @param id [Integer] The ID of the company you wish to delete.
150
158
  # @return [ErrorDetail[]]
151
- def delete_company(id)
152
- path = "/api/v2/companies/#{id}"
153
- delete(path)
154
- end
159
+ def delete_company(id) path = "/api/v2/companies/#{id}"
160
+ delete(path) end
155
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
156
179
 
157
180
  # Check the funding configuration of a company
158
181
  #
@@ -164,14 +187,11 @@ module AvaTax
164
187
  # ### Security Policies
165
188
  #
166
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.
167
- # * 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.
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.
168
191
  # @param companyId [Integer] The unique identifier of the company
169
192
  # @return [Object]
170
- def funding_configuration_by_company(companyId)
171
- path = "/api/v2/companies/#{companyId}/funding/configuration"
172
- get(path)
173
- end
174
-
193
+ def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
194
+ get(path) end
175
195
 
176
196
  # Check the funding configuration of a company
177
197
  #
@@ -183,15 +203,12 @@ module AvaTax
183
203
  # ### Security Policies
184
204
  #
185
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.
186
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
206
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
187
207
  # @param companyId [Integer] The unique identifier of the company
188
208
  # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies
189
209
  # @return [FundingConfigurationModel[]]
190
- def funding_configurations_by_company_and_currency(companyId, options={})
191
- path = "/api/v2/companies/#{companyId}/funding/configurations"
192
- get(path, options)
193
- end
194
-
210
+ def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
211
+ get(path, options) end
195
212
 
196
213
  # Retrieve a single company
197
214
  #
@@ -215,11 +232,8 @@ module AvaTax
215
232
  # @param id [Integer] The ID of the company to retrieve.
216
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.
217
234
  # @return [Object]
218
- def get_company(id, options={})
219
- path = "/api/v2/companies/#{id}"
220
- get(path, options)
221
- end
222
-
235
+ def get_company(id, options={}) path = "/api/v2/companies/#{id}"
236
+ get(path, options) end
223
237
 
224
238
  # Get configuration settings for this company
225
239
  #
@@ -241,11 +255,27 @@ module AvaTax
241
255
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
242
256
  # @param id [Integer]
243
257
  # @return [CompanyConfigurationModel[]]
244
- def get_company_configuration(id)
245
- path = "/api/v2/companies/#{id}/configuration"
246
- get(path)
247
- end
258
+ def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
259
+ get(path) end
248
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
249
279
 
250
280
  # Get this company's filing status
251
281
  #
@@ -268,11 +298,33 @@ module AvaTax
268
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.
269
299
  # @param id [Integer]
270
300
  # @return [String]
271
- def get_filing_status(id)
272
- path = "/api/v2/companies/#{id}/filingstatus"
273
- get(path)
274
- end
301
+ def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
302
+ get(path) end
275
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
276
328
 
277
329
  # Check managed returns funding status for a company
278
330
  #
@@ -283,15 +335,12 @@ module AvaTax
283
335
  #
284
336
  # ### Security Policies
285
337
  #
286
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
338
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
287
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.
288
340
  # @param id [Integer] The unique identifier of the company
289
341
  # @return [FundingStatusModel[]]
290
- def list_funding_requests_by_company(id)
291
- path = "/api/v2/companies/#{id}/funding"
292
- get(path)
293
- end
294
-
342
+ def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
343
+ get(path) end
295
344
 
296
345
  # Retrieve a list of MRS Companies with account
297
346
  #
@@ -303,11 +352,8 @@ module AvaTax
303
352
  #
304
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.
305
354
  # @return [FetchResult]
306
- def list_mrs_companies()
307
- path = "/api/v2/companies/mrs"
308
- get(path)
309
- end
310
-
355
+ def list_mrs_companies() path = "/api/v2/companies/mrs"
356
+ get(path) end
311
357
 
312
358
  # Retrieve all companies
313
359
  #
@@ -333,16 +379,13 @@ module AvaTax
333
379
  #
334
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.
335
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.
336
- # @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
337
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.
338
384
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
339
385
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
340
386
  # @return [FetchResult]
341
- def query_companies(options={})
342
- path = "/api/v2/companies"
343
- get(path, options)
344
- end
345
-
387
+ def query_companies(options={}) path = "/api/v2/companies"
388
+ get(path, options) end
346
389
 
347
390
  # Change configuration settings for this company
348
391
  #
@@ -365,11 +408,8 @@ module AvaTax
365
408
  # @param id [Integer]
366
409
  # @param model [CompanyConfigurationModel[]]
367
410
  # @return [CompanyConfigurationModel[]]
368
- def set_company_configuration(id, model)
369
- path = "/api/v2/companies/#{id}/configuration"
370
- post(path, model)
371
- end
372
-
411
+ def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
412
+ post(path, model) end
373
413
 
374
414
  # Update a single company
375
415
  #
@@ -391,11 +431,28 @@ module AvaTax
391
431
  # @param id [Integer] The ID of the company you wish to update.
392
432
  # @param model [Object] The company object you wish to update.
393
433
  # @return [Object]
394
- def update_company(id, model)
395
- path = "/api/v2/companies/#{id}"
396
- put(path, model)
397
- end
434
+ def update_company(id, model) path = "/api/v2/companies/#{id}"
435
+ put(path, model) end
398
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
399
456
  end
400
457
  end
401
458
  end
@@ -9,11 +9,8 @@ module AvaTax
9
9
  # @param companyId [Integer]
10
10
  # @param model [TransactionReferenceFieldModel[]]
11
11
  # @return [FetchResult]
12
- def tag_transaction(companyId, model)
13
- path = "/api/v2/companies/#{companyId}/transactions/tag"
14
- put(path, model)
15
- end
16
-
12
+ def tag_transaction(companyId, model) path = "/api/v2/companies/#{companyId}/transactions/tag"
13
+ put(path, model) end
17
14
  end
18
15
  end
19
16
  end
@@ -15,11 +15,8 @@ module AvaTax
15
15
  # @param companyId [Integer] The ID of the company that owns this contact.
16
16
  # @param model [ContactModel[]] The contacts you wish to create.
17
17
  # @return [ContactModel[]]
18
- def create_contacts(companyId, model)
19
- path = "/api/v2/companies/#{companyId}/contacts"
20
- post(path, model)
21
- end
22
-
18
+ def create_contacts(companyId, model) path = "/api/v2/companies/#{companyId}/contacts"
19
+ post(path, model) end
23
20
 
24
21
  # Delete a single contact
25
22
  #
@@ -31,11 +28,8 @@ module AvaTax
31
28
  # @param companyId [Integer] The ID of the company that owns this contact.
32
29
  # @param id [Integer] The ID of the contact you wish to delete.
33
30
  # @return [ErrorDetail[]]
34
- def delete_contact(companyId, id)
35
- path = "/api/v2/companies/#{companyId}/contacts/#{id}"
36
- delete(path)
37
- end
38
-
31
+ def delete_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
32
+ delete(path) end
39
33
 
40
34
  # Retrieve a single contact
41
35
  #
@@ -49,11 +43,8 @@ module AvaTax
49
43
  # @param companyId [Integer] The ID of the company for this contact
50
44
  # @param id [Integer] The primary key of this contact
51
45
  # @return [Object]
52
- def get_contact(companyId, id)
53
- path = "/api/v2/companies/#{companyId}/contacts/#{id}"
54
- get(path)
55
- end
56
-
46
+ def get_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
47
+ get(path) end
57
48
 
58
49
  # Retrieve contacts for this company
59
50
  #
@@ -71,11 +62,8 @@ module AvaTax
71
62
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
63
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
73
64
  # @return [FetchResult]
74
- def list_contacts_by_company(companyId, options={})
75
- path = "/api/v2/companies/#{companyId}/contacts"
76
- get(path, options)
77
- end
78
-
65
+ def list_contacts_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/contacts"
66
+ get(path, options) end
79
67
 
80
68
  # Retrieve all contacts
81
69
  #
@@ -94,11 +82,8 @@ module AvaTax
94
82
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
95
83
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
96
84
  # @return [FetchResult]
97
- def query_contacts(options={})
98
- path = "/api/v2/contacts"
99
- get(path, options)
100
- end
101
-
85
+ def query_contacts(options={}) path = "/api/v2/contacts"
86
+ get(path, options) end
102
87
 
103
88
  # Update a single contact
104
89
  #
@@ -115,11 +100,8 @@ module AvaTax
115
100
  # @param id [Integer] The ID of the contact you wish to update
116
101
  # @param model [Object] The contact you wish to update.
117
102
  # @return [Object]
118
- def update_contact(companyId, id, model)
119
- path = "/api/v2/companies/#{companyId}/contacts/#{id}"
120
- put(path, model)
121
- end
122
-
103
+ def update_contact(companyId, id, model) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
104
+ put(path, model) end
123
105
  end
124
106
  end
125
107
  end
@@ -16,23 +16,20 @@ module AvaTax
16
16
  # A nested object such as CustomFields could be specified and created along with the customer object. To fetch the
17
17
  # nested object, please call 'GetCustomer' API with appropriate $include parameters.
18
18
  #
19
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
20
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
21
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
22
- # storage for this company, call `RequestCertificateSetup`.
19
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
20
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
21
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
22
+ # certificate storage for this company, call `RequestCertificateSetup`.
23
23
  #
24
24
  # ### Security Policies
25
25
  #
26
26
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
27
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
27
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
28
28
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
29
29
  # @param model [CustomerModel[]] The list of customer objects to be created
30
30
  # @return [CustomerModel[]]
31
- def create_customers(companyId, model)
32
- path = "/api/v2/companies/#{companyId}/customers"
33
- post(path, model)
34
- end
35
-
31
+ def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers"
32
+ post(path, model) end
36
33
 
37
34
  # Delete a customer record
38
35
  #
@@ -44,23 +41,20 @@ module AvaTax
44
41
  # identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
45
42
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
46
43
  #
47
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
48
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
49
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
50
- # storage for this company, call `RequestCertificateSetup`.
44
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
45
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
46
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
47
+ # certificate storage for this company, call `RequestCertificateSetup`.
51
48
  #
52
49
  # ### Security Policies
53
50
  #
54
51
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
55
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
52
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
56
53
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
57
54
  # @param customerCode [String] The unique code representing this customer
58
55
  # @return [Object]
59
- def delete_customer(companyId, customerCode)
60
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
61
- delete(path)
62
- end
63
-
56
+ def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
57
+ delete(path) end
64
58
 
65
59
  # Retrieve a single customer
66
60
  #
@@ -78,24 +72,21 @@ module AvaTax
78
72
  # * CustomFields - Fetch a list of custom fields associated to this customer.
79
73
  # * attributes - Retrieves all attributes applied to the customer.
80
74
  #
81
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
82
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
83
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
84
- # storage for this company, call `RequestCertificateSetup`.
75
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
76
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
77
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
78
+ # certificate storage for this company, call `RequestCertificateSetup`.
85
79
  #
86
80
  # ### Security Policies
87
81
  #
88
82
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
89
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
83
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
90
84
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
91
85
  # @param customerCode [String] The unique code representing this customer
92
86
  # @param include [String] Specify optional additional objects to include in this fetch request
93
87
  # @return [Object]
94
- def get_customer(companyId, customerCode, options={})
95
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
96
- get(path, options)
97
- end
98
-
88
+ def get_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
89
+ get(path, options) end
99
90
 
100
91
  # Link attributes to a customer
101
92
  #
@@ -110,24 +101,21 @@ module AvaTax
110
101
  # identify any certificates linked to this customer object. If any certificate applies to the transaction,
111
102
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
112
103
  #
113
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
114
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
115
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
116
- # storage for this company, call `RequestCertificateSetup`.
104
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
105
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
106
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
107
+ # certificate storage for this company, call `RequestCertificateSetup`.
117
108
  #
118
109
  # ### Security Policies
119
110
  #
120
111
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
121
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
112
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
122
113
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
123
114
  # @param customerCode [String] The unique code representing the current customer
124
115
  # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
125
116
  # @return [FetchResult]
126
- def link_attributes_to_customer(companyId, customerCode, model)
127
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
128
- put(path, model)
129
- end
130
-
117
+ def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
118
+ put(path, model) end
131
119
 
132
120
  # Link certificates to a customer
133
121
  #
@@ -139,24 +127,21 @@ module AvaTax
139
127
  # identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
140
128
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
141
129
  #
142
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
143
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
144
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
145
- # storage for this company, call `RequestCertificateSetup`.
130
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
131
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
132
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
133
+ # certificate storage for this company, call `RequestCertificateSetup`.
146
134
  #
147
135
  # ### Security Policies
148
136
  #
149
137
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
150
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
138
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
151
139
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
152
140
  # @param customerCode [String] The unique code representing this customer
153
141
  # @param model [Object] The list of certificates to link to this customer
154
142
  # @return [FetchResult]
155
- def link_certificates_to_customer(companyId, customerCode, model)
156
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
157
- post(path, model)
158
- end
159
-
143
+ def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
144
+ post(path, model) end
160
145
 
161
146
  # Link two customer records together
162
147
  #
@@ -177,16 +162,13 @@ module AvaTax
177
162
  # ### Security Policies
178
163
  #
179
164
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
180
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
165
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
181
166
  # @param companyId [Integer] The unique ID number of the company defining customers.
182
167
  # @param code [String] The code of the bill-to customer to link.
183
168
  # @param model [Object] A list of information about ship-to customers to link to this bill-to customer.
184
169
  # @return [Object]
185
- def link_ship_to_customers_to_bill_customer(companyId, code, model)
186
- path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
187
- post(path, model)
188
- end
189
-
170
+ def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
171
+ post(path, model) end
190
172
 
191
173
  # Retrieve a customer's attributes
192
174
  #
@@ -201,23 +183,20 @@ module AvaTax
201
183
  # identify any certificates linked to this customer object. If any certificate applies to the transaction,
202
184
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
203
185
  #
204
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
205
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
206
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
207
- # storage for this company, call `RequestCertificateSetup`.
186
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
187
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
188
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
189
+ # certificate storage for this company, call `RequestCertificateSetup`.
208
190
  #
209
191
  # ### Security Policies
210
192
  #
211
193
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
212
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
194
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
213
195
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
214
196
  # @param customerCode [String] The unique code representing the current customer
215
197
  # @return [FetchResult]
216
- def list_attributes_for_customer(companyId, customerCode)
217
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
218
- get(path)
219
- end
220
-
198
+ def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
199
+ get(path) end
221
200
 
222
201
  # List certificates linked to a customer
223
202
  #
@@ -229,15 +208,15 @@ module AvaTax
229
208
  # identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
230
209
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
231
210
  #
232
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
233
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
234
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
235
- # storage for this company, call `RequestCertificateSetup`.
211
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
212
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
213
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
214
+ # certificate storage for this company, call `RequestCertificateSetup`.
236
215
  #
237
216
  # ### Security Policies
238
217
  #
239
218
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
240
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
219
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
241
220
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
242
221
  # @param customerCode [String] The unique code representing this customer
243
222
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
@@ -246,11 +225,8 @@ module AvaTax
246
225
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
247
226
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
248
227
  # @return [FetchResult]
249
- def list_certificates_for_customer(companyId, customerCode, options={})
250
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
251
- get(path, options)
252
- end
253
-
228
+ def list_certificates_for_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
229
+ get(path, options) end
254
230
 
255
231
  # List valid certificates for a location
256
232
  #
@@ -265,25 +241,22 @@ module AvaTax
265
241
  # a CertExpress invitation link so that the customer can upload proof of their exemption certificate. Please
266
242
  # see the `CreateCertExpressInvitation` API to create an invitation link for this customer.
267
243
  #
268
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
269
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
270
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
271
- # storage for this company, call `RequestCertificateSetup`.
244
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
245
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
246
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
247
+ # certificate storage for this company, call `RequestCertificateSetup`.
272
248
  #
273
249
  # ### Security Policies
274
250
  #
275
251
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
276
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
252
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
277
253
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
278
254
  # @param customerCode [String] The unique code representing this customer
279
255
  # @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
280
256
  # @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code.
281
257
  # @return [Object]
282
- def list_valid_certificates_for_customer(companyId, customerCode, country, region)
283
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
284
- get(path)
285
- end
286
-
258
+ def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
259
+ get(path) end
287
260
 
288
261
  # List all customers for this company
289
262
  #
@@ -300,15 +273,15 @@ module AvaTax
300
273
  # * Certificates - Fetch a list of certificates linked to this customer.
301
274
  # * attributes - Retrieves all attributes applied to the customer.
302
275
  #
303
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
304
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
305
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
306
- # storage for this company, call `RequestCertificateSetup`.
276
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
277
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
278
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
279
+ # certificate storage for this company, call `RequestCertificateSetup`.
307
280
  #
308
281
  # ### Security Policies
309
282
  #
310
283
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
311
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
284
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
312
285
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
313
286
  # @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
314
287
  # @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:* shipTos
@@ -316,11 +289,8 @@ module AvaTax
316
289
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
317
290
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
318
291
  # @return [FetchResult]
319
- def query_customers(companyId, options={})
320
- path = "/api/v2/companies/#{companyId}/customers"
321
- get(path, options)
322
- end
323
-
292
+ def query_customers(companyId, options={}) path = "/api/v2/companies/#{companyId}/customers"
293
+ get(path, options) end
324
294
 
325
295
  # Unlink attributes from a customer
326
296
  #
@@ -335,24 +305,21 @@ module AvaTax
335
305
  # identify any certificates linked to this customer object. If any certificate applies to the transaction,
336
306
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
337
307
  #
338
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
339
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
340
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
341
- # storage for this company, call `RequestCertificateSetup`.
308
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
309
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
310
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
311
+ # certificate storage for this company, call `RequestCertificateSetup`.
342
312
  #
343
313
  # ### Security Policies
344
314
  #
345
315
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
346
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
316
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
347
317
  # @param companyId [Integer] The unique ID number of the company that recorded the customer
348
318
  # @param customerCode [String] The unique code representing the current customer
349
319
  # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
350
320
  # @return [FetchResult]
351
- def unlink_attributes_from_customer(companyId, customerCode, model)
352
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
353
- put(path, model)
354
- end
355
-
321
+ def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
322
+ put(path, model) end
356
323
 
357
324
  # Unlink certificates from a customer
358
325
  #
@@ -364,24 +331,21 @@ module AvaTax
364
331
  # identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
365
332
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
366
333
  #
367
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
368
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
369
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
370
- # storage for this company, call `RequestCertificateSetup`.
334
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
335
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
336
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
337
+ # certificate storage for this company, call `RequestCertificateSetup`.
371
338
  #
372
339
  # ### Security Policies
373
340
  #
374
341
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
375
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
342
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
376
343
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
377
344
  # @param customerCode [String] The unique code representing this customer
378
345
  # @param model [Object] The list of certificates to link to this customer
379
346
  # @return [FetchResult]
380
- def unlink_certificates_from_customer(companyId, customerCode, model)
381
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
382
- post(path, model)
383
- end
384
-
347
+ def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
348
+ post(path, model) end
385
349
 
386
350
  # Update a single customer
387
351
  #
@@ -393,24 +357,21 @@ module AvaTax
393
357
  # identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
394
358
  # AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
395
359
  #
396
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
397
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
398
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
399
- # storage for this company, call `RequestCertificateSetup`.
360
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
361
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
362
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
363
+ # certificate storage for this company, call `RequestCertificateSetup`.
400
364
  #
401
365
  # ### Security Policies
402
366
  #
403
367
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
404
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
368
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
405
369
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
406
370
  # @param customerCode [String] The unique code representing this customer
407
371
  # @param model [Object] The new customer model that will replace the existing record at this URL
408
372
  # @return [Object]
409
- def update_customer(companyId, customerCode, model)
410
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
411
- put(path, model)
412
- end
413
-
373
+ def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
374
+ put(path, model) end
414
375
  end
415
376
  end
416
377
  end