UNPKG

myinvois-sdk

Version:

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

44 lines (43 loc) 1.32 kB
import { BaseModel } from './base-model'; import { TaxSubtotal } from './tax-subtotal'; import { InvoiceLine } from './invoice-line'; /** * Represents tax total information */ export declare class TaxTotal extends BaseModel { private _taxAmount; private _taxableAmount; private _taxType; private _taxRate; private _taxExemptionReason; private _taxSubtotals; get taxAmount(): number; set taxAmount(value: number); get taxableAmount(): number; set taxableAmount(value: number); get taxType(): string; set taxType(value: string); get taxRate(): number; set taxRate(value: number); get taxExemptionReason(): string; set taxExemptionReason(value: string); get taxSubtotals(): TaxSubtotal[]; /** * Add a tax subtotal * @param subtotal The tax subtotal to add */ addTaxSubtotal(subtotal: TaxSubtotal): void; /** * Calculate tax totals based on invoice lines * @param invoiceLines The invoice lines to calculate tax totals from */ calculateTotals(invoiceLines: InvoiceLine[]): void; /** * Converts the tax total to a JSON representation for the invoice level */ toJSON(): any; /** * Converts the tax total to a JSON representation for the line level */ toLineJSON(): any; }