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.
-
#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
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 45 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'] @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.
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 |
#custom_payment_pages_enabled ⇒ Object (readonly)
Returns the value of attribute custom_payment_pages_enabled.
31 32 33 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 31 def custom_payment_pages_enabled @custom_payment_pages_enabled end |
#fx_payout_currency ⇒ Object (readonly)
Returns the value of attribute fx_payout_currency.
32 33 34 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 32 def fx_payout_currency @fx_payout_currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
33 34 35 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 33 def id @id end |
#logo_url ⇒ Object (readonly)
Returns the value of attribute logo_url.
34 35 36 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 34 def logo_url @logo_url end |
#mandate_imports_enabled ⇒ Object (readonly)
Returns the value of attribute mandate_imports_enabled.
35 36 37 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 35 def mandate_imports_enabled @mandate_imports_enabled end |
#merchant_responsible_for_notifications ⇒ Object (readonly)
Returns the value of attribute merchant_responsible_for_notifications.
36 37 38 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 36 def merchant_responsible_for_notifications @merchant_responsible_for_notifications end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
37 38 39 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 37 def name @name end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
38 39 40 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 38 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
39 40 41 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 39 def region @region end |
#scheme_identifiers ⇒ Object (readonly)
Returns the value of attribute scheme_identifiers.
40 41 42 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 40 def scheme_identifiers @scheme_identifiers end |
#verification_status ⇒ Object (readonly)
Returns the value of attribute verification_status.
41 42 43 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 41 def verification_status @verification_status end |
Instance Method Details
#api_response ⇒ Object
70 71 72 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 70 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
75 76 77 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 75 def links @creditor_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the creditor resource as a hash of all its readable attributes
80 81 82 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 80 def to_h @object end |