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
@@ -16,24 +16,21 @@ module AvaTax
16
16
  # Using CertExpress with this API will ensure that your certificates are automatically linked correctly into
17
17
  # your company so that they can be used for tax exemptions.
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 will record certificates
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
  #
@@ -48,25 +45,22 @@ module AvaTax
48
45
  # Using CertExpress with this API will ensure that your certificates are automatically linked correctly into
49
46
  # your company so that they can be used for tax exemptions.
50
47
  #
51
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
52
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
53
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
54
- # storage for this company, call `RequestCertificateSetup`.
48
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
49
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
50
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
51
+ # certificate storage for this company, call `RequestCertificateSetup`.
55
52
  #
56
53
  # ### Security Policies
57
54
  #
58
55
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
59
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
56
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
60
57
  # @param companyId [Integer] The unique ID number of the company that issued this invitation
61
58
  # @param customerCode [String] The number of the customer where the request is sent to
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
  #
@@ -81,15 +75,15 @@ module AvaTax
81
75
  # Using CertExpress with this API will ensure that your certificates are automatically linked correctly into
82
76
  # your company so that they can be used for tax exemptions.
83
77
  #
84
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
85
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
86
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
87
- # storage for this company, call `RequestCertificateSetup`.
78
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
79
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
80
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
81
+ # certificate storage for this company, call `RequestCertificateSetup`.
88
82
  #
89
83
  # ### Security Policies
90
84
  #
91
85
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
92
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
86
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
93
87
  # @param companyId [Integer] The unique ID number of the company that issued this invitation
94
88
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
95
89
  # @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:* companyId, customer, coverLetter, exposureZones, exemptReasons, requestLink
@@ -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
@@ -20,26 +20,23 @@ module AvaTax
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
  #
23
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
24
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
25
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
26
- # storage for this company, call `RequestCertificateSetup`.
23
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
24
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
25
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
26
+ # certificate storage for this company, call `RequestCertificateSetup`.
27
27
  #
28
28
  # If the users specified in the certificates do not exist, the API will create the user and link them to the certificate
29
29
  #
30
30
  # ### Security Policies
31
31
  #
32
32
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
33
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
33
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
34
34
  # @param companyId [Integer] The ID number of the company recording this certificate
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
  #
@@ -52,23 +49,20 @@ module AvaTax
52
49
  #
53
50
  # Revoked certificates can no longer be used.
54
51
  #
55
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
56
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
57
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
58
- # storage for this company, call `RequestCertificateSetup`.
52
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
53
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
54
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
55
+ # certificate storage for this company, call `RequestCertificateSetup`.
59
56
  #
60
57
  # ### Security Policies
61
58
  #
62
59
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
63
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
60
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
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
  #
@@ -82,25 +76,22 @@ module AvaTax
82
76
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
83
77
  # log onto the administrative website for the product you purchased.
84
78
  #
85
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
86
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
87
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
88
- # storage for this company, call `RequestCertificateSetup`.
79
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
80
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
81
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
82
+ # certificate storage for this company, call `RequestCertificateSetup`.
89
83
  #
90
84
  # ### Security Policies
91
85
  #
92
86
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
93
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
87
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
94
88
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
95
89
  # @param id [Integer] The unique ID number of this certificate
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
  #
@@ -117,24 +108,21 @@ module AvaTax
117
108
  # * po_numbers - Retrieves all PO numbers tied to the certificate.
118
109
  # * attributes - Retrieves all attributes applied to the certificate.
119
110
  #
120
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
121
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
122
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
123
- # storage for this company, call `RequestCertificateSetup`.
111
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
112
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
113
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
114
+ # certificate storage for this company, call `RequestCertificateSetup`.
124
115
  #
125
116
  # ### Security Policies
126
117
  #
127
118
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
128
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
119
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
129
120
  # @param companyId [Integer] The ID number of the company that recorded this certificate
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
  #
@@ -149,14 +137,11 @@ module AvaTax
149
137
  # ### Security Policies
150
138
  #
151
139
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
152
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
140
+ # * This API depends on the following active services:*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
  #
@@ -170,24 +155,21 @@ module AvaTax
170
155
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
171
156
  # log onto the administrative website for the product you purchased.
172
157
  #
173
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
174
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
175
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
176
- # storage for this company, call `RequestCertificateSetup`.
158
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
159
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
160
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
161
+ # certificate storage for this company, call `RequestCertificateSetup`.
177
162
  #
178
163
  # ### Security Policies
179
164
  #
180
165
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
181
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
166
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
182
167
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
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
  #
