@paddle/paddle-node-sdk
Version:
A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
29 lines (28 loc) • 961 B
JavaScript
export class TransactionTotalsNotification {
subtotal;
discount;
tax;
total;
credit;
creditToBalance;
balance;
grandTotal;
grandTotalTax;
fee;
earnings;
currencyCode;
constructor(transactionTotals) {
this.subtotal = transactionTotals.subtotal;
this.discount = transactionTotals.discount;
this.tax = transactionTotals.tax;
this.total = transactionTotals.total;
this.credit = transactionTotals.credit;
this.creditToBalance = transactionTotals.credit_to_balance;
this.balance = transactionTotals.balance;
this.grandTotal = transactionTotals.grand_total;
this.grandTotalTax = transactionTotals.grand_total_tax;
this.fee = transactionTotals.fee ? transactionTotals.fee : null;
this.earnings = transactionTotals.earnings ? transactionTotals.earnings : null;
this.currencyCode = transactionTotals.currency_code;
}
}