UNPKG

myinvois-sdk

Version:

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

76 lines (75 loc) 2.57 kB
import { BaseModel } from './base-model'; import { Party } from './party'; import { InvoiceLine } from './invoice-line'; import { TaxTotal } from './tax-total'; import { InvoicePeriod } from './invoice-period'; import { DocumentReference } from './document-reference'; /** * Represents an invoice document */ export declare class Invoice extends BaseModel { private _id; private _issueDate; private _invoiceTypeCode; private _documentCurrencyCode; private _taxCurrencyCode; private _supplier; private _customer; private _invoicePeriod; private _additionalDocumentReferences; private _lineExtensionAmount; private _taxExclusiveAmount; private _taxInclusiveAmount; private _allowanceTotalAmount; private _chargeTotalAmount; private _payableRoundingAmount; private _payableAmount; private _taxTotal; private _invoiceLines; get id(): string; set id(value: string); get issueDate(): Date; set issueDate(value: Date); get invoiceTypeCode(): string; set invoiceTypeCode(value: string); get documentCurrencyCode(): string; set documentCurrencyCode(value: string); get taxCurrencyCode(): string; set taxCurrencyCode(value: string); get supplier(): Party; set supplier(value: Party); get customer(): Party; set customer(value: Party); get invoicePeriod(): InvoicePeriod; set invoicePeriod(value: InvoicePeriod); get additionalDocumentReferences(): DocumentReference[]; set additionalDocumentReferences(value: DocumentReference[]); addDocumentReference(reference: DocumentReference): void; get lineExtensionAmount(): number; set lineExtensionAmount(value: number); get taxExclusiveAmount(): number; set taxExclusiveAmount(value: number); get taxInclusiveAmount(): number; set taxInclusiveAmount(value: number); get allowanceTotalAmount(): number; set allowanceTotalAmount(value: number); get chargeTotalAmount(): number; set chargeTotalAmount(value: number); get payableRoundingAmount(): number; set payableRoundingAmount(value: number); get payableAmount(): number; set payableAmount(value: number); get taxTotal(): TaxTotal; set taxTotal(value: TaxTotal); get invoiceLines(): InvoiceLine[]; set invoiceLines(value: InvoiceLine[]); addInvoiceLine(line: InvoiceLine): void; /** * Calculate totals based on invoice lines */ calculateTotals(): void; /** * Converts the invoice to a JSON representation */ toJSON(): any; }