Class: Starling::Resources::OutboundFasterPaymentsTransactionResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::OutboundFasterPaymentsTransactionResource
- Defined in:
- lib/starling/resources/outbound_faster_payments_transaction_resource.rb
Overview
A resource representing a Transaction returned from the Transactions Faster Payments Out API
Instance Method Summary collapse
-
#amount ⇒ Float
The amount of the transaction.
-
#created ⇒ Time
(also: #created_at)
The date and time when the transaction was recorded.
-
#currency ⇒ String
The currency of the transaction (e.g. “GBP” or “UAH”).
-
#direction ⇒ Symbol
The direction of the transaction (e.g. ‘:outbound`).
-
#id ⇒ String
The Starling internal ID of the transaction.
-
#narrative ⇒ String
The narrative of the transaction.
-
#receiving_contact_account_id ⇒ String?
The Starling internal ID of the contact account the payment was sent to, or nil if they are not one of the user’s contacts.
-
#receiving_contact_id ⇒ String?
The Starling internal ID of the contact who the payment was sent to, or nil if they are not one of the user’s contacts.
-
#source ⇒ Symbol
The source of the transaction (e.g. ‘:master_card`).
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#amount ⇒ Float
Returns the amount of the transaction.
17 18 19 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 17 def amount present_float(parsed_data['amount']) end |
#created ⇒ Time Also known as: created_at
Returns the date and time when the transaction was recorded.
27 28 29 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 27 def created present_datetime(parsed_data['created']) end |
#currency ⇒ String
Returns the currency of the transaction (e.g. “GBP” or “UAH”).
12 13 14 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 12 def currency parsed_data['currency'] end |
#direction ⇒ Symbol
Returns the direction of the transaction (e.g. ‘:outbound`).
22 23 24 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 22 def direction present_enum(parsed_data['direction']) end |
#id ⇒ String
Returns the Starling internal ID of the transaction.
7 8 9 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 7 def id parsed_data['id'] end |
#narrative ⇒ String
Returns the narrative of the transaction.
33 34 35 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 33 def narrative parsed_data['narrative'] end |
#receiving_contact_account_id ⇒ String?
Returns the Starling internal ID of the contact account the payment was sent to, or nil if they are not one of the user’s contacts.
51 52 53 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 51 def receiving_contact_account_id parsed_data['receivingContactAccountId'] end |
#receiving_contact_id ⇒ String?
Returns the Starling internal ID of the contact who the payment was sent to, or nil if they are not one of the user’s contacts.
44 45 46 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 44 def receiving_contact_id parsed_data['receivingContactId'] end |
#source ⇒ Symbol
Returns the source of the transaction (e.g. ‘:master_card`).
38 39 40 |
# File 'lib/starling/resources/outbound_faster_payments_transaction_resource.rb', line 38 def source present_enum(parsed_data['source']) end |