Sha256: 601978c7123ecb591de575c5142faa98ee7d004cc39a7fadb95793687bdee88b

Contents?: true

Size: 647 Bytes

Versions: 2

Compression:

Stored size: 647 Bytes

Contents

module Balanced
  # A Credit represents a transfer of funds from your Marketplace's
  # escrow account to a Merchant's Account within your Marketplace.
  #
  # By default, a Credit is sent to the most recently added funding
  # destination associated with an Account. You may specify a specific
  # funding source.
  #
  class Credit
    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/credit.rb
balanced-0.3.3 lib/balanced/resources/credit.rb