class GoCardless::Resources::Payout
Payouts represent transfers from GoCardless
to a [creditor](developer.gocardless.com/pro/#api-endpoints-creditors). Each payout contains the funds collected from one or many [payments](developer.gocardless.com/pro/#api-endpoints-payments). Payouts are created automatically after a payment has been successfully collected. Represents an instance of a payout resource returned from the API
Attributes
amount[R]
created_at[R]
currency[R]
id[R]
reference[R]
status[R]
Public Class Methods
new(object)
click to toggle source
initialize a resource instance @param object [Hash] an object returned from the API
# File lib/gocardless-pro/resources/payout.rb, line 35 def initialize(object) @object = object @amount = object['amount'] @created_at = object['created_at'] @currency = object['currency'] @id = object['id'] @links = object['links'] @reference = object['reference'] @status = object['status'] end
Public Instance Methods
links()
click to toggle source
return the links that the resource has
# File lib/gocardless-pro/resources/payout.rb, line 48 def links Struct.new( *{ creditor: '', creditor_bank_account: '' }.keys.sort ).new(*@links.sort.map(&:last)) end
to_h()
click to toggle source
Provides the resource as a hash of all it’s readable attributes
# File lib/gocardless-pro/resources/payout.rb, line 61 def to_h @object end