avatax 19.12.1 → 20.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +14 -35
  3. data/lib/avatax/client/addresses.rb +4 -10
  4. data/lib/avatax/client/avafileforms.rb +10 -25
  5. data/lib/avatax/client/batches.rb +12 -30
  6. data/lib/avatax/client/certexpressinvites.rb +6 -15
  7. data/lib/avatax/client/certificates.rb +31 -76
  8. data/lib/avatax/client/companies.rb +32 -80
  9. data/lib/avatax/client/compliance.rb +2 -5
  10. data/lib/avatax/client/contacts.rb +12 -30
  11. data/lib/avatax/client/customers.rb +26 -65
  12. data/lib/avatax/client/datasources.rb +12 -30
  13. data/lib/avatax/client/definitions.rb +124 -284
  14. data/lib/avatax/client/distancethresholds.rb +12 -30
  15. data/lib/avatax/client/filings.rb +2 -5
  16. data/lib/avatax/client/firmclientlinkages.rb +18 -45
  17. data/lib/avatax/client/free.rb +6 -15
  18. data/lib/avatax/client/fundingrequests.rb +4 -10
  19. data/lib/avatax/client/items.rb +38 -95
  20. data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
  21. data/lib/avatax/client/locations.rb +14 -35
  22. data/lib/avatax/client/multidocument.rb +20 -50
  23. data/lib/avatax/client/nexus.rb +16 -40
  24. data/lib/avatax/client/notifications.rb +6 -15
  25. data/lib/avatax/client/provisioning.rb +4 -10
  26. data/lib/avatax/client/registrar.rb +20 -50
  27. data/lib/avatax/client/reports.rb +8 -20
  28. data/lib/avatax/client/settings.rb +12 -30
  29. data/lib/avatax/client/subscriptions.rb +6 -15
  30. data/lib/avatax/client/taxcodes.rb +12 -30
  31. data/lib/avatax/client/taxcontent.rb +6 -15
  32. data/lib/avatax/client/taxrules.rb +12 -30
  33. data/lib/avatax/client/transactions.rb +49 -112
  34. data/lib/avatax/client/upcs.rb +12 -30
  35. data/lib/avatax/client/users.rb +16 -40
  36. data/lib/avatax/client/utilities.rb +6 -15
  37. data/lib/avatax/version.rb +1 -1
  38. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff5274ac366293a11972b289c96588846c783d119a90a3d9b4efde14afc1c77b
4
- data.tar.gz: 9e121b02bebe73c0a28329f9b877de7fb200f1595d2d422e1ab8ddd65267a191
3
+ metadata.gz: e7d37ceebb222ef7471de79d08a99f2b440ee47e9281ede86a961652862c4fd9
4
+ data.tar.gz: 1024e3322a80760e52ac3242ca191f5aa231f075080b1216a132d5a40c6b3558
5
5
  SHA512:
6
- metadata.gz: 51e03ea02329b58fba05cafa8fedfa5671ea6d4ff1652b2b056f2ba29cf498da5b20c4c1fe1f09e89fa1679cceb61be4be7a75f5e0ee337290fde609909dcd33
7
- data.tar.gz: df5e539ac345595f63ec84af85abed40da6c876c5843c2f350e83f8f9f250d77a049ec70130cad5b2bdafe1cc6e625cfffe4b13e8bf8ca659f299cbf9e274e02
6
+ metadata.gz: 314bdf15f97c150b092423d6417ab470d7886ac37a5b87fb1e083c3906ddd45c47b678f3aa21981154939f3f5c80aaf383fc51ceb38977d531f0d456804b0f34
7
+ data.tar.gz: 49ad1fe4601e904941c8fcae8d2660aa31dc11680578ef2a0cf65384ceadb83fd24074fbd9e1941bd4aac96927698b51da14819063db40fb44da8749b998b224
@@ -24,11 +24,8 @@ module AvaTax
24
24
  # @param id [Integer] The ID of the account you wish to update.
25
25
  # @param model [Object] A request confirming that you wish to reset the license key of this account.
