avatax 23.1.0 → 23.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/avatax.gemspec +1 -1
  3. data/lib/avatax/client/accounts.rb +17 -17
  4. data/lib/avatax/client/addresses.rb +2 -2
  5. data/lib/avatax/client/advancedrules.rb +5 -5
  6. data/lib/avatax/client/ageverification.rb +4 -4
  7. data/lib/avatax/client/avafileforms.rb +5 -5
  8. data/lib/avatax/client/batches.rb +8 -8
  9. data/lib/avatax/client/certexpressinvites.rb +3 -3
  10. data/lib/avatax/client/certificates.rb +15 -15
  11. data/lib/avatax/client/companies.rb +36 -36
  12. data/lib/avatax/client/compliance.rb +1 -1
  13. data/lib/avatax/client/contacts.rb +6 -6
  14. data/lib/avatax/client/customers.rb +13 -13
  15. data/lib/avatax/client/datasources.rb +9 -9
  16. data/lib/avatax/client/definitions.rb +82 -82
  17. data/lib/avatax/client/distancethresholds.rb +6 -6
  18. data/lib/avatax/client/ecommercetoken.rb +4 -4
  19. data/lib/avatax/client/firmclientlinkages.rb +11 -11
  20. data/lib/avatax/client/free.rb +1 -1
  21. data/lib/avatax/client/fundingrequests.rb +3 -3
  22. data/lib/avatax/client/items.rb +46 -46
  23. data/lib/avatax/client/jurisdictionoverrides.rb +6 -6
  24. data/lib/avatax/client/locations.rb +18 -18
  25. data/lib/avatax/client/multidocument.rb +10 -10
  26. data/lib/avatax/client/nexus.rb +15 -15
  27. data/lib/avatax/client/notices.rb +4 -4
  28. data/lib/avatax/client/notifications.rb +6 -6
  29. data/lib/avatax/client/provisioning.rb +2 -2
  30. data/lib/avatax/client/registrar.rb +14 -14
  31. data/lib/avatax/client/reports.rb +4 -4
  32. data/lib/avatax/client/settings.rb +9 -9
  33. data/lib/avatax/client/shippingverification.rb +4 -4
  34. data/lib/avatax/client/subscriptions.rb +3 -3
  35. data/lib/avatax/client/taxcodes.rb +6 -6
  36. data/lib/avatax/client/taxcontent.rb +8 -8
  37. data/lib/avatax/client/taxrules.rb +6 -6
  38. data/lib/avatax/client/transactions.rb +24 -24
  39. data/lib/avatax/client/upcs.rb +6 -6
  40. data/lib/avatax/client/userdefinedfields.rb +4 -4
  41. data/lib/avatax/client/users.rb +12 -12
  42. data/lib/avatax/client/utilities.rb +3 -3
  43. data/lib/avatax/version.rb +1 -1
  44. data/spec/spec_helper.rb +1 -0
  45. metadata +4 -4
@@ -29,7 +29,7 @@ module AvaTax
29
29
  # @param model [SettingModel[]] The setting you wish to create.
30
30
  # @return [SettingModel[]]
31
31
  def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
32
- post(path, model, {}, "23.1.0") end
32
+ post(path, model, {}, AvaTax::VERSION) end
33
33
 
34
34
  # Delete a single setting
35
35
  #
@@ -52,7 +52,7 @@ module AvaTax
52
52
  # @param id [Integer] The ID of the setting you wish to delete.
53
53
  # @return [ErrorDetail[]]
54
54
  def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
55
- delete(path, {}, "23.1.0") end
55
+ delete(path, {}, AvaTax::VERSION) end
56
56
 
57
57
  # Retrieve a single setting
58
58
  #
@@ -69,13 +69,13 @@ module AvaTax
69
69
  #
70
70
  # ### Security Policies
71
71
  #
72
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
73
73
  # Swagger Name: AvaTaxClient
74
74
  # @param companyId [Integer] The ID of the company that owns this setting
75
75
  # @param id [Integer] The primary key of this setting
76
76
  # @return [Object]
