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.
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.
-
#bank_reference_prefix ⇒ Object
readonly
Returns the value of attribute bank_reference_prefix.
-
#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.
-
#creditor_type ⇒ Object
readonly
Returns the value of attribute creditor_type.
-
#custom_payment_pages_enabled ⇒ Object
readonly
Returns the value of attribute custom_payment_pages_enabled.
-
#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.
-
#mandate_imports_enabled ⇒ Object
readonly
Returns the value of attribute mandate_imports_enabled.
-
#merchant_responsible_for_notifications ⇒ Object
readonly
Returns the value of attribute merchant_responsible_for_notifications.
-
#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
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# 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 |
Instance Attribute Details
#address_line1 ⇒ Object (readonly)
Returns the value of attribute address_line1.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def address_line1 @address_line1 end |
#address_line2 ⇒ Object (readonly)
Returns the value of attribute address_line2.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def address_line2 @address_line2 end |
#address_line3 ⇒ Object (readonly)
Returns the value of attribute address_line3.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def address_line3 @address_line3 end |
#bank_reference_prefix ⇒ Object (readonly)
Returns the value of attribute bank_reference_prefix.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def bank_reference_prefix @bank_reference_prefix end |
#can_create_refunds ⇒ Object (readonly)
Returns the value of attribute can_create_refunds.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def can_create_refunds @can_create_refunds end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def city @city end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def country_code @country_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def created_at @created_at end |
#creditor_type ⇒ Object (readonly)
Returns the value of attribute creditor_type.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def creditor_type @creditor_type end |
#custom_payment_pages_enabled ⇒ Object (readonly)
Returns the value of attribute custom_payment_pages_enabled.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def custom_payment_pages_enabled @custom_payment_pages_enabled end |
#fx_payout_currency ⇒ Object (readonly)
Returns the value of attribute fx_payout_currency.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def fx_payout_currency @fx_payout_currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def id @id end |
#logo_url ⇒ Object (readonly)
Returns the value of attribute logo_url.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def logo_url @logo_url end |
#mandate_imports_enabled ⇒ Object (readonly)
Returns the value of attribute mandate_imports_enabled.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def mandate_imports_enabled @mandate_imports_enabled end |
#merchant_responsible_for_notifications ⇒ Object (readonly)
Returns the value of attribute merchant_responsible_for_notifications.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def merchant_responsible_for_notifications @merchant_responsible_for_notifications end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def name @name end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def region @region end |
#scheme_identifiers ⇒ Object (readonly)
Returns the value of attribute scheme_identifiers.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def scheme_identifiers @scheme_identifiers end |
#verification_status ⇒ Object (readonly)
Returns the value of attribute verification_status.
21 22 23 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 21 def verification_status @verification_status end |
Instance Method Details
#api_response ⇒ Object
53 54 55 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 53 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
58 59 60 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 58 def links @creditor_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the creditor resource as a hash of all its readable attributes
63 64 65 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 63 def to_h @object end |