avatax 21.7.1 → 21.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +94 -83
  3. data/lib/avatax/client/addresses.rb +22 -20
  4. data/lib/avatax/client/advancedrules.rb +46 -41
  5. data/lib/avatax/client/ageverification.rb +29 -0
  6. data/lib/avatax/client/avafileforms.rb +46 -41
  7. data/lib/avatax/client/batches.rb +70 -62
  8. data/lib/avatax/client/certexpressinvites.rb +30 -27
  9. data/lib/avatax/client/certificates.rb +126 -111
  10. data/lib/avatax/client/companies.rb +174 -153
  11. data/lib/avatax/client/compliance.rb +25 -14
  12. data/lib/avatax/client/contacts.rb +54 -48
  13. data/lib/avatax/client/customers.rb +110 -97
  14. data/lib/avatax/client/datasources.rb +54 -48
  15. data/lib/avatax/client/definitions.rb +624 -450
  16. data/lib/avatax/client/distancethresholds.rb +54 -48
  17. data/lib/avatax/client/ecommercetoken.rb +20 -18
  18. data/lib/avatax/client/filingcalendars.rb +44 -20
  19. data/lib/avatax/client/filings.rb +24 -20
  20. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  21. data/lib/avatax/client/free.rb +14 -13
  22. data/lib/avatax/client/fundingrequests.rb +22 -20
  23. data/lib/avatax/client/items.rb +209 -181
  24. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  25. data/lib/avatax/client/locations.rb +102 -90
  26. data/lib/avatax/client/multidocument.rb +86 -76
  27. data/lib/avatax/client/nexus.rb +148 -105
  28. data/lib/avatax/client/notices.rb +30 -26
  29. data/lib/avatax/client/notifications.rb +30 -27
  30. data/lib/avatax/client/provisioning.rb +22 -20
  31. data/lib/avatax/client/registrar.rb +94 -83
  32. data/lib/avatax/client/reports.rb +38 -34
  33. data/lib/avatax/client/settings.rb +54 -48
  34. data/lib/avatax/client/shippingverification.rb +66 -0
  35. data/lib/avatax/client/subscriptions.rb +30 -27
  36. data/lib/avatax/client/taxcodes.rb +54 -48
  37. data/lib/avatax/client/taxcontent.rb +46 -41
  38. data/lib/avatax/client/taxrules.rb +56 -50
  39. data/lib/avatax/client/transactions.rb +174 -153
  40. data/lib/avatax/client/upcs.rb +54 -48
  41. data/lib/avatax/client/userdefinedfields.rb +52 -0
  42. data/lib/avatax/client/users.rb +70 -62
  43. data/lib/avatax/client/utilities.rb +30 -27
  44. data/lib/avatax/client.rb +2 -0
  45. data/lib/avatax/connection.rb +1 -1
  46. data/lib/avatax/request.rb +21 -12
  47. data/lib/avatax/version.rb +1 -1
  48. metadata +6 -3
@@ -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,16 @@ 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
+ # Swagger Name: AvaTaxClient
24
25
  # @param companyId [Integer] The ID of the company that owns this batch.
25
26
  # @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
- #
27
+ # @return [Object]
28
+ def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel"
29
+ post(path, {}, "21.12.0") end
30
+
31
+ # Create a new batch
32
+ #
32
33
  # Create one or more new batch objects attached to this company.
33
34
  #
34
35
  # Each batch object may have one or more file objects (currently only one file is supported).
@@ -51,15 +52,16 @@ module AvaTax
51
52
  #
52
53
  # ### Security Policies
53
54
  #
54
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
55
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
56
+ # Swagger Name: AvaTaxClient
55
57
  # @param companyId [Integer] The ID of the company that owns this batch.
56
58
  # @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
- #
59
+ # @return [BatchModel[]]
60
+ def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches"
61
+ post(path, model, {}, "21.12.0") end
62
+
63
+ # Create a new transaction batch
64
+ #
63
65
  # Create a new transaction batch objects attached to this company.
64
66
  #
65
67
  # When a transaction batch is created, it is added to the AvaTax Batch v2 Queue and will be
@@ -80,15 +82,16 @@ module AvaTax
80
82
  #
81
83
  # ### Security Policies
82
84
  #
83
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
85
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
86
+ # Swagger Name: AvaTaxClient
84
87
  # @param companyId [Integer] The ID of the company that owns this batch.
85
88
  # @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
- #
89
+ # @return [Object]
90
+ def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions"
91
+ post(path, model, {}, "21.12.0") end
92
+
93
+ # Delete a single batch
94
+ #
92
95
  # Marks the batch identified by this URL as deleted.
93
96
  #
94
97
  # If you attempt to delete a batch that is being processed, you will receive an error message.
@@ -102,29 +105,31 @@ module AvaTax
102
105
  #
103
106
  # ### Security Policies
104
107
  #
105
- # * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
108
+ # * This API requires one of the following user roles: CSPAdmin, CSPTester, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin.
109
+ # Swagger Name: AvaTaxClient
106
110
  # @param companyId [Integer] The ID of the company that owns this batch.
107
111
  # @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