77
77
  def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
78
- get(path, {}, "23.1.0") end
78
+ get(path, {}, AvaTax::VERSION) end
79
79
 
80
80
  # Retrieve all settings for this company
81
81
  #
@@ -95,7 +95,7 @@ module AvaTax
95
95
  #
96
96
  # ### Security Policies
97
97
  #
98
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
98
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
99
99
  # Swagger Name: AvaTaxClient
100
100
  # @param companyId [Integer] The ID of the company that owns these settings
101
101
  # @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:* modifiedDate, ModifiedUserId
@@ -105,7 +105,7 @@ module AvaTax
105
105
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
106
106
  # @return [FetchResult]
107
107
  def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
108
- get(path, options, "23.1.0") end
108
+ get(path, options, AvaTax::VERSION) end
109
109
 
110
110
  # Retrieve all settings
111
111
  #
@@ -125,7 +125,7 @@ module AvaTax
125
125
  #
126
126
  # ### Security Policies
127
127
  #
128
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
128
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
129
129
  # Swagger Name: AvaTaxClient
130
130
  # @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:* modifiedDate, ModifiedUserId
131
131
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -134,7 +134,7 @@ module AvaTax
134
134
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
135
135
  # @return [FetchResult]
136
136
  def query_settings(options={}) path = "/api/v2/settings"
137
- get(path, options, "23.1.0") end
137
+ get(path, options, AvaTax::VERSION) end
138
138
 
139
139
  # Update a single setting
140
140
  #
@@ -162,7 +162,7 @@ module AvaTax
162
162
  # @param model [Object] The setting you wish to update.
163
163
  # @return [Object]
164
164
  def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
165
- put(path, model, {}, "23.1.0") end
165
+ put(path, model, {}, AvaTax::VERSION) end
166
166
  end
167
167
  end
168
168
  end
@@ -16,7 +16,7 @@ module AvaTax
16
16
  def deregister_shipment(companyCode, transactionCode, options={}, x_avalara_version="") path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
17
17
  headers= Hash.new
18
18
  headers["x-avalara-version"]=x_avalara_version if !(x_avalara_version.nil? || x_avalara_version.empty?);
19
- delete(path, options, "", headers) end
19
+ delete(path, options, AvaTax::VERSION, headers) end
20
20
 
21
21
  # Registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
22
22
  #
@@ -31,7 +31,7 @@ module AvaTax
31
31
  def register_shipment(companyCode, transactionCode, options={}, x_avalara_version="") path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
32
32
  headers= Hash.new
33
33
  headers["x-avalara-version"]=x_avalara_version if !(x_avalara_version.nil? || x_avalara_version.empty?);
34
- put(path, options, "", headers) end
34
+ put(path, options, AvaTax::VERSION, headers) end
35
35
 
36
36
  # Evaluates a transaction against a set of direct-to-consumer shipping regulations and, if compliant, registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
37
37
  #
@@ -46,7 +46,7 @@ module AvaTax
46
46
  def register_shipment_if_compliant(companyCode, transactionCode, options={}, x_avalara_version="") path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registerIfCompliant"
47
47
  headers= Hash.new
48
48
  headers["x-avalara-version"]=x_avalara_version if !(x_avalara_version.nil? || x_avalara_version.empty?);
49
- put(path, options, "", headers) end
49
+ put(path, options, AvaTax::VERSION, headers) end
50
50
 
51
51
  # Evaluates a transaction against a set of direct-to-consumer shipping regulations.
52
52
  #
@@ -76,7 +76,7 @@ module AvaTax
76
76
  def verify_shipment(companyCode, transactionCode, options={}, x_avalara_version="") path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/verify"
77
77
  headers= Hash.new
78
78
  headers["x-avalara-version"]=x_avalara_version if !(x_avalara_version.nil? || x_avalara_version.empty?);
79
- get(path, options, "", headers) end
79
+ get(path, options, AvaTax::VERSION, headers) end
80
80
  end
81
81
  end
82
82
  end
@@ -17,7 +17,7 @@ module AvaTax
17
17
  # @param id [Integer] The primary key of this subscription
