interpos-capacitor-plugin
v0.0.4
Published
Interpos custom capacitor plugins
Downloads
8
Readme
interpos-capacitor-plugin
Interpos capacitor plugin
Install
npm install interpos-capacitor-plugin
npx cap sync
API
getScale()
openPresentationDisplay(...)
closePresentationDisplay()
sendPresentationDisplay(...)
sendRawEscPos(...)
- Type Aliases
getScale()
getScale() => Promise<ScaleResult>
Returns: Promise<ScaleResult>
openPresentationDisplay(...)
openPresentationDisplay(url?: string | undefined) => Promise<string>
| Param | Type |
| --------- | ------------------- |
| url
| string |
Returns: Promise<string>
closePresentationDisplay()
closePresentationDisplay() => Promise<string>
Returns: Promise<string>
sendPresentationDisplay(...)
sendPresentationDisplay(data: PresentationDisplayData) => Promise<string>
| Param | Type |
| ---------- | --------------------------------------------------------------------------- |
| data
| PresentationDisplayData |
Returns: Promise<string>
sendRawEscPos(...)
sendRawEscPos(data: { data: number[]; }) => Promise<string>
| Param | Type |
| ---------- | -------------------------------- |
| data
| { data: number[]; } |
Returns: Promise<string>
Type Aliases
ScaleResult
********* Scale types ***********
{ totalWeightInGram: number; isStable: boolean; }
PresentationDisplayData
{ state: string; tradeObject: TradeObject | null; paymentObject: PaymentObject | null; }
TradeObject
{ balance: TradeBalance; tradeItems: TradeItem[]; }
TradeBalance
{ subtotal: string; totalDiscount: string; total: string; }
TradeItem
{ productName: string; productPrice: string; quantity: string; totalDiscount: string; subtotal: string; }
PaymentObject
{ balance: PaymentBalance; paymentItems: PaymentItem[]; }
PaymentBalance
{ total: string; balance: string; }
PaymentItem
{ method: string; state: string; amount: string; }