26
26
  # @return [Object]
27
- def account_reset_license_key(id, model)
28
- path = "/api/v2/accounts/#{id}/resetlicensekey"
29
- post(path, model)
30
- end
31
-
27
+ def account_reset_license_key(id, model) path = "/api/v2/accounts/#{id}/resetlicensekey"
28
+ post(path, model) end
32
29
 
33
30
  # Activate an account by accepting terms and conditions
34
31
  #
@@ -49,11 +46,8 @@ module AvaTax
49
46
  # @param id [Integer] The ID of the account to activate
50
47
  # @param model [Object] The activation request
51
48
  # @return [Object]
52
- def activate_account(id, model)
53
- path = "/api/v2/accounts/#{id}/activate"
54
- post(path, model)
55
- end
56
-
49
+ def activate_account(id, model) path = "/api/v2/accounts/#{id}/activate"
50
+ post(path, model) end
57
51
 
58
52
  # Retrieve audit history for an account.
59
53
  #
@@ -81,11 +75,8 @@ module AvaTax
81
75
  # @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.
82
76
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
83
77
  # @return [FetchResult]
84
- def audit_account(id, options={})
85
- path = "/api/v2/accounts/#{id}/audit"
86
- get(path, options)
87
- end
88
-
78
+ def audit_account(id, options={}) path = "/api/v2/accounts/#{id}/audit"
79
+ get(path, options) end
89
80
 
90
81
  # Retrieve a single account
91
82
  #
@@ -101,11 +92,8 @@ module AvaTax
101
92
  # @param id [Integer] The ID of the account to retrieve
102
93
  # @param include [String] A comma separated list of special fetch options
103
94
  # @return [Object]
104
- def get_account(id, options={})
105
- path = "/api/v2/accounts/#{id}"
106
- get(path, options)
107
- end
108
-
95
+ def get_account(id, options={}) path = "/api/v2/accounts/#{id}"
96
+ get(path, options) end
109
97
 
110
98
  # Get configuration settings for this account
111
99
  #
@@ -127,11 +115,8 @@ module AvaTax
127
115
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
128
116
  # @param id [Integer]
129
117
  # @return [AccountConfigurationModel[]]
130
- def get_account_configuration(id)
131
- path = "/api/v2/accounts/#{id}/configuration"
132
- get(path)
133
- end
134
-
118
+ def get_account_configuration(id) path = "/api/v2/accounts/#{id}/configuration"
119
+ get(path) end
135
120
 
136
121
  # Retrieve all accounts
137
122
  #
@@ -157,11 +142,8 @@ module AvaTax
157
142
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
158
143
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
159
144
  # @return [FetchResult]
160
- def query_accounts(options={})
161
- path = "/api/v2/accounts"
162
- get(path, options)
163
- end
164
-
145
+ def query_accounts(options={}) path = "/api/v2/accounts"
146
+ get(path, options) end
165
147
 
166
148
  # Change configuration settings for this account
167
149
  #
@@ -184,11 +166,8 @@ module AvaTax
184
166
  # @param id [Integer]
185
167
  # @param model [AccountConfigurationModel[]]
186
168
  # @return [AccountConfigurationModel[]]
187
- def set_account_configuration(id, model)
188
- path = "/api/v2/accounts/#{id}/configuration"
189
- post(path, model)
190
- end
191
-
169
+ def set_account_configuration(id, model) path = "/api/v2/accounts/#{id}/configuration"
170
+ post(path, model) end
192
171
  end
193
172
  end
194
173
  end
@@ -30,11 +30,8 @@ module AvaTax
30
30
  # @param country [String] Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)
31
31
  # @param textCase [String] selectable text case for address validation (See TextCase::* for a list of allowable values)
32
32
  # @return [Object]
33
- def resolve_address(options={})
34
- path = "/api/v2/addresses/resolve"
35
- get(path, options)
36
- end
37
-
33
+ def resolve_address(options={}) path = "/api/v2/addresses/resolve"
34
+ get(path, options) end
38
35
 