18
18
  # @return [Object]
19
19
  def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
20
- get(path, {}, "23.1.0") end
20
+ get(path, {}, AvaTax::VERSION) end
21
21
 
22
22
  # Retrieve subscriptions for this account
23
23
  #
@@ -39,7 +39,7 @@ module AvaTax
39
39
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
40
40
  # @return [FetchResult]
41
41
  def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
42
- get(path, options, "23.1.0") end
42
+ get(path, options, AvaTax::VERSION) end
43
43
 
44
44
  # Retrieve all subscriptions
45
45
  #
@@ -60,7 +60,7 @@ module AvaTax
60
60
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
61
61
  # @return [FetchResult]
62
62
  def query_subscriptions(options={}) path = "/api/v2/subscriptions"
63
- get(path, options, "23.1.0") end
63
+ get(path, options, AvaTax::VERSION) end
64
64
  end
65
65
  end
66
66
  end
@@ -19,7 +19,7 @@ module AvaTax
19
19
  # @param model [TaxCodeModel[]] The tax code you wish to create.
20
20
  # @return [TaxCodeModel[]]
21
21
  def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
22
- post(path, model, {}, "23.1.0") end
22
+ post(path, model, {}, AvaTax::VERSION) end
23
23
 
24
24
  # Delete a single tax code
25
25
  #
@@ -33,7 +33,7 @@ module AvaTax
33
33
  # @param id [Integer] The ID of the tax code you wish to delete.
34
34
  # @return [ErrorDetail[]]
35
35
  def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
36
- delete(path, {}, "23.1.0") end
36
+ delete(path, {}, AvaTax::VERSION) end
37
37
 
38
38
  # Retrieve a single tax code
39
39
  #
@@ -51,7 +51,7 @@ module AvaTax
51
51
  # @param id [Integer] The primary key of this tax code
52
52
  # @return [Object]
53
53
  def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
54
- get(path, {}, "23.1.0") end
54
+ get(path, {}, AvaTax::VERSION) end
55
55
 
56
56
  # Retrieve tax codes for this company
57
57
  #
@@ -76,7 +76,7 @@ module AvaTax
76
76
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
77
  # @return [FetchResult]
78
78
  def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
79
- get(path, options, "23.1.0") end
79
+ get(path, options, AvaTax::VERSION) end
80
80
 
81
81
  # Retrieve all tax codes
82
82
  #
@@ -100,7 +100,7 @@ module AvaTax
100
100
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
101
101
  # @return [FetchResult]
102
102
  def query_tax_codes(options={}) path = "/api/v2/taxcodes"
103
- get(path, options, "23.1.0") end
103
+ get(path, options, AvaTax::VERSION) end
104
104
 
105
105
  # Update a single tax code
106
106
  #
@@ -121,7 +121,7 @@ module AvaTax
121
121
  # @param model [Object] The tax code you wish to update.
122
122
  # @return [Object]
123
123
  def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
124
- put(path, model, {}, "23.1.0") end
124
+ put(path, model, {}, AvaTax::VERSION) end
125
125
  end
126
126
  end
127
127
  end
@@ -31,13 +31,13 @@ module AvaTax
31
31
  #
32
32
  # ### Security Policies
33
33
  #
34
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
34
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
35
35
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
36
36
  # Swagger Name: AvaTaxClient
37
37
  # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
38
38
  # @return [Object]
39
39
  def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
40
- post(path, model, {}, "23.1.0") end
40
+ post(path, model, {}, AvaTax::VERSION) end
41
41
 
42
42
  # Build a tax content file for a single location
43
43
  #
@@ -67,7 +67,7 @@ module AvaTax
67
67
  #
68
68
  # ### Security Policies
69
69
  #
70
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
70
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
71
71
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
72
72
  # Swagger Name: AvaTaxClient
73
73
  # @param companyId [Integer] The ID number of the company that owns this location.
@@ -78,7 +78,7 @@ module AvaTax
78
78
  # @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
79
79
  # @return [Object]
80
80
  def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
