Options
All
  • Public
  • Public/Protected
  • All
Menu

Configuration used to create a connection to a device via the Clover cloud.

Hierarchy

  • WebSocketCloverDeviceConfiguration
    • WebSocketCloudCloverDeviceConfiguration

Implements

  • CloverDeviceConfiguration

Index

Constructors

constructor

  • new WebSocketCloudCloverDeviceConfiguration(applicationId: string, webSocketFactoryFunction: any, imageUtil: IImageUtil, cloverServer: string, accessToken: string, httpSupport: HttpSupport, merchantId: string, deviceId: string, friendlyId: string, forceConnect?: boolean, heartbeatInterval?: number, reconnectDelay?: number): WebSocketCloudCloverDeviceConfiguration
  • Parameters

    • applicationId: string

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

    • webSocketFactoryFunction: any

      the function that will return an instance of the CloverWebSocketInterface that will be used when connecting. For Browser implementations, this can be BrowserWebSocketImpl.createInstance. For NodeJS implementations, this will be defined differently.

    • imageUtil: IImageUtil

      utility to translate images into base64 strings.

    • cloverServer: string

      the base url for the clover server used in the cloud connection. EX: https://www.clover.com, http://localhost:9000

    • accessToken: string

      the OAuth access token that will be used when contacting the clover server

    • httpSupport: HttpSupport

      the helper object used when making http requests.

    • merchantId: string

      the merchant the device belongs to.

    • deviceId: string

      the id (not uuid) of the device to connect to

    • friendlyId: string

      an identifier for the specific terminal connected to this device. This id is used in debugging and may be sent to other clients if they attempt to connect to the same device. It will also be sent to other clients that are currently connected if this device does a forceConnect.

    • Default value forceConnect: boolean = false

      if true, overtake any existing connection.

    • Optional heartbeatInterval: number

      duration to wait for a PING before disconnecting

    • Optional reconnectDelay: number

      duration to wait until a reconnect is attempted

    Returns WebSocketCloudCloverDeviceConfiguration

Properties

Private accessToken

accessToken: string

Private cloverServer

cloverServer: string

Private deviceId

deviceId: string

Private forceConnect

forceConnect: boolean

Private friendlyId

friendlyId: string

Protected heartbeatInterval

heartbeatInterval: number = 1000

Private httpSupport

httpSupport: HttpSupport

Protected imageUtil

imageUtil: IImageUtil

Private merchantId

merchantId: string

Protected pingRetryCountBeforeReconnect

pingRetryCountBeforeReconnect: number = 4

Protected reconnectDelay

reconnectDelay: number = 3000

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

setHeartbeatInterval

  • setHeartbeatInterval(heartbeatInterval: number): void

setPingRetryCountBeforeReconnect

  • setPingRetryCountBeforeReconnect(pingRetryCountBeforeReconnect: number): void

setReconnectDelay

  • setReconnectDelay(reconnectDelay: number): void

Generated using TypeDoc