{"size": 430, "ext": "js", "max_stars_repo_path": "src/Transaction.js", "max_stars_repo_name": "victorvallet/bank_test", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Transaction.js", "max_issues_repo_name": "victorvallet/bank_test", "max_issues_repo_issues_event_min_datetime": "2022-02-13T18:16:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T09:33:06.000Z", "max_forks_repo_path": "src/Transaction.js", "max_forks_repo_name": "victorvallet/bank_test", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 22.6315789474, "max_line_length": 83, "alphanum_fraction": 0.5860465116}
class Transaction {
    constructor() {

        this.summary = { date: this.formatDate(), credit: 0, debit: 0, balance: 0 }

    }

    addDebit(money, balance) {
        this.summary.debit = money
        this.summary.balance = balance
    }
    addCredit(money, balance) {
        this.summary.credit = money
        this.summary.balance = balance
    }
    formatDate() {
        return new Date().toLocaleDateString()
    }
}