Abstrresource of a list resource from the Twilio API

package Library
subpackage Twilio\Api\Resource
author Aleksey Korzun

 Methods

Class constructor

__construct() 

Retrieve instance of a client

client() : \Twilio\Api\Client
InheritedStatic
inherited_from \Twilio\Api\Resource::client()

Returns

\Twilio\Api\Client

Deletes a resource from this list.

delete(string $identifier, array $parameters) 

Parameters

$identifier

string

resource identifier

$parameters

array

Gets a resource from this list.

get(string $identifier) : \Twilio\Api\Resource\Instance

Parameters

$identifier

string

resource identifier

Returns

Retrieve sub-resources

getActions(string $name) : string[]
Inherited
inherited_from \Twilio\Api\Resource::getActions()

Parameters

$name

string

Returns

string[]

Implementing placeholder method for IteratorAggregate

getIterator() : \Twilio\Api\Resource\Listing\Paginator

Construct an InstanceResource with the specified params.

getObjectFromJson(array $parameters) : \Twilio\Api\Resource\Instance

Parameters

$parameters

array

usually a JSON HTTP response from the API

Returns

Returns a page of InstanceResources from this list.

getPage(int $page, int $size, array $filters, string $pagingUri) : \Twilio\Api\Resource\Listing\Page

Parameters

$page

int

start page

$size

int

number of items per page

$filters

string[]

optional filters

$pagingUri

string

if provided, the $page and $size parameters will be ignored and this URI will be requested directly.

Returns

Returns an iterable list of InstanceResources

paginator(int $page, int $size, array $filters) : \Twilio\Api\Resource\Listing\Paginator

Parameters

$page

int

start page

$size

int

number of items per page

$filters

string[]

optional filters The filter array can accept full datetimes when StartTime or DateCreated are used. Inequalities should be within the key portion of the array and multiple filter parameters can be combined for more specific searches. eg. array('DateCreated>' => '2011-07-05 08:00:00', 'DateCreated<' => '2011-08-01') or array('StartTime<' => '2011-07-05 08:00:00')

Returns

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

$uri

string

new address

$action

boolstring

optional action end point to append

Retrieve currently set URI

uri() : string
Inherited
inherited_from \Twilio\Api\Resource::uri()

Returns

string

Create a resource on the list and then return its representation as an InstanceResource.

create(array $parameters) : \Twilio\Api\Resource\Instance

Parameters

$parameters

array

The parameters with which to create the resource

Returns

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