class GoCardlessPro::Resources::Payout
Payouts represent transfers from GoCardless to a [creditor](core-endpoints-creditors). Each payout contains the funds collected from one or many [payments](core-endpoints-payments). All the payments in a payout will have been collected in the same currency. Payouts are created automatically after a payment has been successfully collected.
Attributes
Public Class Methods
Source
# File lib/gocardless_pro/resources/payout.rb, line 25 def initialize(object, response = nil) @object = object @amount = object['amount'] @arrival_date = object['arrival_date'] @created_at = object['created_at'] @currency = object['currency'] @deducted_fees = object['deducted_fees'] @fx = object['fx'] @id = object['id'] @links = object['links'] @metadata = object['metadata'] @payout_type = object['payout_type'] @reference = object['reference'] @status = object['status'] @tax_currency = object['tax_currency'] @response = response end
Initialize a payout resource instance @param object [Hash] an object returned from the API
Public Instance Methods
Source
# File lib/gocardless_pro/resources/payout.rb, line 44 def api_response ApiResponse.new(@response) end
Source
# File lib/gocardless_pro/resources/payout.rb, line 49 def links @payout_links ||= Links.new(@links) end
Return the links that the resource has
Source
# File lib/gocardless_pro/resources/payout.rb, line 54 def to_h @object end
Provides the payout resource as a hash of all its readable attributes