UNPKG

myinvois-sdk

Version:

TypeScript SDK for interacting with the Malaysia e-invoicing system (MyInvois) API

43 lines (42 loc) 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Price = void 0; const base_model_1 = require("./base-model"); /** * Represents a price for an item */ class Price extends base_model_1.BaseModel { constructor() { super(...arguments); this._priceAmount = 0; this._currencyID = 'MYR'; } // Getter and Setter for priceAmount get priceAmount() { return this._priceAmount; } set priceAmount(value) { this._priceAmount = value; } // Getter and Setter for currencyID get currencyID() { return this._currencyID; } set currencyID(value) { this._currencyID = value; } /** * Converts the price to a JSON representation */ toJSON() { return { "PriceAmount": [ { "_": this._priceAmount, "currencyID": this._currencyID } ] }; } } exports.Price = Price;