avatax 20.9.0 → 21.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.vs/slnx.sqlite +0 -0
  3. data/lib/avatax/client/accounts.rb +83 -83
  4. data/lib/avatax/client/addresses.rb +21 -21
  5. data/lib/avatax/client/advancedrules.rb +41 -51
  6. data/lib/avatax/client/avafileforms.rb +41 -41
  7. data/lib/avatax/client/batches.rb +62 -62
  8. data/lib/avatax/client/certexpressinvites.rb +39 -39
  9. data/lib/avatax/client/certificates.rb +163 -163
  10. data/lib/avatax/client/companies.rb +157 -156
  11. data/lib/avatax/client/contacts.rb +48 -48
  12. data/lib/avatax/client/customers.rb +145 -145
  13. data/lib/avatax/client/datasources.rb +48 -48
  14. data/lib/avatax/client/definitions.rb +591 -422
  15. data/lib/avatax/client/distancethresholds.rb +48 -48
  16. data/lib/avatax/client/ecms.rb +26 -31
  17. data/lib/avatax/client/ecommercetoken.rb +17 -17
  18. data/lib/avatax/client/errortransactions.rb +27 -15
  19. data/lib/avatax/client/filingcalendars.rb +48 -12
  20. data/lib/avatax/client/filings.rb +23 -21
  21. data/lib/avatax/client/firmclientlinkages.rb +69 -69
  22. data/lib/avatax/client/free.rb +13 -86
  23. data/lib/avatax/client/fundingrequests.rb +20 -20
  24. data/lib/avatax/client/items.rb +255 -137
  25. data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
  26. data/lib/avatax/client/locations.rb +92 -92
  27. data/lib/avatax/client/multidocument.rb +78 -78
  28. data/lib/avatax/client/nexus.rb +133 -105
  29. data/lib/avatax/client/notices.rb +43 -504
  30. data/lib/avatax/client/notifications.rb +27 -27
  31. data/lib/avatax/client/provisioning.rb +20 -20
  32. data/lib/avatax/client/registrar.rb +85 -75
  33. data/lib/avatax/client/reports.rb +44 -35
  34. data/lib/avatax/client/settings.rb +55 -50
  35. data/lib/avatax/client/subscriptions.rb +27 -27
  36. data/lib/avatax/client/taxcodes.rb +48 -48
  37. data/lib/avatax/client/taxcontent.rb +90 -27
  38. data/lib/avatax/client/taxprofiles.rb +14 -10
  39. data/lib/avatax/client/taxrules.rb +50 -50
  40. data/lib/avatax/client/transactions.rb +155 -155
  41. data/lib/avatax/client/upcs.rb +48 -48
  42. data/lib/avatax/client/users.rb +64 -64
  43. data/lib/avatax/client/utilities.rb +27 -27
  44. data/lib/avatax/configuration.rb +1 -1
  45. data/lib/avatax/request.rb +11 -5
  46. data/lib/avatax/version.rb +1 -1
  47. data/spec/avatax/request_spec.rb +25 -0
  48. metadata +12 -4
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Batches
4
-
5
-
6
- # Cancel an in progress batch
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Batches
4
+
5
+
6
+ # Cancel an in progress batch
7
+ #
8
8
  # Marks the in progress batch identified by this URL as cancelled.
9
9
  #
10
10
  # Only JSON batches can be cancelled. If you attempt to cancel a file batch, you will receive an error message.
@@ -20,15 +20,15 @@ module AvaTax
20
20
  #
21
21
  # ### Security Policies
22
22
  #
23
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
23
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
24
24
  # @param companyId [Integer] The ID of the company that owns this batch.
25
25
  # @param id [Integer] The ID of the batch to cancel.
26
- # @return [Object]
27
- def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel"
28
- post(path) end
29
-
30
- # Create a new batch
31
- #
26
+ # @return [Object]
27
+ def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel"
28
+ post(path) end
29
+
30
+ # Create a new batch
31
+ #
32
32
  # Create one or more new batch objects attached to this company.
33
33
  #
34
34
  # Each batch object may have one or more file objects (currently only one file is supported).
