avatax 20.6.0 → 21.1.2
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.
- checksums.yaml +4 -4
- data/.vs/slnx.sqlite +0 -0
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +22 -55
- data/lib/avatax/client/addresses.rb +7 -13
- data/lib/avatax/client/advancedrules.rb +10 -25
- data/lib/avatax/client/avafileforms.rb +15 -30
- data/lib/avatax/client/batches.rb +16 -40
- data/lib/avatax/client/certexpressinvites.rb +21 -30
- data/lib/avatax/client/certificates.rb +97 -142
- data/lib/avatax/client/companies.rb +137 -80
- data/lib/avatax/client/compliance.rb +2 -5
- data/lib/avatax/client/contacts.rb +12 -30
- data/lib/avatax/client/customers.rb +87 -126
- data/lib/avatax/client/datasources.rb +18 -36
- data/lib/avatax/client/definitions.rb +128 -303
- data/lib/avatax/client/distancethresholds.rb +12 -30
- data/lib/avatax/client/ecms.rb +26 -31
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/errortransactions.rb +27 -15
- data/lib/avatax/client/filingcalendars.rb +17 -5
- data/lib/avatax/client/filings.rb +15 -7
- data/lib/avatax/client/firmclientlinkages.rb +18 -45
- data/lib/avatax/client/free.rb +2 -84
- data/lib/avatax/client/fundingrequests.rb +6 -12
- data/lib/avatax/client/items.rb +38 -95
- data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
- data/lib/avatax/client/locations.rb +128 -38
- data/lib/avatax/client/multidocument.rb +52 -62
- data/lib/avatax/client/nexus.rb +138 -37
- data/lib/avatax/client/notices.rb +47 -139
- data/lib/avatax/client/notifications.rb +6 -15
- data/lib/avatax/client/provisioning.rb +4 -10
- data/lib/avatax/client/registrar.rb +20 -50
- data/lib/avatax/client/reports.rb +17 -20
- data/lib/avatax/client/settings.rb +12 -30
- data/lib/avatax/client/subscriptions.rb +6 -15
- data/lib/avatax/client/taxcodes.rb +12 -30
- data/lib/avatax/client/taxcontent.rb +70 -16
- data/lib/avatax/client/taxprofiles.rb +14 -10
- data/lib/avatax/client/taxrules.rb +12 -30
- data/lib/avatax/client/transactions.rb +93 -126
- data/lib/avatax/client/upcs.rb +18 -36
- data/lib/avatax/client/users.rb +16 -40
- data/lib/avatax/client/utilities.rb +6 -15
- data/lib/avatax/configuration.rb +1 -1
- data/lib/avatax/connection.rb +2 -2
- data/lib/avatax/request.rb +0 -2
- data/lib/avatax/version.rb +1 -1
- data/spec/avatax/request_spec.rb +25 -0
- metadata +4 -16
@@ -32,14 +32,11 @@ module AvaTax
|
|
32
32
|
# ### Security Policies
|
33
33
|
#
|
34
34
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
35
|
-
# * This API depends on the following active services
|
35
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
36
36
|
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
37
37
|
# @return [Object]
|
38
|
-
def build_tax_content_file(model)
|
39
|
-
path
|
40
|
-
post(path, model)
|
41
|
-
end
|
42
|
-
|
38
|
+
def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
|
39
|
+
post(path, model) end
|
43
40
|
|
44
41
|
# Build a tax content file for a single location
|
45
42
|
#
|
@@ -70,7 +67,7 @@ module AvaTax
|
|
70
67
|
# ### Security Policies
|
71
68
|
#
|
72
69
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
73
|
-
# * This API depends on the following active services
|
70
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro.
|
74
71
|
# @param companyId [Integer] The ID number of the company that owns this location.
|
75
72
|
# @param id [Integer] The ID number of the location to retrieve point-of-sale data.
|
76
73
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
@@ -78,11 +75,8 @@ module AvaTax
|
|
78
75
|
# @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
|
79
76
|
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
80
77
|
# @return [Object]
|
81
|
-
def build_tax_content_file_for_location(companyId, id, options={})
|
82
|
-
path
|
83
|
-
get(path, options)
|
84
|
-
end
|
85
|
-
|
78
|
+
def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
79
|
+
get(path, options) end
|
86
80
|
|
87
81
|
# Download a file listing tax rates by postal code
|
88
82
|
#
|
@@ -133,11 +127,71 @@ module AvaTax
|
|
133
127
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
|
134
128
|
# @param region [String] A two character region code which limits results to a specific region.
|
135
129
|
# @return [Object]
|
136
|
-
def download_tax_rates_by_zip_code(date, options={})
|
137
|
-
path
|
138
|
-
|
139
|
-
|
130
|
+
def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
131
|
+
get(path, options) end
|
132
|
+
|
133
|
+
# Sales tax rates for a specified address
|
134
|
+
#
|
135
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
136
|
+
# response code 429 - `Too Many Requests`.
|
137
|
+
#
|
138
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
139
|
+
# location in the United States only.
|
140
|
+
#
|
141
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
142
|
+
# which supports features including, but not limited to:
|
143
|
+
#
|
144
|
+
# * Nexus declarations
|
145
|
+
# * Taxability based on product/service type
|
146
|
+
# * Sourcing rules affecting origin/destination states
|
147
|
+
# * Customers who are exempt from certain taxes
|
148
|
+
# * States that have dollar value thresholds for tax amounts
|
149
|
+
# * Refunds for products purchased on a different date
|
150
|
+
# * Detailed jurisdiction names and state assigned codes
|
151
|
+
# * And more!
|
152
|
+
#
|
153
|
+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
154
|
+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
155
|
+
# @param line1 [String] The street address of the location.
|
156
|
+
# @param line2 [String] The street address of the location.
|
157
|
+
# @param line3 [String] The street address of the location.
|
158
|
+
# @param city [String] The city name of the location.
|
159
|
+
# @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
|
160
|
+
# @param postalCode [String] The postal code of the location.
|
161
|
+
# @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`.
|
162
|
+
# @return [Object]
|
163
|
+
def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
|
164
|
+
get(path, options) end
|
140
165
|
|
166
|
+
# Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
167
|
+
#
|
168
|
+
# This API is only available for a US postal codes.
|
169
|
+
#
|
170
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
171
|
+
# response code 429 - `Too Many Requests`.
|
172
|
+
#
|
173
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
174
|
+
# location in the United States only.
|
175
|
+
#
|
176
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
177
|
+
# which supports features including, but not limited to:
|
178
|
+
#
|
179
|
+
# * Nexus declarations
|
180
|
+
# * Taxability based on product/service type
|
181
|
+
# * Sourcing rules affecting origin/destination states
|
182
|
+
# * Customers who are exempt from certain taxes
|
183
|
+
# * States that have dollar value thresholds for tax amounts
|
184
|
+
# * Refunds for products purchased on a different date
|
185
|
+
# * Detailed jurisdiction names and state assigned codes
|
186
|
+
# * And more!
|
187
|
+
#
|
188
|
+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
189
|
+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
190
|
+
# @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`.
|
191
|
+
# @param postalCode [String] The postal code of the location.
|
192
|
+
# @return [Object]
|
193
|
+
def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
|
194
|
+
get(path, options) end
|
141
195
|
end
|
142
196
|
end
|
143
197
|
end
|
@@ -12,28 +12,32 @@ module AvaTax
|
|
12
12
|
#
|
13
13
|
# This API can be used to export a complete zip file containing your company's current tax profile, and you can then restore this
|
14
14
|
# profile to a different company or compare it over time to see if your profile has been changed.
|
15
|
+
#
|
16
|
+
# ### Security Policies
|
17
|
+
#
|
18
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
19
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
15
20
|
# @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
|
16
21
|
# @return [Object]
|
17
|
-
def export_tax_profile(companyId)
|
18
|
-
path
|
19
|
-
get(path)
|
20
|
-
end
|
21
|
-
|
22
|
+
def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
|
23
|
+
get(path) end
|
22
24
|
|
23
25
|
# Import a tax profile.
|
24
26
|
#
|
25
27
|
# Imports a tax profile to a new company, along with the option to import account settings.
|
28
|
+
#
|
29
|
+
# ### Security Policies
|
30
|
+
#
|
31
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
32
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
26
33
|
# @param accountId [Integer] The account id of the account to which the tax profile will be imported.
|
27
34
|
# @param newCompanyCode [String] The companyCode to use for the imported company.
|
28
35
|
# @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
|
29
36
|
# @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
|
30
37
|
# @param taxProfile [Object] The taxProfile
|
31
38
|
# @return [Object]
|
32
|
-
def import_tax_profile()
|
33
|
-
path
|
34
|
-
post(path)
|
35
|
-
end
|
36
|
-
|
39
|
+
def import_tax_profile() path = "/api/v2/taxprofile"
|
40
|
+
post(path) end
|
37
41
|
end
|
38
42
|
end
|
39
43
|
end
|
@@ -25,11 +25,8 @@ module AvaTax
|
|
25
25
|
# @param companyId [Integer] The ID of the company that owns this tax rule.
|
26
26
|
# @param model [TaxRuleModel[]] The tax rule you wish to create.
|
27
27
|
# @return [TaxRuleModel[]]
|
28
|
-
def create_tax_rules(companyId, model)
|
29
|
-
path
|
30
|
-
post(path, model)
|
31
|
-
end
|
32
|
-
|
28
|
+
def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
|
29
|
+
post(path, model) end
|
33
30
|
|
34
31
|
# Delete a single tax rule
|
35
32
|
#
|
@@ -53,11 +50,8 @@ module AvaTax
|
|
53
50
|
# @param companyId [Integer] The ID of the company that owns this tax rule.
|
54
51
|
# @param id [Integer] The ID of the tax rule you wish to delete.
|
55
52
|
# @return [ErrorDetail[]]
|
56
|
-
def delete_tax_rule(companyId, id)
|
57
|
-
path
|
58
|
-
delete(path)
|
59
|
-
end
|
60
|
-
|
53
|
+
def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
54
|
+
delete(path) end
|
61
55
|
|
62
56
|
# Retrieve a single tax rule
|
63
57
|
#
|
@@ -81,11 +75,8 @@ module AvaTax
|
|
81
75
|
# @param companyId [Integer] The ID of the company that owns this tax rule
|
82
76
|
# @param id [Integer] The primary key of this tax rule
|
83
77
|
# @return [Object]
|
84
|
-
def get_tax_rule(companyId, id)
|
85
|
-
path
|
86
|
-
get(path)
|
87
|
-
end
|
88
|
-
|
78
|
+
def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
79
|
+
get(path) end
|
89
80
|
|
90
81
|
# Retrieve tax rules for this company
|
91
82
|
#
|
@@ -116,11 +107,8 @@ module AvaTax
|
|
116
107
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
117
108
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
118
109
|
# @return [FetchResult]
|
119
|
-
def list_tax_rules(companyId, options={})
|
120
|
-
path
|
121
|
-
get(path, options)
|
122
|
-
end
|
123
|
-
|
110
|
+
def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
|
111
|
+
get(path, options) end
|
124
112
|
|
125
113
|
# Retrieve all tax rules
|
126
114
|
#
|
@@ -150,11 +138,8 @@ module AvaTax
|
|
150
138
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
151
139
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
152
140
|
# @return [FetchResult]
|
153
|
-
def query_tax_rules(options={})
|
154
|
-
path
|
155
|
-
get(path, options)
|
156
|
-
end
|
157
|
-
|
141
|
+
def query_tax_rules(options={}) path = "/api/v2/taxrules"
|
142
|
+
get(path, options) end
|
158
143
|
|
159
144
|
# Update a single tax rule
|
160
145
|
#
|
@@ -179,11 +164,8 @@ module AvaTax
|
|
179
164
|
# @param id [Integer] The ID of the tax rule you wish to update
|
180
165
|
# @param model [Object] The tax rule you wish to update.
|
181
166
|
# @return [Object]
|
182
|
-
def update_tax_rule(companyId, id, model)
|
183
|
-
path
|
184
|
-
put(path, model)
|
185
|
-
end
|
186
|
-
|
167
|
+
def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
|
168
|
+
put(path, model) end
|
187
169
|
end
|
188
170
|
end
|
189
171
|
end
|
@@ -29,15 +29,12 @@ module AvaTax
|
|
29
29
|
# ### Security Policies
|
30
30
|
#
|
31
31
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
32
|
-
# * This API depends on the following active services
|
32
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
33
33
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
34
34
|
# @param model [Object] information about the transaction and lines to be added
|
35
35
|
# @return [Object]
|
36
|
-
def add_lines(model, options={})
|
37
|
-
path
|
38
|
-
post(path, model, options)
|
39
|
-
end
|
40
|
-
|
36
|
+
def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
|
37
|
+
post(path, model, options) end
|
41
38
|
|
42
39
|
# Correct a previously created transaction
|
43
40
|
#
|
@@ -67,23 +64,22 @@ module AvaTax
|
|
67
64
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
68
65
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
69
66
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
67
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
68
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
70
69
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
71
70
|
#
|
72
71
|
# ### Security Policies
|
73
72
|
#
|
74
73
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
75
|
-
# * This API depends on the following active services
|
74
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
76
75
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
77
76
|
# @param transactionCode [String] The transaction code to adjust
|
78
77
|
# @param documentType [String] (Optional): The document type of the transaction to adjust. (See DocumentType::* for a list of allowable values)
|
79
78
|
# @param include [String] Specifies objects to include in this fetch call
|
80
79
|
# @param model [Object] The adjustment you wish to make
|
81
80
|
# @return [Object]
|
82
|
-
def adjust_transaction(companyCode, transactionCode, model, options={})
|
83
|
-
path
|
84
|
-
post(path, model, options)
|
85
|
-
end
|
86
|
-
|
81
|
+
def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
|
82
|
+
post(path, model, options) end
|
87
83
|
|
88
84
|
# Get audit information about a transaction
|
89
85
|
#
|
@@ -107,20 +103,19 @@ module AvaTax
|
|
107
103
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
108
104
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
109
105
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
106
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
107
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
110
108
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
111
109
|
#
|
112
110
|
# ### Security Policies
|
113
111
|
#
|
114
112
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
115
|
-
# * This API depends on the following active services
|
113
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
116
114
|
# @param companyCode [String] The code identifying the company that owns this transaction
|
117
115
|
# @param transactionCode [String] The code identifying the transaction
|
118
116
|
# @return [Object]
|
119
|
-
def audit_transaction(companyCode, transactionCode)
|
120
|
-
path
|
121
|
-
get(path)
|
122
|
-
end
|
123
|
-
|
117
|
+
def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
|
118
|
+
get(path) end
|
124
119
|
|
125
120
|
# Get audit information about a transaction
|
126
121
|
#
|
@@ -144,21 +139,20 @@ module AvaTax
|
|
144
139
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
145
140
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
146
141
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
142
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
143
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
147
144
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
148
145
|
#
|
149
146
|
# ### Security Policies
|
150
147
|
#
|
151
148
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
152
|
-
# * This API depends on the following active services
|
149
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
153
150
|
# @param companyCode [String] The code identifying the company that owns this transaction
|
154
151
|
# @param transactionCode [String] The code identifying the transaction
|
155
152
|
# @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
|
156
153
|
# @return [Object]
|
157
|
-
def audit_transaction_with_type(companyCode, transactionCode, documentType)
|
158
|
-
path
|
159
|
-
get(path)
|
160
|
-
end
|
161
|
-
|
154
|
+
def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
|
155
|
+
get(path) end
|
162
156
|
|
163
157
|
# Lock a set of documents
|
164
158
|
#
|
@@ -173,14 +167,11 @@ module AvaTax
|
|
173
167
|
# ### Security Policies
|
174
168
|
#
|
175
169
|
# * This API requires the user role Compliance Root User.
|
176
|
-
# * This API depends on the following active services
|
170
|
+
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
177
171
|
# @param model [Object] bulk lock request
|
178
172
|
# @return [Object]
|
179
|
-
def bulk_lock_transaction(model)
|
180
|
-
path
|
181
|
-
post(path, model)
|
182
|
-
end
|
183
|
-
|
173
|
+
def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
|
174
|
+
post(path, model) end
|
184
175
|
|
185
176
|
# Change a transaction's code
|
186
177
|
#
|
@@ -210,23 +201,22 @@ module AvaTax
|
|
210
201
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
211
202
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
212
203
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
204
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
205
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
213
206
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
214
207
|
#
|
215
208
|
# ### Security Policies
|
216
209
|
#
|
217
210
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
218
|
-
# * This API depends on the following active services
|
211
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
219
212
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
220
213
|
# @param transactionCode [String] The transaction code to change
|
221
214
|
# @param documentType [String] (Optional): The document type of the transaction to change document code. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
222
215
|
# @param include [String] Specifies objects to include in this fetch call
|
223
216
|
# @param model [Object] The code change request you wish to execute
|
224
217
|
# @return [Object]
|
225
|
-
def change_transaction_code(companyCode, transactionCode, model, options={})
|
226
|
-
path
|
227
|
-
post(path, model, options)
|
228
|
-
end
|
229
|
-
|
218
|
+
def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
|
219
|
+
post(path, model, options) end
|
230
220
|
|
231
221
|
# Commit a transaction for reporting
|
232
222
|
#
|
@@ -255,6 +245,8 @@ module AvaTax
|
|
255
245
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
256
246
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
257
247
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
248
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
249
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
258
250
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
259
251
|
#
|
260
252
|
# ### Security Policies
|
@@ -266,11 +258,8 @@ module AvaTax
|
|
266
258
|
# @param include [String] Specifies objects to include in this fetch call
|
267
259
|
# @param model [Object] The commit request you wish to execute
|
268
260
|
# @return [Object]
|
269
|
-
def commit_transaction(companyCode, transactionCode, model, options={})
|
270
|
-
path
|
271
|
-
post(path, model, options)
|
272
|
-
end
|
273
|
-
|
261
|
+
def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
|
262
|
+
post(path, model, options) end
|
274
263
|
|
275
264
|
# Create or adjust a transaction
|
276
265
|
#
|
@@ -311,15 +300,12 @@ module AvaTax
|
|
311
300
|
# ### Security Policies
|
312
301
|
#
|
313
302
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
314
|
-
# * This API depends on the following active services
|
303
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
315
304
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
316
305
|
# @param model [Object] The transaction you wish to create or adjust
|
317
306
|
# @return [Object]
|
318
|
-
def create_or_adjust_transaction(model, options={})
|
319
|
-
path
|
320
|
-
post(path, model, options)
|
321
|
-
end
|
322
|
-
|
307
|
+
def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
|
308
|
+
post(path, model, options) end
|
323
309
|
|
324
310
|
# Create a new transaction
|
325
311
|
#
|
@@ -367,15 +353,12 @@ module AvaTax
|
|
367
353
|
# ### Security Policies
|
368
354
|
#
|
369
355
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
370
|
-
# * This API depends on the following active services
|
356
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
371
357
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
372
358
|
# @param model [Object] The transaction you wish to create
|
373
359
|
# @return [Object]
|
374
|
-
def create_transaction(model, options={})
|
375
|
-
path
|
376
|
-
post(path, model, options)
|
377
|
-
end
|
378
|
-
|
360
|
+
def create_transaction(model, options={}) path = "/api/v2/transactions/create"
|
361
|
+
post(path, model, options) end
|
379
362
|
|
380
363
|
# Remove lines from an existing unlocked transaction
|
381
364
|
#
|
@@ -400,15 +383,12 @@ module AvaTax
|
|
400
383
|
# ### Security Policies
|
401
384
|
#
|
402
385
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
403
|
-
# * This API depends on the following active services
|
386
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
404
387
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
405
388
|
# @param model [Object] information about the transaction and lines to be removed
|
406
389
|
# @return [Object]
|
407
|
-
def delete_lines(model, options={})
|
408
|
-
path
|
409
|
-
post(path, model, options)
|
410
|
-
end
|
411
|
-
|
390
|
+
def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
|
391
|
+
post(path, model, options) end
|
412
392
|
|
413
393
|
# Retrieve a single transaction by code
|
414
394
|
#
|
@@ -435,22 +415,21 @@ module AvaTax
|
|
435
415
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
436
416
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
437
417
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
418
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
419
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
438
420
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
439
421
|
#
|
440
422
|
# ### Security Policies
|
441
423
|
#
|
442
424
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
443
|
-
# * This API depends on the following active services
|
425
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
444
426
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
445
427
|
# @param transactionCode [String] The transaction code to retrieve
|
446
428
|
# @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
|
447
429
|
# @param include [String] Specifies objects to include in this fetch call
|
448
430
|
# @return [Object]
|
449
|
-
def get_transaction_by_code(companyCode, transactionCode, options={})
|
450
|
-
path
|
451
|
-
get(path, options)
|
452
|
-
end
|
453
|
-
|
431
|
+
def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
|
432
|
+
get(path, options) end
|
454
433
|
|
455
434
|
# Retrieve a single transaction by code
|
456
435
|
#
|
@@ -460,22 +439,21 @@ module AvaTax
|
|
460
439
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
461
440
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
462
441
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
442
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
443
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
463
444
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
464
445
|
#
|
465
446
|
# ### Security Policies
|
466
447
|
#
|
467
448
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
468
|
-
# * This API depends on the following active services
|
449
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
469
450
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
470
451
|
# @param transactionCode [String] The transaction code to retrieve
|
471
452
|
# @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
|
472
453
|
# @param include [String] Specifies objects to include in this fetch call
|
473
454
|
# @return [Object]
|
474
|
-
def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={})
|
475
|
-
path
|
476
|
-
get(path, options)
|
477
|
-
end
|
478
|
-
|
455
|
+
def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
|
456
|
+
get(path, options) end
|
479
457
|
|
480
458
|
# Retrieve a single transaction by ID
|
481
459
|
#
|
@@ -500,15 +478,12 @@ module AvaTax
|
|
500
478
|
# ### Security Policies
|
501
479
|
#
|
502
480
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
503
|
-
# * This API depends on the following active services
|
481
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
504
482
|
# @param id [Integer] The unique ID number of the transaction to retrieve
|
505
483
|
# @param include [String] Specifies objects to include in this fetch call
|
506
484
|
# @return [Object]
|
507
|
-
def get_transaction_by_id(id, options={})
|
508
|
-
path
|
509
|
-
get(path, options)
|
510
|
-
end
|
511
|
-
|
485
|
+
def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
|
486
|
+
get(path, options) end
|
512
487
|
|
513
488
|
# Retrieve all transactions
|
514
489
|
#
|
@@ -538,31 +513,30 @@ module AvaTax
|
|
538
513
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
539
514
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
540
515
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
516
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
517
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
541
518
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
542
519
|
#
|
543
520
|
# ### Security Policies
|
544
521
|
#
|
545
522
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
546
|
-
# * This API depends on the following active services
|
523
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
547
524
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
548
525
|
# @param dataSourceId [Integer] Optionally filter transactions to those from a specific data source.
|
549
526
|
# @param include [String] Specifies objects to include in this fetch call
|
550
|
-
# @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:* totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, messages, invoiceMessages, isFakeTransaction
|
527
|
+
# @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:* exchangeRateCurrencyCode, totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, messages, invoiceMessages, isFakeTransaction
|
551
528
|
# @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.
|
552
529
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
553
530
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
554
531
|
# @return [FetchResult]
|
555
|
-
def list_transactions_by_company(companyCode, options={})
|
556
|
-
path
|
557
|
-
get(path, options)
|
558
|
-
end
|
559
|
-
|
532
|
+
def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
|
533
|
+
get(path, options) end
|
560
534
|
|
561
535
|
# Lock a single transaction
|
562
536
|
#
|
563
537
|
# Lock a transaction uniquely identified by this URL.
|
564
538
|
#
|
565
|
-
# This API is mainly used for connector
|
539
|
+
# This API is mainly used for connector developers to simulate what happens when the Returns product locks a document.
|
566
540
|
# After this API call succeeds, the document will be locked and can't be voided or adjusted.
|
567
541
|
#
|
568
542
|
# This API is only available to customers in Sandbox with AvaTaxPro subscription. On production servers, this API is available by invitation only.
|
@@ -586,23 +560,22 @@ module AvaTax
|
|
586
560
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
587
561
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
588
562
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
563
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
564
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
589
565
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
590
566
|
#
|
591
567
|
# ### Security Policies
|
592
568
|
#
|
593
569
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
594
|
-
# * This API depends on the following active services
|
570
|
+
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
595
571
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
596
572
|
# @param transactionCode [String] The transaction code to lock
|
597
573
|
# @param documentType [String] (Optional): The document type of the transaction to lock. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
598
574
|
# @param include [String] Specifies objects to include in this fetch call
|
599
575
|
# @param model [Object] The lock request you wish to execute
|
600
576
|
# @return [Object]
|
601
|
-
def lock_transaction(companyCode, transactionCode, model, options={})
|
602
|
-
path
|
603
|
-
post(path, model, options)
|
604
|
-
end
|
605
|
-
|
577
|
+
def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
|
578
|
+
post(path, model, options) end
|
606
579
|
|
607
580
|
# Create a refund for a transaction
|
608
581
|
#
|
@@ -642,12 +615,14 @@ module AvaTax
|
|
642
615
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
643
616
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
644
617
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
618
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
619
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
645
620
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
646
621
|
#
|
647
622
|
# ### Security Policies
|
648
623
|
#
|
649
624
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
650
|
-
# * This API depends on the following active services
|
625
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
651
626
|
# @param companyCode [String] The code of the company that made the original sale
|
652
627
|
# @param transactionCode [String] The transaction code of the original sale
|
653
628
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
@@ -655,11 +630,8 @@ module AvaTax
|
|
655
630
|
# @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
|
656
631
|
# @param model [Object] Information about the refund to create
|
657
632
|
# @return [Object]
|
658
|
-
def refund_transaction(companyCode, transactionCode, model, options={})
|
659
|
-
path
|
660
|
-
post(path, model, options)
|
661
|
-
end
|
662
|
-
|
633
|
+
def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
|
634
|
+
post(path, model, options) end
|
663
635
|
|
664
636
|
# Perform multiple actions on a transaction
|
665
637
|
#
|
@@ -688,6 +660,8 @@ module AvaTax
|
|
688
660
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
689
661
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
690
662
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
663
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
664
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
691
665
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
692
666
|
#
|
693
667
|
# ### Security Policies
|
@@ -699,11 +673,8 @@ module AvaTax
|
|
699
673
|
# @param include [String] Specifies objects to include in this fetch call
|
700
674
|
# @param model [Object] The data from an external system to reconcile against AvaTax
|
701
675
|
# @return [Object]
|
702
|
-
def settle_transaction(companyCode, transactionCode, model, options={})
|
703
|
-
path
|
704
|
-
post(path, model, options)
|
705
|
-
end
|
706
|
-
|
676
|
+
def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
|
677
|
+
post(path, model, options) end
|
707
678
|
|
708
679
|
# Uncommit a transaction for reporting
|
709
680
|
#
|
@@ -726,22 +697,21 @@ module AvaTax
|
|
726
697
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
727
698
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
728
699
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
700
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
701
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
729
702
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
730
703
|
#
|
731
704
|
# ### Security Policies
|
732
705
|
#
|
733
706
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
734
|
-
# * This API depends on the following active services
|
707
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
735
708
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
736
709
|
# @param transactionCode [String] The transaction code to Uncommit
|
737
710
|
# @param documentType [String] (Optional): The document type of the transaction to Uncommit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
738
711
|
# @param include [String] Specifies objects to include in this fetch call
|
739
712
|
# @return [Object]
|
740
|
-
def uncommit_transaction(companyCode, transactionCode, options={})
|
741
|
-
path
|
742
|
-
post(path, options)
|
743
|
-
end
|
744
|
-
|
713
|
+
def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
|
714
|
+
post(path, options) end
|
745
715
|
|
746
716
|
# Unvoids a transaction
|
747
717
|
#
|
@@ -761,22 +731,21 @@ module AvaTax
|
|
761
731
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
762
732
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
763
733
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
734
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
735
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
764
736
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
765
737
|
#
|
766
738
|
# ### Security Policies
|
767
739
|
#
|
768
740
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
769
|
-
# * This API depends on the following active services
|
741
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
770
742
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
771
743
|
# @param transactionCode [String] The transaction code to commit
|
772
744
|
# @param documentType [String] (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
773
745
|
# @param include [String] Specifies objects to include in this fetch call
|
774
746
|
# @return [Object]
|
775
|
-
def unvoid_transaction(companyCode, transactionCode, options={})
|
776
|
-
path
|
777
|
-
post(path, options)
|
778
|
-
end
|
779
|
-
|
747
|
+
def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
|
748
|
+
post(path, options) end
|
780
749
|
|
781
750
|
# Verify a transaction
|
782
751
|
#
|
@@ -803,23 +772,22 @@ module AvaTax
|
|
803
772
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
804
773
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
805
774
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
775
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
776
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
806
777
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
807
778
|
#
|
808
779
|
# ### Security Policies
|
809
780
|
#
|
810
781
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
811
|
-
# * This API depends on the following active services
|
782
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
812
783
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
813
784
|
# @param transactionCode [String] The transaction code to settle
|
814
785
|
# @param documentType [String] (Optional): The document type of the transaction to verify. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
815
786
|
# @param include [String] Specifies objects to include in this fetch call
|
816
787
|
# @param model [Object] The data from an external system to reconcile against AvaTax
|
817
788
|
# @return [Object]
|
818
|
-
def verify_transaction(companyCode, transactionCode, model, options={})
|
819
|
-
path
|
820
|
-
post(path, model, options)
|
821
|
-
end
|
822
|
-
|
789
|
+
def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
|
790
|
+
post(path, model, options) end
|
823
791
|
|
824
792
|
# Void a transaction
|
825
793
|
#
|
@@ -848,23 +816,22 @@ module AvaTax
|
|
848
816
|
# * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
|
849
817
|
# * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
|
850
818
|
# * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
|
819
|
+
# * Replace '%' with '\_-ava25-\_' For example: document%Code becomes document_-ava25-_Code
|
820
|
+
# * Replace '#' with '\_-ava23-\_' For example: document#Code becomes document_-ava23-_Code
|
851
821
|
# * Replace ' ' with '%20' For example: document Code becomes document%20Code
|
852
822
|
#
|
853
823
|
# ### Security Policies
|
854
824
|
#
|
855
825
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
856
|
-
# * This API depends on the following active services
|
826
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
857
827
|
# @param companyCode [String] The company code of the company that recorded this transaction
|
858
828
|
# @param transactionCode [String] The transaction code to void
|
859
829
|
# @param documentType [String] (Optional): The document type of the transaction to void. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
860
830
|
# @param include [String] Specifies objects to include in this fetch call
|
861
831
|
# @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
|
862
832
|
# @return [Object]
|
863
|
-
def void_transaction(companyCode, transactionCode, model, options={})
|
864
|
-
path
|
865
|
-
post(path, model, options)
|
866
|
-
end
|
867
|
-
|
833
|
+
def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
|
834
|
+
post(path, model, options) end
|
868
835
|
end
|
869
836
|
end
|
870
837
|
end
|