Sha256: b9010cecc849abb439fc3eb61c7d40d5162a05557b9b15cf432eea79402441cf

Contents?: true

Size: 528 Bytes

Versions: 1

Compression:

Stored size: 528 Bytes

Contents

# -*- encoding : utf-8 -*-
module OpenPayU

  # Create Refund for an Order

  class Refund

    # Creates a RefundCreateRequest
    #
    # @param [Hash] data A Hash object containing full {Models::Refund} object
    # @return [Documents::Response] Response class object order
    #   with RefundCreateResponse
    def self.create(data)
      refund = Models::Refund.new(data)
      @response = Documents::Response.new(
        Connection.post("orders/#{refund.order_id}/refund",  refund.prepare_data)
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openpayu-0.1.2 lib/openpayu/refund.rb