avatax 20.7.0 → 20.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +22 -55
  3. data/lib/avatax/client/addresses.rb +4 -10
  4. data/lib/avatax/client/advancedrules.rb +12 -30
  5. data/lib/avatax/client/avafileforms.rb +10 -25
  6. data/lib/avatax/client/batches.rb +16 -40
  7. data/lib/avatax/client/certexpressinvites.rb +6 -15
  8. data/lib/avatax/client/certificates.rb +30 -75
  9. data/lib/avatax/client/companies.rb +32 -80
  10. data/lib/avatax/client/compliance.rb +2 -5
  11. data/lib/avatax/client/contacts.rb +12 -30
  12. data/lib/avatax/client/customers.rb +26 -65
  13. data/lib/avatax/client/datasources.rb +12 -30
  14. data/lib/avatax/client/definitions.rb +118 -295
  15. data/lib/avatax/client/distancethresholds.rb +12 -30
  16. data/lib/avatax/client/filingcalendars.rb +2 -5
  17. data/lib/avatax/client/filings.rb +2 -5
  18. data/lib/avatax/client/firmclientlinkages.rb +18 -45
  19. data/lib/avatax/client/free.rb +6 -15
  20. data/lib/avatax/client/fundingrequests.rb +4 -10
  21. data/lib/avatax/client/items.rb +38 -95
  22. data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
  23. data/lib/avatax/client/locations.rb +14 -35
  24. data/lib/avatax/client/multidocument.rb +20 -50
  25. data/lib/avatax/client/nexus.rb +16 -40
  26. data/lib/avatax/client/notifications.rb +6 -15
  27. data/lib/avatax/client/provisioning.rb +4 -10
  28. data/lib/avatax/client/registrar.rb +20 -50
  29. data/lib/avatax/client/reports.rb +8 -20
  30. data/lib/avatax/client/settings.rb +12 -30
  31. data/lib/avatax/client/subscriptions.rb +6 -15
  32. data/lib/avatax/client/taxcodes.rb +12 -30
  33. data/lib/avatax/client/taxcontent.rb +6 -15
  34. data/lib/avatax/client/taxrules.rb +12 -30
  35. data/lib/avatax/client/transactions.rb +42 -105
  36. data/lib/avatax/client/upcs.rb +12 -30
  37. data/lib/avatax/client/users.rb +16 -40
  38. data/lib/avatax/client/utilities.rb +6 -15
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -17,11 +17,8 @@ module AvaTax
17
17
  # @param companyId [Integer] The unique ID number of the company that owns this DistanceThreshold
18
18
  # @param model [CompanyDistanceThresholdModel[]] The DistanceThreshold object or objects you wish to create.
19
19
  # @return [CompanyDistanceThresholdModel[]]
20
- def create_distance_threshold(companyId, model)
21
- path = "/api/v2/companies/#{companyId}/distancethresholds"
22
- post(path, model)
23
- end
24
-
20
+ def create_distance_threshold(companyId, model) path = "/api/v2/companies/#{companyId}/distancethresholds"
21
+ post(path, model) end
25
22
 
26
23
  # Delete a single DistanceThreshold object
27
24
  #
@@ -37,11 +34,8 @@ module AvaTax
37
34
  # @param companyId [Integer] The unique ID number of the company that owns this DistanceThreshold
38
35
  # @param id [Integer] The unique ID number of the DistanceThreshold object you wish to delete.
39
36
  # @return [ErrorDetail[]]
40
- def delete_distance_threshold(companyId, id)
41
- path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}"
42
- delete(path)
43
- end
44
-
37
+ def delete_distance_threshold(companyId, id) path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}"
38
+ delete(path) end
45
39
 
46
40
  # Retrieve a single DistanceThreshold
47
41
  #
@@ -57,11 +51,8 @@ module AvaTax
57
51
  # @param companyId [Integer] The ID of the company that owns this DistanceThreshold object
58
52
  # @param id [Integer] The unique ID number referring to this DistanceThreshold object
59
53
  # @return [Object]
60
- def get_distance_threshold(companyId, id)
61
- path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}"
62
- get(path)
63
- end
64
-
54
+ def get_distance_threshold(companyId, id) path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}"
55
+ get(path) end
65
56
 
66
57
  # Retrieve all DistanceThresholds for this company.
67
58
  #
@@ -81,11 +72,8 @@ module AvaTax
81
72
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
82
73
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
83
74
  # @return [FetchResult]
