avatax 20.1.0 → 20.9.0

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