avatax 20.7.0 → 20.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +22 -55
  3. data/lib/avatax/client/addresses.rb +4 -10
  4. data/lib/avatax/client/advancedrules.rb +12 -30
  5. data/lib/avatax/client/avafileforms.rb +10 -25
  6. data/lib/avatax/client/batches.rb +16 -40
  7. data/lib/avatax/client/certexpressinvites.rb +6 -15
  8. data/lib/avatax/client/certificates.rb +30 -75
  9. data/lib/avatax/client/companies.rb +32 -80
  10. data/lib/avatax/client/compliance.rb +2 -5
  11. data/lib/avatax/client/contacts.rb +12 -30
  12. data/lib/avatax/client/customers.rb +26 -65
  13. data/lib/avatax/client/datasources.rb +12 -30
  14. data/lib/avatax/client/definitions.rb +118 -295
  15. data/lib/avatax/client/distancethresholds.rb +12 -30
  16. data/lib/avatax/client/filingcalendars.rb +2 -5
  17. data/lib/avatax/client/filings.rb +2 -5
  18. data/lib/avatax/client/firmclientlinkages.rb +18 -45
  19. data/lib/avatax/client/free.rb +6 -15
  20. data/lib/avatax/client/fundingrequests.rb +4 -10
  21. data/lib/avatax/client/items.rb +38 -95
  22. data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
  23. data/lib/avatax/client/locations.rb +14 -35
  24. data/lib/avatax/client/multidocument.rb +20 -50
  25. data/lib/avatax/client/nexus.rb +16 -40
  26. data/lib/avatax/client/notifications.rb +6 -15
  27. data/lib/avatax/client/provisioning.rb +4 -10
  28. data/lib/avatax/client/registrar.rb +20 -50
  29. data/lib/avatax/client/reports.rb +8 -20
  30. data/lib/avatax/client/settings.rb +12 -30
  31. data/lib/avatax/client/subscriptions.rb +6 -15
  32. data/lib/avatax/client/taxcodes.rb +12 -30
  33. data/lib/avatax/client/taxcontent.rb +6 -15
  34. data/lib/avatax/client/taxrules.rb +12 -30
  35. data/lib/avatax/client/transactions.rb +42 -105
  36. data/lib/avatax/client/upcs.rb +12 -30
  37. data/lib/avatax/client/users.rb +16 -40
  38. data/lib/avatax/client/utilities.rb +6 -15
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -35,11 +35,8 @@ module AvaTax
35
35
  # @param preValidatedExemptionReason [Boolean] If set to true, the certificate will bypass the human verification process.
36
36
  # @param model [CertificateModel[]] Certificates to be created
37
37
  # @return [CertificateModel[]]
