repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1 value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 | partition stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|---|---|---|
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php | SyncListItemList.create | public function create($data) {
$data = Values::of(array('Data' => Serialize::jsonObject($data), ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new SyncListItemInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['listSid']
);
} | php | public function create($data) {
$data = Values::of(array('Data' => Serialize::jsonObject($data), ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new SyncListItemInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['listSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"data",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Data'",
"=>",
"Serialize",
"::",
"jsonObject",
"(",
"$",
"data",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"SyncListItemInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'listSid'",
"]",
")",
";",
"}"
] | Create a new SyncListItemInstance
@param array $data The data
@return SyncListItemInstance Newly created SyncListItemInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"SyncListItemInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php#L46-L62 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php | SyncListItemList.page | public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
$options = new Values($options);
$params = Values::of(array(
'Order' => $options['order'],
'From' => $options['from'],
'Bounds' => $options['bounds'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
));
$response = $this->version->page(
'GET',
$this->uri,
$params
);
return new SyncListItemPage($this->version, $response, $this->solution);
} | php | public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
$options = new Values($options);
$params = Values::of(array(
'Order' => $options['order'],
'From' => $options['from'],
'Bounds' => $options['bounds'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
));
$response = $this->version->page(
'GET',
$this->uri,
$params
);
return new SyncListItemPage($this->version, $response, $this->solution);
} | [
"public",
"function",
"page",
"(",
"$",
"options",
"=",
"array",
"(",
")",
",",
"$",
"pageSize",
"=",
"Values",
"::",
"NONE",
",",
"$",
"pageToken",
"=",
"Values",
"::",
"NONE",
",",
"$",
"pageNumber",
"=",
"Values",
"::",
"NONE",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"params",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Order'",
"=>",
"$",
"options",
"[",
"'order'",
"]",
",",
"'From'",
"=>",
"$",
"options",
"[",
"'from'",
"]",
",",
"'Bounds'",
"=>",
"$",
"options",
"[",
"'bounds'",
"]",
",",
"'PageToken'",
"=>",
"$",
"pageToken",
",",
"'Page'",
"=>",
"$",
"pageNumber",
",",
"'PageSize'",
"=>",
"$",
"pageSize",
",",
")",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"version",
"->",
"page",
"(",
"'GET'",
",",
"$",
"this",
"->",
"uri",
",",
"$",
"params",
")",
";",
"return",
"new",
"SyncListItemPage",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"response",
",",
"$",
"this",
"->",
"solution",
")",
";",
"}"
] | Retrieve a single page of SyncListItemInstance records from the API.
Request is executed immediately
@param array|Options $options Optional Arguments
@param mixed $pageSize Number of records to return, defaults to 50
@param string $pageToken PageToken provided by the API
@param mixed $pageNumber Page Number, this value is simply for client state
@return \Twilio\Page Page of SyncListItemInstance | [
"Retrieve",
"a",
"single",
"page",
"of",
"SyncListItemInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php#L121-L139 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php | SyncListItemList.getPage | public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);
return new SyncListItemPage($this->version, $response, $this->solution);
} | php | public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);
return new SyncListItemPage($this->version, $response, $this->solution);
} | [
"public",
"function",
"getPage",
"(",
"$",
"targetUrl",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"version",
"->",
"getDomain",
"(",
")",
"->",
"getClient",
"(",
")",
"->",
"request",
"(",
"'GET'",
",",
"$",
"targetUrl",
")",
";",
"return",
"new",
"SyncListItemPage",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"response",
",",
"$",
"this",
"->",
"solution",
")",
";",
"}"
] | Retrieve a specific page of SyncListItemInstance records from the API.
Request is executed immediately
@param string $targetUrl API-generated URL for the requested results page
@return \Twilio\Page Page of SyncListItemInstance | [
"Retrieve",
"a",
"specific",
"page",
"of",
"SyncListItemInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php#L148-L155 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php | SyncListItemList.getContext | public function getContext($index) {
return new SyncListItemContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['listSid'],
$index
);
} | php | public function getContext($index) {
return new SyncListItemContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['listSid'],
$index
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"index",
")",
"{",
"return",
"new",
"SyncListItemContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'listSid'",
"]",
",",
"$",
"index",
")",
";",
"}"
] | Constructs a SyncListItemContext
@param integer $index The index
@return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext | [
"Constructs",
"a",
"SyncListItemContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php#L163-L170 | train |
twilio/twilio-php | Twilio/Rest/FlexApi/V1/ConfigurationContext.php | ConfigurationContext.fetch | public function fetch($options = array()) {
$options = new Values($options);
$params = Values::of(array('UiVersion' => $options['uiVersion'], ));
$payload = $this->version->fetch(
'GET',
$this->uri,
$params
);
return new ConfigurationInstance($this->version, $payload);
} | php | public function fetch($options = array()) {
$options = new Values($options);
$params = Values::of(array('UiVersion' => $options['uiVersion'], ));
$payload = $this->version->fetch(
'GET',
$this->uri,
$params
);
return new ConfigurationInstance($this->version, $payload);
} | [
"public",
"function",
"fetch",
"(",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"params",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'UiVersion'",
"=>",
"$",
"options",
"[",
"'uiVersion'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"fetch",
"(",
"'GET'",
",",
"$",
"this",
"->",
"uri",
",",
"$",
"params",
")",
";",
"return",
"new",
"ConfigurationInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Fetch a ConfigurationInstance
@param array|Options $options Optional Arguments
@return ConfigurationInstance Fetched ConfigurationInstance
@throws TwilioException When an HTTP error occurs. | [
"Fetch",
"a",
"ConfigurationInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/FlexApi/V1/ConfigurationContext.php#L40-L52 | train |
twilio/twilio-php | Twilio/Rest/FlexApi/V1/ConfigurationContext.php | ConfigurationContext.create | public function create() {
$data = Values::of(array());
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ConfigurationInstance($this->version, $payload);
} | php | public function create() {
$data = Values::of(array());
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ConfigurationInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"ConfigurationInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new ConfigurationInstance
@return ConfigurationInstance Newly created ConfigurationInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"ConfigurationInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/FlexApi/V1/ConfigurationContext.php#L60-L71 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/FunctionContext.php | FunctionContext.getFunctionVersions | protected function getFunctionVersions() {
if (!$this->_functionVersions) {
$this->_functionVersions = new FunctionVersionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_functionVersions;
} | php | protected function getFunctionVersions() {
if (!$this->_functionVersions) {
$this->_functionVersions = new FunctionVersionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_functionVersions;
} | [
"protected",
"function",
"getFunctionVersions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_functionVersions",
")",
"{",
"$",
"this",
"->",
"_functionVersions",
"=",
"new",
"FunctionVersionList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_functionVersions",
";",
"}"
] | Access the functionVersions
@return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList | [
"Access",
"the",
"functionVersions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/FunctionContext.php#L97-L107 | train |
twilio/twilio-php | Twilio/Rest/Chat/V1/Service/UserContext.php | UserContext.getUserChannels | protected function getUserChannels() {
if (!$this->_userChannels) {
$this->_userChannels = new UserChannelList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_userChannels;
} | php | protected function getUserChannels() {
if (!$this->_userChannels) {
$this->_userChannels = new UserChannelList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_userChannels;
} | [
"protected",
"function",
"getUserChannels",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_userChannels",
")",
"{",
"$",
"this",
"->",
"_userChannels",
"=",
"new",
"UserChannelList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_userChannels",
";",
"}"
] | Access the userChannels
@return \Twilio\Rest\Chat\V1\Service\User\UserChannelList | [
"Access",
"the",
"userChannels"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Chat/V1/Service/UserContext.php#L111-L121 | train |
twilio/twilio-php | Twilio/Rest/Chat/V1/Service/ChannelContext.php | ChannelContext.getMembers | protected function getMembers() {
if (!$this->_members) {
$this->_members = new MemberList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_members;
} | php | protected function getMembers() {
if (!$this->_members) {
$this->_members = new MemberList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_members;
} | [
"protected",
"function",
"getMembers",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_members",
")",
"{",
"$",
"this",
"->",
"_members",
"=",
"new",
"MemberList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_members",
";",
"}"
] | Access the members
@return \Twilio\Rest\Chat\V1\Service\Channel\MemberList | [
"Access",
"the",
"members"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Chat/V1/Service/ChannelContext.php#L120-L130 | train |
twilio/twilio-php | Twilio/Rest/Chat/V1/Service/ChannelContext.php | ChannelContext.getMessages | protected function getMessages() {
if (!$this->_messages) {
$this->_messages = new MessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_messages;
} | php | protected function getMessages() {
if (!$this->_messages) {
$this->_messages = new MessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_messages;
} | [
"protected",
"function",
"getMessages",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_messages",
")",
"{",
"$",
"this",
"->",
"_messages",
"=",
"new",
"MessageList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_messages",
";",
"}"
] | Access the messages
@return \Twilio\Rest\Chat\V1\Service\Channel\MessageList | [
"Access",
"the",
"messages"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Chat/V1/Service/ChannelContext.php#L137-L147 | train |
twilio/twilio-php | Twilio/Rest/Chat/V1/Service/ChannelContext.php | ChannelContext.getInvites | protected function getInvites() {
if (!$this->_invites) {
$this->_invites = new InviteList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_invites;
} | php | protected function getInvites() {
if (!$this->_invites) {
$this->_invites = new InviteList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_invites;
} | [
"protected",
"function",
"getInvites",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_invites",
")",
"{",
"$",
"this",
"->",
"_invites",
"=",
"new",
"InviteList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_invites",
";",
"}"
] | Access the invites
@return \Twilio\Rest\Chat\V1\Service\Channel\InviteList | [
"Access",
"the",
"invites"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Chat/V1/Service/ChannelContext.php#L154-L164 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/FieldTypeList.php | FieldTypeList.create | public function create($uniqueName, $options = array()) {
$options = new Values($options);
$data = Values::of(array('UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'], ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
} | php | public function create($uniqueName, $options = array()) {
$options = new Values($options);
$data = Values::of(array('UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'], ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"uniqueName",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'UniqueName'",
"=>",
"$",
"uniqueName",
",",
"'FriendlyName'",
"=>",
"$",
"options",
"[",
"'friendlyName'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"FieldTypeInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
")",
";",
"}"
] | Create a new FieldTypeInstance
@param string $uniqueName An application-defined string that uniquely
identifies the new resource
@param array|Options $options Optional Arguments
@return FieldTypeInstance Newly created FieldTypeInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"FieldTypeInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeList.php#L133-L146 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php | DocumentPermissionList.getContext | public function getContext($identity) {
return new DocumentPermissionContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['documentSid'],
$identity
);
} | php | public function getContext($identity) {
return new DocumentPermissionContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['documentSid'],
$identity
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"identity",
")",
"{",
"return",
"new",
"DocumentPermissionContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'documentSid'",
"]",
",",
"$",
"identity",
")",
";",
"}"
] | Constructs a DocumentPermissionContext
@param string $identity Identity of the user to whom the Sync Document
Permission applies.
@return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext | [
"Constructs",
"a",
"DocumentPermissionContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php#L131-L138 | train |
twilio/twilio-php | Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php | InstalledAddOnExtensionContext.update | public function update($enabled) {
$data = Values::of(array('Enabled' => Serialize::booleanToString($enabled), ));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new InstalledAddOnExtensionInstance(
$this->version,
$payload,
$this->solution['installedAddOnSid'],
$this->solution['sid']
);
} | php | public function update($enabled) {
$data = Values::of(array('Enabled' => Serialize::booleanToString($enabled), ));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new InstalledAddOnExtensionInstance(
$this->version,
$payload,
$this->solution['installedAddOnSid'],
$this->solution['sid']
);
} | [
"public",
"function",
"update",
"(",
"$",
"enabled",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Enabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"enabled",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"InstalledAddOnExtensionInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'installedAddOnSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}"
] | Update the InstalledAddOnExtensionInstance
@param boolean $enabled A Boolean indicating if the Extension will be invoked
@return InstalledAddOnExtensionInstance Updated
InstalledAddOnExtensionInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"InstalledAddOnExtensionInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php#L70-L86 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/ServiceContext.php | ServiceContext.getEnvironments | protected function getEnvironments() {
if (!$this->_environments) {
$this->_environments = new EnvironmentList($this->version, $this->solution['sid']);
}
return $this->_environments;
} | php | protected function getEnvironments() {
if (!$this->_environments) {
$this->_environments = new EnvironmentList($this->version, $this->solution['sid']);
}
return $this->_environments;
} | [
"protected",
"function",
"getEnvironments",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_environments",
")",
"{",
"$",
"this",
"->",
"_environments",
"=",
"new",
"EnvironmentList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_environments",
";",
"}"
] | Access the environments
@return \Twilio\Rest\Serverless\V1\Service\EnvironmentList | [
"Access",
"the",
"environments"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/ServiceContext.php#L105-L111 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/ServiceContext.php | ServiceContext.getFunctions | protected function getFunctions() {
if (!$this->_functions) {
$this->_functions = new FunctionList($this->version, $this->solution['sid']);
}
return $this->_functions;
} | php | protected function getFunctions() {
if (!$this->_functions) {
$this->_functions = new FunctionList($this->version, $this->solution['sid']);
}
return $this->_functions;
} | [
"protected",
"function",
"getFunctions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_functions",
")",
"{",
"$",
"this",
"->",
"_functions",
"=",
"new",
"FunctionList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_functions",
";",
"}"
] | Access the functions
@return \Twilio\Rest\Serverless\V1\Service\FunctionList | [
"Access",
"the",
"functions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/ServiceContext.php#L118-L124 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/ServiceContext.php | ServiceContext.getAssets | protected function getAssets() {
if (!$this->_assets) {
$this->_assets = new AssetList($this->version, $this->solution['sid']);
}
return $this->_assets;
} | php | protected function getAssets() {
if (!$this->_assets) {
$this->_assets = new AssetList($this->version, $this->solution['sid']);
}
return $this->_assets;
} | [
"protected",
"function",
"getAssets",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_assets",
")",
"{",
"$",
"this",
"->",
"_assets",
"=",
"new",
"AssetList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_assets",
";",
"}"
] | Access the assets
@return \Twilio\Rest\Serverless\V1\Service\AssetList | [
"Access",
"the",
"assets"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/ServiceContext.php#L131-L137 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/ServiceContext.php | ServiceContext.getBuilds | protected function getBuilds() {
if (!$this->_builds) {
$this->_builds = new BuildList($this->version, $this->solution['sid']);
}
return $this->_builds;
} | php | protected function getBuilds() {
if (!$this->_builds) {
$this->_builds = new BuildList($this->version, $this->solution['sid']);
}
return $this->_builds;
} | [
"protected",
"function",
"getBuilds",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_builds",
")",
"{",
"$",
"this",
"->",
"_builds",
"=",
"new",
"BuildList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_builds",
";",
"}"
] | Access the builds
@return \Twilio\Rest\Serverless\V1\Service\BuildList | [
"Access",
"the",
"builds"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/ServiceContext.php#L144-L150 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php | SampleList.create | public function create($language, $taggedText, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Language' => $language,
'TaggedText' => $taggedText,
'SourceChannel' => $options['sourceChannel'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new SampleInstance(
$this->version,
$payload,
$this->solution['assistantSid'],
$this->solution['taskSid']
);
} | php | public function create($language, $taggedText, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Language' => $language,
'TaggedText' => $taggedText,
'SourceChannel' => $options['sourceChannel'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new SampleInstance(
$this->version,
$payload,
$this->solution['assistantSid'],
$this->solution['taskSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"language",
",",
"$",
"taggedText",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Language'",
"=>",
"$",
"language",
",",
"'TaggedText'",
"=>",
"$",
"taggedText",
",",
"'SourceChannel'",
"=>",
"$",
"options",
"[",
"'sourceChannel'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"SampleInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'taskSid'",
"]",
")",
";",
"}"
] | Create a new SampleInstance
@param string $language The ISO language-country string that specifies the
language used for the new sample
@param string $taggedText The text example of how end users might express
the task
@param array|Options $options Optional Arguments
@return SampleInstance Newly created SampleInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"SampleInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php#L141-L163 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php | SampleList.getContext | public function getContext($sid) {
return new SampleContext(
$this->version,
$this->solution['assistantSid'],
$this->solution['taskSid'],
$sid
);
} | php | public function getContext($sid) {
return new SampleContext(
$this->version,
$this->solution['assistantSid'],
$this->solution['taskSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"SampleContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'taskSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a SampleContext
@param string $sid The unique string that identifies the resource
@return \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleContext | [
"Constructs",
"a",
"SampleContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php#L171-L178 | train |
twilio/twilio-php | Twilio/Rest/Sync/V1/Service/SyncStreamContext.php | SyncStreamContext.getStreamMessages | protected function getStreamMessages() {
if (!$this->_streamMessages) {
$this->_streamMessages = new StreamMessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_streamMessages;
} | php | protected function getStreamMessages() {
if (!$this->_streamMessages) {
$this->_streamMessages = new StreamMessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_streamMessages;
} | [
"protected",
"function",
"getStreamMessages",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_streamMessages",
")",
"{",
"$",
"this",
"->",
"_streamMessages",
"=",
"new",
"StreamMessageList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_streamMessages",
";",
"}"
] | Access the streamMessages
@return \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList | [
"Access",
"the",
"streamMessages"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Sync/V1/Service/SyncStreamContext.php#L109-L119 | train |
twilio/twilio-php | Twilio/Rest/Video/V1/CompositionHookList.php | CompositionHookList.create | public function create($friendlyName, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'FriendlyName' => $friendlyName,
'Enabled' => Serialize::booleanToString($options['enabled']),
'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }),
'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }),
'Resolution' => $options['resolution'],
'Format' => $options['format'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'Trim' => Serialize::booleanToString($options['trim']),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CompositionHookInstance($this->version, $payload);
} | php | public function create($friendlyName, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'FriendlyName' => $friendlyName,
'Enabled' => Serialize::booleanToString($options['enabled']),
'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }),
'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }),
'Resolution' => $options['resolution'],
'Format' => $options['format'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'Trim' => Serialize::booleanToString($options['trim']),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CompositionHookInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
"$",
"friendlyName",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'FriendlyName'",
"=>",
"$",
"friendlyName",
",",
"'Enabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'enabled'",
"]",
")",
",",
"'VideoLayout'",
"=>",
"Serialize",
"::",
"jsonObject",
"(",
"$",
"options",
"[",
"'videoLayout'",
"]",
")",
",",
"'AudioSources'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'audioSources'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'AudioSourcesExcluded'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'audioSourcesExcluded'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'Resolution'",
"=>",
"$",
"options",
"[",
"'resolution'",
"]",
",",
"'Format'",
"=>",
"$",
"options",
"[",
"'format'",
"]",
",",
"'StatusCallback'",
"=>",
"$",
"options",
"[",
"'statusCallback'",
"]",
",",
"'StatusCallbackMethod'",
"=>",
"$",
"options",
"[",
"'statusCallbackMethod'",
"]",
",",
"'Trim'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'trim'",
"]",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"CompositionHookInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new CompositionHookInstance
@param string $friendlyName Friendly name of the Composition Hook to be
shown in the console.
@param array|Options $options Optional Arguments
@return CompositionHookInstance Newly created CompositionHookInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"CompositionHookInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Video/V1/CompositionHookList.php#L140-L164 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.php | AddOnResultContext.getPayloads | protected function getPayloads() {
if (!$this->_payloads) {
$this->_payloads = new PayloadList(
$this->version,
$this->solution['accountSid'],
$this->solution['referenceSid'],
$this->solution['sid']
);
}
return $this->_payloads;
} | php | protected function getPayloads() {
if (!$this->_payloads) {
$this->_payloads = new PayloadList(
$this->version,
$this->solution['accountSid'],
$this->solution['referenceSid'],
$this->solution['sid']
);
}
return $this->_payloads;
} | [
"protected",
"function",
"getPayloads",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_payloads",
")",
"{",
"$",
"this",
"->",
"_payloads",
"=",
"new",
"PayloadList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'referenceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_payloads",
";",
"}"
] | Access the payloads
@return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList | [
"Access",
"the",
"payloads"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.php#L88-L99 | train |
twilio/twilio-php | Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.php | ParticipantContext.getMessageInteractions | protected function getMessageInteractions() {
if (!$this->_messageInteractions) {
$this->_messageInteractions = new MessageInteractionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sessionSid'],
$this->solution['sid']
);
}
return $this->_messageInteractions;
} | php | protected function getMessageInteractions() {
if (!$this->_messageInteractions) {
$this->_messageInteractions = new MessageInteractionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sessionSid'],
$this->solution['sid']
);
}
return $this->_messageInteractions;
} | [
"protected",
"function",
"getMessageInteractions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_messageInteractions",
")",
"{",
"$",
"this",
"->",
"_messageInteractions",
"=",
"new",
"MessageInteractionList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sessionSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_messageInteractions",
";",
"}"
] | Access the messageInteractions
@return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList | [
"Access",
"the",
"messageInteractions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.php#L86-L97 | train |
twilio/twilio-php | Twilio/Rest/Verify/V2/Service/VerificationCheckList.php | VerificationCheckList.create | public function create($code, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Code' => $code,
'To' => $options['to'],
'VerificationSid' => $options['verificationSid'],
'Amount' => $options['amount'],
'Payee' => $options['payee'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new VerificationCheckInstance($this->version, $payload, $this->solution['serviceSid']);
} | php | public function create($code, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Code' => $code,
'To' => $options['to'],
'VerificationSid' => $options['verificationSid'],
'Amount' => $options['amount'],
'Payee' => $options['payee'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new VerificationCheckInstance($this->version, $payload, $this->solution['serviceSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"code",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Code'",
"=>",
"$",
"code",
",",
"'To'",
"=>",
"$",
"options",
"[",
"'to'",
"]",
",",
"'VerificationSid'",
"=>",
"$",
"options",
"[",
"'verificationSid'",
"]",
",",
"'Amount'",
"=>",
"$",
"options",
"[",
"'amount'",
"]",
",",
"'Payee'",
"=>",
"$",
"options",
"[",
"'payee'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"VerificationCheckInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
")",
";",
"}"
] | Create a new VerificationCheckInstance
@param string $code The verification string
@param array|Options $options Optional Arguments
@return VerificationCheckInstance Newly created VerificationCheckInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"VerificationCheckInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Verify/V2/Service/VerificationCheckList.php#L46-L65 | train |
twilio/twilio-php | Twilio/Rest/Chat/V1/Service/RoleList.php | RoleList.create | public function create($friendlyName, $type, $permission) {
$data = Values::of(array(
'FriendlyName' => $friendlyName,
'Type' => $type,
'Permission' => Serialize::map($permission, function($e) { return $e; }),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
} | php | public function create($friendlyName, $type, $permission) {
$data = Values::of(array(
'FriendlyName' => $friendlyName,
'Type' => $type,
'Permission' => Serialize::map($permission, function($e) { return $e; }),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"friendlyName",
",",
"$",
"type",
",",
"$",
"permission",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'FriendlyName'",
"=>",
"$",
"friendlyName",
",",
"'Type'",
"=>",
"$",
"type",
",",
"'Permission'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"permission",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"RoleInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
")",
";",
"}"
] | Create a new RoleInstance
@param string $friendlyName The human-readable name of this role.
@param string $type What kind of role this is.
@param string $permission A permission this role should have.
@return RoleInstance Newly created RoleInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"RoleInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Chat/V1/Service/RoleList.php#L43-L58 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Call/RecordingContext.php | RecordingContext.update | public function update($status, $options = array()) {
$options = new Values($options);
$data = Values::of(array('Status' => $status, 'PauseBehavior' => $options['pauseBehavior'], ));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new RecordingInstance(
$this->version,
$payload,
$this->solution['accountSid'],
$this->solution['callSid'],
$this->solution['sid']
);
} | php | public function update($status, $options = array()) {
$options = new Values($options);
$data = Values::of(array('Status' => $status, 'PauseBehavior' => $options['pauseBehavior'], ));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new RecordingInstance(
$this->version,
$payload,
$this->solution['accountSid'],
$this->solution['callSid'],
$this->solution['sid']
);
} | [
"public",
"function",
"update",
"(",
"$",
"status",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Status'",
"=>",
"$",
"status",
",",
"'PauseBehavior'",
"=>",
"$",
"options",
"[",
"'pauseBehavior'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"RecordingInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'callSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}"
] | Update the RecordingInstance
@param string $status The new status of the recording
@param array|Options $options Optional Arguments
@return RecordingInstance Updated RecordingInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"RecordingInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Call/RecordingContext.php#L45-L64 | train |
twilio/twilio-php | Twilio/Rest/Preview/DeployedDevices/FleetContext.php | FleetContext.getDevices | protected function getDevices() {
if (!$this->_devices) {
$this->_devices = new DeviceList($this->version, $this->solution['sid']);
}
return $this->_devices;
} | php | protected function getDevices() {
if (!$this->_devices) {
$this->_devices = new DeviceList($this->version, $this->solution['sid']);
}
return $this->_devices;
} | [
"protected",
"function",
"getDevices",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_devices",
")",
"{",
"$",
"this",
"->",
"_devices",
"=",
"new",
"DeviceList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_devices",
";",
"}"
] | Access the devices
@return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeviceList | [
"Access",
"the",
"devices"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/DeployedDevices/FleetContext.php#L114-L120 | train |
twilio/twilio-php | Twilio/Rest/Preview/DeployedDevices/FleetContext.php | FleetContext.getCertificates | protected function getCertificates() {
if (!$this->_certificates) {
$this->_certificates = new CertificateList($this->version, $this->solution['sid']);
}
return $this->_certificates;
} | php | protected function getCertificates() {
if (!$this->_certificates) {
$this->_certificates = new CertificateList($this->version, $this->solution['sid']);
}
return $this->_certificates;
} | [
"protected",
"function",
"getCertificates",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_certificates",
")",
"{",
"$",
"this",
"->",
"_certificates",
"=",
"new",
"CertificateList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_certificates",
";",
"}"
] | Access the certificates
@return \Twilio\Rest\Preview\DeployedDevices\Fleet\CertificateList | [
"Access",
"the",
"certificates"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/DeployedDevices/FleetContext.php#L140-L146 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php | EnvironmentContext.getVariables | protected function getVariables() {
if (!$this->_variables) {
$this->_variables = new VariableList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_variables;
} | php | protected function getVariables() {
if (!$this->_variables) {
$this->_variables = new VariableList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_variables;
} | [
"protected",
"function",
"getVariables",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_variables",
")",
"{",
"$",
"this",
"->",
"_variables",
"=",
"new",
"VariableList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_variables",
";",
"}"
] | Access the variables
@return \Twilio\Rest\Serverless\V1\Service\Environment\VariableList | [
"Access",
"the",
"variables"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php#L76-L86 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php | EnvironmentContext.getDeployments | protected function getDeployments() {
if (!$this->_deployments) {
$this->_deployments = new DeploymentList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_deployments;
} | php | protected function getDeployments() {
if (!$this->_deployments) {
$this->_deployments = new DeploymentList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_deployments;
} | [
"protected",
"function",
"getDeployments",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_deployments",
")",
"{",
"$",
"this",
"->",
"_deployments",
"=",
"new",
"DeploymentList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_deployments",
";",
"}"
] | Access the deployments
@return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList | [
"Access",
"the",
"deployments"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php#L93-L103 | train |
twilio/twilio-php | Twilio/Rest/Studio/V1/FlowContext.php | FlowContext.getEngagements | protected function getEngagements() {
if (!$this->_engagements) {
$this->_engagements = new EngagementList($this->version, $this->solution['sid']);
}
return $this->_engagements;
} | php | protected function getEngagements() {
if (!$this->_engagements) {
$this->_engagements = new EngagementList($this->version, $this->solution['sid']);
}
return $this->_engagements;
} | [
"protected",
"function",
"getEngagements",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_engagements",
")",
"{",
"$",
"this",
"->",
"_engagements",
"=",
"new",
"EngagementList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_engagements",
";",
"}"
] | Access the engagements
@return \Twilio\Rest\Studio\V1\Flow\EngagementList | [
"Access",
"the",
"engagements"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Studio/V1/FlowContext.php#L78-L84 | train |
twilio/twilio-php | Twilio/Rest/Studio/V1/FlowContext.php | FlowContext.getExecutions | protected function getExecutions() {
if (!$this->_executions) {
$this->_executions = new ExecutionList($this->version, $this->solution['sid']);
}
return $this->_executions;
} | php | protected function getExecutions() {
if (!$this->_executions) {
$this->_executions = new ExecutionList($this->version, $this->solution['sid']);
}
return $this->_executions;
} | [
"protected",
"function",
"getExecutions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_executions",
")",
"{",
"$",
"this",
"->",
"_executions",
"=",
"new",
"ExecutionList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_executions",
";",
"}"
] | Access the executions
@return \Twilio\Rest\Studio\V1\Flow\ExecutionList | [
"Access",
"the",
"executions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Studio/V1/FlowContext.php#L91-L97 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/AddressContext.php | AddressContext.getDependentPhoneNumbers | protected function getDependentPhoneNumbers() {
if (!$this->_dependentPhoneNumbers) {
$this->_dependentPhoneNumbers = new DependentPhoneNumberList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
return $this->_dependentPhoneNumbers;
} | php | protected function getDependentPhoneNumbers() {
if (!$this->_dependentPhoneNumbers) {
$this->_dependentPhoneNumbers = new DependentPhoneNumberList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
return $this->_dependentPhoneNumbers;
} | [
"protected",
"function",
"getDependentPhoneNumbers",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_dependentPhoneNumbers",
")",
"{",
"$",
"this",
"->",
"_dependentPhoneNumbers",
"=",
"new",
"DependentPhoneNumberList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_dependentPhoneNumbers",
";",
"}"
] | Access the dependentPhoneNumbers
@return \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList | [
"Access",
"the",
"dependentPhoneNumbers"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/AddressContext.php#L118-L128 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php | DeploymentList.create | public function create($buildSid) {
$data = Values::of(array('BuildSid' => $buildSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new DeploymentInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['environmentSid']
);
} | php | public function create($buildSid) {
$data = Values::of(array('BuildSid' => $buildSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new DeploymentInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['environmentSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"buildSid",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'BuildSid'",
"=>",
"$",
"buildSid",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"DeploymentInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'environmentSid'",
"]",
")",
";",
"}"
] | Create a new DeploymentInstance
@param string $buildSid Build Sid.
@return DeploymentInstance Newly created DeploymentInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"DeploymentInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php#L130-L146 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php | DeploymentList.getContext | public function getContext($sid) {
return new DeploymentContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['environmentSid'],
$sid
);
} | php | public function getContext($sid) {
return new DeploymentContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['environmentSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"DeploymentContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'environmentSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a DeploymentContext
@param string $sid Deployment Sid.
@return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentContext | [
"Constructs",
"a",
"DeploymentContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php#L154-L161 | train |
twilio/twilio-php | Twilio/Rest/Messaging/V1/Service/ShortCodeList.php | ShortCodeList.create | public function create($shortCodeSid) {
$data = Values::of(array('ShortCodeSid' => $shortCodeSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']);
} | php | public function create($shortCodeSid) {
$data = Values::of(array('ShortCodeSid' => $shortCodeSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"shortCodeSid",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'ShortCodeSid'",
"=>",
"$",
"shortCodeSid",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"ShortCodeInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
")",
";",
"}"
] | Create a new ShortCodeInstance
@param string $shortCodeSid SID of the ShortCode being added to the Service.
@return ShortCodeInstance Newly created ShortCodeInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"ShortCodeInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php#L44-L55 | train |
twilio/twilio-php | Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainList.php | TerminatingSipDomainList.create | public function create($sipDomainSid) {
$data = Values::of(array('SipDomainSid' => $sipDomainSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new TerminatingSipDomainInstance($this->version, $payload, $this->solution['trunkSid']);
} | php | public function create($sipDomainSid) {
$data = Values::of(array('SipDomainSid' => $sipDomainSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new TerminatingSipDomainInstance($this->version, $payload, $this->solution['trunkSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"sipDomainSid",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'SipDomainSid'",
"=>",
"$",
"sipDomainSid",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"TerminatingSipDomainInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'trunkSid'",
"]",
")",
";",
"}"
] | Create a new TerminatingSipDomainInstance
@param string $sipDomainSid The SID of the SIP Domain to associate with the
trunk
@return TerminatingSipDomainInstance Newly created
TerminatingSipDomainInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"TerminatingSipDomainInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainList.php#L42-L53 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Call/RecordingList.php | RecordingList.getContext | public function getContext($sid) {
return new RecordingContext(
$this->version,
$this->solution['accountSid'],
$this->solution['callSid'],
$sid
);
} | php | public function getContext($sid) {
return new RecordingContext(
$this->version,
$this->solution['accountSid'],
$this->solution['callSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"RecordingContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'callSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a RecordingContext
@param string $sid The unique string that identifies the resource
@return \Twilio\Rest\Api\V2010\Account\Call\RecordingContext | [
"Constructs",
"a",
"RecordingContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Call/RecordingList.php#L168-L175 | train |
twilio/twilio-php | Twilio/Rest/Video/V1/CompositionList.php | CompositionList.create | public function create($roomSid, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'RoomSid' => $roomSid,
'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }),
'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }),
'Resolution' => $options['resolution'],
'Format' => $options['format'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'Trim' => Serialize::booleanToString($options['trim']),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CompositionInstance($this->version, $payload);
} | php | public function create($roomSid, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'RoomSid' => $roomSid,
'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }),
'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }),
'Resolution' => $options['resolution'],
'Format' => $options['format'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'Trim' => Serialize::booleanToString($options['trim']),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CompositionInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
"$",
"roomSid",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'RoomSid'",
"=>",
"$",
"roomSid",
",",
"'VideoLayout'",
"=>",
"Serialize",
"::",
"jsonObject",
"(",
"$",
"options",
"[",
"'videoLayout'",
"]",
")",
",",
"'AudioSources'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'audioSources'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'AudioSourcesExcluded'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'audioSourcesExcluded'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'Resolution'",
"=>",
"$",
"options",
"[",
"'resolution'",
"]",
",",
"'Format'",
"=>",
"$",
"options",
"[",
"'format'",
"]",
",",
"'StatusCallback'",
"=>",
"$",
"options",
"[",
"'statusCallback'",
"]",
",",
"'StatusCallbackMethod'",
"=>",
"$",
"options",
"[",
"'statusCallbackMethod'",
"]",
",",
"'Trim'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'trim'",
"]",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"CompositionInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new CompositionInstance
@param string $roomSid Twilio Room SID.
@param array|Options $options Optional Arguments
@return CompositionInstance Newly created CompositionInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"CompositionInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Video/V1/CompositionList.php#L139-L162 | train |
twilio/twilio-php | Twilio/Rest/Authy/V1/ServiceContext.php | ServiceContext.getEntities | protected function getEntities() {
if (!$this->_entities) {
$this->_entities = new EntityList($this->version, $this->solution['sid']);
}
return $this->_entities;
} | php | protected function getEntities() {
if (!$this->_entities) {
$this->_entities = new EntityList($this->version, $this->solution['sid']);
}
return $this->_entities;
} | [
"protected",
"function",
"getEntities",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_entities",
")",
"{",
"$",
"this",
"->",
"_entities",
"=",
"new",
"EntityList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_entities",
";",
"}"
] | Access the entities
@return \Twilio\Rest\Authy\V1\Service\EntityList | [
"Access",
"the",
"entities"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Authy/V1/ServiceContext.php#L99-L105 | train |
twilio/twilio-php | Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php | StepContextList.getContext | public function getContext() {
return new StepContextContext(
$this->version,
$this->solution['flowSid'],
$this->solution['engagementSid'],
$this->solution['stepSid']
);
} | php | public function getContext() {
return new StepContextContext(
$this->version,
$this->solution['flowSid'],
$this->solution['engagementSid'],
$this->solution['stepSid']
);
} | [
"public",
"function",
"getContext",
"(",
")",
"{",
"return",
"new",
"StepContextContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'flowSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'engagementSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'stepSid'",
"]",
")",
";",
"}"
] | Constructs a StepContextContext
@return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext | [
"Constructs",
"a",
"StepContextContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php#L41-L48 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.php | AddOnResultList.getContext | public function getContext($sid) {
return new AddOnResultContext(
$this->version,
$this->solution['accountSid'],
$this->solution['referenceSid'],
$sid
);
} | php | public function getContext($sid) {
return new AddOnResultContext(
$this->version,
$this->solution['accountSid'],
$this->solution['referenceSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"AddOnResultContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'referenceSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a AddOnResultContext
@param string $sid The unique string that identifies the resource to fetch
@return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultContext | [
"Constructs",
"a",
"AddOnResultContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.php#L127-L134 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.php | IpAccessControlListContext.getIpAddresses | protected function getIpAddresses() {
if (!$this->_ipAddresses) {
$this->_ipAddresses = new IpAddressList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
return $this->_ipAddresses;
} | php | protected function getIpAddresses() {
if (!$this->_ipAddresses) {
$this->_ipAddresses = new IpAddressList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
return $this->_ipAddresses;
} | [
"protected",
"function",
"getIpAddresses",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_ipAddresses",
")",
"{",
"$",
"this",
"->",
"_ipAddresses",
"=",
"new",
"IpAddressList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_ipAddresses",
";",
"}"
] | Access the ipAddresses
@return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList | [
"Access",
"the",
"ipAddresses"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.php#L105-L115 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Message/MediaList.php | MediaList.getContext | public function getContext($sid) {
return new MediaContext(
$this->version,
$this->solution['accountSid'],
$this->solution['messageSid'],
$sid
);
} | php | public function getContext($sid) {
return new MediaContext(
$this->version,
$this->solution['accountSid'],
$this->solution['messageSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"MediaContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'messageSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a MediaContext
@param string $sid The unique string that identifies this resource
@return \Twilio\Rest\Api\V2010\Account\Message\MediaContext | [
"Constructs",
"a",
"MediaContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Message/MediaList.php#L135-L142 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php | DocumentPermissionInstance.update | public function update($read, $write, $manage) {
return $this->proxy()->update($read, $write, $manage);
} | php | public function update($read, $write, $manage) {
return $this->proxy()->update($read, $write, $manage);
} | [
"public",
"function",
"update",
"(",
"$",
"read",
",",
"$",
"write",
",",
"$",
"manage",
")",
"{",
"return",
"$",
"this",
"->",
"proxy",
"(",
")",
"->",
"update",
"(",
"$",
"read",
",",
"$",
"write",
",",
"$",
"manage",
")",
";",
"}"
] | Update the DocumentPermissionInstance
@param boolean $read Read access.
@param boolean $write Write access.
@param boolean $manage Manage access.
@return DocumentPermissionInstance Updated DocumentPermissionInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"DocumentPermissionInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php#L111-L113 | train |
twilio/twilio-php | Twilio/Rest/Verify/V2/ServiceContext.php | ServiceContext.getVerifications | protected function getVerifications() {
if (!$this->_verifications) {
$this->_verifications = new VerificationList($this->version, $this->solution['sid']);
}
return $this->_verifications;
} | php | protected function getVerifications() {
if (!$this->_verifications) {
$this->_verifications = new VerificationList($this->version, $this->solution['sid']);
}
return $this->_verifications;
} | [
"protected",
"function",
"getVerifications",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_verifications",
")",
"{",
"$",
"this",
"->",
"_verifications",
"=",
"new",
"VerificationList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_verifications",
";",
"}"
] | Access the verifications
@return \Twilio\Rest\Verify\V2\Service\VerificationList | [
"Access",
"the",
"verifications"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Verify/V2/ServiceContext.php#L111-L117 | train |
twilio/twilio-php | Twilio/Rest/Verify/V2/ServiceContext.php | ServiceContext.getVerificationChecks | protected function getVerificationChecks() {
if (!$this->_verificationChecks) {
$this->_verificationChecks = new VerificationCheckList($this->version, $this->solution['sid']);
}
return $this->_verificationChecks;
} | php | protected function getVerificationChecks() {
if (!$this->_verificationChecks) {
$this->_verificationChecks = new VerificationCheckList($this->version, $this->solution['sid']);
}
return $this->_verificationChecks;
} | [
"protected",
"function",
"getVerificationChecks",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_verificationChecks",
")",
"{",
"$",
"this",
"->",
"_verificationChecks",
"=",
"new",
"VerificationCheckList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_verificationChecks",
";",
"}"
] | Access the verificationChecks
@return \Twilio\Rest\Verify\V2\Service\VerificationCheckList | [
"Access",
"the",
"verificationChecks"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Verify/V2/ServiceContext.php#L124-L130 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/DocumentContext.php | DocumentContext.update | public function update($data) {
$data = Values::of(array('Data' => Serialize::jsonObject($data), ));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new DocumentInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['sid']
);
} | php | public function update($data) {
$data = Values::of(array('Data' => Serialize::jsonObject($data), ));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new DocumentInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['sid']
);
} | [
"public",
"function",
"update",
"(",
"$",
"data",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Data'",
"=>",
"Serialize",
"::",
"jsonObject",
"(",
"$",
"data",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"DocumentInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}"
] | Update the DocumentInstance
@param array $data The data
@return DocumentInstance Updated DocumentInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"DocumentInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/DocumentContext.php#L85-L101 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/DocumentContext.php | DocumentContext.getDocumentPermissions | protected function getDocumentPermissions() {
if (!$this->_documentPermissions) {
$this->_documentPermissions = new DocumentPermissionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_documentPermissions;
} | php | protected function getDocumentPermissions() {
if (!$this->_documentPermissions) {
$this->_documentPermissions = new DocumentPermissionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_documentPermissions;
} | [
"protected",
"function",
"getDocumentPermissions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_documentPermissions",
")",
"{",
"$",
"this",
"->",
"_documentPermissions",
"=",
"new",
"DocumentPermissionList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_documentPermissions",
";",
"}"
] | Access the documentPermissions
@return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList | [
"Access",
"the",
"documentPermissions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/DocumentContext.php#L108-L118 | train |
twilio/twilio-php | Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php | WorkerContext.getReservations | protected function getReservations() {
if (!$this->_reservations) {
$this->_reservations = new ReservationList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
return $this->_reservations;
} | php | protected function getReservations() {
if (!$this->_reservations) {
$this->_reservations = new ReservationList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
return $this->_reservations;
} | [
"protected",
"function",
"getReservations",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_reservations",
")",
"{",
"$",
"this",
"->",
"_reservations",
"=",
"new",
"ReservationList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'workspaceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_reservations",
";",
"}"
] | Access the reservations
@return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList | [
"Access",
"the",
"reservations"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php#L179-L189 | train |
twilio/twilio-php | Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php | WorkerContext.getWorkerChannels | protected function getWorkerChannels() {
if (!$this->_workerChannels) {
$this->_workerChannels = new WorkerChannelList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
return $this->_workerChannels;
} | php | protected function getWorkerChannels() {
if (!$this->_workerChannels) {
$this->_workerChannels = new WorkerChannelList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
return $this->_workerChannels;
} | [
"protected",
"function",
"getWorkerChannels",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_workerChannels",
")",
"{",
"$",
"this",
"->",
"_workerChannels",
"=",
"new",
"WorkerChannelList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'workspaceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_workerChannels",
";",
"}"
] | Access the workerChannels
@return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList | [
"Access",
"the",
"workerChannels"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php#L196-L206 | train |
twilio/twilio-php | Twilio/Rest/Sync/V1/ServiceContext.php | ServiceContext.getSyncStreams | protected function getSyncStreams() {
if (!$this->_syncStreams) {
$this->_syncStreams = new SyncStreamList($this->version, $this->solution['sid']);
}
return $this->_syncStreams;
} | php | protected function getSyncStreams() {
if (!$this->_syncStreams) {
$this->_syncStreams = new SyncStreamList($this->version, $this->solution['sid']);
}
return $this->_syncStreams;
} | [
"protected",
"function",
"getSyncStreams",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_syncStreams",
")",
"{",
"$",
"this",
"->",
"_syncStreams",
"=",
"new",
"SyncStreamList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_syncStreams",
";",
"}"
] | Access the syncStreams
@return \Twilio\Rest\Sync\V1\Service\SyncStreamList | [
"Access",
"the",
"syncStreams"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Sync/V1/ServiceContext.php#L156-L162 | train |
twilio/twilio-php | Twilio/Jwt/Client/ScopeURI.php | ScopeURI.parse | public static function parse($uri) {
if (strpos($uri, 'scope:') !== 0) {
throw new \UnexpectedValueException(
'Not a scope URI according to scheme');
}
$parts = explode('?', $uri, 1);
$params = null;
if (count($parts) > 1) {
parse_str($parts[1], $params);
}
$parts = explode(':', $parts[0], 2);
if (count($parts) != 3) {
throw new \UnexpectedValueException(
'Not enough parts for scope URI');
}
list($scheme, $service, $privilege) = $parts;
return new ScopeURI($service, $privilege, $params);
} | php | public static function parse($uri) {
if (strpos($uri, 'scope:') !== 0) {
throw new \UnexpectedValueException(
'Not a scope URI according to scheme');
}
$parts = explode('?', $uri, 1);
$params = null;
if (count($parts) > 1) {
parse_str($parts[1], $params);
}
$parts = explode(':', $parts[0], 2);
if (count($parts) != 3) {
throw new \UnexpectedValueException(
'Not enough parts for scope URI');
}
list($scheme, $service, $privilege) = $parts;
return new ScopeURI($service, $privilege, $params);
} | [
"public",
"static",
"function",
"parse",
"(",
"$",
"uri",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"uri",
",",
"'scope:'",
")",
"!==",
"0",
")",
"{",
"throw",
"new",
"\\",
"UnexpectedValueException",
"(",
"'Not a scope URI according to scheme'",
")",
";",
"}",
"$",
"parts",
"=",
"explode",
"(",
"'?'",
",",
"$",
"uri",
",",
"1",
")",
";",
"$",
"params",
"=",
"null",
";",
"if",
"(",
"count",
"(",
"$",
"parts",
")",
">",
"1",
")",
"{",
"parse_str",
"(",
"$",
"parts",
"[",
"1",
"]",
",",
"$",
"params",
")",
";",
"}",
"$",
"parts",
"=",
"explode",
"(",
"':'",
",",
"$",
"parts",
"[",
"0",
"]",
",",
"2",
")",
";",
"if",
"(",
"count",
"(",
"$",
"parts",
")",
"!=",
"3",
")",
"{",
"throw",
"new",
"\\",
"UnexpectedValueException",
"(",
"'Not enough parts for scope URI'",
")",
";",
"}",
"list",
"(",
"$",
"scheme",
",",
"$",
"service",
",",
"$",
"privilege",
")",
"=",
"$",
"parts",
";",
"return",
"new",
"ScopeURI",
"(",
"$",
"service",
",",
"$",
"privilege",
",",
"$",
"params",
")",
";",
"}"
] | Parse a scope URI into a ScopeURI object
@param string $uri The scope URI
@return ScopeURI The parsed scope uri
@throws \UnexpectedValueException | [
"Parse",
"a",
"scope",
"URI",
"into",
"a",
"ScopeURI",
"object"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Jwt/Client/ScopeURI.php#L44-L66 | train |
twilio/twilio-php | Twilio/Rest/Wireless/V1/CommandList.php | CommandList.create | public function create($command, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Command' => $command,
'Sim' => $options['sim'],
'CallbackMethod' => $options['callbackMethod'],
'CallbackUrl' => $options['callbackUrl'],
'CommandMode' => $options['commandMode'],
'IncludeSid' => $options['includeSid'],
'DeliveryReceiptRequested' => Serialize::booleanToString($options['deliveryReceiptRequested']),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CommandInstance($this->version, $payload);
} | php | public function create($command, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Command' => $command,
'Sim' => $options['sim'],
'CallbackMethod' => $options['callbackMethod'],
'CallbackUrl' => $options['callbackUrl'],
'CommandMode' => $options['commandMode'],
'IncludeSid' => $options['includeSid'],
'DeliveryReceiptRequested' => Serialize::booleanToString($options['deliveryReceiptRequested']),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CommandInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
"$",
"command",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Command'",
"=>",
"$",
"command",
",",
"'Sim'",
"=>",
"$",
"options",
"[",
"'sim'",
"]",
",",
"'CallbackMethod'",
"=>",
"$",
"options",
"[",
"'callbackMethod'",
"]",
",",
"'CallbackUrl'",
"=>",
"$",
"options",
"[",
"'callbackUrl'",
"]",
",",
"'CommandMode'",
"=>",
"$",
"options",
"[",
"'commandMode'",
"]",
",",
"'IncludeSid'",
"=>",
"$",
"options",
"[",
"'includeSid'",
"]",
",",
"'DeliveryReceiptRequested'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'deliveryReceiptRequested'",
"]",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"CommandInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new CommandInstance
@param string $command The message body of the Command or a Base64 encoded
byte string in binary mode.
@param array|Options $options Optional Arguments
@return CommandInstance Newly created CommandInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"CommandInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Wireless/V1/CommandList.php#L137-L158 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php | SyncListPermissionContext.update | public function update($read, $write, $manage) {
$data = Values::of(array(
'Read' => Serialize::booleanToString($read),
'Write' => Serialize::booleanToString($write),
'Manage' => Serialize::booleanToString($manage),
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new SyncListPermissionInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['listSid'],
$this->solution['identity']
);
} | php | public function update($read, $write, $manage) {
$data = Values::of(array(
'Read' => Serialize::booleanToString($read),
'Write' => Serialize::booleanToString($write),
'Manage' => Serialize::booleanToString($manage),
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new SyncListPermissionInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['listSid'],
$this->solution['identity']
);
} | [
"public",
"function",
"update",
"(",
"$",
"read",
",",
"$",
"write",
",",
"$",
"manage",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Read'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"read",
")",
",",
"'Write'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"write",
")",
",",
"'Manage'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"manage",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"SyncListPermissionInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'listSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'identity'",
"]",
")",
";",
"}"
] | Update the SyncListPermissionInstance
@param boolean $read Read access.
@param boolean $write Write access.
@param boolean $manage Manage access.
@return SyncListPermissionInstance Updated SyncListPermissionInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"SyncListPermissionInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php#L87-L108 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/AssetContext.php | AssetContext.getAssetVersions | protected function getAssetVersions() {
if (!$this->_assetVersions) {
$this->_assetVersions = new AssetVersionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_assetVersions;
} | php | protected function getAssetVersions() {
if (!$this->_assetVersions) {
$this->_assetVersions = new AssetVersionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
return $this->_assetVersions;
} | [
"protected",
"function",
"getAssetVersions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_assetVersions",
")",
"{",
"$",
"this",
"->",
"_assetVersions",
"=",
"new",
"AssetVersionList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_assetVersions",
";",
"}"
] | Access the assetVersions
@return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList | [
"Access",
"the",
"assetVersions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/AssetContext.php#L97-L107 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/AssistantContext.php | AssistantContext.getFieldTypes | protected function getFieldTypes() {
if (!$this->_fieldTypes) {
$this->_fieldTypes = new FieldTypeList($this->version, $this->solution['sid']);
}
return $this->_fieldTypes;
} | php | protected function getFieldTypes() {
if (!$this->_fieldTypes) {
$this->_fieldTypes = new FieldTypeList($this->version, $this->solution['sid']);
}
return $this->_fieldTypes;
} | [
"protected",
"function",
"getFieldTypes",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_fieldTypes",
")",
"{",
"$",
"this",
"->",
"_fieldTypes",
"=",
"new",
"FieldTypeList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_fieldTypes",
";",
"}"
] | Access the fieldTypes
@return \Twilio\Rest\Autopilot\V1\Assistant\FieldTypeList | [
"Access",
"the",
"fieldTypes"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/AssistantContext.php#L132-L138 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/AssistantContext.php | AssistantContext.getModelBuilds | protected function getModelBuilds() {
if (!$this->_modelBuilds) {
$this->_modelBuilds = new ModelBuildList($this->version, $this->solution['sid']);
}
return $this->_modelBuilds;
} | php | protected function getModelBuilds() {
if (!$this->_modelBuilds) {
$this->_modelBuilds = new ModelBuildList($this->version, $this->solution['sid']);
}
return $this->_modelBuilds;
} | [
"protected",
"function",
"getModelBuilds",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_modelBuilds",
")",
"{",
"$",
"this",
"->",
"_modelBuilds",
"=",
"new",
"ModelBuildList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_modelBuilds",
";",
"}"
] | Access the modelBuilds
@return \Twilio\Rest\Autopilot\V1\Assistant\ModelBuildList | [
"Access",
"the",
"modelBuilds"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/AssistantContext.php#L158-L164 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/AssistantContext.php | AssistantContext.getQueries | protected function getQueries() {
if (!$this->_queries) {
$this->_queries = new QueryList($this->version, $this->solution['sid']);
}
return $this->_queries;
} | php | protected function getQueries() {
if (!$this->_queries) {
$this->_queries = new QueryList($this->version, $this->solution['sid']);
}
return $this->_queries;
} | [
"protected",
"function",
"getQueries",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_queries",
")",
"{",
"$",
"this",
"->",
"_queries",
"=",
"new",
"QueryList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_queries",
";",
"}"
] | Access the queries
@return \Twilio\Rest\Autopilot\V1\Assistant\QueryList | [
"Access",
"the",
"queries"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/AssistantContext.php#L171-L177 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/AssistantContext.php | AssistantContext.getStyleSheet | protected function getStyleSheet() {
if (!$this->_styleSheet) {
$this->_styleSheet = new StyleSheetList($this->version, $this->solution['sid']);
}
return $this->_styleSheet;
} | php | protected function getStyleSheet() {
if (!$this->_styleSheet) {
$this->_styleSheet = new StyleSheetList($this->version, $this->solution['sid']);
}
return $this->_styleSheet;
} | [
"protected",
"function",
"getStyleSheet",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_styleSheet",
")",
"{",
"$",
"this",
"->",
"_styleSheet",
"=",
"new",
"StyleSheetList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_styleSheet",
";",
"}"
] | Access the styleSheet
@return \Twilio\Rest\Autopilot\V1\Assistant\StyleSheetList | [
"Access",
"the",
"styleSheet"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/AssistantContext.php#L184-L190 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/AssistantContext.php | AssistantContext.getDefaults | protected function getDefaults() {
if (!$this->_defaults) {
$this->_defaults = new DefaultsList($this->version, $this->solution['sid']);
}
return $this->_defaults;
} | php | protected function getDefaults() {
if (!$this->_defaults) {
$this->_defaults = new DefaultsList($this->version, $this->solution['sid']);
}
return $this->_defaults;
} | [
"protected",
"function",
"getDefaults",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_defaults",
")",
"{",
"$",
"this",
"->",
"_defaults",
"=",
"new",
"DefaultsList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_defaults",
";",
"}"
] | Access the defaults
@return \Twilio\Rest\Autopilot\V1\Assistant\DefaultsList | [
"Access",
"the",
"defaults"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/AssistantContext.php#L197-L203 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/AssistantContext.php | AssistantContext.getDialogues | protected function getDialogues() {
if (!$this->_dialogues) {
$this->_dialogues = new DialogueList($this->version, $this->solution['sid']);
}
return $this->_dialogues;
} | php | protected function getDialogues() {
if (!$this->_dialogues) {
$this->_dialogues = new DialogueList($this->version, $this->solution['sid']);
}
return $this->_dialogues;
} | [
"protected",
"function",
"getDialogues",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_dialogues",
")",
"{",
"$",
"this",
"->",
"_dialogues",
"=",
"new",
"DialogueList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_dialogues",
";",
"}"
] | Access the dialogues
@return \Twilio\Rest\Autopilot\V1\Assistant\DialogueList | [
"Access",
"the",
"dialogues"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/AssistantContext.php#L210-L216 | train |
twilio/twilio-php | Twilio/Rest/Trunking/V1/TrunkContext.php | TrunkContext.getOriginationUrls | protected function getOriginationUrls() {
if (!$this->_originationUrls) {
$this->_originationUrls = new OriginationUrlList($this->version, $this->solution['sid']);
}
return $this->_originationUrls;
} | php | protected function getOriginationUrls() {
if (!$this->_originationUrls) {
$this->_originationUrls = new OriginationUrlList($this->version, $this->solution['sid']);
}
return $this->_originationUrls;
} | [
"protected",
"function",
"getOriginationUrls",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_originationUrls",
")",
"{",
"$",
"this",
"->",
"_originationUrls",
"=",
"new",
"OriginationUrlList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_originationUrls",
";",
"}"
] | Access the originationUrls
@return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList | [
"Access",
"the",
"originationUrls"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Trunking/V1/TrunkContext.php#L122-L128 | train |
twilio/twilio-php | Twilio/Rest/Trunking/V1/TrunkContext.php | TrunkContext.getCredentialsLists | protected function getCredentialsLists() {
if (!$this->_credentialsLists) {
$this->_credentialsLists = new CredentialListList($this->version, $this->solution['sid']);
}
return $this->_credentialsLists;
} | php | protected function getCredentialsLists() {
if (!$this->_credentialsLists) {
$this->_credentialsLists = new CredentialListList($this->version, $this->solution['sid']);
}
return $this->_credentialsLists;
} | [
"protected",
"function",
"getCredentialsLists",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_credentialsLists",
")",
"{",
"$",
"this",
"->",
"_credentialsLists",
"=",
"new",
"CredentialListList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_credentialsLists",
";",
"}"
] | Access the credentialsLists
@return \Twilio\Rest\Trunking\V1\Trunk\CredentialListList | [
"Access",
"the",
"credentialsLists"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Trunking/V1/TrunkContext.php#L135-L141 | train |
twilio/twilio-php | Twilio/Rest/Trunking/V1/TrunkContext.php | TrunkContext.getTerminatingSipDomains | protected function getTerminatingSipDomains() {
if (!$this->_terminatingSipDomains) {
$this->_terminatingSipDomains = new TerminatingSipDomainList(
$this->version,
$this->solution['sid']
);
}
return $this->_terminatingSipDomains;
} | php | protected function getTerminatingSipDomains() {
if (!$this->_terminatingSipDomains) {
$this->_terminatingSipDomains = new TerminatingSipDomainList(
$this->version,
$this->solution['sid']
);
}
return $this->_terminatingSipDomains;
} | [
"protected",
"function",
"getTerminatingSipDomains",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_terminatingSipDomains",
")",
"{",
"$",
"this",
"->",
"_terminatingSipDomains",
"=",
"new",
"TerminatingSipDomainList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_terminatingSipDomains",
";",
"}"
] | Access the terminatingSipDomains
@return \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainList | [
"Access",
"the",
"terminatingSipDomains"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Trunking/V1/TrunkContext.php#L174-L183 | train |
twilio/twilio-php | Twilio/Rest/Preview/Wireless/RatePlanList.php | RatePlanList.create | public function create($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'UniqueName' => $options['uniqueName'],
'FriendlyName' => $options['friendlyName'],
'DataEnabled' => Serialize::booleanToString($options['dataEnabled']),
'DataLimit' => $options['dataLimit'],
'DataMetering' => $options['dataMetering'],
'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']),
'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
'CommandsEnabled' => Serialize::booleanToString($options['commandsEnabled']),
'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']),
'InternationalRoaming' => Serialize::map($options['internationalRoaming'], function($e) { return $e; }),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new RatePlanInstance($this->version, $payload);
} | php | public function create($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'UniqueName' => $options['uniqueName'],
'FriendlyName' => $options['friendlyName'],
'DataEnabled' => Serialize::booleanToString($options['dataEnabled']),
'DataLimit' => $options['dataLimit'],
'DataMetering' => $options['dataMetering'],
'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']),
'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
'CommandsEnabled' => Serialize::booleanToString($options['commandsEnabled']),
'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']),
'InternationalRoaming' => Serialize::map($options['internationalRoaming'], function($e) { return $e; }),
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new RatePlanInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'UniqueName'",
"=>",
"$",
"options",
"[",
"'uniqueName'",
"]",
",",
"'FriendlyName'",
"=>",
"$",
"options",
"[",
"'friendlyName'",
"]",
",",
"'DataEnabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'dataEnabled'",
"]",
")",
",",
"'DataLimit'",
"=>",
"$",
"options",
"[",
"'dataLimit'",
"]",
",",
"'DataMetering'",
"=>",
"$",
"options",
"[",
"'dataMetering'",
"]",
",",
"'MessagingEnabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'messagingEnabled'",
"]",
")",
",",
"'VoiceEnabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'voiceEnabled'",
"]",
")",
",",
"'CommandsEnabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'commandsEnabled'",
"]",
")",
",",
"'NationalRoamingEnabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'nationalRoamingEnabled'",
"]",
")",
",",
"'InternationalRoaming'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'internationalRoaming'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"RatePlanInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new RatePlanInstance
@param array|Options $options Optional Arguments
@return RatePlanInstance Newly created RatePlanInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"RatePlanInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Wireless/RatePlanList.php#L130-L154 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.php | CredentialList.getContext | public function getContext($sid) {
return new CredentialContext(
$this->version,
$this->solution['accountSid'],
$this->solution['credentialListSid'],
$sid
);
} | php | public function getContext($sid) {
return new CredentialContext(
$this->version,
$this->solution['accountSid'],
$this->solution['credentialListSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"CredentialContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'credentialListSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a CredentialContext
@param string $sid The unique id that identifies the resource to fetch.
@return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialContext | [
"Constructs",
"a",
"CredentialContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.php#L155-L162 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/CallList.php | CallList.create | public function create($to, $from, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'To' => $to,
'From' => $from,
'Url' => $options['url'],
'ApplicationSid' => $options['applicationSid'],
'Method' => $options['method'],
'FallbackUrl' => $options['fallbackUrl'],
'FallbackMethod' => $options['fallbackMethod'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }),
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'SendDigits' => $options['sendDigits'],
'Timeout' => $options['timeout'],
'Record' => Serialize::booleanToString($options['record']),
'RecordingChannels' => $options['recordingChannels'],
'RecordingStatusCallback' => $options['recordingStatusCallback'],
'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
'SipAuthUsername' => $options['sipAuthUsername'],
'SipAuthPassword' => $options['sipAuthPassword'],
'MachineDetection' => $options['machineDetection'],
'MachineDetectionTimeout' => $options['machineDetectionTimeout'],
'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }),
'Trim' => $options['trim'],
'CallerId' => $options['callerId'],
'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'],
'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'],
'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CallInstance($this->version, $payload, $this->solution['accountSid']);
} | php | public function create($to, $from, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'To' => $to,
'From' => $from,
'Url' => $options['url'],
'ApplicationSid' => $options['applicationSid'],
'Method' => $options['method'],
'FallbackUrl' => $options['fallbackUrl'],
'FallbackMethod' => $options['fallbackMethod'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }),
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'SendDigits' => $options['sendDigits'],
'Timeout' => $options['timeout'],
'Record' => Serialize::booleanToString($options['record']),
'RecordingChannels' => $options['recordingChannels'],
'RecordingStatusCallback' => $options['recordingStatusCallback'],
'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
'SipAuthUsername' => $options['sipAuthUsername'],
'SipAuthPassword' => $options['sipAuthPassword'],
'MachineDetection' => $options['machineDetection'],
'MachineDetectionTimeout' => $options['machineDetectionTimeout'],
'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }),
'Trim' => $options['trim'],
'CallerId' => $options['callerId'],
'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'],
'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'],
'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new CallInstance($this->version, $payload, $this->solution['accountSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"to",
",",
"$",
"from",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'To'",
"=>",
"$",
"to",
",",
"'From'",
"=>",
"$",
"from",
",",
"'Url'",
"=>",
"$",
"options",
"[",
"'url'",
"]",
",",
"'ApplicationSid'",
"=>",
"$",
"options",
"[",
"'applicationSid'",
"]",
",",
"'Method'",
"=>",
"$",
"options",
"[",
"'method'",
"]",
",",
"'FallbackUrl'",
"=>",
"$",
"options",
"[",
"'fallbackUrl'",
"]",
",",
"'FallbackMethod'",
"=>",
"$",
"options",
"[",
"'fallbackMethod'",
"]",
",",
"'StatusCallback'",
"=>",
"$",
"options",
"[",
"'statusCallback'",
"]",
",",
"'StatusCallbackEvent'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'statusCallbackEvent'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'StatusCallbackMethod'",
"=>",
"$",
"options",
"[",
"'statusCallbackMethod'",
"]",
",",
"'SendDigits'",
"=>",
"$",
"options",
"[",
"'sendDigits'",
"]",
",",
"'Timeout'",
"=>",
"$",
"options",
"[",
"'timeout'",
"]",
",",
"'Record'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'record'",
"]",
")",
",",
"'RecordingChannels'",
"=>",
"$",
"options",
"[",
"'recordingChannels'",
"]",
",",
"'RecordingStatusCallback'",
"=>",
"$",
"options",
"[",
"'recordingStatusCallback'",
"]",
",",
"'RecordingStatusCallbackMethod'",
"=>",
"$",
"options",
"[",
"'recordingStatusCallbackMethod'",
"]",
",",
"'SipAuthUsername'",
"=>",
"$",
"options",
"[",
"'sipAuthUsername'",
"]",
",",
"'SipAuthPassword'",
"=>",
"$",
"options",
"[",
"'sipAuthPassword'",
"]",
",",
"'MachineDetection'",
"=>",
"$",
"options",
"[",
"'machineDetection'",
"]",
",",
"'MachineDetectionTimeout'",
"=>",
"$",
"options",
"[",
"'machineDetectionTimeout'",
"]",
",",
"'RecordingStatusCallbackEvent'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'recordingStatusCallbackEvent'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'Trim'",
"=>",
"$",
"options",
"[",
"'trim'",
"]",
",",
"'CallerId'",
"=>",
"$",
"options",
"[",
"'callerId'",
"]",
",",
"'MachineDetectionSpeechThreshold'",
"=>",
"$",
"options",
"[",
"'machineDetectionSpeechThreshold'",
"]",
",",
"'MachineDetectionSpeechEndThreshold'",
"=>",
"$",
"options",
"[",
"'machineDetectionSpeechEndThreshold'",
"]",
",",
"'MachineDetectionSilenceTimeout'",
"=>",
"$",
"options",
"[",
"'machineDetectionSilenceTimeout'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"CallInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
")",
";",
"}"
] | Create a new CallInstance
@param string $to Phone number, SIP address, or client identifier to call
@param string $from Twilio number from which to originate the call
@param array|Options $options Optional Arguments
@return CallInstance Newly created CallInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"CallInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/CallList.php#L52-L92 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/CallList.php | CallList.getFeedbackSummaries | protected function getFeedbackSummaries() {
if (!$this->_feedbackSummaries) {
$this->_feedbackSummaries = new FeedbackSummaryList($this->version, $this->solution['accountSid']);
}
return $this->_feedbackSummaries;
} | php | protected function getFeedbackSummaries() {
if (!$this->_feedbackSummaries) {
$this->_feedbackSummaries = new FeedbackSummaryList($this->version, $this->solution['accountSid']);
}
return $this->_feedbackSummaries;
} | [
"protected",
"function",
"getFeedbackSummaries",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_feedbackSummaries",
")",
"{",
"$",
"this",
"->",
"_feedbackSummaries",
"=",
"new",
"FeedbackSummaryList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_feedbackSummaries",
";",
"}"
] | Access the feedbackSummaries | [
"Access",
"the",
"feedbackSummaries"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/CallList.php#L197-L203 | train |
twilio/twilio-php | Twilio/Rest/Chat/V1/Service/Channel/MessageList.php | MessageList.getContext | public function getContext($sid) {
return new MessageContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['channelSid'],
$sid
);
} | php | public function getContext($sid) {
return new MessageContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['channelSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"MessageContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'channelSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a MessageContext
@param string $sid The sid
@return \Twilio\Rest\Chat\V1\Service\Channel\MessageContext | [
"Constructs",
"a",
"MessageContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Chat/V1/Service/Channel/MessageList.php#L165-L172 | train |
twilio/twilio-php | Twilio/Rest/Pricing/V1/VoiceList.php | VoiceList.getNumbers | protected function getNumbers() {
if (!$this->_numbers) {
$this->_numbers = new NumberList($this->version);
}
return $this->_numbers;
} | php | protected function getNumbers() {
if (!$this->_numbers) {
$this->_numbers = new NumberList($this->version);
}
return $this->_numbers;
} | [
"protected",
"function",
"getNumbers",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_numbers",
")",
"{",
"$",
"this",
"->",
"_numbers",
"=",
"new",
"NumberList",
"(",
"$",
"this",
"->",
"version",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_numbers",
";",
"}"
] | Access the numbers | [
"Access",
"the",
"numbers"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Pricing/V1/VoiceList.php#L44-L50 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php | AssignedAddOnExtensionList.getContext | public function getContext($sid) {
return new AssignedAddOnExtensionContext(
$this->version,
$this->solution['accountSid'],
$this->solution['resourceSid'],
$this->solution['assignedAddOnSid'],
$sid
);
} | php | public function getContext($sid) {
return new AssignedAddOnExtensionContext(
$this->version,
$this->solution['accountSid'],
$this->solution['resourceSid'],
$this->solution['assignedAddOnSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"AssignedAddOnExtensionContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'resourceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'assignedAddOnSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a AssignedAddOnExtensionContext
@param string $sid The unique string that identifies the resource
@return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext | [
"Constructs",
"a",
"AssignedAddOnExtensionContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php#L139-L147 | train |
twilio/twilio-php | Twilio/Rest/Api/V2010/Account/ValidationRequestList.php | ValidationRequestList.create | public function create($phoneNumber, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'PhoneNumber' => $phoneNumber,
'FriendlyName' => $options['friendlyName'],
'CallDelay' => $options['callDelay'],
'Extension' => $options['extension'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']);
} | php | public function create($phoneNumber, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'PhoneNumber' => $phoneNumber,
'FriendlyName' => $options['friendlyName'],
'CallDelay' => $options['callDelay'],
'Extension' => $options['extension'],
'StatusCallback' => $options['statusCallback'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"phoneNumber",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'PhoneNumber'",
"=>",
"$",
"phoneNumber",
",",
"'FriendlyName'",
"=>",
"$",
"options",
"[",
"'friendlyName'",
"]",
",",
"'CallDelay'",
"=>",
"$",
"options",
"[",
"'callDelay'",
"]",
",",
"'Extension'",
"=>",
"$",
"options",
"[",
"'extension'",
"]",
",",
"'StatusCallback'",
"=>",
"$",
"options",
"[",
"'statusCallback'",
"]",
",",
"'StatusCallbackMethod'",
"=>",
"$",
"options",
"[",
"'statusCallbackMethod'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"ValidationRequestInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'accountSid'",
"]",
")",
";",
"}"
] | Create a new ValidationRequestInstance
@param string $phoneNumber The phone number to verify in E.164 format
@param array|Options $options Optional Arguments
@return ValidationRequestInstance Newly created ValidationRequestInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"ValidationRequestInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Api/V2010/Account/ValidationRequestList.php#L42-L62 | train |
twilio/twilio-php | Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php | ChallengeList.create | public function create($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'ExpirationDate' => Serialize::iso8601DateTime($options['expirationDate']),
'Details' => $options['details'],
'HiddenDetails' => $options['hiddenDetails'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ChallengeInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['identity'],
$this->solution['factorSid']
);
} | php | public function create($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'ExpirationDate' => Serialize::iso8601DateTime($options['expirationDate']),
'Details' => $options['details'],
'HiddenDetails' => $options['hiddenDetails'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new ChallengeInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['identity'],
$this->solution['factorSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'ExpirationDate'",
"=>",
"Serialize",
"::",
"iso8601DateTime",
"(",
"$",
"options",
"[",
"'expirationDate'",
"]",
")",
",",
"'Details'",
"=>",
"$",
"options",
"[",
"'details'",
"]",
",",
"'HiddenDetails'",
"=>",
"$",
"options",
"[",
"'hiddenDetails'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"ChallengeInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'identity'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'factorSid'",
"]",
")",
";",
"}"
] | Create a new ChallengeInstance
@param array|Options $options Optional Arguments
@return ChallengeInstance Newly created ChallengeInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"ChallengeInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php#L51-L74 | train |
twilio/twilio-php | Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php | ChallengeList.getContext | public function getContext($sid) {
return new ChallengeContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['identity'],
$this->solution['factorSid'],
$sid
);
} | php | public function getContext($sid) {
return new ChallengeContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['identity'],
$this->solution['factorSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"ChallengeContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'identity'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'factorSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a ChallengeContext
@param string $sid A string that uniquely identifies this Challenge, or
`latest`.
@return \Twilio\Rest\Authy\V1\Service\Entity\Factor\ChallengeContext | [
"Constructs",
"a",
"ChallengeContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php#L83-L91 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php | FieldValueList.create | public function create($language, $value, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Language' => $language,
'Value' => $value,
'SynonymOf' => $options['synonymOf'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new FieldValueInstance(
$this->version,
$payload,
$this->solution['assistantSid'],
$this->solution['fieldTypeSid']
);
} | php | public function create($language, $value, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Language' => $language,
'Value' => $value,
'SynonymOf' => $options['synonymOf'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new FieldValueInstance(
$this->version,
$payload,
$this->solution['assistantSid'],
$this->solution['fieldTypeSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"language",
",",
"$",
"value",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Language'",
"=>",
"$",
"language",
",",
"'Value'",
"=>",
"$",
"value",
",",
"'SynonymOf'",
"=>",
"$",
"options",
"[",
"'synonymOf'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"FieldValueInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'fieldTypeSid'",
"]",
")",
";",
"}"
] | Create a new FieldValueInstance
@param string $language The ISO language-country tag that identifies the
language of the value
@param string $value The Field Value data
@param array|Options $options Optional Arguments
@return FieldValueInstance Newly created FieldValueInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"FieldValueInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php#L141-L163 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php | FieldValueList.getContext | public function getContext($sid) {
return new FieldValueContext(
$this->version,
$this->solution['assistantSid'],
$this->solution['fieldTypeSid'],
$sid
);
} | php | public function getContext($sid) {
return new FieldValueContext(
$this->version,
$this->solution['assistantSid'],
$this->solution['fieldTypeSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"FieldValueContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'fieldTypeSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a FieldValueContext
@param string $sid The unique string that identifies the resource
@return \Twilio\Rest\Autopilot\V1\Assistant\FieldType\FieldValueContext | [
"Constructs",
"a",
"FieldValueContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php#L171-L178 | train |
twilio/twilio-php | Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.php | BulkCountryUpdateList.create | public function create($updateRequest) {
$data = Values::of(array('UpdateRequest' => $updateRequest, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new BulkCountryUpdateInstance($this->version, $payload);
} | php | public function create($updateRequest) {
$data = Values::of(array('UpdateRequest' => $updateRequest, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new BulkCountryUpdateInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
"$",
"updateRequest",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'UpdateRequest'",
"=>",
"$",
"updateRequest",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"BulkCountryUpdateInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new BulkCountryUpdateInstance
@param string $updateRequest URL encoded JSON array of update objects
@return BulkCountryUpdateInstance Newly created BulkCountryUpdateInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"BulkCountryUpdateInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.php#L42-L53 | train |
twilio/twilio-php | Twilio/Rest/Messaging/V1/SessionContext.php | SessionContext.update | public function update($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'FriendlyName' => $options['friendlyName'],
'Attributes' => $options['attributes'],
'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
'CreatedBy' => $options['createdBy'],
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new SessionInstance($this->version, $payload, $this->solution['sid']);
} | php | public function update($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'FriendlyName' => $options['friendlyName'],
'Attributes' => $options['attributes'],
'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
'CreatedBy' => $options['createdBy'],
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new SessionInstance($this->version, $payload, $this->solution['sid']);
} | [
"public",
"function",
"update",
"(",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'FriendlyName'",
"=>",
"$",
"options",
"[",
"'friendlyName'",
"]",
",",
"'Attributes'",
"=>",
"$",
"options",
"[",
"'attributes'",
"]",
",",
"'DateCreated'",
"=>",
"Serialize",
"::",
"iso8601DateTime",
"(",
"$",
"options",
"[",
"'dateCreated'",
"]",
")",
",",
"'DateUpdated'",
"=>",
"Serialize",
"::",
"iso8601DateTime",
"(",
"$",
"options",
"[",
"'dateUpdated'",
"]",
")",
",",
"'CreatedBy'",
"=>",
"$",
"options",
"[",
"'createdBy'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"SessionInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}"
] | Update the SessionInstance
@param array|Options $options Optional Arguments
@return SessionInstance Updated SessionInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"SessionInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Messaging/V1/SessionContext.php#L89-L108 | train |
twilio/twilio-php | Twilio/Rest/Messaging/V1/SessionContext.php | SessionContext.getWebhooks | protected function getWebhooks() {
if (!$this->_webhooks) {
$this->_webhooks = new WebhookList($this->version, $this->solution['sid']);
}
return $this->_webhooks;
} | php | protected function getWebhooks() {
if (!$this->_webhooks) {
$this->_webhooks = new WebhookList($this->version, $this->solution['sid']);
}
return $this->_webhooks;
} | [
"protected",
"function",
"getWebhooks",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_webhooks",
")",
"{",
"$",
"this",
"->",
"_webhooks",
"=",
"new",
"WebhookList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_webhooks",
";",
"}"
] | Access the webhooks
@return \Twilio\Rest\Messaging\V1\Session\WebhookList | [
"Access",
"the",
"webhooks"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Messaging/V1/SessionContext.php#L141-L147 | train |
twilio/twilio-php | Twilio/Rest/Proxy/V1/Service/Session/InteractionList.php | InteractionList.getContext | public function getContext($sid) {
return new InteractionContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['sessionSid'],
$sid
);
} | php | public function getContext($sid) {
return new InteractionContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['sessionSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"InteractionContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sessionSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a InteractionContext
@param string $sid The unique string that identifies the resource
@return \Twilio\Rest\Proxy\V1\Service\Session\InteractionContext | [
"Constructs",
"a",
"InteractionContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Proxy/V1/Service/Session/InteractionList.php#L129-L136 | train |
twilio/twilio-php | Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.php | WorkflowContext.update | public function update($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'FriendlyName' => $options['friendlyName'],
'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'],
'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'],
'Configuration' => $options['configuration'],
'TaskReservationTimeout' => $options['taskReservationTimeout'],
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new WorkflowInstance(
$this->version,
$payload,
$this->solution['workspaceSid'],
$this->solution['sid']
);
} | php | public function update($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'FriendlyName' => $options['friendlyName'],
'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'],
'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'],
'Configuration' => $options['configuration'],
'TaskReservationTimeout' => $options['taskReservationTimeout'],
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new WorkflowInstance(
$this->version,
$payload,
$this->solution['workspaceSid'],
$this->solution['sid']
);
} | [
"public",
"function",
"update",
"(",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'FriendlyName'",
"=>",
"$",
"options",
"[",
"'friendlyName'",
"]",
",",
"'AssignmentCallbackUrl'",
"=>",
"$",
"options",
"[",
"'assignmentCallbackUrl'",
"]",
",",
"'FallbackAssignmentCallbackUrl'",
"=>",
"$",
"options",
"[",
"'fallbackAssignmentCallbackUrl'",
"]",
",",
"'Configuration'",
"=>",
"$",
"options",
"[",
"'configuration'",
"]",
",",
"'TaskReservationTimeout'",
"=>",
"$",
"options",
"[",
"'taskReservationTimeout'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"WorkflowInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'workspaceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}"
] | Update the WorkflowInstance
@param array|Options $options Optional Arguments
@return WorkflowInstance Updated WorkflowInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"WorkflowInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.php#L81-L105 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php | SyncMapItemList.create | public function create($key, $data) {
$data = Values::of(array('Key' => $key, 'Data' => Serialize::jsonObject($data), ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new SyncMapItemInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['mapSid']
);
} | php | public function create($key, $data) {
$data = Values::of(array('Key' => $key, 'Data' => Serialize::jsonObject($data), ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new SyncMapItemInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['mapSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"key",
",",
"$",
"data",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Key'",
"=>",
"$",
"key",
",",
"'Data'",
"=>",
"Serialize",
"::",
"jsonObject",
"(",
"$",
"data",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"SyncMapItemInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'mapSid'",
"]",
")",
";",
"}"
] | Create a new SyncMapItemInstance
@param string $key The key
@param array $data The data
@return SyncMapItemInstance Newly created SyncMapItemInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"SyncMapItemInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php#L47-L63 | train |
twilio/twilio-php | Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php | SyncMapItemList.getContext | public function getContext($key) {
return new SyncMapItemContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['mapSid'],
$key
);
} | php | public function getContext($key) {
return new SyncMapItemContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['mapSid'],
$key
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"key",
")",
"{",
"return",
"new",
"SyncMapItemContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'mapSid'",
"]",
",",
"$",
"key",
")",
";",
"}"
] | Constructs a SyncMapItemContext
@param string $key The key
@return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext | [
"Constructs",
"a",
"SyncMapItemContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php#L164-L171 | train |
twilio/twilio-php | Twilio/Rest/Notify/V1/Service/BindingList.php | BindingList.create | public function create($identity, $bindingType, $address, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Identity' => $identity,
'BindingType' => $bindingType,
'Address' => $address,
'Tag' => Serialize::map($options['tag'], function($e) { return $e; }),
'NotificationProtocolVersion' => $options['notificationProtocolVersion'],
'CredentialSid' => $options['credentialSid'],
'Endpoint' => $options['endpoint'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
} | php | public function create($identity, $bindingType, $address, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'Identity' => $identity,
'BindingType' => $bindingType,
'Address' => $address,
'Tag' => Serialize::map($options['tag'], function($e) { return $e; }),
'NotificationProtocolVersion' => $options['notificationProtocolVersion'],
'CredentialSid' => $options['credentialSid'],
'Endpoint' => $options['endpoint'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"identity",
",",
"$",
"bindingType",
",",
"$",
"address",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Identity'",
"=>",
"$",
"identity",
",",
"'BindingType'",
"=>",
"$",
"bindingType",
",",
"'Address'",
"=>",
"$",
"address",
",",
"'Tag'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'tag'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'NotificationProtocolVersion'",
"=>",
"$",
"options",
"[",
"'notificationProtocolVersion'",
"]",
",",
"'CredentialSid'",
"=>",
"$",
"options",
"[",
"'credentialSid'",
"]",
",",
"'Endpoint'",
"=>",
"$",
"options",
"[",
"'endpoint'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"BindingInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
")",
";",
"}"
] | Create a new BindingInstance
@param string $identity The `identity` value that identifies the new
resource's User
@param string $bindingType The type of the Binding
@param string $address The channel-specific address
@param array|Options $options Optional Arguments
@return BindingInstance Newly created BindingInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"BindingInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Notify/V1/Service/BindingList.php#L50-L71 | train |
twilio/twilio-php | Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.php | OriginationUrlList.create | public function create($weight, $priority, $enabled, $friendlyName, $sipUrl) {
$data = Values::of(array(
'Weight' => $weight,
'Priority' => $priority,
'Enabled' => Serialize::booleanToString($enabled),
'FriendlyName' => $friendlyName,
'SipUrl' => $sipUrl,
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new OriginationUrlInstance($this->version, $payload, $this->solution['trunkSid']);
} | php | public function create($weight, $priority, $enabled, $friendlyName, $sipUrl) {
$data = Values::of(array(
'Weight' => $weight,
'Priority' => $priority,
'Enabled' => Serialize::booleanToString($enabled),
'FriendlyName' => $friendlyName,
'SipUrl' => $sipUrl,
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new OriginationUrlInstance($this->version, $payload, $this->solution['trunkSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"weight",
",",
"$",
"priority",
",",
"$",
"enabled",
",",
"$",
"friendlyName",
",",
"$",
"sipUrl",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Weight'",
"=>",
"$",
"weight",
",",
"'Priority'",
"=>",
"$",
"priority",
",",
"'Enabled'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"enabled",
")",
",",
"'FriendlyName'",
"=>",
"$",
"friendlyName",
",",
"'SipUrl'",
"=>",
"$",
"sipUrl",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"OriginationUrlInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'trunkSid'",
"]",
")",
";",
"}"
] | Create a new OriginationUrlInstance
@param integer $weight The value that determines the relative load the URI
should receive compared to others with the same
priority
@param integer $priority The relative importance of the URI
@param boolean $enabled Whether the URL is enabled
@param string $friendlyName A string to describe the resource
@param string $sipUrl The SIP address you want Twilio to route your
Origination calls to
@return OriginationUrlInstance Newly created OriginationUrlInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"OriginationUrlInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.php#L48-L65 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php | VariableList.create | public function create($key, $value) {
$data = Values::of(array('Key' => $key, 'Value' => $value, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new VariableInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['environmentSid']
);
} | php | public function create($key, $value) {
$data = Values::of(array('Key' => $key, 'Value' => $value, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new VariableInstance(
$this->version,
$payload,
$this->solution['serviceSid'],
$this->solution['environmentSid']
);
} | [
"public",
"function",
"create",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'Key'",
"=>",
"$",
"key",
",",
"'Value'",
"=>",
"$",
"value",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"VariableInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'environmentSid'",
"]",
")",
";",
"}"
] | Create a new VariableInstance
@param string $key A string by which this Variable can be referenced.
@param string $value A string that contains the actual value of this
Variable.
@return VariableInstance Newly created VariableInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"VariableInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php#L132-L148 | train |
twilio/twilio-php | Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php | VariableList.getContext | public function getContext($sid) {
return new VariableContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['environmentSid'],
$sid
);
} | php | public function getContext($sid) {
return new VariableContext(
$this->version,
$this->solution['serviceSid'],
$this->solution['environmentSid'],
$sid
);
} | [
"public",
"function",
"getContext",
"(",
"$",
"sid",
")",
"{",
"return",
"new",
"VariableContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'environmentSid'",
"]",
",",
"$",
"sid",
")",
";",
"}"
] | Constructs a VariableContext
@param string $sid Variable Sid.
@return \Twilio\Rest\Serverless\V1\Service\Environment\VariableContext | [
"Constructs",
"a",
"VariableContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php#L156-L163 | train |
twilio/twilio-php | Twilio/Rest/Preview/Understand/AssistantContext.php | AssistantContext.getAssistantFallbackActions | protected function getAssistantFallbackActions() {
if (!$this->_assistantFallbackActions) {
$this->_assistantFallbackActions = new AssistantFallbackActionsList(
$this->version,
$this->solution['sid']
);
}
return $this->_assistantFallbackActions;
} | php | protected function getAssistantFallbackActions() {
if (!$this->_assistantFallbackActions) {
$this->_assistantFallbackActions = new AssistantFallbackActionsList(
$this->version,
$this->solution['sid']
);
}
return $this->_assistantFallbackActions;
} | [
"protected",
"function",
"getAssistantFallbackActions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_assistantFallbackActions",
")",
"{",
"$",
"this",
"->",
"_assistantFallbackActions",
"=",
"new",
"AssistantFallbackActionsList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_assistantFallbackActions",
";",
"}"
] | Access the assistantFallbackActions
@return \Twilio\Rest\Preview\Understand\Assistant\AssistantFallbackActionsList | [
"Access",
"the",
"assistantFallbackActions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Understand/AssistantContext.php#L190-L199 | train |
twilio/twilio-php | Twilio/Rest/Preview/Understand/AssistantContext.php | AssistantContext.getAssistantInitiationActions | protected function getAssistantInitiationActions() {
if (!$this->_assistantInitiationActions) {
$this->_assistantInitiationActions = new AssistantInitiationActionsList(
$this->version,
$this->solution['sid']
);
}
return $this->_assistantInitiationActions;
} | php | protected function getAssistantInitiationActions() {
if (!$this->_assistantInitiationActions) {
$this->_assistantInitiationActions = new AssistantInitiationActionsList(
$this->version,
$this->solution['sid']
);
}
return $this->_assistantInitiationActions;
} | [
"protected",
"function",
"getAssistantInitiationActions",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_assistantInitiationActions",
")",
"{",
"$",
"this",
"->",
"_assistantInitiationActions",
"=",
"new",
"AssistantInitiationActionsList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_assistantInitiationActions",
";",
"}"
] | Access the assistantInitiationActions
@return \Twilio\Rest\Preview\Understand\Assistant\AssistantInitiationActionsList | [
"Access",
"the",
"assistantInitiationActions"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/Understand/AssistantContext.php#L206-L215 | train |
twilio/twilio-php | Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php | PhoneNumberList.create | public function create($phoneNumberSid) {
$data = Values::of(array('PhoneNumberSid' => $phoneNumberSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']);
} | php | public function create($phoneNumberSid) {
$data = Values::of(array('PhoneNumberSid' => $phoneNumberSid, ));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']);
} | [
"public",
"function",
"create",
"(",
"$",
"phoneNumberSid",
")",
"{",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'PhoneNumberSid'",
"=>",
"$",
"phoneNumberSid",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"PhoneNumberInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
")",
";",
"}"
] | Create a new PhoneNumberInstance
@param string $phoneNumberSid Phone Number SID for the Phone Number being
added to the Service.
@return PhoneNumberInstance Newly created PhoneNumberInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"PhoneNumberInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php#L44-L55 | train |
twilio/twilio-php | Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php | SettingsContext.fetch | public function fetch() {
$params = Values::of(array());
$payload = $this->version->fetch(
'GET',
$this->uri,
$params
);
return new SettingsInstance($this->version, $payload);
} | php | public function fetch() {
$params = Values::of(array());
$payload = $this->version->fetch(
'GET',
$this->uri,
$params
);
return new SettingsInstance($this->version, $payload);
} | [
"public",
"function",
"fetch",
"(",
")",
"{",
"$",
"params",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"fetch",
"(",
"'GET'",
",",
"$",
"this",
"->",
"uri",
",",
"$",
"params",
")",
";",
"return",
"new",
"SettingsInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Fetch a SettingsInstance
@return SettingsInstance Fetched SettingsInstance
@throws TwilioException When an HTTP error occurs. | [
"Fetch",
"a",
"SettingsInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php#L43-L53 | train |
twilio/twilio-php | Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php | SettingsContext.update | public function update($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'DialingPermissionsInheritance' => Serialize::booleanToString($options['dialingPermissionsInheritance']),
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new SettingsInstance($this->version, $payload);
} | php | public function update($options = array()) {
$options = new Values($options);
$data = Values::of(array(
'DialingPermissionsInheritance' => Serialize::booleanToString($options['dialingPermissionsInheritance']),
));
$payload = $this->version->update(
'POST',
$this->uri,
array(),
$data
);
return new SettingsInstance($this->version, $payload);
} | [
"public",
"function",
"update",
"(",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'DialingPermissionsInheritance'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"options",
"[",
"'dialingPermissionsInheritance'",
"]",
")",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"update",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"SettingsInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Update the SettingsInstance
@param array|Options $options Optional Arguments
@return SettingsInstance Updated SettingsInstance
@throws TwilioException When an HTTP error occurs. | [
"Update",
"the",
"SettingsInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php#L62-L77 | train |
twilio/twilio-php | Twilio/Rest/Studio/V1/Flow/ExecutionContext.php | ExecutionContext.getExecutionContext | protected function getExecutionContext() {
if (!$this->_executionContext) {
$this->_executionContext = new ExecutionContextList(
$this->version,
$this->solution['flowSid'],
$this->solution['sid']
);
}
return $this->_executionContext;
} | php | protected function getExecutionContext() {
if (!$this->_executionContext) {
$this->_executionContext = new ExecutionContextList(
$this->version,
$this->solution['flowSid'],
$this->solution['sid']
);
}
return $this->_executionContext;
} | [
"protected",
"function",
"getExecutionContext",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_executionContext",
")",
"{",
"$",
"this",
"->",
"_executionContext",
"=",
"new",
"ExecutionContextList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'flowSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_executionContext",
";",
"}"
] | Access the executionContext
@return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList | [
"Access",
"the",
"executionContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Studio/V1/Flow/ExecutionContext.php#L101-L111 | train |
twilio/twilio-php | Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php | HostedNumberOrderList.create | public function create($phoneNumber, $smsCapability, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'PhoneNumber' => $phoneNumber,
'SmsCapability' => Serialize::booleanToString($smsCapability),
'AccountSid' => $options['accountSid'],
'FriendlyName' => $options['friendlyName'],
'UniqueName' => $options['uniqueName'],
'CcEmails' => Serialize::map($options['ccEmails'], function($e) { return $e; }),
'SmsUrl' => $options['smsUrl'],
'SmsMethod' => $options['smsMethod'],
'SmsFallbackUrl' => $options['smsFallbackUrl'],
'SmsFallbackMethod' => $options['smsFallbackMethod'],
'StatusCallbackUrl' => $options['statusCallbackUrl'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'SmsApplicationSid' => $options['smsApplicationSid'],
'AddressSid' => $options['addressSid'],
'Email' => $options['email'],
'VerificationType' => $options['verificationType'],
'VerificationDocumentSid' => $options['verificationDocumentSid'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new HostedNumberOrderInstance($this->version, $payload);
} | php | public function create($phoneNumber, $smsCapability, $options = array()) {
$options = new Values($options);
$data = Values::of(array(
'PhoneNumber' => $phoneNumber,
'SmsCapability' => Serialize::booleanToString($smsCapability),
'AccountSid' => $options['accountSid'],
'FriendlyName' => $options['friendlyName'],
'UniqueName' => $options['uniqueName'],
'CcEmails' => Serialize::map($options['ccEmails'], function($e) { return $e; }),
'SmsUrl' => $options['smsUrl'],
'SmsMethod' => $options['smsMethod'],
'SmsFallbackUrl' => $options['smsFallbackUrl'],
'SmsFallbackMethod' => $options['smsFallbackMethod'],
'StatusCallbackUrl' => $options['statusCallbackUrl'],
'StatusCallbackMethod' => $options['statusCallbackMethod'],
'SmsApplicationSid' => $options['smsApplicationSid'],
'AddressSid' => $options['addressSid'],
'Email' => $options['email'],
'VerificationType' => $options['verificationType'],
'VerificationDocumentSid' => $options['verificationDocumentSid'],
));
$payload = $this->version->create(
'POST',
$this->uri,
array(),
$data
);
return new HostedNumberOrderInstance($this->version, $payload);
} | [
"public",
"function",
"create",
"(",
"$",
"phoneNumber",
",",
"$",
"smsCapability",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"new",
"Values",
"(",
"$",
"options",
")",
";",
"$",
"data",
"=",
"Values",
"::",
"of",
"(",
"array",
"(",
"'PhoneNumber'",
"=>",
"$",
"phoneNumber",
",",
"'SmsCapability'",
"=>",
"Serialize",
"::",
"booleanToString",
"(",
"$",
"smsCapability",
")",
",",
"'AccountSid'",
"=>",
"$",
"options",
"[",
"'accountSid'",
"]",
",",
"'FriendlyName'",
"=>",
"$",
"options",
"[",
"'friendlyName'",
"]",
",",
"'UniqueName'",
"=>",
"$",
"options",
"[",
"'uniqueName'",
"]",
",",
"'CcEmails'",
"=>",
"Serialize",
"::",
"map",
"(",
"$",
"options",
"[",
"'ccEmails'",
"]",
",",
"function",
"(",
"$",
"e",
")",
"{",
"return",
"$",
"e",
";",
"}",
")",
",",
"'SmsUrl'",
"=>",
"$",
"options",
"[",
"'smsUrl'",
"]",
",",
"'SmsMethod'",
"=>",
"$",
"options",
"[",
"'smsMethod'",
"]",
",",
"'SmsFallbackUrl'",
"=>",
"$",
"options",
"[",
"'smsFallbackUrl'",
"]",
",",
"'SmsFallbackMethod'",
"=>",
"$",
"options",
"[",
"'smsFallbackMethod'",
"]",
",",
"'StatusCallbackUrl'",
"=>",
"$",
"options",
"[",
"'statusCallbackUrl'",
"]",
",",
"'StatusCallbackMethod'",
"=>",
"$",
"options",
"[",
"'statusCallbackMethod'",
"]",
",",
"'SmsApplicationSid'",
"=>",
"$",
"options",
"[",
"'smsApplicationSid'",
"]",
",",
"'AddressSid'",
"=>",
"$",
"options",
"[",
"'addressSid'",
"]",
",",
"'Email'",
"=>",
"$",
"options",
"[",
"'email'",
"]",
",",
"'VerificationType'",
"=>",
"$",
"options",
"[",
"'verificationType'",
"]",
",",
"'VerificationDocumentSid'",
"=>",
"$",
"options",
"[",
"'verificationDocumentSid'",
"]",
",",
")",
")",
";",
"$",
"payload",
"=",
"$",
"this",
"->",
"version",
"->",
"create",
"(",
"'POST'",
",",
"$",
"this",
"->",
"uri",
",",
"array",
"(",
")",
",",
"$",
"data",
")",
";",
"return",
"new",
"HostedNumberOrderInstance",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"payload",
")",
";",
"}"
] | Create a new HostedNumberOrderInstance
@param string $phoneNumber An E164 formatted phone number.
@param boolean $smsCapability Specify SMS capability to host.
@param array|Options $options Optional Arguments
@return HostedNumberOrderInstance Newly created HostedNumberOrderInstance
@throws TwilioException When an HTTP error occurs. | [
"Create",
"a",
"new",
"HostedNumberOrderInstance"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php#L141-L172 | train |
twilio/twilio-php | Twilio/Rest/Authy/V1/Service/Entity/FactorContext.php | FactorContext.getChallenges | protected function getChallenges() {
if (!$this->_challenges) {
$this->_challenges = new ChallengeList(
$this->version,
$this->solution['serviceSid'],
$this->solution['identity'],
$this->solution['sid']
);
}
return $this->_challenges;
} | php | protected function getChallenges() {
if (!$this->_challenges) {
$this->_challenges = new ChallengeList(
$this->version,
$this->solution['serviceSid'],
$this->solution['identity'],
$this->solution['sid']
);
}
return $this->_challenges;
} | [
"protected",
"function",
"getChallenges",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_challenges",
")",
"{",
"$",
"this",
"->",
"_challenges",
"=",
"new",
"ChallengeList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'serviceSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'identity'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_challenges",
";",
"}"
] | Access the challenges
@return \Twilio\Rest\Authy\V1\Service\Entity\Factor\ChallengeList | [
"Access",
"the",
"challenges"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Authy/V1/Service/Entity/FactorContext.php#L113-L124 | train |
twilio/twilio-php | Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.php | ExecutionStepContextList.getContext | public function getContext() {
return new ExecutionStepContextContext(
$this->version,
$this->solution['flowSid'],
$this->solution['executionSid'],
$this->solution['stepSid']
);
} | php | public function getContext() {
return new ExecutionStepContextContext(
$this->version,
$this->solution['flowSid'],
$this->solution['executionSid'],
$this->solution['stepSid']
);
} | [
"public",
"function",
"getContext",
"(",
")",
"{",
"return",
"new",
"ExecutionStepContextContext",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'flowSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'executionSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'stepSid'",
"]",
")",
";",
"}"
] | Constructs a ExecutionStepContextContext
@return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextContext | [
"Constructs",
"a",
"ExecutionStepContextContext"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.php#L41-L48 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php | TaskContext.getFields | protected function getFields() {
if (!$this->_fields) {
$this->_fields = new FieldList(
$this->version,
$this->solution['assistantSid'],
$this->solution['sid']
);
}
return $this->_fields;
} | php | protected function getFields() {
if (!$this->_fields) {
$this->_fields = new FieldList(
$this->version,
$this->solution['assistantSid'],
$this->solution['sid']
);
}
return $this->_fields;
} | [
"protected",
"function",
"getFields",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_fields",
")",
"{",
"$",
"this",
"->",
"_fields",
"=",
"new",
"FieldList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_fields",
";",
"}"
] | Access the fields
@return \Twilio\Rest\Autopilot\V1\Assistant\Task\FieldList | [
"Access",
"the",
"fields"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php#L129-L139 | train |
twilio/twilio-php | Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php | TaskContext.getSamples | protected function getSamples() {
if (!$this->_samples) {
$this->_samples = new SampleList(
$this->version,
$this->solution['assistantSid'],
$this->solution['sid']
);
}
return $this->_samples;
} | php | protected function getSamples() {
if (!$this->_samples) {
$this->_samples = new SampleList(
$this->version,
$this->solution['assistantSid'],
$this->solution['sid']
);
}
return $this->_samples;
} | [
"protected",
"function",
"getSamples",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_samples",
")",
"{",
"$",
"this",
"->",
"_samples",
"=",
"new",
"SampleList",
"(",
"$",
"this",
"->",
"version",
",",
"$",
"this",
"->",
"solution",
"[",
"'assistantSid'",
"]",
",",
"$",
"this",
"->",
"solution",
"[",
"'sid'",
"]",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_samples",
";",
"}"
] | Access the samples
@return \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleList | [
"Access",
"the",
"samples"
] | 58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f | https://github.com/twilio/twilio-php/blob/58a8322c5a8ce2ff7d68cd16ff56dc8ab44c168f/Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php#L146-L156 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.