- #
112
+ # @return [ErrorDetail[]]
113
+ def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
114
+ delete(path, {}, "21.12.0") end
115
+
116
+ # Download a single batch file
117
+ #
114
118
  # Download a single batch file identified by this URL.
115
119
  #
116
120
  # ### Security Policies
117
121
  #
118
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
122
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
123
+ # Swagger Name: AvaTaxClient
119
124
  # @param companyId [Integer] The ID of the company that owns this batch
120
125
  # @param batchId [Integer] The ID of the batch object
121
126
  # @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
- #
127
+ # @return [Object]
128
+ def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
129
+ get(path, {}, "21.12.0") end
130
+
131
+ # Retrieve a single batch
132
+ #
128
133
  # Get the batch object identified by this URL. A batch object is a large
129
134
  # collection of API calls stored in a compact file.
130
135
  #
@@ -143,15 +148,16 @@ module AvaTax
143
148
  #
144
149
  # ### Security Policies
145
150
  #
146
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
151
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
152
+ # Swagger Name: AvaTaxClient
147
153
  # @param companyId [Integer] The ID of the company that owns this batch
148
154
  # @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
- #
155
+ # @return [Object]
156
+ def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}"
157
+ get(path, {}, "21.12.0") end
158
+
159
+ # Retrieve all batches for this company
160
+ #
155
161
  # List all batch objects attached to the specified company.
156
162
  #
157
163
  # A batch object is a large collection of API calls stored in a compact file.
@@ -176,19 +182,20 @@ module AvaTax
176
182
  #
177
183
  # ### Security Policies
178
184
  #
179
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
185
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
186
+ # Swagger Name: AvaTaxClient
180
187
  # @param companyId [Integer] The ID of the company that owns these batches
181
188
  # @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
189
  # @param include [String] A comma separated list of additional data to retrieve.
183
190
  # @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
191
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
185
192
  # @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
- #
193
+ # @return [FetchResult]
194
+ def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches"
195
+ get(path, options, "21.12.0") end
196
+
197
+ # Retrieve all batches
198
+ #
192
199
  # Get multiple batch objects across all companies.
193
200
  #
194
201
  # A batch object is a large collection of API calls stored in a compact file.
@@ -210,15 +217,16 @@ module AvaTax
210
217
  #
211
218
  # ### Security Policies
212
219
  #
213
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
220
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser.
221
+ # Swagger Name: AvaTaxClient
214
222
  # @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
223
  # @param include [String] A comma separated list of additional data to retrieve.
216
224
  # @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
225
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
218
226
  # @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
227
+ # @return [FetchResult]
228
+ def query_batches(options={}) path = "/api/v2/batches"
229
+ get(path, options, "21.12.0") end
230
+ end
231
+ end
224
232
  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
@@ -24,16 +24,17 @@ module AvaTax
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:*Required* (all): AvaTaxPro.
27
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
28
+ # Swagger Name: AvaTaxClient
28
29
  # @param companyId [Integer] The unique ID number of the company that will record certificates
29
30
  # @param customerCode [String] The number of the customer where the request is sent to
30
31
  # @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
- #
32
+ # @return [CertExpressInvitationStatusModel[]]
33
+ def create_cert_express_invitation(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites"
34
+ post(path, model, {}, "21.12.0") end
35
+
36
+ # Retrieve a single CertExpress invitation
37
+ #
37
38
  # Retrieve an existing CertExpress invitation sent to a customer.
38
39
  #
39
40
  # A CertExpression invitation allows a customer to follow a helpful step-by-step guide to provide information
@@ -53,17 +54,18 @@ module AvaTax
53
54
  # ### Security Policies
54
55
  #
55
56
  # * 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:*Required* (all): AvaTaxPro.
57
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
58
+ # Swagger Name: AvaTaxClient
57
59
  # @param companyId [Integer] The unique ID number of the company that issued this invitation
58
60
  # @param customerCode [String] The number of the customer where the request is sent to
59
61
  # @param id [Integer] The unique ID number of this CertExpress invitation
60
62
  # @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
- #
63
+ # @return [Object]
64
+ def get_cert_express_invitation(companyId, customerCode, id, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}"
65
+ get(path, options, "21.12.0") end
66
+
67
+ # List CertExpress invitations
68
+ #
67
69
  # Retrieve CertExpress invitations sent by this company.
68
70
  #
69
71
  # A CertExpression invitation allows a customer to follow a helpful step-by-step guide to provide information
@@ -83,16 +85,17 @@ module AvaTax
83
85
  # ### Security Policies
84
86
  #
85
87
  # * 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:*Required* (all): AvaTaxPro.
88
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
89
+ # Swagger Name: AvaTaxClient
87
90
  # @param companyId [Integer] The unique ID number of the company that issued this invitation
88
91
  # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time.
89
92
  # @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
93
  # @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
94
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
92
95
  # @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
96
+ # @return [FetchResult]
97
+ def list_cert_express_invitations(companyId, options={}) path = "/api/v2/companies/#{companyId}/certexpressinvites"
98
+ get(path, options, "21.12.0") end
99
+ end
100
+ end
98
101
  end