Options
All
  • Public
  • Public/Protected
  • All
Menu

creates a Hello Model object which assists with correctly formatting data inputs for Hello API.
To create an order that works with Hello API and Hello Screens, send a Wave event with the following options.
Note: orderId is a required property

returns

A Hello Model object

Hierarchy

Index

Properties

convertToDataObject

convertToDataObject: () => HelloDataTemplate

Returns all stored values as a data object

returns

An object containing all values stored by the Hello Helper

throws

RequiredValueMissingError This exception is thrown if orderId or eventType have not been set as they are required fields

Type declaration

setCustomDataField

setCustomDataField: (fieldName: string, fieldValue: string) => HelloModel

Set a custom data field. These fields will be included in the wave event and any associated webhook, but will not be displayed in Hello Screens or returned from Hello API

param

The key for the custom data field

param

The value for the custom data field

returns

the Hello Helper object

throws

InvalidTypeError This exception is thrown if the fieldName or fieldValue is not a string

throws

ValidationError This exception is thrown if a given fieldName is a field reserved by HelloModel. Use the specific method for this property instead

Type declaration

    • (fieldName: string, fieldValue: string): HelloModel
    • Parameters

      • fieldName: string
      • fieldValue: string

      Returns HelloModel

setCustomerName

setCustomerName: (customerName: string) => HelloModel

Set the stored customerName

param

The name of the customer

returns

the Hello Helper object

throws

InvalidTypeError This exception is thrown if the input is not a string

Type declaration

setDisplayedCustomDataField

setDisplayedCustomDataField: (fieldName: string, fieldValue: string) => HelloModel

Set a custom data field which will be returned from Hello API and displayed in the Order Details view in Hello Screens. Please note these fields will be prefixed with an hs_ in any received webhooks for the events

param

The key for the custom data field

param

The value for the custom data field

returns

the Hello Helper object

throws

InvalidTypeError This exception is thrown if the fieldName or fieldValue is not a string

throws

ValidationError This exception is thrown if a given fieldName is a field reserved by HelloModel. Use the specific method for this property instead

Type declaration

    • (fieldName: string, fieldValue: string): HelloModel
    • Parameters

      • fieldName: string
      • fieldValue: string

      Returns HelloModel

setEventType

setEventType: (eventType: HelloEventType) => HelloModel

Set the stored eventType. eventType is required if sending a wave event using the HelloModel

param

Allowed values 'arrival' or 'onTheWay'

returns

the Hello Helper object

throws

InvalidTypeError This exception is thrown if the input is not a string

throws

ValidationError This exception is thrown if the input is not a valid event type

Type declaration

setMobileNumber

setMobileNumber: (mobileNumber: string) => HelloModel

Set the stored Mobile Number

param

The mobile number can only contain + and numeric characters

returns

the Hello Helper object

throws

InvalidTypeError This exception is thrown if the input is not a string

throws

ValidationError This exception is thrown if the input contains characters other than + and numeric

Type declaration

setOrderId

setOrderId: (orderId: string) => HelloModel

Set the stored Order ID. Order ID is required if sending a wave event using the HelloModel

param

A unique identifier for the order

returns

the Hello Helper object

throws

InvalidTypeError If orderId is not a string

Type declaration

Generated using TypeDoc