@paddle/paddle-node-sdk
Version:
A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.
15 lines (14 loc) • 785 B
JavaScript
import { Totals, UnitTotals } from '../shared/index.js';
import { Product } from '../product/index.js';
import { Proration } from '../transaction/proration.js';
export class TransactionLineItemPreview {
constructor(transactionLineItemPreview) {
this.priceId = transactionLineItemPreview.price_id;
this.quantity = transactionLineItemPreview.quantity;
this.taxRate = transactionLineItemPreview.tax_rate;
this.unitTotals = new UnitTotals(transactionLineItemPreview.unit_totals);
this.totals = new Totals(transactionLineItemPreview.totals);
this.product = new Product(transactionLineItemPreview.product);
this.proration = transactionLineItemPreview.proration ? new Proration(transactionLineItemPreview.proration) : null;
}
}