0.0.4 • Published 1 year ago

interpos-capacitor-plugin v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

interpos-capacitor-plugin

Interpos capacitor plugin

Install

npm install interpos-capacitor-plugin
npx cap sync

API

getScale()

getScale() => Promise<ScaleResult>

Returns: Promise<ScaleResult>


openPresentationDisplay(...)

openPresentationDisplay(url?: string | undefined) => Promise<string>
ParamType
urlstring

Returns: Promise<string>


closePresentationDisplay()

closePresentationDisplay() => Promise<string>

Returns: Promise<string>


sendPresentationDisplay(...)

sendPresentationDisplay(data: PresentationDisplayData) => Promise<string>
ParamType
dataPresentationDisplayData

Returns: Promise<string>


sendRawEscPos(...)

sendRawEscPos(data: { data: number[]; }) => Promise<string>
ParamType
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; }