0.0.9 • Published 8 months ago

yonoton-pos-api v0.0.9

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

yonoton-pos-api

Getting started

npm i yonoton-pos-api

import { YonotonAPI, YonotonApiTypes } from 'yonoton-pos-api';

... const { View } = YonotonApiTypes

Introduction

The YonotonAPI is injected to the embedded web site by the Yonoton POS. These APIs communicate directly with the POS on the frontend side.

The embedded view is opened fullscreen. Navigate API should be used to return back Home and close the webview.

Cart related actions

Clear cart

YonotonAPI.cart.clear()

Add items to cart by product ID

YonotonAPI.cart.addItemsByProductId(items: ItemByProductId[])

Add items to cart matching by EAN code

YonotonAPI.cart.addItemsByEAN(items: ItemByEAN[])

Add items to cart matching by reference code

YonotonAPI.cart.addItemsByReferenceCode(items: ItemByReferenceCode[])

Payment actions

Add pre-payment

The pre-payment is registered as a payment and it reduces the amount remaining to pay for the cart.

YonotonAPI.cart.addPayments(payments: Payment[])

Identity actions

Add identity

Identity represents a user. The identity information is attached to the purchase.

YonotonAPI.cart.connectIdentity(identity: Identity)

Navigating actions

Navigate

YonotonAPI.navigate.navigate(View.HOME)

0.0.3

11 months ago

0.0.9

8 months ago

0.0.8

9 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.7

9 months ago

0.0.6

11 months ago

0.0.2

12 months ago

0.0.1

12 months ago