81
- get(path, options, "23.1.0") end
81
+ get(path, options, AvaTax::VERSION) end
82
82
 
83
83
  # Download a file listing tax rates by postal code
84
84
  #
@@ -125,13 +125,13 @@ module AvaTax
125
125
  #
126
126
  # ### Security Policies
127
127
  #
128
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
128
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
129
129
  # Swagger Name: AvaTaxClient
130
130
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
131
131
  # @param region [String] A two character region code which limits results to a specific region.
132
132
  # @return [Object]
133
133
  def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
134
- get(path, options, "23.1.0") end
134
+ get(path, options, AvaTax::VERSION) end
135
135
 
136
136
  # Sales tax rates for a specified address
137
137
  #
@@ -165,7 +165,7 @@ module AvaTax
165
165
  # @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`.
166
166
  # @return [Object]
167
167
  def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
168
- get(path, options, "23.1.0") end
168
+ get(path, options, AvaTax::VERSION) end
169
169
 
170
170
  # Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
171
171
  #
@@ -196,7 +196,7 @@ module AvaTax
196
196
  # @param postalCode [String] The postal code of the location.
197
197
  # @return [Object]
198
198
  def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
199
- get(path, options, "23.1.0") end
199
+ get(path, options, AvaTax::VERSION) end
200
200
  end
201
201
  end
202
202
  end
@@ -27,7 +27,7 @@ module AvaTax
27
27
  # @param model [TaxRuleModel[]] The tax rule you wish to create.
28
28
  # @return [TaxRuleModel[]]
29
29
  def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
30
- post(path, model, {}, "23.1.0") end
30
+ post(path, model, {}, AvaTax::VERSION) end
31
31
 
32
32
  # Delete a single tax rule
33
33
  #
@@ -53,7 +53,7 @@ module AvaTax
53
53
  # @param id [Integer] The ID of the tax rule you wish to delete.
54
54
  # @return [ErrorDetail[]]
55
55
  def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
56
- delete(path, {}, "23.1.0") end
56
+ delete(path, {}, AvaTax::VERSION) end
57
57
 
58
58
  # Retrieve a single tax rule
59
59
  #
@@ -79,7 +79,7 @@ module AvaTax
79
79
  # @param id [Integer] The primary key of this tax rule
80
80
  # @return [Object]
81
81
  def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
82
- get(path, {}, "23.1.0") end
82
+ get(path, {}, AvaTax::VERSION) end
83
83
 
84
84
  # Retrieve tax rules for this company
85
85
  #
@@ -112,7 +112,7 @@ module AvaTax
112
112
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
113
113
  # @return [FetchResult]
114
114
  def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
115
- get(path, options, "23.1.0") end
115
+ get(path, options, AvaTax::VERSION) end
116
116
 
117
117
  # Retrieve all tax rules
118
118
  #
@@ -144,7 +144,7 @@ module AvaTax
144
144
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
145
145
  # @return [FetchResult]
146
146
  def query_tax_rules(options={}) path = "/api/v2/taxrules"
147
- get(path, options, "23.1.0") end
147
+ get(path, options, AvaTax::VERSION) end
148
148
 
149
149
  # Update a single tax rule
150
150
  #
@@ -171,7 +171,7 @@ module AvaTax
171
171
  # @param model [Object] The tax rule you wish to update.
172
172
  # @return [Object]
173
173
  def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
174
- put(path, model, {}, "23.1.0") end
174
+ put(path, model, {}, AvaTax::VERSION) end
175
175
  end
176
176
  end
177
177
  end
@@ -35,7 +35,7 @@ module AvaTax
35
35
  # @param model [Object] information about the transaction and lines to be added
36
36
  # @return [Object]
37
37
  def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
38
- post(path, model, options, "23.1.0") end
38
+ post(path, model, options, AvaTax::VERSION) end
39
39
 
40
40
  # Correct a previously created transaction
41
41
  #
@@ -81,7 +81,7 @@ module AvaTax
81
81
  # @param model [Object] The adjustment you wish to make
82
82
  # @return [Object]
