avatax 19.12.0 → 20.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +269 -193
  4. data/lib/avatax/client/addresses.rb +60 -60
  5. data/lib/avatax/client/advancedrules.rb +81 -162
  6. data/lib/avatax/client/avafileforms.rb +93 -93
  7. data/lib/avatax/client/batches.rb +247 -188
  8. data/lib/avatax/client/certexpressinvites.rb +106 -106
  9. data/lib/avatax/client/certificates.rb +469 -469
  10. data/lib/avatax/client/companies.rb +400 -398
  11. data/lib/avatax/client/compliance.rb +18 -18
  12. data/lib/avatax/client/contacts.rb +124 -124
  13. data/lib/avatax/client/customers.rb +415 -415
  14. data/lib/avatax/client/datasources.rb +117 -117
  15. data/lib/avatax/client/definitions.rb +1039 -1007
  16. data/lib/avatax/client/distancethresholds.rb +140 -140
  17. data/lib/avatax/client/filingcalendars.rb +23 -508
  18. data/lib/avatax/client/filings.rb +29 -29
  19. data/lib/avatax/client/firmclientlinkages.rb +150 -150
  20. data/lib/avatax/client/free.rb +109 -109
  21. data/lib/avatax/client/fundingrequests.rb +58 -58
  22. data/lib/avatax/client/items.rb +480 -480
  23. data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
  24. data/lib/avatax/client/locations.rb +163 -160
  25. data/lib/avatax/client/multidocument.rb +420 -340
  26. data/lib/avatax/client/nexus.rb +240 -225
  27. data/lib/avatax/client/notifications.rb +84 -84
  28. data/lib/avatax/client/provisioning.rb +55 -55
  29. data/lib/avatax/client/registrar.rb +228 -228
  30. data/lib/avatax/client/reports.rb +109 -109
  31. data/lib/avatax/client/settings.rb +174 -174
  32. data/lib/avatax/client/subscriptions.rb +71 -71
  33. data/lib/avatax/client/taxcodes.rb +138 -138
  34. data/lib/avatax/client/taxcontent.rb +142 -142
  35. data/lib/avatax/client/taxrules.rb +188 -188
  36. data/lib/avatax/client/transactions.rb +899 -854
  37. data/lib/avatax/client/upcs.rb +129 -129
  38. data/lib/avatax/client/users.rb +207 -207
  39. data/lib/avatax/client/utilities.rb +70 -70
  40. data/lib/avatax/connection.rb +3 -3
  41. data/lib/avatax/request.rb +2 -0
  42. data/lib/avatax/version.rb +1 -1
  43. metadata +4 -25