84
- def list_distance_thresholds(companyId, options={})
85
- path = "/api/v2/companies/#{companyId}/distancethresholds"
86
- get(path, options)
87
- end
88
-
75
+ def list_distance_thresholds(companyId, options={}) path = "/api/v2/companies/#{companyId}/distancethresholds"
76
+ get(path, options) end
89
77
 
90
78
  # Retrieve all DistanceThreshold objects
91
79
  #
@@ -107,11 +95,8 @@ module AvaTax
107
95
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
108
96
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
109
97
  # @return [FetchResult]
110
- def query_distance_thresholds(options={})
111
- path = "/api/v2/distancethresholds"
112
- get(path, options)
113
- end
114
-
98
+ def query_distance_thresholds(options={}) path = "/api/v2/distancethresholds"
99
+ get(path, options) end
115
100
 
116
101
  # Update a DistanceThreshold object
117
102
  #
@@ -131,11 +116,8 @@ module AvaTax
131
116
  # @param id [Integer] The unique ID number of the DistanceThreshold object to replace.
132
117
  # @param model [Object] The new DistanceThreshold object to store.
133
118
  # @return [Object]
134
- def update_distance_threshold(companyId, id, model)
135
- path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}"
136
- put(path, model)
137
- end
138
-
119
+ def update_distance_threshold(companyId, id, model) path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}"
120
+ put(path, model) end
139
121
  end
140
122
  end
141
123
  end
@@ -14,11 +14,8 @@ module AvaTax
14
14
  # @param filingCalendarId [Integer] The unique ID of the filing calendar that will remove setting
15
15
  # @param companyReturnSettingId [Integer] The unique ID of the company return setting that will be deleted from the filing calendar
16
16
  # @return [CompanyReturnSettingModel[]]
17
- def delete_company_return_settings(companyId, filingCalendarId, companyReturnSettingId)
18
- path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/setting/#{companyReturnSettingId}"
19
- delete(path)
20
- end
21
-
17
+ def delete_company_return_settings(companyId, filingCalendarId, companyReturnSettingId) path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/setting/#{companyReturnSettingId}"
18
+ delete(path) end
22
19
  end
23
20
  end
24
21
  end
@@ -20,11 +20,8 @@ module AvaTax
20
20
  # @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
21
21
  # @param taxformCode [String] The unique tax form code of the form.
22
22
  # @return [FetchResult]
23
- def get_filed_returns(companyId, options={})
24
- path = "/api/v2/companies/#{companyId}/filings/returns/filed"
25
- get(path, options)
26
- end
27
-
23
+ def get_filed_returns(companyId, options={}) path = "/api/v2/companies/#{companyId}/filings/returns/filed"
24
+ get(path, options) end
28
25
  end
29
26
  end
30
27
  end
@@ -12,11 +12,8 @@ module AvaTax
12
12
  # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
13
  # @param id [Integer]
14
14
  # @return [Object]
15
- def approve_firm_client_linkage(id)
16
- path = "/api/v2/firmclientlinkages/#{id}/approve"
17
- post(path)
18
- end
19
-
15
+ def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve"
16
+ post(path) end
20
17
 
21
18
  # Request a new FirmClient account and create an approved linkage to it
22
19
  #
@@ -36,11 +33,8 @@ module AvaTax
36
33
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
37
34
  # @param model [Object] Information about the account you wish to create.
38
35
  # @return [Object]
39
- def create_and_link_new_firm_client_account(model)
40
- path = "/api/v2/firmclientlinkages/createandlinkclient"
41
- post(path, model)
42
- end
43
-
36
+ def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient"
37
+ post(path, model) end
44
38
 
45
39
  # Links a firm account with the client account
46
40
  #
@@ -51,11 +45,8 @@ module AvaTax
51
45
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
52
46
  # @param model [Object] FirmClientLinkageInputModel
53
47
  # @return [Object]
54
- def create_firm_client_linkage(model)
55
- path = "/api/v2/firmclientlinkages"
56
- post(path, model)
57
- end
58
-
48
+ def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages"
49
+ post(path, model) end
59
50
 
60
51
  # Delete a linkage
61
52
  #
@@ -66,11 +57,8 @@ module AvaTax
66
57
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
67
58
  # @param id [Integer]
68
59
  # @return [ErrorDetail[]]
69
- def delete_firm_client_linkage(id)
70
- path = "/api/v2/firmclientlinkages/#{id}"
71
- delete(path)
72
- end
73
-
60
+ def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
61
+ delete(path) end
74
62
 
