class GoCardless::Resources::Creditor

Each [payment](developer.gocardless.com/pro/#api-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.

Please get in touch if you wish to use this endpoint. Currently, for Anti Money Laundering reasons, any creditors you add must be directly related to your organisation. Represents an instance of a creditor resource returned from the API

Attributes

address_line1[R]
address_line2[R]
address_line3[R]
city[R]
country_code[R]
created_at[R]
id[R]
name[R]
postal_code[R]
region[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/creditor.rb, line 46
def initialize(object)
  @object = object

  @address_line1 = object['address_line1']
  @address_line2 = object['address_line2']
  @address_line3 = object['address_line3']
  @city = object['city']
  @country_code = object['country_code']
  @created_at = object['created_at']
  @id = object['id']
  @links = object['links']
  @name = object['name']
  @postal_code = object['postal_code']
  @region = object['region']
end

Public Instance Methods

to_h() click to toggle source

Provides the resource as a hash of all it’s readable attributes

# File lib/gocardless-pro/resources/creditor.rb, line 78
def to_h
  @object
end