1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const uuid = require('uuid/v4');
|
4 | class Payment {
|
5 | constructor(dollarValue, amount, currency, sendTo, received = 0, createdAt = new Date(), updatedAt = new Date(createdAt), paymentID = uuid()) {
|
6 | this.dollarValue = dollarValue;
|
7 | this.amount = amount;
|
8 | this.currency = currency;
|
9 | this.sendTo = sendTo;
|
10 | this.received = received;
|
11 | this.createdAt = createdAt;
|
12 | this.updatedAt = updatedAt;
|
13 | this.paymentID = paymentID;
|
14 | this.status = "Created";
|
15 | this.transactions = [];
|
16 | }
|
17 | addTransaction(tx) {
|
18 | this.transactions.push(tx);
|
19 | }
|
20 | }
|
21 | exports.Payment = Payment;
|