Module: Mobilepay::Client::CaptureAmount
- Included in:
- Mobilepay::Client
- Defined in:
- lib/mobilepay/client/capture_amount.rb
Instance Method Summary collapse
-
#capture_amount(args = {}) ⇒ Object
Reservations_CaptureAmount Captures a previously reserved amount, either in full or partially.
Instance Method Details
#capture_amount(args = {}) ⇒ Object
Reservations_CaptureAmount Captures a previously reserved amount, either in full or partially
7 8 9 10 11 12 13 |
# File 'lib/mobilepay/client/capture_amount.rb', line 7 def capture_amount(args = {}) check_args(order_id: args[:order_id]) response = call(:put, "/reservations/merchants/#{merchant_id}/orders/#{args[:order_id]}", { body: args[:body] || '' }) JSON.parse(response.body) rescue Failure => ex return { error: ex. } end |