avatax-ruby 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcb3ffaacaeb247976527ec07b2f499cb91949c8
4
- data.tar.gz: 4ce1ff0d55b73959e697ad81a706f31b2d37bb61
3
+ metadata.gz: 9dcea2a811ce172ac5706cbd9bfe851cd378ba4a
4
+ data.tar.gz: b9aeb57a0b51910031f1b46e97e75fd8a857f68c
5
5
  SHA512:
6
- metadata.gz: d141f70ce1dd1eec21a6ef62307c9555b04157f951fbc682b96f3a1102630229bd8f1f06d399a4903c58c155d7ca525e825a23ef5e8d4096b11569bc72c551c1
7
- data.tar.gz: f103ec5ce463743f21adae2d515a1932b4b04d83e1d998b10f4ee1f8207a5abd04bd413f1b4bdc0fcd22d1217afdb26ea2353073b39baa44e8e5949e1bfb8d49
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)
@@ -1,3 +1,3 @@
1
1
  module Avatax
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-05-31 00:00:00.000000000 Z
11
+ date: 2017-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport