module Mobilepay::Client::RefundAmount

Merchants_RefundAmount

Public Instance Methods

refund_amount(args = {}) click to toggle source

Refunds an amount to the customer based on an order id

# File lib/mobilepay/client/refund_amount.rb, line 6
def refund_amount(args = {})
    check_args(order_id: args[:order_id])
    @body = args[:body]
    response = request(:put, "/merchants/#{merchant_id}/orders/#{args[:order_id]}")
    response.parsed_response
rescue Failure => ex
    return { error: ex.message }
end