Class: Starling::Resources::DirectDebitMandateResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::DirectDebitMandateResource
- Defined in:
- lib/starling/resources/direct_debit_mandate_resource.rb
Overview
A resource representing a Direct Debit mandate returned from the Direct Debit Mandates API
Instance Method Summary collapse
-
#created ⇒ Time
(also: #created_at)
The date when the mandate was created.
-
#originator_name ⇒ String
The name of the Direct Debit mandate’s originator.
-
#originator_uid ⇒ String
The Starling internal ID of the Direct Debit mandate’s originator.
-
#reference ⇒ String
The reference of the Direct Debit mandate.
-
#source ⇒ Symbol
The source of the mandate (e.g. ‘:electronic` or `paper).
-
#status ⇒ Symbol
The status of the mandate (e.g. ‘:live`).
-
#uid ⇒ String
The Starling internal ID of the Direct Debit mandate.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#created ⇒ Time Also known as: created_at
Returns the date when the mandate was created.
27 28 29 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 27 def created present_datetime(parsed_data['created']) end |
#originator_name ⇒ String
Returns the name of the Direct Debit mandate’s originator.
33 34 35 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 33 def originator_name parsed_data['originatorName'] end |
#originator_uid ⇒ String
Returns the Starling internal ID of the Direct Debit mandate’s originator.
38 39 40 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 38 def originator_uid parsed_data['originatorUid'] end |
#reference ⇒ String
Returns the reference of the Direct Debit mandate.
12 13 14 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 12 def reference parsed_data['reference'] end |
#source ⇒ Symbol
Returns the source of the mandate (e.g. ‘:electronic` or `paper).
22 23 24 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 22 def source present_enum(parsed_data['source']) end |
#status ⇒ Symbol
Returns the status of the mandate (e.g. ‘:live`).
17 18 19 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 17 def status present_enum(parsed_data['status']) end |
#uid ⇒ String
Returns the Starling internal ID of the Direct Debit mandate.
7 8 9 |
# File 'lib/starling/resources/direct_debit_mandate_resource.rb', line 7 def uid parsed_data['uid'] end |