From Bright Pattern Documentation
Jump to: navigation, search
• 5.19


setPhoneDevice

Selects a specific phone device and sets a phone number, if needed.

Request

Syntax

setPhoneDevice(phoneDevice: PhoneDeviceData): Promise<OperationResult<null>>

Where:

type PhoneDeviceData = {

    type: PhoneDevice

    phone?: string

}

Parameters

Parameters Parameter Values Data Type Optional/Required Description
PhoneDeviceData
type String Required Allows you to select one of the available PhoneDevice types (i.e., as defined in the method getPhoneDevicesList)
phone String Optional Allows you to define a phone number for the selected phone device type.


Example Request

setPhoneDeviceButton.onclick = () => {

    adApi.setPhoneDevice({

        type: phoneDeviceTypeInput.value as any,

        phone: phoneDeviceNumberInput.value,

    })

}

Return Value

null

< Previous | Next >