Class: Balanced::Refund

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/balanced/resources/refund.rb

Overview

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.

Instance Attribute Summary

Attributes included from Resource

#attributes

Instance Method Summary collapse

Methods included from Resource

#copy_from, #destroy, #find, included, #method_missing, #reload, #save, #warn_on_positional

Constructor Details

#initialize(attributes = {}) ⇒ Refund

Returns a new instance of Refund.



10
11
12
13
14
15
16
# File 'lib/balanced/resources/refund.rb', line 10

def initialize attributes = {}
  Balanced::Utils.stringify_keys! attributes
  unless attributes.has_key? 'uri'
    attributes['uri'] = self.class.uri
  end
  super attributes
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Balanced::Resource