@@ -51,15 +51,15 @@ module AvaTax
51
51
  #
52
52
  # ### Security Policies
53
53
  #
54
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
54
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
55
55
  # @param companyId [Integer] The ID of the company that owns this batch.
56
56
  # @param model [BatchModel[]] The batch you wish to create.
57
- # @return [BatchModel[]]
58
- def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches"
59
- post(path, model) end
60
-
61
- # Create a new transaction batch
62
- #
57
+ # @return [BatchModel[]]
58
+ def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches"
59
+ post(path, model) end
60
+
61
+ # Create a new transaction batch
62
+ #
63
63
  # Create a new transaction batch objects attached to this company.
64
64
  #
65
65
  # When a transaction batch is created, it is added to the AvaTax Batch v2 Queue and will be
@@ -80,15 +80,15 @@ module AvaTax
80
80
  #
81
81
  # ### Security Policies
82
82
  #
83
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
83
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
84
84
  # @param companyId [Integer] The ID of the company that owns this batch.
85
85
  # @param model [Object] The transaction batch you wish to create.
86
- # @return [Object]
87
- def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions"
88
- post(path, model) end
89
-
90
- # Delete a single batch
91
- #
86
+ # @return [Object]
87
+ def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions"
88
+ post(path, model) end
89
+
90
+ # Delete a single batch
91
+ #
92
92
  # Marks the batch identified by this URL as deleted.
93
93
  #
94
94
  # If you attempt to delete a batch that is being processed, you will receive an error message.
@@ -102,29 +102,29 @@ module AvaTax
102
102
  #
103
103
  # ### Security Policies
104
104
  #
105
- # * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
105
+ # * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
106
106
  # @param companyId [Integer] The ID of the company that owns this batch.
107
107
  # @param id [Integer] The ID of the batch to delete.
108
- # @return [ErrorDetail[]]
109
- def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
110
- delete(path) end
111
-
112
- # Download a single batch file
113
- #
108
+ # @return [ErrorDetail[]]
109
+ def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
110
+ delete(path) end
111
+
112
+ # Download a single batch file
113
+ #
114
114
  # Download a single batch file identified by this URL.
115
115
  #
116
116
  # ### Security Policies
117
117
  #
118
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
118
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
119
119
  # @param companyId [Integer] The ID of the company that owns this batch
120
120
  # @param batchId [Integer] The ID of the batch object
121
121
  # @param id [Integer] The primary key of this batch file object
122
- # @return [Object]
123
- def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
124
- get(path) end
125
-
126
- # Retrieve a single batch
127
- #
122
+ # @return [Object]
123
+ def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
124
+ get(path) end
125
+
126
+ # Retrieve a single batch
127
+ #
128
128
  # Get the batch object identified by this URL. A batch object is a large
129
129
  # collection of API calls stored in a compact file.
130
130
  #
@@ -143,15 +143,15 @@ module AvaTax
143
143
  #
144
144
  # ### Security Policies
145
145
  #
146
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
146
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
147
147
  # @param companyId [Integer] The ID of the company that owns this batch
148
148
  # @param id [Integer] The primary key of this batch
149
- # @return [Object]
150
- def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
151
- get(path) end
152
-
153
- # Retrieve all batches for this company
154
- #
149
+ # @return [Object]
150
+ def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
151
+ get(path) end
152
+
153
+ # Retrieve all batches for this company
154
+ #
155
155
  # List all batch objects attached to the specified company.
156
156
  #
157
157
  # A batch object is a large collection of API calls stored in a compact file.
@@ -176,19 +176,19 @@ module AvaTax
176
176
  #
177
177
  # ### Security Policies
178
178
  #
179
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
179
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
180
180
  # @param companyId [Integer] The ID of the company that owns these batches
181
181
  # @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:* files
182
182
  # @param include [String] A comma separated list of additional data to retrieve.
183
183
  # @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.
184
184
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
185
185
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
186
- # @return [FetchResult]
187
- def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches"
188
- get(path, options) end
189
-
190
- # Retrieve all batches
191
- #
186
+ # @return [FetchResult]
187
+ def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches"
188
+ get(path, options) end
189
+
190
+ # Retrieve all batches
191
+ #
192
192
  # Get multiple batch objects across all companies.