39
36
  # Retrieve geolocation information for a specified address
40
37
  #
@@ -51,11 +48,8 @@ module AvaTax
51
48
  # * This API depends on the following active services<br />*Required* (all): AutoAddress.
52
49
  # @param model [Object] The address to resolve
53
50
  # @return [Object]
54
- def resolve_address_post(model)
55
- path = "/api/v2/addresses/resolve"
56
- post(path, model)
57
- end
58
-
51
+ def resolve_address_post(model) path = "/api/v2/addresses/resolve"
52
+ post(path, model) end
59
53
  end
60
54
  end
61
55
  end
@@ -14,11 +14,8 @@ module AvaTax
14
14
  # * 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.
15
15
  # @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
16
16
  # @return [AvaFileFormModel[]]
17
- def create_ava_file_forms(model)
18
- path = "/api/v2/avafileforms"
19
- post(path, model)
20
- end
21
-
17
+ def create_ava_file_forms(model) path = "/api/v2/avafileforms"
18
+ post(path, model) end
22
19
 
23
20
  # Delete a single AvaFileForm
24
21
  #
@@ -30,11 +27,8 @@ module AvaTax
30
27
  # * 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.
31
28
  # @param id [Integer] The ID of the AvaFileForm you wish to delete.
32
29
  # @return [ErrorDetail[]]
33
- def delete_ava_file_form(id)
34
- path = "/api/v2/avafileforms/#{id}"
35
- delete(path)
36
- end
37
-
30
+ def delete_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
31
+ delete(path) end
38
32
 
39
33
  # Retrieve a single AvaFileForm
40
34
  #
@@ -46,11 +40,8 @@ module AvaTax
46
40
  # * 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.
47
41
  # @param id [Integer] The primary key of this AvaFileForm
48
42
  # @return [Object]
49
- def get_ava_file_form(id)
50
- path = "/api/v2/avafileforms/#{id}"
51
- get(path)
52
- end
53
-
43
+ def get_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
44
+ get(path) end
54
45
 
55
46
  # Retrieve all AvaFileForms
56
47
  #
@@ -66,11 +57,8 @@ module AvaTax
66
57
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
67
58
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
68
59
  # @return [FetchResult]
69
- def query_ava_file_forms(options={})
70
- path = "/api/v2/avafileforms"
71
- get(path, options)
72
- end
73
-
60
+ def query_ava_file_forms(options={}) path = "/api/v2/avafileforms"
61
+ get(path, options) end
74
62
 
75
63
  # Update a AvaFileForm
76
64
  #
@@ -84,11 +72,8 @@ module AvaTax
84
72
  # @param id [Integer] The ID of the AvaFileForm you wish to update
85
73
  # @param model [Object] The AvaFileForm model you wish to update.
86
74
  # @return [Object]
87
- def update_ava_file_form(id, model)
88
- path = "/api/v2/avafileforms/#{id}"
89
- put(path, model)
90
- end
91
-
75
+ def update_ava_file_form(id, model) path = "/api/v2/avafileforms/#{id}"
76
+ put(path, model) end
92
77
  end
93
78
  end
94
79
  end
@@ -31,11 +31,8 @@ module AvaTax
31
31
  # @param companyId [Integer] The ID of the company that owns this batch.
32
32
  # @param model [BatchModel[]] The batch you wish to create.
33
33
  # @return [BatchModel[]]
34
- def create_batches(companyId, model)
35
- path = "/api/v2/companies/#{companyId}/batches"
36
- post(path, model)
37
- end
38
-
34
+ def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches"
35
+ post(path, model) end
39
36
 
40
37
  # Delete a single batch
41
38
  #
@@ -56,11 +53,8 @@ module AvaTax
56
53
  # @param companyId [Integer] The ID of the company that owns this batch.
57
54
  # @param id [Integer] The ID of the batch to delete.
58
55
  # @return [ErrorDetail[]]
59
- def delete_batch(companyId, id)
60
- path = "/api/v2/companies/#{companyId}/batches/#{id}"
61
- delete(path)
62
- end
63
-
56
+ def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
57
+ delete(path) end
64
58
 
