Class: GoCardlessPro::Resources::Creditor
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::Creditor
- Defined in:
- lib/gocardless_pro/resources/creditor.rb
Overview
Each payment (https://developer.gocardless.com/api-reference/#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
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 46 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.
23 24 25 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 23 def address_line1 @address_line1 end |
#address_line2 ⇒ Object (readonly)
Returns the value of attribute address_line2.
24 25 26 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 24 def address_line2 @address_line2 end |
#address_line3 ⇒ Object (readonly)
Returns the value of attribute address_line3.
25 26 27 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 25 def address_line3 @address_line3 end |
#bank_reference_prefix ⇒ Object (readonly)
Returns the value of attribute bank_reference_prefix.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 26 def bank_reference_prefix @bank_reference_prefix 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 |
#creditor_type ⇒ Object (readonly)
Returns the value of attribute creditor_type.
31 32 33 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 31 def creditor_type @creditor_type end |
#custom_payment_pages_enabled ⇒ Object (readonly)
Returns the value of attribute custom_payment_pages_enabled.
32 33 34 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 32 def custom_payment_pages_enabled @custom_payment_pages_enabled end |
#fx_payout_currency ⇒ Object (readonly)
Returns the value of attribute fx_payout_currency.
33 34 35 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 33 def fx_payout_currency @fx_payout_currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
34 35 36 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 34 def id @id end |
#logo_url ⇒ Object (readonly)
Returns the value of attribute logo_url.
35 36 37 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 35 def logo_url @logo_url end |
#mandate_imports_enabled ⇒ Object (readonly)
Returns the value of attribute mandate_imports_enabled.
36 37 38 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 36 def mandate_imports_enabled @mandate_imports_enabled end |
#merchant_responsible_for_notifications ⇒ Object (readonly)
Returns the value of attribute merchant_responsible_for_notifications.
37 38 39 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 37 def merchant_responsible_for_notifications @merchant_responsible_for_notifications end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 38 def name @name end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
39 40 41 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 39 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
40 41 42 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 40 def region @region end |
#scheme_identifiers ⇒ Object (readonly)
Returns the value of attribute scheme_identifiers.
41 42 43 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 41 def scheme_identifiers @scheme_identifiers end |
#verification_status ⇒ Object (readonly)
Returns the value of attribute verification_status.
42 43 44 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 42 def verification_status @verification_status end |
Instance Method Details
#api_response ⇒ Object
73 74 75 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 73 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
78 79 80 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 78 def links @creditor_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the creditor resource as a hash of all its readable attributes
83 84 85 |
# File 'lib/gocardless_pro/resources/creditor.rb', line 83 def to_h @object end |