Class: GoCardlessPro::Resources::PayoutItem
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::PayoutItem
- Defined in:
- lib/gocardless_pro/resources/payout_item.rb
Overview
When we collect a payment on your behalf, we add the money you've collected to your GoCardless balance, minus any fees paid. Periodically (usually every working day), we take any positive balance in your GoCardless account, and pay it out to your nominated bank account.
Other actions in your GoCardless account can also affect your balance. For example, if a customer charges back a payment, we'll deduct the payment's amount from your balance, but add any fees you paid for that payment back to your balance.
The Payout Items API allows you to view, on a per-payout basis, the credit and debit items that make up that payout's amount. Payout items can only be retrieved for payouts created in the last 6 months. Requests for older payouts will return an HTTP status 410 Gone.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#taxes ⇒ Object
readonly
Returns the value of attribute taxes.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ PayoutItem
constructor
Initialize a payout_item resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the payout_item resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ PayoutItem
Initialize a payout_item resource instance
41 42 43 44 45 46 47 48 49 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 41 def initialize(object, response = nil) @object = object @amount = object['amount'] @links = object['links'] @taxes = object['taxes'] @type = object['type'] @response = response end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
35 36 37 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 35 def amount @amount end |
#taxes ⇒ Object (readonly)
Returns the value of attribute taxes.
36 37 38 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 36 def taxes @taxes end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
37 38 39 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 37 def type @type end |
Instance Method Details
#api_response ⇒ Object
51 52 53 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 51 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
56 57 58 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 56 def links @payout_item_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the payout_item resource as a hash of all its readable attributes
61 62 63 |
# File 'lib/gocardless_pro/resources/payout_item.rb', line 61 def to_h @object end |