193
193
  #
194
194
  # A batch object is a large collection of API calls stored in a compact file.
@@ -210,15 +210,15 @@ module AvaTax
210
210
  #
211
211
  # ### Security Policies
212
212
  #
213
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
213
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
214
214
  # @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:* files
215
215
  # @param include [String] A comma separated list of additional data to retrieve.
216
216
  # @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.
217
217
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
218
218
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
219
- # @return [FetchResult]
220
- def query_batches(options={}) path = "/api/v2/batches"
221
- get(path, options) end
222
- end
223
- end
219
+ # @return [FetchResult]
220
+ def query_batches(options={}) path = "/api/v2/batches"
221
+ get(path, options) end
222
+ end
223
+ end
224
224
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module CertExpressInvites
4
-
5
-
6
- # Create a CertExpress invitation
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module CertExpressInvites
4
+
5
+
6
+ # Create a CertExpress invitation
7
+ #
8
8
  # Creates an invitation for a customer to self-report certificates using the CertExpress website.
9
9
  #
10
10
  # This invitation is delivered by your choice of method, or you can present a hyperlink to the user
@@ -16,24 +16,24 @@ 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
- # @return [CertExpressInvitationStatusModel[]]
32
- def create_cert_express_invitation(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites"
33
- post(path, model) end
34
-
35
- # Retrieve a single CertExpress invitation
36
- #
31
+ # @return [CertExpressInvitationStatusModel[]]
32
+ def create_cert_express_invitation(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites"
33
+ post(path, model) end
34
+
35
+ # Retrieve a single CertExpress invitation
36
+ #
37
37
  # Retrieve an existing CertExpress invitation sent to a customer.
38
38
  #
39
39
  # A CertExpression invitation allows a customer to follow a helpful step-by-step guide to provide information
@@ -45,25 +45,25 @@ module AvaTax
45
45
  # Using CertExpress with this API will ensure that your certificates are automatically linked correctly into
46
46
  # your company so that they can be used for tax exemptions.
47
47
  #
48
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
49
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
50
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
51
- # 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`.
52
52
  #
53
53
  # ### Security Policies
54
54
  #
55
55
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
56
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
56
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
57
57
  # @param companyId [Integer] The unique ID number of the company that issued this invitation
58
58
  # @param customerCode [String] The number of the customer where the request is sent to
59
59
  # @param id [Integer] The unique ID number of this CertExpress invitation
60
60
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
61
- # @return [Object]
62
- def get_cert_express_invitation(companyId, customerCode, id, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}"
63
- get(path, options) end
64
-
65
- # List CertExpress invitations
66
- #
61
+ # @return [Object]
62
+ def get_cert_express_invitation(companyId, customerCode, id, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}"
63
+ get(path, options) end
64
+
65
+ # List CertExpress invitations
66
+ #
67
67
  # Retrieve CertExpress invitations sent by this company.
68
68
  #
69
69
  # A CertExpression invitation allows a customer to follow a helpful step-by-step guide to provide information
@@ -75,24 +75,24 @@ module AvaTax
75
75
  # Using CertExpress with this API will ensure that your certificates are automatically linked correctly into
76
76
  # your company so that they can be used for tax exemptions.
77
77
  #
78
- # Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
79
- # Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
80
- # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
81
- # 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`.
82
82
  #
83
83
  # ### Security Policies
84
84
  #
85
85
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
86
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
86
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
87
87
  # @param companyId [Integer] The unique ID number of the company that issued this invitation
88
88
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
89
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
90
90
  # @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.
91
91
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
92
92
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
93
- # @return [FetchResult]
94
- def list_cert_express_invitations(companyId, options={}) path = "/api/v2/companies/#{companyId}/certexpressinvites"
95
- get(path, options) end
96
- end
97
- end
93
+ # @return [FetchResult]
94
+ def list_cert_express_invitations(companyId, options={}) path = "/api/v2/companies/#{companyId}/certexpressinvites"
95
+ get(path, options) end
96
+ end
97
+ end
98
98
  end