@@ -1,226 +1,241 @@
1
- module AvaTax
2
- class Client
3
- module Nexus
4
-
5
-
6
- # Create a new nexus
7
- #
8
- # Creates one or more new nexus declarations attached to this company.
9
- #
10
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
11
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
12
- # accountant or lawyer prior to declaring nexus.
13
- #
14
- # To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
15
- # list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
16
- # only the user-selectable fields in this object.
17
- #
18
- # The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
19
- # `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
20
- #
21
- # When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
22
- # must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
23
- # by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
24
- #
25
- # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
26
- # of calculating tax for a location.
27
- #
28
- # ### Security Policies
29
- #
30
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
- # @param companyId [Integer] The ID of the company that owns this nexus.
32
- # @param model [NexusModel[]] The nexus you wish to create.
33
- # @return [NexusModel[]]
34
- def create_nexus(companyId, model)
35
- path = "/api/v2/companies/#{companyId}/nexus"
36
- post(path, model)
37
- end
38
-
39
-
40
- # Creates nexus for a list of addresses.
41
- #
42
- # This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
43
- # API declares nexus for this company, for the list of addresses provided,
44
- # for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
45
- #
46
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
47
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
48
- # accountant or lawyer prior to declaring nexus.
49
- #
50
- # Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
51
- # '/api/v2/definitions/nexus' endpoint.
52
- #
53
- # You may only define nexus matching the official list of declared nexus.
54
- #
55
- # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
56
- # of calculating tax for a location.
57
- #
58
- # ### Security Policies
59
- #
60
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
61
- # @param companyId [Integer] The ID of the company that will own this nexus.
62
- # @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
63
- # @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
-
69
-
70
- # Delete a single nexus
71
- #
72
- # Marks the existing nexus object at this URL as deleted.
73
- #
74
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
75
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
76
- # accountant or lawyer prior to declaring nexus.
77
- #
78
- # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
79
- # of calculating tax for a location.
80
- #
81
- # ### Security Policies
82
- #
83
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
84
- # @param companyId [Integer] The ID of the company that owns this nexus.
85
- # @param id [Integer] The ID of the nexus you wish to delete.
86
- # @return [ErrorDetail[]]
87
- def delete_nexus(companyId, id)
88
- path = "/api/v2/companies/#{companyId}/nexus/#{id}"
89
- delete(path)
90
- end
91
-
92
-
93
- # Retrieve a single nexus
94
- #
95
- # Get the nexus object identified by this URL.
96
- #
97
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
98
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
99
- # accountant or lawyer prior to declaring nexus.
100
- #
101
- # ### Security Policies
102
- #
103
- # * 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.
104
- # @param companyId [Integer] The ID of the company that owns this nexus object
105
- # @param id [Integer] The primary key of this nexus
106
- # @return [Object]
107
- def get_nexus(companyId, id)
108
- path = "/api/v2/companies/#{companyId}/nexus/#{id}"
109
- get(path)
110
- end
111
-
112
-
113
- # List company nexus related to a tax form
114
- #
115
- # Retrieves a list of nexus related to a tax form.
116
- #
117
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
118
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
119
- # accountant or lawyer prior to declaring nexus.
120
- #
121
- # This API is intended to provide useful information when examining a tax form. If you are about to begin filing
122
- # a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
123
- # form in order to better understand how the form will be filled out.
124
- #
125
- # ### Security Policies
126
- #
127
- # * 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.
128
- # @param companyId [Integer] The ID of the company that owns this nexus object
129
- # @param formCode [String] The form code that we are looking up the nexus for
130
- # @return [Object]
131
- def get_nexus_by_form_code(companyId, formCode)
132
- path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
133
- get(path)
134
- end
135
-
136
-
137
- # Retrieve nexus for this company
138
- #
139
- # List all nexus objects defined for this company.
140
- #
141
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
142
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
143
- # accountant or lawyer prior to declaring nexus.
144
- #
145
- # 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/) .
146
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
147
- #
148
- # ### Security Policies
149
- #
150
- # * 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.
151
- # @param companyId [Integer] The ID of the company that owns these nexus objects
152
- # @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
153
- # @param include [String] A comma separated list of additional data to retrieve.
154
- # @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.
155
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
156
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
157
- # @return [FetchResult]
158
- def list_nexus_by_company(companyId, options={})
159
- path = "/api/v2/companies/#{companyId}/nexus"
160
- get(path, options)
161
- end
162
-
163
-
164
- # Retrieve all nexus
165
- #
166
- # Get multiple nexus objects across all companies.
167
- #
168
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
169
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
170
- # accountant or lawyer prior to declaring nexus.
171
- #
172
- # 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/) .
173
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
174
- #
175
- # ### Security Policies
176
- #
177
- # * 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.
178
- # @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
179
- # @param include [String] A comma separated list of additional data to retrieve.
180
- # @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.
181
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
182
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
183
- # @return [FetchResult]
184
- def query_nexus(options={})
185
- path = "/api/v2/nexus"
186
- get(path, options)
187
- end
188
-
189
-
190
- # Update a single nexus
191
- #
192
- # Replace the existing nexus declaration object at this URL with an updated object.
193
- #
194
- # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
195
- # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
196
- # accountant or lawyer prior to declaring nexus.
197
- #
198
- # To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
199
- # list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
200
- # only the user-selectable fields in this object.
201
- #
202
- # The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
203
- # `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
204
- #
205
- # When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
206
- # must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
207
- # by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
208
- #
209
- # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
210
- # of calculating tax for a location.
211
- #
212
- # ### Security Policies
213
- #
214
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
215
- # @param companyId [Integer] The ID of the company that this nexus belongs to.
216
- # @param id [Integer] The ID of the nexus you wish to update
217
- # @param model [Object] The nexus object you wish to update.
218
- # @return [Object]
219
- def update_nexus(companyId, id, model)
220
- path = "/api/v2/companies/#{companyId}/nexus/#{id}"
221
- put(path, model)
222
- end
223
-
224
- end
225
- end
1
+ module AvaTax
2
+ class Client
3
+ module Nexus
4
+
5
+
6
+ # Create a new nexus
7
+ #
8
+ # Creates one or more new nexus declarations attached to this company.
9
+ #
10
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
11
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
12
+ # accountant or lawyer prior to declaring nexus.
13
+ #
14
+ # To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
15
+ # list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
16
+ # only the user-selectable fields in this object.
17
+ #
18
+ # The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
19
+ # `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
20
+ #
21
+ # When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
22
+ # must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
23
+ # by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
24
+ #
25
+ # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
26
+ # of calculating tax for a location.
27
+ #
28
+ # ### Security Policies
29
+ #
30
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
+ # @param companyId [Integer] The ID of the company that owns this nexus.
32
+ # @param model [NexusModel[]] The nexus you wish to create.
33
+ # @return [NexusModel[]]
34
+ def create_nexus(companyId, model)
35
+ path = "/api/v2/companies/#{companyId}/nexus"
36
+ post(path, model)
37
+ end
38
+
39
+
40
+ # Creates nexus for a list of addresses.
41
+ #
42
+ # This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
43
+ # API declares nexus for this company, for the list of addresses provided,
44
+ # for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
45
+ #
46
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
47
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
48
+ # accountant or lawyer prior to declaring nexus.
49
+ #
50
+ # Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
51
+ # '/api/v2/definitions/nexus' endpoint.
52
+ #
53
+ # You may only define nexus matching the official list of declared nexus.
54
+ #
55
+ # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
56
+ # of calculating tax for a location.
57
+ #
58
+ # ### Security Policies
59
+ #
60
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
61
+ # @param companyId [Integer] The ID of the company that will own this nexus.
62
+ # @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
63
+ # @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
+
69
+
70
+ # Delete a single nexus
71
+ #
72
+ # Marks the existing nexus object at this URL as deleted.
73
+ #
74
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
75
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
76
+ # accountant or lawyer prior to declaring nexus.
77
+ #
78
+ # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
79
+ # of calculating tax for a location.
80
+ #
81
+ # ### Security Policies
82
+ #
83
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
84
+ # @param companyId [Integer] The ID of the company that owns this nexus.
85
+ # @param id [Integer] The ID of the nexus you wish to delete.
86
+ # @param cascadeDelete [Boolean] If true, deletes all the child nexus if they exist along with parent nexus
87
+ # @return [ErrorDetail[]]
88
+ def delete_nexus(companyId, id, options={})
89
+ path = "/api/v2/companies/#{companyId}/nexus/#{id}"
90
+ delete(path, options)
91
+ end
92
+
93
+
94
+ # Retrieve a single nexus
95
+ #
96
+ # Get the nexus object identified by this URL.
97
+ #
98
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
99
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
100
+ # accountant or lawyer prior to declaring nexus.
101
+ # You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
102
+ #
103
+ # * Parameters
104
+ #
105
+ # ### Security Policies
106
+ #
107
+ # * 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.
108
+ # @param companyId [Integer] The ID of the company that owns this nexus object
109
+ # @param id [Integer] The primary key of this nexus
110
+ # @param include [String]
111
+ # @return [Object]
112
+ def get_nexus(companyId, id, options={})
113
+ path = "/api/v2/companies/#{companyId}/nexus/#{id}"
114
+ get(path, options)
115
+ end
116
+
117
+
118
+ # List company nexus related to a tax form
119
+ #
120
+ # Retrieves a list of nexus related to a tax form.
121
+ #
122
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
123
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
124
+ # accountant or lawyer prior to declaring nexus.
125
+ #
126
+ # This API is intended to provide useful information when examining a tax form. If you are about to begin filing
127
+ # a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
128
+ # form in order to better understand how the form will be filled out.
129
+ # You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
130
+ #
131
+ # * Parameters
132
+ #
133
+ # ### Security Policies
134
+ #
135
+ # * 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.
136
+ # @param companyId [Integer] The ID of the company that owns this nexus object
137
+ # @param formCode [String] The form code that we are looking up the nexus for
138
+ # @param include [String]
139
+ # @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
144
+
145
+
146
+ # Retrieve nexus for this company
147
+ #
148
+ # List all nexus objects defined for this company.
149
+ #
150
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
151
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
152
+ # accountant or lawyer prior to declaring nexus.
153
+ #
154
+ # 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/) .
155
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
156
+ # You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
157
+ #
158
+ # * Parameters
159
+ #
160
+ # ### Security Policies
161
+ #
162
+ # * 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
+ # @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
165
+ # @param include [String] A comma separated list of additional data to retrieve.
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.
167
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
168
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
169
+ # @return [FetchResult]
170
+ def list_nexus_by_company(companyId, options={})
171
+ path = "/api/v2/companies/#{companyId}/nexus"
172
+ get(path, options)
173
+ end
174
+
175
+
176
+ # Retrieve all nexus
177
+ #
178
+ # Get multiple nexus objects across all companies.
179
+ #
180
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
181
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
182
+ # accountant or lawyer prior to declaring nexus.
183
+ #
184
+ # 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/) .
185
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
186
+ # You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
187
+ #
188
+ # * Parameters
189
+ #
190
+ # ### Security Policies
191
+ #
192
+ # * 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
194
+ # @param include [String] A comma separated list of additional data to retrieve.
195
+ # @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
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
197
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
198
+ # @return [FetchResult]
199
+ def query_nexus(options={})
200
+ path = "/api/v2/nexus"
201
+ get(path, options)
202
+ end
203
+
204
+
205
+ # Update a single nexus
206
+ #
207
+ # Replace the existing nexus declaration object at this URL with an updated object.
208
+ #
209
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
210
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
211
+ # accountant or lawyer prior to declaring nexus.
212
+ #
213
+ # To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
214
+ # list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
215
+ # only the user-selectable fields in this object.
216
+ #
217
+ # The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
218
+ # `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
219
+ #
220
+ # When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
221
+ # must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
222
+ # by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
223
+ #
224
+ # Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
225
+ # of calculating tax for a location.
226
+ #
227
+ # ### Security Policies
228
+ #
229
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
230
+ # @param companyId [Integer] The ID of the company that this nexus belongs to.
231
+ # @param id [Integer] The ID of the nexus you wish to update
232
+ # @param model [Object] The nexus object you wish to update.
233
+ # @return [Object]
234
+ def update_nexus(companyId, id, model)
235
+ path = "/api/v2/companies/#{companyId}/nexus/#{id}"
236
+ put(path, model)
237
+ end
238
+
239
+ end
240
+ end
226
241
  end