65
59
  # Download a single batch file
66
60
  #
@@ -73,11 +67,8 @@ module AvaTax
73
67
  # @param batchId [Integer] The ID of the batch object
74
68
  # @param id [Integer] The primary key of this batch file object
75
69
  # @return [Object]
76
- def download_batch(companyId, batchId, id)
77
- path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
78
- get(path)
79
- end
80
-
70
+ def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
71
+ get(path) end
81
72
 
82
73
  # Retrieve a single batch
83
74
  #
@@ -103,11 +94,8 @@ module AvaTax
103
94
  # @param companyId [Integer] The ID of the company that owns this batch
104
95
  # @param id [Integer] The primary key of this batch
105
96
  # @return [Object]
106
- def get_batch(companyId, id)
107
- path = "/api/v2/companies/#{companyId}/batches/#{id}"
108
- get(path)
109
- end
110
-
97
+ def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
98
+ get(path) end
111
99
 
112
100
  # Retrieve all batches for this company
113
101
  #
@@ -143,11 +131,8 @@ module AvaTax
143
131
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
144
132
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
145
133
  # @return [FetchResult]
146
- def list_batches_by_company(companyId, options={})
147
- path = "/api/v2/companies/#{companyId}/batches"
148
- get(path, options)
149
- end
150
-
134
+ def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches"
135
+ get(path, options) end
151
136
 
152
137
  # Retrieve all batches
153
138
  #
@@ -179,11 +164,8 @@ module AvaTax
179
164
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
180
165
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
181
166
  # @return [FetchResult]
182
- def query_batches(options={})
183
- path = "/api/v2/batches"
184
- get(path, options)
185
- end
186
-
167
+ def query_batches(options={}) path = "/api/v2/batches"
168
+ get(path, options) end
187
169
  end
188
170
  end
189
171
  end
@@ -29,11 +29,8 @@ module AvaTax
29
29
  # @param customerCode [String] The number of the customer where the request is sent to
30
30
  # @param model [CreateCertExpressInvitationModel[]] the requests to send out to customers
31
31
  # @return [CertExpressInvitationStatusModel[]]
32
- def create_cert_express_invitation(companyId, customerCode, model)
33
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites"
34
- post(path, model)
35
- end
36
-
32
+ def create_cert_express_invitation(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites"
33
+ post(path, model) end
37
34
 
38
35
  # Retrieve a single CertExpress invitation
39
36
  #
@@ -62,11 +59,8 @@ module AvaTax
62
59
  # @param id [Integer] The unique ID number of this CertExpress invitation
63
60
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
64
61
  # @return [Object]
65
- def get_cert_express_invitation(companyId, customerCode, id, options={})
66
- path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}"
67
- get(path, options)
68
- end
69
-
62
+ def get_cert_express_invitation(companyId, customerCode, id, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}"
63
+ get(path, options) end
70
64
 
71
65
  # List CertExpress invitations
72
66
  #
@@ -97,11 +91,8 @@ module AvaTax
97
91
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
98
92
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
99
93
  # @return [FetchResult]
100
- def list_cert_express_invitations(companyId, options={})
101
- path = "/api/v2/companies/#{companyId}/certexpressinvites"
102
- get(path, options)
103
- end
104
-
94
+ def list_cert_express_invitations(companyId, options={}) path = "/api/v2/companies/#{companyId}/certexpressinvites"
95
+ get(path, options) end
105
96
  end
106
97
  end
107
98
  end
@@ -16,7 +16,7 @@ module AvaTax
16
16
  # calculating tax exemptions when processing is complete. For a certificate to be used in calculating exemptions,
17
17
  # it must have the following:
18
18
  #
19
- # * A list of exposure zones indicating where the certificate is valid
19
+ # * An exposure zone indicating where the certificate is valid
20
20
  # * A link to the customer that is allowed to use this certificate
21
21
  # * Your tax transaction must contain the correct customer code
22
22
  #
@@ -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