Class: Balanced::Credit
- Inherits:
-
Object
- Object
- Balanced::Credit
- Includes:
- HypermediaRegistry, Resource
- Defined in:
- lib/balanced/resources/credit.rb
Overview
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.
Instance Attribute Summary
Attributes included from Resource
#attributes, #href, #hyperlinks, #id, #links
Instance Method Summary collapse
Methods included from HypermediaRegistry
Methods included from Resource
#copy_from, #does_resource_respond_to?, #fetch, #hydrate, included, #initialize, #method_missing, #reload, #respond_to?, #respond_to_missing?, #sanitize, #save, #unstore
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Balanced::Resource
Instance Method Details
#reverse(options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/balanced/resources/credit.rb', line 15 def reverse(={}) amount = [:amount] description = [:description] reversal = Reversal.new( :href => self.reversals.href, :amount => amount, :description => description ) reversal.save end |