class Transaction
transaction class for soofa requests
Public Class Methods
new(data)
click to toggle source
# File lib/transaction.rb, line 4 def initialize(data) @sender = data['sender'] @sender_currency = data['sender_currency'] @status = data['status'] @receiver_currency = data['receiver_currency'] @tid = data['tid'] @reference = data['reference'] @receiver = data['receiver'] @receipt_no = data['receipt_no'] @timestamp = data['timestamp'] @gross_amount = data['gross_amount'] @net_amount = data['net_amount'] @transacted_via = data['transacted_via'] @is_money_in=data['is_money_in'] @as_string= data.to_json end
Public Instance Methods
as_json()
click to toggle source
# File lib/transaction.rb, line 20 def as_json return JSON.parse(@as_string) end
as_string()
click to toggle source
# File lib/transaction.rb, line 23 def as_string return @as_string end
gross_amount()
click to toggle source
# File lib/transaction.rb, line 53 def gross_amount return @gross_amount end
is_money_in()
click to toggle source
# File lib/transaction.rb, line 62 def is_money_in return @is_money_in end
net_amount()
click to toggle source
# File lib/transaction.rb, line 56 def net_amount return @net_amount end
receipt_no()
click to toggle source
# File lib/transaction.rb, line 47 def receipt_no return @receipt_no end
receiver()
click to toggle source
# File lib/transaction.rb, line 44 def receiver return @receiver end
receiver_currency()
click to toggle source
# File lib/transaction.rb, line 32 def receiver_currency return @receiver_currency end
reference()
click to toggle source
# File lib/transaction.rb, line 38 def reference return @reference end
sender()
click to toggle source
# File lib/transaction.rb, line 41 def sender return @sender end
sender_currency()
click to toggle source
# File lib/transaction.rb, line 29 def sender_currency return @sender_currency end
status()
click to toggle source
# File lib/transaction.rb, line 26 def status return @status end
tid()
click to toggle source
# File lib/transaction.rb, line 35 def tid return @tid end
timestamp()
click to toggle source
# File lib/transaction.rb, line 50 def timestamp return @timestamp end
transacted_via()
click to toggle source
# File lib/transaction.rb, line 59 def transacted_via return @transacted_via end