Class: Tikkie::Api::V1::Responses::Payment
- Inherits:
-
Base
- Object
- Base
- Tikkie::Api::V1::Responses::Payment
show all
- Defined in:
- lib/tikkie/api/v1/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
20
21
22
23
24
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 20
def amount
decimal = BigDecimal(data[:amountInCents])
decimal /= 100.0
decimal
end
|
#counter_party_name ⇒ Object
16
17
18
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 16
def counter_party_name
data[:counterPartyName]
end
|
#created_at ⇒ Object
34
35
36
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 34
def created_at
Time.parse(data[:created]) if data[:created]
end
|
#currency ⇒ Object
26
27
28
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 26
def currency
data[:amountCurrency]
end
|
#description ⇒ Object
30
31
32
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 30
def description
data[:description]
end
|
#online_payment_status ⇒ Object
39
40
41
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 39
def online_payment_status
data[:onlinePaymentStatus]
end
|
#payment_token ⇒ Object
12
13
14
|
# File 'lib/tikkie/api/v1/responses/payment.rb', line 12
def payment_token
data[:paymentToken]
end
|