83
83
  def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
84
- post(path, model, options, "23.1.0") end
84
+ post(path, model, options, AvaTax::VERSION) end
85
85
 
86
86
  # Get audit information about a transaction
87
87
  #
@@ -118,7 +118,7 @@ module AvaTax
118
118
  # @param transactionCode [String] The code identifying the transaction
119
119
  # @return [Object]
120
120
  def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
121
- get(path, {}, "23.1.0") end
121
+ get(path, {}, AvaTax::VERSION) end
122
122
 
123
123
  # Get audit information about a transaction
124
124
  #
@@ -156,7 +156,7 @@ module AvaTax
156
156
  # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
157
157
  # @return [Object]
158
158
  def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
159
- get(path, {}, "23.1.0") end
159
+ get(path, {}, AvaTax::VERSION) end
160
160
 
161
161
  # Lock a set of documents
162
162
  #
@@ -176,7 +176,7 @@ module AvaTax
176
176
  # @param model [Object] bulk lock request
177
177
  # @return [Object]
178
178
  def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
179
- post(path, model, {}, "23.1.0") end
179
+ post(path, model, {}, AvaTax::VERSION) end
180
180
 
181
181
  # Change a transaction's code
182
182
  #
@@ -222,7 +222,7 @@ module AvaTax
222
222
  # @param model [Object] The code change request you wish to execute
223
223
  # @return [Object]
224
224
  def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
225
- post(path, model, options, "23.1.0") end
225
+ post(path, model, options, AvaTax::VERSION) end
226
226
 
227
227
  # Commit a transaction for reporting
228
228
  #
@@ -266,7 +266,7 @@ module AvaTax
266
266
  # @param model [Object] The commit request you wish to execute
267
267
  # @return [Object]
268
268
  def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
269
- post(path, model, options, "23.1.0") end
269
+ post(path, model, options, AvaTax::VERSION) end
270
270
 
271
271
  # Create or adjust a transaction
272
272
  #
@@ -313,7 +313,7 @@ module AvaTax
313
313
  # @param model [Object] The transaction you wish to create or adjust
314
314
  # @return [Object]
315
315
  def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
316
- post(path, model, options, "23.1.0") end
316
+ post(path, model, options, AvaTax::VERSION) end
317
317
 
318
318
  # Create a new transaction
319
319
  #
@@ -367,7 +367,7 @@ module AvaTax
367
367
  # @param model [Object] The transaction you wish to create
368
368
  # @return [Object]
369
369
  def create_transaction(model, options={}) path = "/api/v2/transactions/create"
370
- post(path, model, options, "23.1.0") end
370
+ post(path, model, options, AvaTax::VERSION) end
371
371
 
372
372
  # Remove lines from an existing unlocked transaction
373
373
  #
@@ -398,7 +398,7 @@ module AvaTax
398
398
  # @param model [Object] information about the transaction and lines to be removed
399
399
  # @return [Object]
400
400
  def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
401
- post(path, model, options, "23.1.0") end
401
+ post(path, model, options, AvaTax::VERSION) end
402
402
 
403
403
  # Fetches the Variance data generated for all the transactions done by Company.
404
404
  #
@@ -410,7 +410,7 @@ module AvaTax
410
410
  # @param companyCode [String]
411
411
  # @return [Object]
412
412
  def get_all_variance_report_by_company_code(companyCode) path = "/api/v2/companies/#{companyCode}/AllVariance"
413
- get(path, {}, "23.1.0") end
413
+ get(path, {}, AvaTax::VERSION) end
414
414
 
415
415
  # Retrieve a single transaction by code
416
416
  #
@@ -452,7 +452,7 @@ module AvaTax
452
452
  # @param include [String] Specifies objects to include in this fetch call
453
453
  # @return [Object]
454
454
  def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
455
- get(path, options, "23.1.0") end
455
+ get(path, options, AvaTax::VERSION) end
456
456
 
457
457
  # Retrieve a single transaction by code
458
458
  #
@@ -477,7 +477,7 @@ module AvaTax
477
477
  # @param include [String] Specifies objects to include in this fetch call
