avatax-ruby 0.0.2 → 0.0.3
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/api/transactions.rb +27 -0
- data/lib/avatax/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dcea2a811ce172ac5706cbd9bfe851cd378ba4a
|
4
|
+
data.tar.gz: b9aeb57a0b51910031f1b46e97e75fd8a857f68c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f943dd84487e60a147f549193687ba32512543edbe290a484ba580599d2672c1817b61d82c663c18cb3640733134da5d7e19450d2dd1ee932d402b6fe2bf5514
|
7
|
+
data.tar.gz: 8fb4ee2f0c6459aa319680789881935eb0e4667c0c2c6719dd8b3ddf7de9f76477db4889ac276e8ef0508fe47605770894861640cd9e9e005cacc59a981e5551
|
@@ -133,6 +133,19 @@ module Avatax
|
|
133
133
|
post_for(:void, company_code, transaction_code, args)
|
134
134
|
end
|
135
135
|
|
136
|
+
##
|
137
|
+
# Refund a transaction
|
138
|
+
# @see https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/RefundTransaction/
|
139
|
+
#
|
140
|
+
# @param company_code [String] The company_code in avatax.
|
141
|
+
# @param transaction_code [String] The current avatax transaction code.
|
142
|
+
# @param args [Hash] Arguments for avatax.
|
143
|
+
# @return [Avatax::Response]
|
144
|
+
#
|
145
|
+
def refund(company_code, transaction_code, args = {})
|
146
|
+
post_for(:refund, company_code, transaction_code, args)
|
147
|
+
end
|
148
|
+
|
136
149
|
##
|
137
150
|
# Create a transaction
|
138
151
|
# @see https://developer.avalara.com/avatax/api-reference/tax/v2/Transactions/#ApiV2TransactionsCreatePost
|
@@ -157,6 +170,20 @@ module Avatax
|
|
157
170
|
handle_response(resp)
|
158
171
|
end
|
159
172
|
|
173
|
+
##
|
174
|
+
# Lock a transaction
|
175
|
+
# @see https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/LockTransaction
|
176
|
+
#
|
177
|
+
# @param company_code [String] The company_code in avatax.
|
178
|
+
# @param transaction_code [String] The avatax transaction code.
|
179
|
+
# @param args [Hash] Arguments for avatax.
|
180
|
+
# @return [Avatax::Response]
|
181
|
+
#
|
182
|
+
def lock(company_code, transaction_code, args = {})
|
183
|
+
args.reverse_merge!(isLocked: true)
|
184
|
+
post_for(:lock, company_code, transaction_code, args)
|
185
|
+
end
|
186
|
+
|
160
187
|
private
|
161
188
|
|
162
189
|
def post_for(endpoint, company_code, transaction_code, args)
|
data/lib/avatax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatax-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Scott
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|