Represents a Twilio TaskRouter workflow rule with expression, targets, and optional friendly name.
// Source: https://github.com/twilio/twilio-php | License: MIT | Copyright 2023, Twilio, Inc. <https://www.twilio.com/help/contact>
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace Twilio\TaskRouter;
/**
* Twilio TaskRouter Workflow Rule
*
* @author Justin Witz <jwitz@twilio.com>
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
class WorkflowRule implements \JsonSerializable {
public $expression;
public $friendly_name;
public $targets;
public function __construct(string $expression, array $targets, ?string $friendly_name = null) {
$this->expression = $expression;
$this->targets = $targets;
$this->friendly_name = $friendly_name;
}
public function jsonSerialize(): array {
$json = [];
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key