75
63
  # Get linkage between a firm and client by id
76
64
  #
@@ -81,11 +69,8 @@ module AvaTax
81
69
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
82
70
  # @param id [Integer]
83
71
  # @return [Object]
84
- def get_firm_client_linkage(id)
85
- path = "/api/v2/firmclientlinkages/#{id}"
86
- get(path)
87
- end
88
-
72
+ def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
73
+ get(path) end
89
74
 
90
75
  # List client linkages for a firm or client
91
76
  #
@@ -96,11 +81,8 @@ module AvaTax
96
81
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
97
82
  # @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:* firmAccountName, clientAccountName
98
83
  # @return [FetchResult]
99
- def list_firm_client_linkage(options={})
100
- path = "/api/v2/firmclientlinkages"
101
- get(path, options)
102
- end
103
-
84
+ def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages"
85
+ get(path, options) end
104
86
 
105
87
  # Rejects linkage to a firm for a client account
106
88
  #
@@ -111,11 +93,8 @@ module AvaTax
111
93
  # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
112
94
  # @param id [Integer]
113
95
  # @return [Object]
114
- def reject_firm_client_linkage(id)
115
- path = "/api/v2/firmclientlinkages/#{id}/reject"
116
- post(path)
117
- end
118
-
96
+ def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject"
97
+ post(path) end
119
98
 
120
99
  # Reset linkage status between a client and firm back to requested
121
100
  #
@@ -126,11 +105,8 @@ module AvaTax
126
105
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
127
106
  # @param id [Integer]
128
107
  # @return [Object]
129
- def reset_firm_client_linkage(id)
130
- path = "/api/v2/firmclientlinkages/#{id}/reset"
131
- post(path)
132
- end
133
-
108
+ def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset"
109
+ post(path) end
134
110
 
135
111
  # Revokes previously approved linkage to a firm for a client account
136
112
  #
@@ -141,11 +117,8 @@ module AvaTax
141
117
  # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
142
118
  # @param id [Integer]
143
119
  # @return [Object]
144
- def revoke_firm_client_linkage(id)
145
- path = "/api/v2/firmclientlinkages/#{id}/revoke"
146
- post(path)
147
- end
148
-
120
+ def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke"
121
+ post(path) end
149
122
  end
150
123
  end
151
124
  end
@@ -21,11 +21,8 @@ module AvaTax
21
21
  # * This API may be called without providing authentication credentials.
22
22
  # @param model [Object] Required information to provision a free trial account.
23
23
  # @return [Object]
24
- def request_free_trial(model)
25
- path = "/api/v2/accounts/freetrials/request"
26
- post(path, model)
27
- end
28
-
24
+ def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
25
+ post(path, model) end
29
26
 
30
27
  # FREE API - Sales tax rates for a specified address
31
28
  #
@@ -62,11 +59,8 @@ module AvaTax
62
59
  # @param postalCode [String] The postal code of the location.
63
60
  # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
64
61
  # @return [Object]
65
- def tax_rates_by_address(options={})
66
- path = "/api/v2/taxrates/byaddress"
67
- get(path, options)
68
- end
69
-
62
+ def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
63
+ get(path, options) end
70
64
 
71
65
  # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
72
66
  #
@@ -100,11 +94,8 @@ module AvaTax
100
94
  # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
101
95
  # @param postalCode [String] The postal code of the location.
102
96
  # @return [Object]
103
- def tax_rates_by_postal_code(options={})
104
- path = "/api/v2/taxrates/bypostalcode"
105
- get(path, options)
106
- end
107
-
97
+ def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
98
+ get(path, options) end
108
99
  end
109
100
  end
110
101
  end
@@ -24,11 +24,8 @@ module AvaTax
24
24
  # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
25
25
  # @param id [Integer] The unique ID number of this funding request
26
26
  # @return [Object]
27
- def activate_funding_request(id)
28
- path = "/api/v2/fundingrequests/#{id}/widget"
29
- get(path)
30
- end
31
-
27
+ def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
28
+ get(path) end
32
29
 
33
30
  # Retrieve status about a funding setup request
34
31
  #
@@ -49,11 +46,8 @@ module AvaTax
49
46
  # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
50
47
  # @param id [Integer] The unique ID number of this funding request
51
48
  # @return [Object]