38
- def create_certificates(companyId, model, options={})
39
- path = "/api/v2/companies/#{companyId}/certificates"
40
- post(path, model, options)
41
- end
42
-
38
+ def create_certificates(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/certificates"
39
+ post(path, model, options) end
43
40
 
44
41
  # Revoke and delete a certificate
45
42
  #
@@ -64,11 +61,8 @@ module AvaTax
64
61
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
65
62
  # @param id [Integer] The unique ID number of this certificate
66
63
  # @return [ErrorDetail[]]
67
- def delete_certificate(companyId, id)
68
- path = "/api/v2/companies/#{companyId}/certificates/#{id}"
69
- delete(path)
70
- end
71
-
64
+ def delete_certificate(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}"
65
+ delete(path) end
72
66
 
73
67
  # Download an image for this certificate
74
68
  #
@@ -96,11 +90,8 @@ module AvaTax
96
90
  # @param page [Integer] If you choose `$type`=`Jpeg`, you must specify which page number to retrieve.
97
91
  # @param type [String] The data format in which to retrieve the certificate image (See CertificatePreviewType::* for a list of allowable values)
98
92
  # @return [Object]
99
- def download_certificate_image(companyId, id, options={})
100
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment"
101
- get(path, options)
102
- end
103
-
93
+ def download_certificate_image(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment"
94
+ get(path, options) end
104
95
 
105
96
  # Retrieve a single certificate
106
97
  #
@@ -130,11 +121,8 @@ module AvaTax
130
121
  # @param id [Integer] The unique ID number of this certificate
131
122
  # @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.
132
123
  # @return [Object]
133
- def get_certificate(companyId, id, options={})
134
- path = "/api/v2/companies/#{companyId}/certificates/#{id}"
135
- get(path, options)
136
- end
137
-
124
+ def get_certificate(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}"
125
+ get(path, options) end
138
126
 
139
127
  # Check a company's exemption certificate status.
140
128
  #
@@ -152,11 +140,8 @@ module AvaTax
152
140
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
153
141
  # @param companyId [Integer] The company ID to check
154
142
  # @return [Object]
155
- def get_certificate_setup(companyId)
156
- path = "/api/v2/companies/#{companyId}/certificates/setup"
157
- get(path)
158
- end
159
-
143
+ def get_certificate_setup(companyId) path = "/api/v2/companies/#{companyId}/certificates/setup"
144
+ get(path) end
160
145
 
161
146
  # Link attributes to a certificate
162
147
  #
@@ -183,11 +168,8 @@ module AvaTax
183
168
  # @param id [Integer] The unique ID number of this certificate
184
169
  # @param model [CertificateAttributeModel[]] The list of attributes to link to this certificate.
185
170
  # @return [FetchResult]
186
- def link_attributes_to_certificate(companyId, id, model)
187
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/link"
188
- post(path, model)
189
- end
190
-
171
+ def link_attributes_to_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/link"
172
+ post(path, model) end
191
173
 
192
174
  # Link customers to a certificate
193
175
  #
@@ -215,11 +197,8 @@ module AvaTax
215
197
  # @param id [Integer] The unique ID number of this certificate
216
198
  # @param model [Object] The list of customers needed be added to the Certificate for exemption
217
199
  # @return [FetchResult]
218
- def link_customers_to_certificate(companyId, id, model)
219
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/link"
220
- post(path, model)
221
- end
222
-
200
+ def link_customers_to_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/link"
201
+ post(path, model) end
223
202
 
224
203
  # List all attributes applied to this certificate
225
204
  #
@@ -245,11 +224,8 @@ module AvaTax
245
224
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
246
225
  # @param id [Integer] The unique ID number of this certificate
247
226
  # @return [FetchResult]
248
- def list_attributes_for_certificate(companyId, id)
249
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes"
250
- get(path)
251
- end
252
-
227
+ def list_attributes_for_certificate(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes"
228
+ get(path) end
253
229
 
254
230
  # List customers linked to this certificate
255
231
  #
@@ -276,11 +252,8 @@ module AvaTax
276
252
  # @param id [Integer] The unique ID number of this certificate
277
253
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are currently available when fetching customers.
278
254
  # @return [FetchResult]
279
- def list_customers_for_certificate(companyId, id, options={})
280
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers"
281
- get(path, options)
282
- end
283
-
255
+ def list_customers_for_certificate(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers"
256
+ get(path, options) end
284
257
 
285
258
  # List all certificates for a company
286
259
  #
@@ -313,11 +286,8 @@ module AvaTax
313
286
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
314
287
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
315
288
  # @return [FetchResult]
316
- def query_certificates(companyId, options={})
317
- path = "/api/v2/companies/#{companyId}/certificates"
318
- get(path, options)
319
- end
320
-
289
+ def query_certificates(companyId, options={}) path = "/api/v2/companies/#{companyId}/certificates"
290
+ get(path, options) end
321
291
 
322
292
  # Request setup of exemption certificates for this company.
323
293
  #
@@ -337,11 +307,8 @@ module AvaTax
337
307
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
338
308
  # @param companyId [Integer]
339
309
  # @return [Object]
340
- def request_certificate_setup(companyId)
341
- path = "/api/v2/companies/#{companyId}/certificates/setup"
342
- post(path)
343
- end
344
-
310
+ def request_certificate_setup(companyId) path = "/api/v2/companies/#{companyId}/certificates/setup"
311
+ post(path) end
345
312
 
346
313
  # Unlink attributes from a certificate
347
314
  #
@@ -368,11 +335,8 @@ module AvaTax
368
335
  # @param id [Integer] The unique ID number of this certificate
369
336
  # @param model [CertificateAttributeModel[]] The list of attributes to unlink from this certificate.
370
337
  # @return [FetchResult]
371
- def unlink_attributes_from_certificate(companyId, id, model)
372
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/unlink"
373
- post(path, model)
374
- end
375
-
338
+ def unlink_attributes_from_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/unlink"
339
+ post(path, model) end
376
340
 
377
341
  # Unlink customers from a certificate
378
342
  #
@@ -401,11 +365,8 @@ module AvaTax
401
365
  # @param id [Integer] The unique ID number of this certificate
402
366
  # @param model [Object] The list of customers to unlink from this certificate
403
367
  # @return [FetchResult]
404
- def unlink_customers_from_certificate(companyId, id, model)
405
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/unlink"
406
- post(path, model)
407
- end
408
-
368
+ def unlink_customers_from_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/unlink"
369
+ post(path, model) end
409
370
 
410
371
  # Update a single certificate
411
372
  #
@@ -429,11 +390,8 @@ module AvaTax
429
390
  # @param id [Integer] The unique ID number of this certificate
430
391
  # @param model [Object] The new certificate object that will replace the existing one
431
392
  # @return [Object]
432
- def update_certificate(companyId, id, model)
433
- path = "/api/v2/companies/#{companyId}/certificates/#{id}"
434
- put(path, model)
435
- end
436
-
393
+ def update_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}"
394
+ put(path, model) end
437
395
 
438
396
  # Upload an image or PDF attachment for this certificate
439
397
  #
@@ -460,11 +418,8 @@ module AvaTax
460
418
  # @param id [Integer] The unique ID number of this certificate
461
419
  # @param file [Object] The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG.
462
420
  # @return [String]
463
- def upload_certificate_image(companyId, id)
464
- path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment"
465
- post(path)
466
- end
467
-
421
+ def upload_certificate_image(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment"
422
+ post(path) end
468
423
  end
469
424
  end
470
425
  end
@@ -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,8 @@ 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
114
-
101
+ def create_companies(model) path = "/api/v2/companies"
102
+ post(path, model) end
115
103
 
116
104
  # Request managed returns funding setup for a company
117
105
  #
@@ -133,11 +121,8 @@ module AvaTax
133
121
  # @param id [Integer] The unique identifier of the company
134
122
  # @param model [Object] The funding initialization request
135
123
  # @return [Object]
136
- def create_funding_request(id, model)
137
- path = "/api/v2/companies/#{id}/funding/setup"
138
- post(path, model)
139
- end
140
-
124
+ def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup"
125
+ post(path, model) end
141
126
 
142
127
  # Delete a single company
143
128
  #
@@ -148,11 +133,8 @@ module AvaTax
148
133
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
149
134
  # @param id [Integer] The ID of the company you wish to delete.
150
135
  # @return [ErrorDetail[]]
151
- def delete_company(id)
152
- path = "/api/v2/companies/#{id}"
153
- delete(path)
154
- end
155
-
136
+ def delete_company(id) path = "/api/v2/companies/#{id}"
137
+ delete(path) end
156
138
 
157
139
  # Check the funding configuration of a company
158
140
  #
@@ -167,11 +149,8 @@ module AvaTax
167
149
  # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
168
150
  # @param companyId [Integer] The unique identifier of the company
169
151
  # @return [Object]
170
- def funding_configuration_by_company(companyId)
171
- path = "/api/v2/companies/#{companyId}/funding/configuration"
172
- get(path)
173
- end
174
-
152
+ def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration"
153
+ get(path) end
175
154
 
176
155
  # Check the funding configuration of a company
177
156
  #
@@ -187,11 +166,8 @@ module AvaTax
187
166
  # @param companyId [Integer] The unique identifier of the company
188
167
  # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies
189
168
  # @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
-
169
+ def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations"
170
+ get(path, options) end
195
171
 
196
172
  # Retrieve a single company
197
173
  #
@@ -215,11 +191,8 @@ module AvaTax
215
191
  # @param id [Integer] The ID of the company to retrieve.
216
192
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects.
217
193
  # @return [Object]
218
- def get_company(id, options={})
219
- path = "/api/v2/companies/#{id}"
220
- get(path, options)
221
- end
222
-
194
+ def get_company(id, options={}) path = "/api/v2/companies/#{id}"
195
+ get(path, options) end
223
196
 
224
197
  # Get configuration settings for this company
225
198
  #
@@ -241,11 +214,8 @@ module AvaTax
241
214
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
242
215
  # @param id [Integer]
243
216
  # @return [CompanyConfigurationModel[]]
244
- def get_company_configuration(id)
245
- path = "/api/v2/companies/#{id}/configuration"
246
- get(path)
247
- end
248
-
217
+ def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration"
218
+ get(path) end
249
219
 
250
220
  # Get this company's filing status
251
221
  #
@@ -268,11 +238,8 @@ module AvaTax
268
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.
269
239
  # @param id [Integer]
270
240
  # @return [String]
271
- def get_filing_status(id)
272
- path = "/api/v2/companies/#{id}/filingstatus"
273
- get(path)
274
- end
275
-
241
+ def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus"
242
+ get(path) end
276
243
 
277
244
  # Check managed returns funding status for a company
278
245
  #
@@ -287,11 +254,8 @@ module AvaTax
287
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.
288
255
  # @param id [Integer] The unique identifier of the company
289
256
  # @return [FundingStatusModel[]]
290
- def list_funding_requests_by_company(id)
291
- path = "/api/v2/companies/#{id}/funding"
292
- get(path)
293
- end
294
-
257
+ def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding"
258
+ get(path) end
295
259
 
296
260
  # Retrieve a list of MRS Companies with account
297
261
  #
@@ -303,11 +267,8 @@ module AvaTax
303
267
  #
304
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.
305
269
  # @return [FetchResult]
306
- def list_mrs_companies()
307
- path = "/api/v2/companies/mrs"
308
- get(path)
309
- end
310
-
270
+ def list_mrs_companies() path = "/api/v2/companies/mrs"
271
+ get(path) end
311
272
 
312
273
  # Retrieve all companies
313
274
  #
@@ -338,11 +299,8 @@ module AvaTax
338
299
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
339
300
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
340
301
  # @return [FetchResult]
341
- def query_companies(options={})
342
- path = "/api/v2/companies"
343
- get(path, options)
344
- end
345
-
302
+ def query_companies(options={}) path = "/api/v2/companies"
303
+ get(path, options) end
346
304
 
347
305
  # Change configuration settings for this company
348
306
  #
@@ -365,11 +323,8 @@ module AvaTax
365
323
  # @param id [Integer]
366
324
  # @param model [CompanyConfigurationModel[]]
367
325
  # @return [CompanyConfigurationModel[]]
368
- def set_company_configuration(id, model)
369
- path = "/api/v2/companies/#{id}/configuration"
370
- post(path, model)
371
- end
372
-
326
+ def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration"
327
+ post(path, model) end
373
328
 
374
329
  # Update a single company
375
330
  #
@@ -391,11 +346,8 @@ module AvaTax
391
346
  # @param id [Integer] The ID of the company you wish to update.
392
347
  # @param model [Object] The company object you wish to update.
393
348
  # @return [Object]
394
- def update_company(id, model)
395
- path = "/api/v2/companies/#{id}"
396
- put(path, model)
397
- end
398
-
349
+ def update_company(id, model) path = "/api/v2/companies/#{id}"
350
+ put(path, model) end
399
351
  end
400
352
  end
401
353
  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