avatax 18.3.0 → 18.4.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.
- checksums.yaml +4 -4
- data/lib/avatax/client/advancedrules.rb +135 -0
- data/lib/avatax/client/customers.rb +3 -0
- data/lib/avatax/client/definitions.rb +3 -4
- data/lib/avatax/client/free.rb +1 -1
- data/lib/avatax/client/nexus.rb +29 -2
- data/lib/avatax/client/reports.rb +1 -1
- data/lib/avatax/client/settings.rb +58 -32
- data/lib/avatax/client/taxcontent.rb +4 -3
- data/lib/avatax/client/transactions.rb +17 -1
- data/lib/avatax/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: add871ab3afdc0119f99b02c044b02bd8225ecf932a5b6d03a05dca34b634c42
|
4
|
+
data.tar.gz: 81010bad716cfc21394149b55922060a35a17d1246e330c489a66bac65678c96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d017ab32652887888d279f02ff25b4dff502c0c37d5d94baf43c9cd48d0a8b9473a6e094e44d418bed5202bb348cc7a214c7d39724576bee5d8849b1f7e83ee
|
7
|
+
data.tar.gz: 5c56513540926d23b348b4f3c3e7a861c0f23a3403f21523ff5e76d1f93bebd5f1f92d197d60801a9db1549783540ca246ab6089553bd034a0150282f798aab6
|
@@ -0,0 +1,135 @@
|
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module AdvancedRules
|
4
|
+
|
5
|
+
|
6
|
+
# Approve an advanced rule script to run.
|
7
|
+
#
|
8
|
+
# This API is available by invite only and implementation support is required.
|
9
|
+
# Please contact your Customer Account Manager if you are interested in using
|
10
|
+
# Advanced Rules in your AvaTax integration.
|
11
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
12
|
+
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
13
|
+
# @return [Object]
|
14
|
+
def approve_advanced_rule_script(accountId, scriptType)
|
15
|
+
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}/approve"
|
16
|
+
post(path)
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
# Create an advanced rule.
|
21
|
+
#
|
22
|
+
# This API is available by invite only and implementation support is required.
|
23
|
+
# Please contact your Customer Account Manager if you are interested in using
|
24
|
+
# Advanced Rules in your AvaTax integration.
|
25
|
+
# @param accountId [Integer] The ID of the account that will own the Advanced Rule.
|
26
|
+
# @param scriptType [String] The script transform type, Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
27
|
+
# @param crashBehavior [String] The behavior the script should take if it crashes: Fail or Proceed. (See AdvancedRuleCrashBehavior::* for a list of allowable values)
|
28
|
+
# @param file [Object] The JavaScript file containing the advanced rule.
|
29
|
+
# @return [String]
|
30
|
+
def create_advanced_rule_script(accountId, scriptType, options={})
|
31
|
+
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}"
|
32
|
+
post(path, options)
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
# Create a lookup table for an advanced rule
|
37
|
+
#
|
38
|
+
# This API is available by invite only and implementation support is required.
|
39
|
+
# Please contact your Customer Account Manager if you are interested in using
|
40
|
+
# Advanced Rules in your AvaTax integration.
|
41
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
42
|
+
# @param csvTableName [String] The name to assign the CSV lookup table.
|
43
|
+
# @param file [Object] A CSV file containing lookup data for an advanced rule.
|
44
|
+
# @return [String]
|
45
|
+
def create_advanced_rule_table(accountId, csvTableName)
|
46
|
+
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
47
|
+
post(path)
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
# Delete an account's active advanced rule
|
52
|
+
#
|
53
|
+
# This API is available by invite only and implementation support is required.
|
54
|
+
# Please contact your Customer Account Manager if you are interested in using
|
55
|
+
# Advanced Rules in your AvaTax integration.
|
56
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
57
|
+
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
58
|
+
# @return [ErrorDetail[]]
|
59
|
+
def delete_advanced_rule_script(accountId, scriptType)
|
60
|
+
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}"
|
61
|
+
delete(path)
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
# Delete a lookup table for an advanced rule.
|
66
|
+
#
|
67
|
+
# This API is available by invite only and implementation support is required.
|
68
|
+
# Please contact your Customer Account Manager if you are interested in using
|
69
|
+
# Advanced Rules in your AvaTax integration.
|
70
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
71
|
+
# @param csvTableName [String] The name of the CSV lookup table to delete.
|
72
|
+
# @return [ErrorDetail[]]
|
73
|
+
def delete_advanced_rule_table(accountId, csvTableName)
|
74
|
+
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
75
|
+
delete(path)
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
# Get an account's advanced rule script.
|
80
|
+
#
|
81
|
+
# This API is available by invite only and implementation support is required.
|
82
|
+
# Please contact your Customer Account Manager if you are interested in using
|
83
|
+
# Advanced Rules in your AvaTax integration.
|
84
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
85
|
+
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
86
|
+
# @return [Object]
|
87
|
+
def get_advanced_rule_script(accountId, scriptType)
|
88
|
+
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}"
|
89
|
+
get(path)
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
# Get an advanced rule lookup table for an account
|
94
|
+
#
|
95
|
+
# This API is available by invite only and implementation support is required.
|
96
|
+
# Please contact your Customer Account Manager if you are interested in using
|
97
|
+
# Advanced Rules in your AvaTax integration.
|
98
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
99
|
+
# @param csvTableName [String] The name of the CSV lookup table to get.
|
100
|
+
# @return [Object]
|
101
|
+
def get_advanced_rule_table(accountId, csvTableName)
|
102
|
+
path = "/api/v2/accounts/#{accountId}/advancedruletables/#{csvTableName}"
|
103
|
+
get(path)
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
# Get all advanced rule lookup tables for an account
|
108
|
+
#
|
109
|
+
# This API is available by invite only and implementation support is required.
|
110
|
+
# Please contact your Customer Account Manager if you are interested in using
|
111
|
+
# Advanced Rules in your AvaTax integration.
|
112
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
113
|
+
# @return [Object]
|
114
|
+
def get_advanced_rule_tables(accountId)
|
115
|
+
path = "/api/v2/accounts/#{accountId}/advancedruletables"
|
116
|
+
get(path)
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
# Unapprove an advanced rule script so that it cannot be run.
|
121
|
+
#
|
122
|
+
# This API is available by invite only and implementation support is required.
|
123
|
+
# Please contact your Customer Account Manager if you are interested in using
|
124
|
+
# Advanced Rules in your AvaTax integration.
|
125
|
+
# @param accountId [Integer] The ID of the account that owns the Advanced Rule.
|
126
|
+
# @param scriptType [String] The script transform type: Request or Response. (See AdvancedRuleScriptType::* for a list of allowable values)
|
127
|
+
# @return [Object]
|
128
|
+
def unapprove_advanced_rule_script(accountId, scriptType)
|
129
|
+
path = "/api/v2/accounts/#{accountId}/advancedrulescripts/#{scriptType}/unapprove"
|
130
|
+
post(path)
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
@@ -13,6 +13,9 @@ module AvaTax
|
|
13
13
|
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
14
14
|
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
15
15
|
#
|
16
|
+
# A nested object such as CustomFields could be specified and created along with the customer object. To fetch the
|
17
|
+
# nested object, please call 'GetCustomer' API with appropriate $include parameters.
|
18
|
+
#
|
16
19
|
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
17
20
|
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
18
21
|
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
@@ -79,7 +79,7 @@ module AvaTax
|
|
79
79
|
end
|
80
80
|
|
81
81
|
|
82
|
-
# List certificate
|
82
|
+
# List the certificate exempt reasons defined by a company
|
83
83
|
#
|
84
84
|
# List the certificate exempt reasons defined by a company.
|
85
85
|
#
|
@@ -119,10 +119,9 @@ module AvaTax
|
|
119
119
|
end
|
120
120
|
|
121
121
|
|
122
|
-
# Retrieve the full list of communications
|
122
|
+
# Retrieve the full list of communications service types
|
123
123
|
#
|
124
|
-
# Returns full list of
|
125
|
-
# are accepted in communication tax calculation requests.
|
124
|
+
# Returns full list of service types for a given transaction type ID.
|
126
125
|
# @param id [Integer] The transaction type ID to examine
|
127
126
|
# @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/) .
|
128
127
|
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
data/lib/avatax/client/free.rb
CHANGED
@@ -7,7 +7,7 @@ module AvaTax
|
|
7
7
|
#
|
8
8
|
# Call this API to obtain a free AvaTax sandbox account.
|
9
9
|
#
|
10
|
-
# This API is free to use. No authentication credentials are required to call this API.
|
10
|
+
# This API is free to use. No authentication credentials are required to call this API. You must read and accept Avalara's terms and conditions.
|
11
11
|
# The account will grant a full trial version of AvaTax (e.g. AvaTaxPro) for a limited period of time.
|
12
12
|
# After this introductory period, you may continue to use the free TaxRates API.
|
13
13
|
#
|
data/lib/avatax/client/nexus.rb
CHANGED
@@ -13,7 +13,7 @@ module AvaTax
|
|
13
13
|
# Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
|
14
14
|
# '/api/v2/definitions/nexus' endpoint.
|
15
15
|
# You may only define nexus matching the official list of declared nexus.
|
16
|
-
# Please allow 1 minute before
|
16
|
+
# Please allow 1 minute before using the created nexus in your transactions.
|
17
17
|
# @param companyId [Integer] The ID of the company that owns this nexus.
|
18
18
|
# @param model [NexusModel[]] The nexus you wish to create.
|
19
19
|
# @return [NexusModel[]]
|
@@ -23,6 +23,33 @@ module AvaTax
|
|
23
23
|
end
|
24
24
|
|
25
25
|
|
26
|
+
# Creates nexus for a list of addresses.
|
27
|
+
#
|
28
|
+
# This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
|
29
|
+
# API declares nexus for this company, for the list of addresses provided,
|
30
|
+
# for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
|
31
|
+
#
|
32
|
+
# The concept of 'Nexus' indicates a place where your company has sufficient physical presence and is obligated
|
33
|
+
# to collect and remit transaction-based taxes.
|
34
|
+
#
|
35
|
+
# When defining companies in AvaTax, you must declare nexus for your company in order to correctly calculate tax
|
36
|
+
# in all jurisdictions affected by your transactions.
|
37
|
+
#
|
38
|
+
# Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
|
39
|
+
# '/api/v2/definitions/nexus' endpoint.
|
40
|
+
#
|
41
|
+
# You may only define nexus matching the official list of declared nexus.
|
42
|
+
#
|
43
|
+
# Please allow 1 minute before using the created nexus in your transactions.
|
44
|
+
# @param companyId [Integer] The ID of the company that will own this nexus.
|
45
|
+
# @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
|
46
|
+
# @return [NexusByAddressModel[]]
|
47
|
+
def declare_nexus_by_address(companyId, model)
|
48
|
+
path = "/api/v2/companies/#{companyId}/nexus/byaddress"
|
49
|
+
post(path, model)
|
50
|
+
end
|
51
|
+
|
52
|
+
|
26
53
|
# Delete a single nexus
|
27
54
|
#
|
28
55
|
# Marks the existing nexus object at this URL as deleted.
|
@@ -131,7 +158,7 @@ module AvaTax
|
|
131
158
|
# You may only define nexus matching the official list of declared nexus.
|
132
159
|
# All data from the existing object will be replaced with data in the object you PUT.
|
133
160
|
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
134
|
-
# Please allow 1 minute
|
161
|
+
# Please allow 1 minute for your updated Nexus to take effect on your transactions.
|
135
162
|
# @param companyId [Integer] The ID of the company that this nexus belongs to.
|
136
163
|
# @param id [Integer] The ID of the nexus you wish to update
|
137
164
|
# @param model [Object] The nexus object you wish to update.
|
@@ -82,7 +82,7 @@ module AvaTax
|
|
82
82
|
# The `ExportDocumentLine` report produces information about invoice lines recorded within your account.
|
83
83
|
# @param companyId [Integer] The unique ID number of the company to report on.
|
84
84
|
# @param model [Object] Options that may be configured to customize the report.
|
85
|
-
# @return [
|
85
|
+
# @return [ReportModel[]]
|
86
86
|
def initiate_export_document_line_report(companyId, model)
|
87
87
|
path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
|
88
88
|
post(path, model)
|
@@ -6,12 +6,15 @@ module AvaTax
|
|
6
6
|
# Create a new setting
|
7
7
|
#
|
8
8
|
# Create one or more new setting objects attached to this company.
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
9
|
+
#
|
10
|
+
# The company settings system is a metadata system that you can use to store extra information
|
11
|
+
# about a company. Your integration or connector could use this data storage to keep track of
|
12
|
+
# preference information, reminders, or any other storage that would need to persist even if
|
13
|
+
# the customer uninstalls your application.
|
14
|
+
#
|
15
|
+
# A setting can refer to any type of data you need to remember about this company object.
|
16
|
+
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
17
|
+
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
15
18
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
16
19
|
# @param model [SettingModel[]] The setting you wish to create.
|
17
20
|
# @return [SettingModel[]]
|
@@ -24,6 +27,15 @@ module AvaTax
|
|
24
27
|
# Delete a single setting
|
25
28
|
#
|
26
29
|
# Mark the setting object at this URL as deleted.
|
30
|
+
#
|
31
|
+
# The company settings system is a metadata system that you can use to store extra information
|
32
|
+
# about a company. Your integration or connector could use this data storage to keep track of
|
33
|
+
# preference information, reminders, or any other storage that would need to persist even if
|
34
|
+
# the customer uninstalls your application.
|
35
|
+
#
|
36
|
+
# A setting can refer to any type of data you need to remember about this company object.
|
37
|
+
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
38
|
+
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
27
39
|
# @param companyId [Integer] The ID of the company that owns this setting.
|
28
40
|
# @param id [Integer] The ID of the setting you wish to delete.
|
29
41
|
# @return [ErrorDetail[]]
|
@@ -36,12 +48,15 @@ module AvaTax
|
|
36
48
|
# Retrieve a single setting
|
37
49
|
#
|
38
50
|
# Get a single setting object by its unique ID.
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
51
|
+
#
|
52
|
+
# The company settings system is a metadata system that you can use to store extra information
|
53
|
+
# about a company. Your integration or connector could use this data storage to keep track of
|
54
|
+
# preference information, reminders, or any other storage that would need to persist even if
|
55
|
+
# the customer uninstalls your application.
|
56
|
+
#
|
57
|
+
# A setting can refer to any type of data you need to remember about this company object.
|
58
|
+
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
59
|
+
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
45
60
|
# @param companyId [Integer] The ID of the company that owns this setting
|
46
61
|
# @param id [Integer] The primary key of this setting
|
47
62
|
# @return [Object]
|
@@ -54,12 +69,15 @@ module AvaTax
|
|
54
69
|
# Retrieve all settings for this company
|
55
70
|
#
|
56
71
|
# List all setting objects attached to this company.
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
72
|
+
#
|
73
|
+
# The company settings system is a metadata system that you can use to store extra information
|
74
|
+
# about a company. Your integration or connector could use this data storage to keep track of
|
75
|
+
# preference information, reminders, or any other storage that would need to persist even if
|
76
|
+
# the customer uninstalls your application.
|
77
|
+
#
|
78
|
+
# A setting can refer to any type of data you need to remember about this company object.
|
79
|
+
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
80
|
+
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
63
81
|
#
|
64
82
|
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
65
83
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
@@ -79,12 +97,15 @@ module AvaTax
|
|
79
97
|
# Retrieve all settings
|
80
98
|
#
|
81
99
|
# Get multiple setting objects across all companies.
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
100
|
+
#
|
101
|
+
# The company settings system is a metadata system that you can use to store extra information
|
102
|
+
# about a company. Your integration or connector could use this data storage to keep track of
|
103
|
+
# preference information, reminders, or any other storage that would need to persist even if
|
104
|
+
# the customer uninstalls your application.
|
105
|
+
#
|
106
|
+
# A setting can refer to any type of data you need to remember about this company object.
|
107
|
+
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
108
|
+
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
88
109
|
#
|
89
110
|
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
90
111
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
@@ -103,14 +124,19 @@ module AvaTax
|
|
103
124
|
# Update a single setting
|
104
125
|
#
|
105
126
|
# Replace the existing setting object at this URL with an updated object.
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
127
|
+
#
|
128
|
+
# The company settings system is a metadata system that you can use to store extra information
|
129
|
+
# about a company. Your integration or connector could use this data storage to keep track of
|
130
|
+
# preference information, reminders, or any other storage that would need to persist even if
|
131
|
+
# the customer uninstalls your application.
|
132
|
+
#
|
133
|
+
# A setting can refer to any type of data you need to remember about this company object.
|
134
|
+
# When creating this object, you may define your own `set`, `name`, and `value` parameters.
|
135
|
+
# To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
|
136
|
+
#
|
137
|
+
# All data from the existing object will be replaced with data in the object you `PUT`.
|
138
|
+
#
|
139
|
+
# To set a field's value to `null`, you may either set its value to `null` or omit that field from the object when calling update.
|
114
140
|
# @param companyId [Integer] The ID of the company that this setting belongs to.
|
115
141
|
# @param id [Integer] The ID of the setting you wish to update
|
116
142
|
# @param model [Object] The setting you wish to update.
|
@@ -46,7 +46,7 @@ module AvaTax
|
|
46
46
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
47
47
|
# @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
|
48
48
|
# @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
|
49
|
-
# @param includeJurisCodes [
|
49
|
+
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
50
50
|
# @return [Object]
|
51
51
|
def build_tax_content_file_for_location(companyId, id, options={})
|
52
52
|
path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
@@ -74,10 +74,11 @@ module AvaTax
|
|
74
74
|
#
|
75
75
|
# For more detailed tax content, please use the `BuildTaxContentFile` API which allows usage of exact items and exact locations.
|
76
76
|
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
|
77
|
+
# @param region [String] If the region is provided, this API is going to generate the tax rate per zipcode for only the region specified.
|
77
78
|
# @return [Object]
|
78
|
-
def download_tax_rates_by_zip_code(date)
|
79
|
+
def download_tax_rates_by_zip_code(date, options={})
|
79
80
|
path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
80
|
-
get(path)
|
81
|
+
get(path, options)
|
81
82
|
end
|
82
83
|
|
83
84
|
end
|
@@ -456,7 +456,7 @@ module AvaTax
|
|
456
456
|
# @param transactionCode [String] The transaction code of the original sale
|
457
457
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
458
458
|
# @param documentType [String] (Optional): The document type of the transaction to refund. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
|
459
|
-
# @param useTaxDateOverride [
|
459
|
+
# @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
|
460
460
|
# @param model [Object] Information about the refund to create
|
461
461
|
# @return [Object]
|
462
462
|
def refund_transaction(companyCode, transactionCode, model, options={})
|
@@ -488,6 +488,22 @@ module AvaTax
|
|
488
488
|
end
|
489
489
|
|
490
490
|
|
491
|
+
# Uncommit a transaction for reporting
|
492
|
+
#
|
493
|
+
# Adjusts a transaction by changing it to an uncommitted status.
|
494
|
+
#
|
495
|
+
# Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered `locked` and are
|
496
|
+
# no longer available to be uncommitted.
|
497
|
+
# @param companyCode [String] The company code of the company that recorded this transaction
|
498
|
+
# @param transactionCode [String] The transaction code to commit
|
499
|
+
# @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)
|
500
|
+
# @return [Object]
|
501
|
+
def uncommit_transaction(companyCode, transactionCode, options={})
|
502
|
+
path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
|
503
|
+
post(path, options)
|
504
|
+
end
|
505
|
+
|
506
|
+
|
491
507
|
# Verify a transaction
|
492
508
|
#
|
493
509
|
# Verifies that the transaction uniquely identified by this URL matches certain expected values.
|
data/lib/avatax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 18.
|
4
|
+
version: 18.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Vorwaller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- lib/avatax/client.rb
|
146
146
|
- lib/avatax/client/accounts.rb
|
147
147
|
- lib/avatax/client/addresses.rb
|
148
|
+
- lib/avatax/client/advancedrules.rb
|
148
149
|
- lib/avatax/client/avafileforms.rb
|
149
150
|
- lib/avatax/client/batches.rb
|
150
151
|
- lib/avatax/client/certexpressinvites.rb
|