478
478
  # @return [Object]
479
479
  def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
480
- get(path, options, "23.1.0") end
480
+ get(path, options, AvaTax::VERSION) end
481
481
 
482
482
  # Retrieve a single transaction by ID
483
483
  #
@@ -507,7 +507,7 @@ module AvaTax
507
507
  # @param include [String] Specifies objects to include in this fetch call
508
508
  # @return [Object]
509
509
  def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
510
- get(path, options, "23.1.0") end
510
+ get(path, options, AvaTax::VERSION) end
511
511
 
512
512
  # Fetches the Variance data generated for particular Company by transaction ID
513
513
  #
@@ -520,7 +520,7 @@ module AvaTax
520
520
  # @param transactionId [String]
521
521
  # @return [Object]
522
522
  def get_variance_report_by_company_code_by_transaction_id(companyCode, transactionId) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionId}/variance"
523
- get(path, {}, "23.1.0") end
523
+ get(path, {}, AvaTax::VERSION) end
524
524
 
525
525
  # Retrieve all transactions
526
526
  #
@@ -568,7 +568,7 @@ module AvaTax
568
568
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
569
569
  # @return [FetchResult]
570
570
  def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
571
- get(path, options, "23.1.0") end
571
+ get(path, options, AvaTax::VERSION) end
572
572
 
573
573
  # Lock a single transaction
574
574
  #
@@ -614,7 +614,7 @@ module AvaTax
614
614
  # @param model [Object] The lock request you wish to execute
615
615
  # @return [Object]
616
616
  def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
617
- post(path, model, options, "23.1.0") end
617
+ post(path, model, options, AvaTax::VERSION) end
618
618
 
619
619
  # Create a refund for a transaction
620
620
  #
@@ -671,7 +671,7 @@ module AvaTax
671
671
  # @param model [Object] Information about the refund to create
672
672
  # @return [Object]
673
673
  def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
674
- post(path, model, options, "23.1.0") end
674
+ post(path, model, options, AvaTax::VERSION) end
675
675
 
676
676
  # Perform multiple actions on a transaction
677
677
  #
@@ -715,7 +715,7 @@ module AvaTax
715
715
  # @param model [Object] The data from an external system to reconcile against AvaTax
716
716
  # @return [Object]
717
717
  def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
718
- post(path, model, options, "23.1.0") end
718
+ post(path, model, options, AvaTax::VERSION) end
719
719
 
720
720
  # Uncommit a transaction for reporting
721
721
  #
@@ -753,7 +753,7 @@ module AvaTax
753
753
  # @param include [String] Specifies objects to include in this fetch call
754
754
  # @return [Object]
755
755
  def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
756
- post(path, options, "23.1.0") end
756
+ post(path, {}, options, AvaTax::VERSION) end
757
757
 
758
758
  # Unvoids a transaction
759
759
  #
@@ -788,7 +788,7 @@ module AvaTax
788
788
  # @param include [String] Specifies objects to include in this fetch call
789
789
  # @return [Object]
790
790
  def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
791
- post(path, options, "23.1.0") end
791
+ post(path, {}, options, AvaTax::VERSION) end
792
792
 
793
793
  # Generates the Variance report which will capture the difference between "Tax Calculated by Avalara" Vs "Actual Tax" paid at custom clearance at line / header level.
794
794
  #
@@ -801,7 +801,7 @@ module AvaTax
801
801
  # @param model [VarianceRequestModel[]]
802
802
  # @return [Object]
803
803
  def variance_report(companyCode, model) path = "/api/v2/companies/#{companyCode}/variance"
804
- post(path, model, {}, "23.1.0") end
804
+ post(path, model, {}, AvaTax::VERSION) end
805
805
 
806
806
  # Verify a transaction
807
807
  #
@@ -844,7 +844,7 @@ module AvaTax
844
844
  # @param model [Object] The data from an external system to reconcile against AvaTax
845
845
  # @return [Object]
846
846
  def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
847
- post(path, model, options, "23.1.0") end
847
+ post(path, model, options, AvaTax::VERSION) end
848
848
 
