Abstraction of an instance resource from the Twilio API.
Methods
Class constructor
__construct(array $parameters)
Inherited
inherited_from |
\Twilio\Api\Resource::__construct() |
Parameters
$parameters
array
Get the value of a property on this resource.
__get(string $name) : mixed
To help with lazy HTTP requests, we don't actually retrieve an object
from the API unless you really need it. Hence, this function may make
API requests if the property you're requesting isn't available on the
resource.
Parameters
$name
string
property name
Returns
mixed
Retrieve instance of a client
client() : \Twilio\Api\Client
InheritedStatic
inherited_from |
\Twilio\Api\Resource::client() |
Returns
\Twilio\Api\Client
Retrieve sub-resources
getActions(string $name) : string[]
Inherited
inherited_from |
\Twilio\Api\Resource::getActions() |
Parameters
$name
string
Returns
string[]
Set a new client
setClient(object $client)
InheritedStatic
inherited_from |
\Twilio\Api\Resource::setClient() |
Parameters
$client
object
Set new URI
setUri(string $uri, bool | string $action)
Inherited
inherited_from |
\Twilio\Api\Resource::setUri() |
Parameters
$action
bool
string
optional action end point to append
Update instance parameters
update(mixed $parameters, mixed $value)
Parameters
$parameters
mixed
array of updates, or a property name
$value
mixed
a value with which to update the resource
Add all properties from an associative array (the JSON response body) as
properties on this instance resource
updateAttributes(mixed $parameters)
Parameters
$parameters
mixed
Retrieve currently set URI
uri() : string
Inherited
inherited_from |
\Twilio\Api\Resource::uri() |
Returns
string
Initialize instance
initialize()
Setup sub-resources
setupActions()
Inherited
inherited_from |
\Twilio\Api\Resource::setupActions() |
Properties
$actions : string[]
Inherited
inherited_from |
\Twilio\Api\Resource::$actions |
$client : \Twilio\Api\Client
Inherited
inherited_from |
\Twilio\Api\Resource::$client |
$resource : mixed
Inherited
inherited_from |
\Twilio\Api\Resource::$resource |
$uri : string
Inherited
inherited_from |
\Twilio\Api\Resource::$uri |