Sha256: 45b35fd77bd45c65509e9f062fa47d0b7b53bce965bf0e0f24c14bf9366c150a

Contents?: true

Size: 821 Bytes

Versions: 1

Compression:

Stored size: 821 Bytes

Contents

#transaction class for soofa requests
class Transaction
  attr_reader :status, :sender_currency, :receiver_currency, :tid, :reference, :sender, :receiver,
              :receipt_no, :timestamp, :gross_amount, :net_amount, :transacted_via, :is_money_in
  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_json = data
  end
  def json
    return @as_json
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
soofapay-0.1.1 lib/transaction.rb