52
- def funding_request_status(id)
53
- path = "/api/v2/fundingrequests/#{id}"
54
- get(path)
55
- end
56
-
49
+ def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
50
+ get(path) end
57
51
  end
58
52
  end
59
53
  end
@@ -17,11 +17,8 @@ module AvaTax
17
17
  # @param companyId [Integer] The ID of the company that owns this item.
18
18
  # @param itemId [Integer] The ID of the item you wish to delete the classifications.
19
19
  # @return [ErrorDetail[]]
20
- def batch_delete_item_classifications(companyId, itemId)
21
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
22
- delete(path)
23
- end
24
-
20
+ def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
21
+ delete(path) end
25
22
 
26
23
  # Delete all parameters for an item
27
24
  #
@@ -39,11 +36,8 @@ module AvaTax
39
36
  # @param companyId [Integer] The ID of the company that owns this item.
40
37
  # @param itemId [Integer] The ID of the item you wish to delete the parameters.
41
38
  # @return [ErrorDetail[]]
42
- def batch_delete_item_parameters(companyId, itemId)
43
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
44
- delete(path)
45
- end
46
-
39
+ def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
40
+ delete(path) end
47
41
 
48
42
  # Add classifications to an item.
49
43
  #
@@ -62,11 +56,8 @@ module AvaTax
62
56
  # @param itemId [Integer] The item id.
63
57
  # @param model [ItemClassificationInputModel[]] The item classifications you wish to create.
64
58
  # @return [ItemClassificationOutputModel[]]
65
- def create_item_classifications(companyId, itemId, model)
66
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
67
- post(path, model)
68
- end
69
-
59
+ def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
60
+ post(path, model) end
70
61
 
71
62
  # Add parameters to an item.
72
63
  #
@@ -89,11 +80,8 @@ module AvaTax
89
80
  # @param itemId [Integer] The item id.
90
81
  # @param model [ItemParameterModel[]] The item parameters you wish to create.
91
82
  # @return [ItemParameterModel[]]
92
- def create_item_parameters(companyId, itemId, model)
93
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
94
- post(path, model)
95
- end
96
-
83
+ def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
84
+ post(path, model) end
97
85
 
98
86
  # Create a new item
99
87
  #
@@ -113,11 +101,8 @@ module AvaTax
113
101
  # @param companyId [Integer] The ID of the company that owns this item.
114
102
  # @param model [ItemModel[]] The item you wish to create.
115
103
  # @return [ItemModel[]]
116
- def create_items(companyId, model)
117
- path = "/api/v2/companies/#{companyId}/items"
118
- post(path, model)
119
- end
120
-
104
+ def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
105
+ post(path, model) end
121
106
 
122
107
  # Delete a single item
123
108
  #
@@ -137,11 +122,8 @@ module AvaTax
137
122
  # @param companyId [Integer] The ID of the company that owns this item.
138
123
  # @param id [Integer] The ID of the item you wish to delete.
139
124
  # @return [ErrorDetail[]]
140
- def delete_item(companyId, id)
141
- path = "/api/v2/companies/#{companyId}/items/#{id}"
142
- delete(path)
143
- end
144
-
125
+ def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}"
126
+ delete(path) end
145
127
 
146
128
  # Delete a single item classification.
147
129
  #
@@ -158,11 +140,8 @@ module AvaTax
158
140
  # @param itemId [Integer] The item id.
159
141
  # @param id [Integer] The item classification id.
160
142
  # @return [ErrorDetail[]]
161
- def delete_item_classification(companyId, itemId, id)
162
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
163
- delete(path)
164
- end
165
-
143
+ def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
144
+ delete(path) end
166
145
 
167
146
  # Delete a single item parameter
168
147
  #
@@ -181,11 +160,8 @@ module AvaTax
181
160
  # @param itemId [Integer] The item id
182
161
  # @param id [Integer] The parameter id
183
162
  # @return [ErrorDetail[]]
184
- def delete_item_parameter(companyId, itemId, id)
185
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
186
- delete(path)
187
- end
188
-
163
+ def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
164
+ delete(path) end
189
165
 
190
166
  # Retrieve a single item
191
167
  #
@@ -204,11 +180,8 @@ module AvaTax
204
180
  # @param id [Integer] The primary key of this item
205
181
  # @param include [String] A comma separated list of additional data to retrieve.
206
182
  # @return [Object]
