class OutwardLogModel:

    def __init__(self, bank, r, api):
        self.bankcode = bank
        self.jrnl_id = api.get("journalId")
        self.ref_no = api.get("remarks")

        self.tran_date = r["TXN_DATE"].strftime("%d%m%Y")
        self.txn_amt = float(r["TXN_AMT"])

        self.recv_ac = r["DEST_AC_NO"]
        self.send_ac = api.get("accountNum")

        self.ifsc = r["IFSC_CODE"]
        self.sender_name = r["REMITTER_NAME"]
        self.receiver_name = r["BENEFICIARY_NAME"]
        self.beneficiary_address = r["BENEFICIARY_ADD"]

        self.sender_info = r["TXN_NO"]

    def to_dict(self):
        return self.__dict__