Class: GoCardlessPro::Resources::Creditor
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::Creditor
- Defined in:
- lib/gocardless_pro/resources/creditor.rb
Overview
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.
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.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#address_line1 ⇒ Object
readonly
Returns the value of attribute address_line1.
-
#address_line2 ⇒ Object
readonly
Returns the value of attribute address_line2.
-
#address_line3 ⇒ Object
readonly
Returns the value of attribute address_line3.
-
#can_create_refunds ⇒ Object
readonly
Returns the value of attribute can_create_refunds.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#fx_payout_currency ⇒ Object
readonly
Returns the value of attribute fx_payout_currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#logo_url ⇒ Object
readonly
Returns the value of attribute logo_url.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#scheme_identifiers ⇒ Object
readonly
Returns the value of attribute scheme_identifiers.
-
#verification_status ⇒ Object
readonly
Returns the value of attribute verification_status.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ Creditor
constructor
Initialize a creditor resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the creditor resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ Creditor
Initialize a creditor resource instance
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 42 def initialize(object, response = nil) @object = object @address_line1 = object['address_line1'] @address_line2 = object['address_line2'] @address_line3 = object['address_line3'] @can_create_refunds = object['can_create_refunds'] @city = object['city'] @country_code = object['country_code'] @created_at = object['created_at'] @fx_payout_currency = object['fx_payout_currency'] @id = object['id'] @links = object['links'] @logo_url = object['logo_url'] @name = object['name'] @postal_code = object['postal_code'] @region = object['region'] @scheme_identifiers = object['scheme_identifiers'] @verification_status = object['verification_status'] @response = response end |
Instance Attribute Details
#address_line1 ⇒ Object (readonly)
Returns the value of attribute address_line1.
24 25 26 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 24 def address_line1 @address_line1 end |
#address_line2 ⇒ Object (readonly)
Returns the value of attribute address_line2.
25 26 27 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 25 def address_line2 @address_line2 end |
#address_line3 ⇒ Object (readonly)
Returns the value of attribute address_line3.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 26 def address_line3 @address_line3 end |
#can_create_refunds ⇒ Object (readonly)
Returns the value of attribute can_create_refunds.
27 28 29 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 27 def can_create_refunds @can_create_refunds end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
28 29 30 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 28 def city @city end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
29 30 31 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 29 def country_code @country_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
30 31 32 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 30 def created_at @created_at end |
#fx_payout_currency ⇒ Object (readonly)
Returns the value of attribute fx_payout_currency.
31 32 33 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 31 def fx_payout_currency @fx_payout_currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
32 33 34 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 32 def id @id end |
#logo_url ⇒ Object (readonly)
Returns the value of attribute logo_url.
33 34 35 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 33 def logo_url @logo_url end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
34 35 36 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 34 def name @name end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
35 36 37 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 35 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
36 37 38 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 36 def region @region end |
#scheme_identifiers ⇒ Object (readonly)
Returns the value of attribute scheme_identifiers.
37 38 39 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 37 def scheme_identifiers @scheme_identifiers end |
#verification_status ⇒ Object (readonly)
Returns the value of attribute verification_status.
38 39 40 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 38 def verification_status @verification_status end |
Instance Method Details
#api_response ⇒ Object
64 65 66 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 64 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
69 70 71 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 69 def links @creditor_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the creditor resource as a hash of all its readable attributes
74 75 76 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 74 def to_h @object end |