Options
All
  • Public
  • Public/Protected
  • All
Menu

This is the base class that is used when connecting directly to a device via the "Network Pay Display".

A pairing scheme is used when connecting, so the function callbacks for when a pairing code is received, and when the pairing completes must be implemented here.

Hierarchy

  • WebSocketCloverDeviceConfiguration
    • WebSocketPairedCloverDeviceConfiguration

Implements

  • CloverDeviceConfiguration
  • PairingDeviceConfiguration

Index

Constructors

constructor

  • new WebSocketPairedCloverDeviceConfiguration(endpoint: string, applicationId: string, posName: string, serialNumber: string, authToken: string, webSocketFactoryFunction: any, imageUtil: IImageUtil, heartbeatInterval?: number, reconnectDelay?: number): WebSocketPairedCloverDeviceConfiguration
  • Parameters

    • endpoint: string

      the endpoint of the Clover device. e.g. wss://192.168.1.15:12345/remote_pay

    • applicationId: string

      the applicationId that uniquely identifies the POS. e.g. com.company.MyPOS:2.3.1

    • posName: string

      Displayed during pairing to display the POS name on the Mini. e.g. MyPOS

    • serialNumber: string

      Displayed during pairing to display the device identifier. e.g. 'Aisle 3' or 'POS-35153234'

    • authToken: string

      The authToken retrieved from a previous pairing activity, passed as an argument to onPairingSuccess. This will be null for the first connection

    • webSocketFactoryFunction: any

      the function that will return an instance of the CloverWebSocketInterface that will be used when connecting.

    • imageUtil: IImageUtil

      utility to translate images into base64 strings.

    • Optional heartbeatInterval: number
    • Optional reconnectDelay: number

    Returns WebSocketPairedCloverDeviceConfiguration

Properties

Private authToken

authToken: string

Protected heartbeatInterval

heartbeatInterval: number = 1000

Protected imageUtil

imageUtil: IImageUtil

Protected pingRetryCountBeforeReconnect

pingRetryCountBeforeReconnect: number = 4

Private posName

posName: string

Protected reconnectDelay

reconnectDelay: number = 3000

Private serialNumber

serialNumber: string

Private uri

uri: string = null

Protected webSocketImplClass

webSocketImplClass: any

Methods

getApplicationId

  • getApplicationId(): string

getCloverDeviceType

  • getCloverDeviceType(): any

getCloverTransport

  • getCloverTransport(): CloverTransport

getHeartbeatInterval

  • getHeartbeatInterval(): number

getImageUtil

getMessagePackageName

  • getMessagePackageName(): string

getName

  • getName(): string

getPingRetryCountBeforeReconnect

  • getPingRetryCountBeforeReconnect(): number

getReconnectDelay

  • getReconnectDelay(): number

onPairingCode

  • onPairingCode(pairingCode: string): void

onPairingSuccess

  • onPairingSuccess(authToken: string): void

setHeartbeatInterval

  • setHeartbeatInterval(heartbeatInterval: number): void

setPingRetryCountBeforeReconnect

  • setPingRetryCountBeforeReconnect(pingRetryCountBeforeReconnect: number): void

setReconnectDelay

  • setReconnectDelay(reconnectDelay: number): void

Generated using TypeDoc