207
- def get_item(companyId, id, options={})
208
- path = "/api/v2/companies/#{companyId}/items/#{id}"
209
- get(path, options)
210
- end
211
-
183
+ def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}"
184
+ get(path, options) end
212
185
 
213
186
  # Retrieve a single item classification.
214
187
  #
@@ -225,11 +198,8 @@ module AvaTax
225
198
  # @param itemId [Integer] The item id.
226
199
  # @param id [Integer] The item classification id.
227
200
  # @return [Object]
228
- def get_item_classification(companyId, itemId, id)
229
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
230
- get(path)
231
- end
232
-
201
+ def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
202
+ get(path) end
233
203
 
234
204
  # Retrieve a single item parameter
235
205
  #
@@ -248,11 +218,8 @@ module AvaTax
248
218
  # @param itemId [Integer] The item id
249
219
  # @param id [Integer] The parameter id
250
220
  # @return [Object]
251
- def get_item_parameter(companyId, itemId, id)
252
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
253
- get(path)
254
- end
255
-
221
+ def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
222
+ get(path) end
256
223
 
257
224
  # Retrieve classifications for an item.
258
225
  #
@@ -275,11 +242,8 @@ module AvaTax
275
242
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
276
243
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
277
244
  # @return [FetchResult]
278
- def list_item_classifications(companyId, itemId, options={})
279
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
280
- get(path, options)
281
- end
282
-
245
+ def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
246
+ get(path, options) end
283
247
 
284
248
  # Retrieve parameters for an item
285
249
  #
@@ -304,11 +268,8 @@ module AvaTax
304
268
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
305
269
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
306
270
  # @return [FetchResult]
307
- def list_item_parameters(companyId, itemId, options={})
308
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
309
- get(path, options)
310
- end
311
-
271
+ def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
272
+ get(path, options) end
312
273
 
313
274
  # Retrieve items for this company
314
275
  #
@@ -339,11 +300,8 @@ module AvaTax
339
300
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
340
301
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
341
302
  # @return [FetchResult]
342
- def list_items_by_company(companyId, options={})
343
- path = "/api/v2/companies/#{companyId}/items"
344
- get(path, options)
345
- end
346
-
303
+ def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
304
+ get(path, options) end
347
305
 
348
306
  # Retrieve all items
349
307
  #
@@ -368,11 +326,8 @@ module AvaTax
368
326
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
369
327
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
370
328
  # @return [FetchResult]
371
- def query_items(options={})
372
- path = "/api/v2/items"
373
- get(path, options)
374
- end
375
-
329
+ def query_items(options={}) path = "/api/v2/items"
330
+ get(path, options) end
376
331
 
377
332
  # Sync items from a product catalog
378
333
  #
@@ -395,11 +350,8 @@ module AvaTax
395
350
  # @param companyId [Integer] The ID of the company that owns this item.
396
351
  # @param model [Object] The request object.
397
352
  # @return [Object]
398
- def sync_items(companyId, model)
399
- path = "/api/v2/companies/#{companyId}/items/sync"
400
- post(path, model)
401
- end
402
-
353
+ def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
354
+ post(path, model) end
403
355
 
404
356
  # Update a single item
405
357
  #
@@ -423,11 +375,8 @@ module AvaTax
423
375
  # @param id [Integer] The ID of the item you wish to update
424
376
  # @param model [Object] The item object you wish to update.
425
377
  # @return [Object]
426
- def update_item(companyId, id, model)
427
- path = "/api/v2/companies/#{companyId}/items/#{id}"
428
- put(path, model)
429
- end
430
-
378
+ def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
379
+ put(path, model) end
431
380
 
432
381
  # Update an item classification.
433
382
  #
@@ -447,11 +396,8 @@ module AvaTax
447
396
  # @param id [Integer] The item classification id.
448
397
  # @param model [Object] The item object you wish to update.
449
398
  # @return [Object]
450
- def update_item_classification(companyId, itemId, id, model)
451
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
452
- put(path, model)
453
- end
454
-
399
+ def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
400
+ put(path, model) end
455
401
 
456
402
  # Update an item parameter
457
403
  #
@@ -471,11 +417,8 @@ module AvaTax
471
417
  # @param id [Integer] The item parameter id
472
418
  # @param model [Object] The item object you wish to update.
473
419
  # @return [Object]
474
- def update_item_parameter(companyId, itemId, id, model)
475
- path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
476
- put(path, model)
477
- end
478
-
420
+ def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
421
+ put(path, model) end
479
422
  end
480
423
  end
481
424
  end