Sha256: 8eafe2e685f6db875c0828283857d445ff6a2e9ae3110d5af95afc2edb09d729

Contents?: true

Size: 630 Bytes

Versions: 3

Compression:

Stored size: 630 Bytes

Contents

module Balanced
  # A Credit represents a transfer of funds from your Marketplace 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

3 entries across 3 versions & 1 rubygems

Version Path
balanced-0.3.2 lib/balanced/resources/credit.rb
balanced-0.3.1 lib/balanced/resources/credit.rb
balanced-0.3.0 lib/balanced/resources/credit.rb