class GoCardlessPro::Resources::Creditor
Each [payment](core-endpoints-payments) taken through the API is linked to a “creditor”, to whom the payment is then paid out. In most cases your organisation will have a single “creditor”, but the API also supports collecting payments on behalf of others.
Currently, for Anti Money Laundering reasons, any creditors you add must be directly related to your organisation.
Attributes
Public Class Methods
Source
# File lib/gocardless_pro/resources/creditor.rb, line 26 def initialize(object, response = nil) @object = object @address_line1 = object['address_line1'] @address_line2 = object['address_line2'] @address_line3 = object['address_line3'] @bank_reference_prefix = object['bank_reference_prefix'] @can_create_refunds = object['can_create_refunds'] @city = object['city'] @country_code = object['country_code'] @created_at = object['created_at'] @creditor_type = object['creditor_type'] @custom_payment_pages_enabled = object['custom_payment_pages_enabled'] @fx_payout_currency = object['fx_payout_currency'] @id = object['id'] @links = object['links'] @logo_url = object['logo_url'] @mandate_imports_enabled = object['mandate_imports_enabled'] @merchant_responsible_for_notifications = object['merchant_responsible_for_notifications'] @name = object['name'] @postal_code = object['postal_code'] @region = object['region'] @scheme_identifiers = object['scheme_identifiers'] @verification_status = object['verification_status'] @response = response end
Initialize a creditor resource instance @param object [Hash] an object returned from the API
Public Instance Methods
Source
# File lib/gocardless_pro/resources/creditor.rb, line 53 def api_response ApiResponse.new(@response) end
Source
# File lib/gocardless_pro/resources/creditor.rb, line 58 def links @creditor_links ||= Links.new(@links) end
Return the links that the resource has
Source
# File lib/gocardless_pro/resources/creditor.rb, line 63 def to_h @object end
Provides the creditor resource as a hash of all its readable attributes