Class: Tikkie::Api::Responses::Payment
- Inherits:
-
Base
- Object
- Base
- Tikkie::Api::Responses::Payment
show all
- Defined in:
- lib/tikkie/api/responses/payment.rb
Overview
Payment that is associated with a payment request.
Instance Attribute Summary
Attributes inherited from Base
#data, #response
Instance Method Summary
collapse
Methods inherited from Base
#error?, #errors, #initialize, #response_code, #success?, #trace_id
Instance Method Details
#amount ⇒ Object
19
20
21
22
23
|
# File 'lib/tikkie/api/responses/payment.rb', line 19
def amount
decimal = BigDecimal.new(data[:amountInCents])
decimal /= 100.0
decimal
end
|
#counter_party_name ⇒ Object
15
16
17
|
# File 'lib/tikkie/api/responses/payment.rb', line 15
def counter_party_name
data[:counterPartyName]
end
|
#created_at ⇒ Object
33
34
35
|
# File 'lib/tikkie/api/responses/payment.rb', line 33
def created_at
Time.parse(data[:created]) if data[:created]
end
|
#currency ⇒ Object
25
26
27
|
# File 'lib/tikkie/api/responses/payment.rb', line 25
def currency
data[:amountCurrency]
end
|
#description ⇒ Object
29
30
31
|
# File 'lib/tikkie/api/responses/payment.rb', line 29
def description
data[:description]
end
|
#online_payment_status ⇒ Object
38
39
40
|
# File 'lib/tikkie/api/responses/payment.rb', line 38
def online_payment_status
data[:onlinePaymentStatus]
end
|
#payment_token ⇒ Object
11
12
13
|
# File 'lib/tikkie/api/responses/payment.rb', line 11
def payment_token
data[:paymentToken]
end
|