Send Digits Result

View as Markdown

Relay.Calling.SendDigitsResult

This object is returned by sendDigits method and represents the final result of a send digits action.

Methods

getEvent

Returns the last Relay Event arrived for this operation.

Parameters

None

Returns

Relay.Event - Last Relay Event.

Examples

Send some digits and then grab the last event occurred.

1<?php
2
3$call->sendDigits('1234')->done(function($result) {
4 $event = $result->getEvent();
5 // Inspect $event->payload ..
6});

isSuccessful

Return true if the operation has succeeded, false otherwise.

Parameters

None

Returns

boolean - Whether the operation has completed successfully.

Examples

Send some digits and then check if it has ended successfully.

1<?php
2
3$call->sendDigits('1234')->done(function($result) {
4 if ($result->isSuccessful()) {
5 // Do other things...
6 }
7});