avatax 20.7.0 → 21.3.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 (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
@@ -3,6 +3,30 @@ module AvaTax
3
3
  module Locations
4
4
 
5
5
 
6
+ # Add parameters to a location.
7
+ #
8
+ # Add parameters to a location.
9
+ #
10
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
11
+ #
12
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
13
+ #
14
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
15
+ #
16
+ # To see available parameters for this location, call `/api/v2/definitions/parameters?$filter=attributeType eq Company`
17
+ #
18
+ # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
19
+ #
20
+ # ### Security Policies
21
+ #
22
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
23
+ # @param companyId [Integer] The ID of the company that owns this location parameter.
24
+ # @param locationId [Integer] The location id.
25
+ # @param model [LocationParameterModel[]] The location parameters you wish to create.
26
+ # @return [LocationParameterModel[]]
27
+ def create_location_parameters(companyId, locationId, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
28
+ post(path, model) end
29
+
6
30
  # Create a new location
7
31
  #
8
32
  # Create one or more new location objects attached to this company.
@@ -13,11 +37,8 @@ module AvaTax
13
37
  # @param companyId [Integer] The ID of the company that owns this location.
14
38
  # @param model [LocationModel[]] The location you wish to create.
15
39
  # @return [LocationModel[]]
16
- def create_locations(companyId, model)
17
- path = "/api/v2/companies/#{companyId}/locations"
18
- post(path, model)
19
- end
20
-
40
+ def create_locations(companyId, model) path = "/api/v2/companies/#{companyId}/locations"
41
+ post(path, model) end
21
42
 
22
43
  # Delete a single location
23
44
  #
@@ -29,11 +50,28 @@ module AvaTax
29
50
  # @param companyId [Integer] The ID of the company that owns this location.
30
51
  # @param id [Integer] The ID of the location you wish to delete.
31
52
  # @return [ErrorDetail[]]
32
- def delete_location(companyId, id)
33
- path = "/api/v2/companies/#{companyId}/locations/#{id}"
34
- delete(path)
35
- end
53
+ def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
54
+ delete(path) end
36
55
 
56
+ # Delete a single location parameter
57
+ #
58
+ # Delete a single location parameter.
59
+ #
60
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
61
+ #
62
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
63
+ #
64
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
65
+ #
66
+ # ### Security Policies
67
+ #
68
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
69
+ # @param companyId [Integer] The company id
70
+ # @param locationId [Integer] The location id
71
+ # @param id [Integer] The parameter id
72
+ # @return [ErrorDetail[]]
73
+ def delete_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
74
+ delete(path) end
37
75
 
38
76
  # Retrieve a single location
39
77
  #
@@ -50,16 +88,59 @@ module AvaTax
50
88
  #
51
89
  # ### Security Policies
52
90
  #
53
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
91
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
54
92
  # @param companyId [Integer] The ID of the company that owns this location
55
93
  # @param id [Integer] The primary key of this location
56
94
  # @param include [String] A comma separated list of additional data to retrieve.
57
95
  # @return [Object]
58
- def get_location(companyId, id, options={})
59
- path = "/api/v2/companies/#{companyId}/locations/#{id}"
60
- get(path, options)
61
- end
96
+ def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
97
+ get(path, options) end
98
+
99
+ # Retrieve a single company location parameter
100
+ #
101
+ # Retrieve a single location parameter.
102
+ #
103
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
104
+ #
105
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
106
+ #
107
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
108
+ #
109
+ # ### Security Policies
110
+ #
111
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
112
+ # @param companyId [Integer] The company id
113
+ # @param locationId [Integer] The location id
114
+ # @param id [Integer] The parameter id
115
+ # @return [Object]
116
+ def get_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
117
+ get(path) end
62
118
 
119
+ # Retrieve parameters for a location
120
+ #
121
+ # List parameters for a location.
122
+ #
123
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
124
+ #
125
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
126
+ #
127
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
128
+ #
129
+ # Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
130
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
131
+ #
132
+ # ### Security Policies
133
+ #
134
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
135
+ # @param companyId [Integer] The company id
136
+ # @param locationId [Integer] The ID of the location
137
+ # @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:* name, unit
138
+ # @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.
139
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
140
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
141
+ # @return [FetchResult]
142
+ def list_location_parameters(companyId, locationId, options={}) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
143
+ get(path, options) end
63
144
 
64
145
  # Retrieve locations for this company
65
146
  #
@@ -78,19 +159,16 @@ module AvaTax
78
159
  #
79
160
  # ### Security Policies
80
161
  #
81
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
162
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
82
163
  # @param companyId [Integer] The ID of the company that owns these locations
83
- # @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:* settings, parameters
164
+ # @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:* isMarketplaceOutsideUsa, settings, parameters
84
165
  # @param include [String] A comma separated list of additional data to retrieve.
85
166
  # @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.
86
167
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
87
168
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
88
169
  # @return [FetchResult]
89
- def list_locations_by_company(companyId, options={})
90
- path = "/api/v2/companies/#{companyId}/locations"
91
- get(path, options)
92
- end
93
-
170
+ def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations"
171
+ get(path, options) end
94
172
 
95
173
  # Retrieve all locations
96
174
  #
@@ -110,18 +188,15 @@ module AvaTax
110
188
  #
111
189
  # ### Security Policies
112
190
  #
113
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
114
- # @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:* settings, parameters
191
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
192
+ # @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:* isMarketplaceOutsideUsa, settings, parameters
115
193
  # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
116
194
  # @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.
117
195
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
118
196
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
119
197
  # @return [FetchResult]
120
- def query_locations(options={})
121
- path = "/api/v2/locations"
122
- get(path, options)
123
- end
124
-
198
+ def query_locations(options={}) path = "/api/v2/locations"
199
+ get(path, options) end
125
200
 
126
201
  # Update a single location
127
202
  #
@@ -136,11 +211,29 @@ module AvaTax
136
211
  # @param id [Integer] The ID of the location you wish to update
137
212
  # @param model [Object] The location you wish to update.
138
213
  # @return [Object]
139
- def update_location(companyId, id, model)
140
- path = "/api/v2/companies/#{companyId}/locations/#{id}"
141
- put(path, model)
142
- end
214
+ def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
215
+ put(path, model) end
143
216
 
217
+ # Update a location parameter
218
+ #
219
+ # Update a location parameter.
220
+ #
221
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
222
+ #
223
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
224
+ #
225
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
226
+ #
227
+ # ### Security Policies
228
+ #
229
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
230
+ # @param companyId [Integer] The company id.
231
+ # @param locationId [Integer] The location id
232
+ # @param id [Integer] The location parameter id
233
+ # @param model [Object] The location parameter object you wish to update.
234
+ # @return [Object]
235
+ def update_location_parameter(companyId, locationId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
236
+ put(path, model) end
144
237
 
145
238
  # Validate the location against local requirements
146
239
  #
@@ -150,15 +243,12 @@ module AvaTax
150
243
  #
151
244
  # ### Security Policies
152
245
  #
153
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
246
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
154
247
  # @param companyId [Integer] The ID of the company that owns this location
155
248
  # @param id [Integer] The primary key of this location
156
249
  # @return [Object]
157
- def validate_location(companyId, id)
158
- path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
159
- get(path)
160
- end
161
-
250
+ def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
251
+ get(path) end
162
252
  end
163
253
  end
164
254
  end
@@ -27,17 +27,14 @@ module AvaTax
27
27
  # ### Security Policies
28
28
  #
29
29
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
30
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
30
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
31
31
  # @param code [String] The transaction code for this MultiDocument transaction
32
32
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
33
33
  # @param include [String] Specifies objects to include in this fetch call
34
34
  # @param model [Object] The adjust request you wish to execute
35
35
  # @return [Object]
36
- def adjust_multi_document_transaction(code, type, model, options={})
37
- path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
38
- post(path, model, options)
39
- end
40
-
36
+ def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
37
+ post(path, model, options) end
41
38
 
42
39
  # Get audit information about a MultiDocument transaction
43
40
  #
@@ -67,15 +64,12 @@ module AvaTax
67
64
  # ### Security Policies
68
65
  #
69
66
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
67
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
71
68
  # @param code [String] The transaction code for this MultiDocument transaction
72
69
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
73
70
  # @return [Object]
74
- def audit_multi_document_transaction(code, type)
75
- path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
76
- get(path)
77
- end
78
-
71
+ def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
72
+ get(path) end
79
73
 
80
74
  # Commit a MultiDocument transaction
81
75
  #
@@ -99,14 +93,11 @@ module AvaTax
99
93
  # ### Security Policies
100
94
  #
101
95
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
102
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
96
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
103
97
  # @param model [Object] The commit request you wish to execute
104
98
  # @return [Object]
105
- def commit_multi_document_transaction(model)
106
- path = "/api/v2/transactions/multidocument/commit"
107
- post(path, model)
108
- end
109
-
99
+ def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
100
+ post(path, model) end
110
101
 
111
102
  # Create a new MultiDocument transaction
112
103
  #
@@ -154,15 +145,12 @@ module AvaTax
154
145
  # ### Security Policies
155
146
  #
156
147
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
157
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
148
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
158
149
  # @param include [String] Specifies objects to include in the response after transaction is created
159
150
  # @param model [Object] the multi document transaction model
160
151
  # @return [Object]
161
- def create_multi_document_transaction(model, options={})
162
- path = "/api/v2/transactions/multidocument"
163
- post(path, model, options)
164
- end
165
-
152
+ def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
153
+ post(path, model, options) end
166
154
 
167
155
  # Retrieve a MultiDocument transaction
168
156
  #
@@ -190,16 +178,13 @@ module AvaTax
190
178
  # ### Security Policies
191
179
  #
192
180
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
193
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
194
- # @param code [String]
195
- # @param type [String] (See DocumentType::* for a list of allowable values)
181
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
182
+ # @param code [String] The multidocument code to retrieve
183
+ # @param type [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
196
184
  # @param include [String] Specifies objects to include in the response after transaction is created
197
185
  # @return [Object]
198
- def get_multi_document_transaction_by_code_and_type(code, type, options={})
199
- path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
200
- get(path, options)
201
- end
202
-
186
+ def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
187
+ get(path, options) end
203
188
 
204
189
  # Retrieve a MultiDocument transaction by ID
205
190
  #
@@ -236,15 +221,12 @@ module AvaTax
236
221
  # ### Security Policies
237
222
  #
238
223
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
239
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
224
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
240
225
  # @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve
241
226
  # @param include [String] Specifies objects to include in the response after transaction is created
242
227
  # @return [Object]
243
- def get_multi_document_transaction_by_id(id, options={})
244
- path = "/api/v2/transactions/multidocument/#{id}"
245
- get(path, options)
246
- end
247
-
228
+ def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
229
+ get(path, options) end
248
230
 
249
231
  # Retrieve all MultiDocument transactions
250
232
  #
@@ -279,18 +261,15 @@ module AvaTax
279
261
  # ### Security Policies
280
262
  #
281
263
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
282
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
264
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
283
265
  # @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:* documents
284
266
  # @param include [String] Specifies objects to include in the response after transaction is created
285
267
  # @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.
286
268
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
287
269
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
288
270
  # @return [FetchResult]
289
- def list_multi_document_transactions(options={})
290
- path = "/api/v2/transactions/multidocument"
291
- get(path, options)
292
- end
293
-
271
+ def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
272
+ get(path, options) end
294
273
 
295
274
  # Create a refund for a MultiDocument transaction
296
275
  #
@@ -342,17 +321,14 @@ module AvaTax
342
321
  # ### Security Policies
343
322
  #
344
323
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
345
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
324
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
346
325
  # @param code [String] The code of this MultiDocument transaction
347
326
  # @param type [String] The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values)
348
327
  # @param include [String] Specifies objects to include in the response after transaction is created
349
328
  # @param model [Object] Information about the refund to create
350
329
  # @return [Object]
351
- def refund_multi_document_transaction(code, type, model, options={})
352
- path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
353
- post(path, model, options)
354
- end
355
-
330
+ def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
331
+ post(path, model, options) end
356
332
 
357
333
  # Verify a MultiDocument transaction
358
334
  #
@@ -374,14 +350,11 @@ module AvaTax
374
350
  # ### Security Policies
375
351
  #
376
352
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
377
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
353
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
378
354
  # @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
379
355
  # @return [Object]
380
- def verify_multi_document_transaction(model)
381
- path = "/api/v2/transactions/multidocument/verify"
382
- post(path, model)
383
- end
384
-
356
+ def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
357
+ post(path, model) end
385
358
 
386
359
  # Void a MultiDocument transaction
387
360
  #
@@ -406,16 +379,13 @@ module AvaTax
406
379
  # ### Security Policies
407
380
  #
408
381
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
409
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
382
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
410
383
  # @param code [String] The transaction code for this MultiDocument transaction
411
384
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
412
385
  # @param model [Object] The void request you wish to execute
413
386
  # @return [Object]
414
- def void_multi_document_transaction(code, type, model)
415
- path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
416
- post(path, model)
417
- end
418
-
387
+ def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
388
+ post(path, model) end
419
389
  end
420
390
  end
421
391
  end
@@ -31,11 +31,31 @@ module AvaTax
31
31
  # @param companyId [Integer] The ID of the company that owns this nexus.
32
32
  # @param model [NexusModel[]] The nexus you wish to create.
33
33
  # @return [NexusModel[]]
34
- def create_nexus(companyId, model)
35
- path = "/api/v2/companies/#{companyId}/nexus"
36
- post(path, model)
37
- end
34
+ def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus"
35
+ post(path, model) end
38
36
 
37
+ # Add parameters to a nexus.
38
+ #
39
+ # Add parameters to the nexus.
40
+ # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
41
+ #
42
+ # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
43
+ #
44
+ # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
45
+ #
46
+ # To see available parameters for this item, call `/api/v2/definitions/parameters?$filter=attributeType eq Nexus`
47
+ #
48
+ # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
49
+ #
50
+ # ### Security Policies
51
+ #
52
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
53
+ # @param companyId [Integer] The ID of the company that owns this nexus parameter.
54
+ # @param nexusId [Integer] The nexus id.
55
+ # @param model [NexusParameterDetailModel[]] The nexus parameters you wish to create.
56
+ # @return [NexusParameterDetailModel[]]
57
+ def create_nexus_parameters(companyId, nexusId, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
58
+ post(path, model) end
39
59
 
40
60
  # Creates nexus for a list of addresses.
41
61
  #
@@ -61,11 +81,8 @@ module AvaTax
61
81
  # @param companyId [Integer] The ID of the company that will own this nexus.
62
82
  # @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
63
83
  # @return [NexusByAddressModel[]]
64
- def declare_nexus_by_address(companyId, model)
65
- path = "/api/v2/companies/#{companyId}/nexus/byaddress"
66
- post(path, model)
67
- end
68
-
84
+ def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress"
85
+ post(path, model) end
69
86
 
70
87
  # Delete a single nexus
71
88
  #
@@ -85,11 +102,45 @@ module AvaTax
85
102
  # @param id [Integer] The ID of the nexus you wish to delete.
86
103
  # @param cascadeDelete [Boolean] If true, deletes all the child nexus if they exist along with parent nexus
87
104
  # @return [ErrorDetail[]]
88
- def delete_nexus(companyId, id, options={})
89
- path = "/api/v2/companies/#{companyId}/nexus/#{id}"
90
- delete(path, options)
91
- end
105
+ def delete_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
106
+ delete(path, options) end
92
107
 
108
+ # Delete a single nexus parameter
109
+ #
110
+ # Delete a single nexus parameter.
111
+ # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
112
+ #
113
+ # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
114
+ #
115
+ # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
116
+ #
117
+ # ### Security Policies
118
+ #
119
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
120
+ # @param companyId [Integer] The company id
121
+ # @param nexusId [Integer] The nexus id
122
+ # @param id [Integer] The parameter id
123
+ # @return [ErrorDetail[]]
124
+ def delete_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
125
+ delete(path) end
126
+
127
+ # Delete all parameters for an nexus
128
+ #
129
+ # Delete all the parameters for a given nexus.
130
+ # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
131
+ #
132
+ # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
133
+ #
134
+ # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
135
+ #
136
+ # ### Security Policies
137
+ #
138
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
139
+ # @param companyId [Integer] The ID of the company that owns this nexus.
140
+ # @param nexusId [Integer] The ID of the nexus you wish to delete the parameters.
141
+ # @return [ErrorDetail[]]
142
+ def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
143
+ delete(path) end
93
144
 
94
145
  # Retrieve a single nexus
95
146
  #
@@ -109,11 +160,8 @@ module AvaTax
109
160
  # @param id [Integer] The primary key of this nexus
110
161
  # @param include [String]
111
162
  # @return [Object]
112
- def get_nexus(companyId, id, options={})
113
- path = "/api/v2/companies/#{companyId}/nexus/#{id}"
114
- get(path, options)
115
- end
116
-
163
+ def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
164
+ get(path, options) end
117
165
 
118
166
  # List company nexus related to a tax form
119
167
  #
@@ -137,11 +185,27 @@ module AvaTax
137
185
  # @param formCode [String] The form code that we are looking up the nexus for
138
186
  # @param include [String]
139
187
  # @return [Object]
140
- def get_nexus_by_form_code(companyId, formCode, options={})
141
- path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
142
- get(path, options)
143
- end
188
+ def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
189
+ get(path, options) end
144
190
 
191
+ # Retrieve a single nexus parameter
192
+ #
193
+ # Retrieve a single nexus parameter.
194
+ # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller.In AvaTax, these tax-affecting properties are called "parameters".
195
+ #
196
+ # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
197
+ #
198
+ # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
199
+ #
200
+ # ### Security Policies
201
+ #
202
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
203
+ # @param companyId [Integer] The company id
204
+ # @param nexusId [Integer] The nexus id
205
+ # @param id [Integer] The parameter id
206
+ # @return [Object]
207
+ def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
208
+ get(path) end
145
209
 
146
210
  # Retrieve nexus for this company
147
211
  #
@@ -161,17 +225,39 @@ module AvaTax
161
225
  #
162
226
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
163
227
  # @param companyId [Integer] The ID of the company that owns these nexus objects
164
- # @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
228
+ # @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
165
229
  # @param include [String] A comma separated list of additional data to retrieve.
166
230
  # @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.
167
231
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
168
232
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
169
233
  # @return [FetchResult]
170
- def list_nexus_by_company(companyId, options={})
171
- path = "/api/v2/companies/#{companyId}/nexus"
172
- get(path, options)
173
- end
234
+ def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus"
235
+ get(path, options) end
174
236
 
237
+ # Retrieve parameters for a nexus
238
+ #
239
+ # List parameters for a nexus.
240
+ # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
241
+ #
242
+ # A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
243
+ #
244
+ # A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
245
+ #
246
+ # Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
247
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
248
+ #
249
+ # ### Security Policies
250
+ #
251
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
252
+ # @param companyId [Integer] The company id
253
+ # @param nexusId [Integer] The nexus id
254
+ # @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:* name, unit
255
+ # @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.
256
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
257
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
258
+ # @return [FetchResult]
259
+ def list_nexus_parameters(companyId, nexusId, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
260
+ get(path, options) end
175
261
 
176
262
  # Retrieve all nexus
177
263
  #
@@ -190,17 +276,14 @@ module AvaTax
190
276
  # ### Security Policies
191
277
  #
192
278
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
193
- # @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
279
+ # @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters, taxableNexus
194
280
  # @param include [String] A comma separated list of additional data to retrieve.
195
281
  # @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.
196
282
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
197
283
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
198
284
  # @return [FetchResult]
199
- def query_nexus(options={})
200
- path = "/api/v2/nexus"
201
- get(path, options)
202
- end
203
-
285
+ def query_nexus(options={}) path = "/api/v2/nexus"
286
+ get(path, options) end
204
287
 
205
288
  # Update a single nexus
206
289
  #
@@ -231,11 +314,29 @@ module AvaTax
231
314
  # @param id [Integer] The ID of the nexus you wish to update
232
315
  # @param model [Object] The nexus object you wish to update.
233
316
  # @return [Object]
234
- def update_nexus(companyId, id, model)
235
- path = "/api/v2/companies/#{companyId}/nexus/#{id}"
236
- put(path, model)
237
- end
317
+ def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
318
+ put(path, model) end
238
319
 
320
+ # Update an nexus parameter
321
+ #
322
+ # Update an nexus parameter.
323
+ #
324
+ # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
325
+ #
326
+ # A parameter added to a nexus will be used in tax calculation based on the locationcode and parameter value the transaction state line might have lines added.
327
+ #
328
+ # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.????? I dont know about this?
329
+ #
330
+ # ### Security Policies
331
+ #
332
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
333
+ # @param companyId [Integer] The company id.
334
+ # @param nexusId [Integer] The nexus id
335
+ # @param id [Integer] The nexus parameter id
336
+ # @param model [Object] The nexus object you wish to update.
337
+ # @return [Object]
338
+ def update_nexus_parameter(companyId, nexusId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
339
+ put(path, model) end
239
340
  end
240
341
  end
241
342
  end