From Bright Pattern Documentation
Jump to: navigation, search
(Created page with "<translate> =setPhoneDevice= Selects a specific phone device and sets a phone number, if needed. ==Request== ''Syntax'' {| class="wikitable" |setPhoneDevice(phoneDevice: Ph...")
 
(No difference)

Latest revision as of 13:43, 16 September 2022

• 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 >