Sha256: 6263a607351adc6ebe0c9211f482124eca4df0a6a7d922aefd653582e2789869

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

module Balanced
  # A Refund represents a reversal of funds from a Debit. A Debit can have
  # many Refunds associated with it up to the total amount of the original
  # Debit. Funds are returned to your Marketplace's Merchant Account
  # proportional to the amount of the Refund.
  #
  class Refund
    include Balanced::Resource

    def initialize attributes = {}
      Balanced::Utils.stringify_keys! attributes
      unless attributes.has_key? 'uri'
        attributes['uri'] = Balanced::Marketplace.my_marketplace.send(self.class.collection_name + '_uri')
      end
      super attributes
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
balanced-0.3.4 lib/balanced/resources/refund.rb
balanced-0.3.3 lib/balanced/resources/refund.rb