849
849
  # Void a transaction
850
850
  #
@@ -889,7 +889,7 @@ module AvaTax
889
889
  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
890
890
  # @return [Object]
891
891
  def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
892
- post(path, model, options, "23.1.0") end
892
+ post(path, model, options, AvaTax::VERSION) end
893
893
  end
894
894
  end
895
895
  end
@@ -17,7 +17,7 @@ module AvaTax
17
17
  # @param model [UPCModel[]] The UPC you wish to create.
18
18
  # @return [UPCModel[]]
19
19
  def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
20
- post(path, model, {}, "23.1.0") end
20
+ post(path, model, {}, AvaTax::VERSION) end
21
21
 
22
22
  # Delete a single UPC
23
23
  #
@@ -32,7 +32,7 @@ module AvaTax
32
32
  # @param id [Integer] The ID of the UPC you wish to delete.
33
33
  # @return [ErrorDetail[]]
34
34
  def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
35
- delete(path, {}, "23.1.0") end
35
+ delete(path, {}, AvaTax::VERSION) end
36
36
 
37
37
  # Retrieve a single UPC
38
38
  #
@@ -48,7 +48,7 @@ module AvaTax
48
48
  # @param id [Integer] The primary key of this UPC
49
49
  # @return [Object]
50
50
  def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
51
- get(path, {}, "23.1.0") end
51
+ get(path, {}, AvaTax::VERSION) end
52
52
 
53
53
  # Retrieve UPCs for this company
54
54
  #
@@ -71,7 +71,7 @@ module AvaTax
71
71
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
72
72
  # @return [FetchResult]
73
73
  def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
74
- get(path, options, "23.1.0") end
74
+ get(path, options, AvaTax::VERSION) end
75
75
 
76
76
  # Retrieve all UPCs
77
77
  #
@@ -93,7 +93,7 @@ module AvaTax
93
93
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
94
94
  # @return [FetchResult]
95
95
  def query_u_p_cs(options={}) path = "/api/v2/upcs"
96
- get(path, options, "23.1.0") end
96
+ get(path, options, AvaTax::VERSION) end
97
97
 
98
98
  # Update a single UPC
99
99
  #
@@ -112,7 +112,7 @@ module AvaTax
112
112
  # @param model [Object] The UPC you wish to update.
113
113
  # @return [Object]
114
114
  def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
115
- put(path, model, {}, "23.1.0") end
115
+ put(path, model, {}, AvaTax::VERSION) end
116
116
  end
117
117
  end
118
118
  end
@@ -16,13 +16,13 @@ module AvaTax
16
16
  # @param id [Integer] The id of the User Defined Field you wish to delete.
17
17
  # @return [ErrorDetail[]]
18
18
  def delete_user_defined_field(companyId, id) path = "/api/v2/companies/#{companyId}/userdefinedfields/#{id}"
19
- delete(path, {}, "23.1.0") end
19
+ delete(path, {}, AvaTax::VERSION) end
20
20
 
21
21
  #
22
22
  #
23
23
  # ### Security Policies
24
24
  #
25
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
25
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
26
26
  # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
27
27
  # Swagger Name: AvaTaxClient
28
28
  # @param companyId [Integer]
@@ -30,7 +30,7 @@ module AvaTax
30
30
  # @param allowDefaults [Boolean] If true this will add defaulted UDFs to the list that are not named yet
31
31
  # @return [FetchResult]
32
32
  def list_user_defined_fields_by_company_id(companyId, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
33
- get(path, options, "23.1.0") end
33
+ get(path, options, AvaTax::VERSION) end
34
34
 
35
35
  # Update a User Defined Field identified by id for a company
36
36
  #
@@ -46,7 +46,7 @@ module AvaTax
46
46
  # @param model [Object]
47
47
  # @return [Object]
48
48
  def update_user_defined_field(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
49
- post(path, model, options, "23.1.0") end
49
+ post(path, model, options, AvaTax::VERSION) end
50
50
  end
51
51
  end
52
52
  end