blob: bb3ed6b263962efd24d1fcbee6c44133d906bdda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?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($expression, $targets, $friendly_name = null)
{
$this->expression = $expression;
$this->targets = $targets;
$this->friendly_name = $friendly_name;
}
public function jsonSerialize() {
$json = array();
$json["expression"] = $this->expression;
$json["targets"] = $this->targets;
if($this->friendly_name != null) {
$json["friendly_name"] = $this->friendly_name;
}
return $json;
}
}
|