@@ -202,24 +184,21 @@ module AvaTax
202
184
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
203
185
  # log onto the administrative website for the product you purchased.
204
186
  #
205
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
206
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
207
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
208
- # storage for this company, call `RequestCertificateSetup`.
187
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
188
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
189
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
190
+ # certificate storage for this company, call `RequestCertificateSetup`.
209
191
  #
210
192
  # ### Security Policies
211
193
  #
212
194
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
213
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
195
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
214
196
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
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
  #
@@ -233,23 +212,20 @@ module AvaTax
233
212
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
234
213
  # log onto the administrative website for the product you purchased.
235
214
  #
236
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
237
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
238
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
239
- # storage for this company, call `RequestCertificateSetup`.
215
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
216
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
217
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
218
+ # certificate storage for this company, call `RequestCertificateSetup`.
240
219
  #
241
220
  # ### Security Policies
242
221
  #
243
222
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
244
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
223
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
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
  #
@@ -263,24 +239,21 @@ module AvaTax
263
239
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
264
240
  # log onto the administrative website for the product you purchased.
265
241
  #
266
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
267
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
268
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
269
- # storage for this company, call `RequestCertificateSetup`.
242
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
243
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
244
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
245
+ # certificate storage for this company, call `RequestCertificateSetup`.
270
246
  #
271
247
  # ### Security Policies
272
248
  #
273
249
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
274
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
250
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
275
251
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
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
  #
@@ -297,15 +270,15 @@ module AvaTax
297
270
  # * po_numbers - Retrieves all PO numbers tied to the certificate.
298
271
  # * attributes - Retrieves all attributes applied to the certificate.
299
272
  #
300
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
301
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
302
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
303
- # storage for this company, call `RequestCertificateSetup`.
273
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
274
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
275
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
276
+ # certificate storage for this company, call `RequestCertificateSetup`.
304
277
  #
305
278
  # ### Security Policies
306
279
  #
307
280
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
308
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
281
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
309
282
  # @param companyId [Integer] The ID number of the company to search
310
283
  # @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.
311
284
  # @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:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
@@ -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
  #
@@ -334,14 +304,11 @@ module AvaTax
334
304
  # ### Security Policies
335
305
  #
336
306
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
337
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
307
+ # * This API depends on the following active services:*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
  #
@@ -355,24 +322,21 @@ module AvaTax
355
322
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
356
323
  # log onto the administrative website for the product you purchased.
357
324
  #
358
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
359
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
360
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
361
- # storage for this company, call `RequestCertificateSetup`.
325
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
326
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
327
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
328
+ # certificate storage for this company, call `RequestCertificateSetup`.
362
329
  #
363
330
  # ### Security Policies
364
331
  #
365
332
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
366
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
333
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
367
334
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
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
  #
@@ -388,24 +352,21 @@ module AvaTax
388
352
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
389
353
  # log onto the administrative website for the product you purchased.
390
354
  #
391
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
392
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
393
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
394
- # storage for this company, call `RequestCertificateSetup`.
355
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
356
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
357
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
358
+ # certificate storage for this company, call `RequestCertificateSetup`.
395
359
  #
396
360
  # ### Security Policies
397
361
  #
398
362
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
399
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
363
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
400
364
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
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
  #
@@ -416,24 +377,21 @@ module AvaTax
416
377
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
417
378
  # log onto the administrative website for the product you purchased.
418
379
  #
419
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
420
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
421
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
422
- # storage for this company, call `RequestCertificateSetup`.
380
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
381
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
382
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
383
+ # certificate storage for this company, call `RequestCertificateSetup`.
423
384
  #
424
385
  # ### Security Policies
425
386
  #
426
387
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
427
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
388
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
428
389
  # @param companyId [Integer] The ID number of the company that recorded this certificate
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
  #
@@ -447,24 +405,21 @@ module AvaTax
447
405
  # criteria you specify when you store the certificate. To view or manage your certificates directly, please
448
406
  # log onto the administrative website for the product you purchased.
449
407
  #
450
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
451
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
452
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
453
- # storage for this company, call `RequestCertificateSetup`.
408
+ # Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
409
+ # Companies that do not have this storage system set up will see `CertCaptureNotConfiguredError` when they call exemption
410
+ # certificate related APIs. To check if this is set up for a company, call `GetCertificateSetup`. To request setup of exemption
411
+ # certificate storage for this company, call `RequestCertificateSetup`.
454
412
  #
455
413
  # ### Security Policies
456
414
  #
457
415
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
458
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
416
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
459
417
  # @param companyId [Integer] The unique ID number of the company that recorded this certificate
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