summaryrefslogtreecommitdiffstats
path: root/Twilio/TaskRouter/WorkflowRule.php
diff options
context:
space:
mode:
authorJustin Witz <jwitz@twilio.com>2016-08-16 15:52:42 -0700
committerJustin Witz <jwitz@twilio.com>2016-08-16 15:52:42 -0700
commit3b281d31d6bf3554eac3d52d8abe8cdc20093f1c (patch)
tree3f17ae0b228d926fa91215720d2f8d47cf9deb4a /Twilio/TaskRouter/WorkflowRule.php
parent4d7be745f5d6b0d261fb36be8c91a7c25d55f956 (diff)
downloadtwilio-php-origin/workflow-configuration.zip
twilio-php-origin/workflow-configuration.tar.gz
twilio-php-origin/workflow-configuration.tar.bz2
Port WorkflowConfiguration to PHP 5.0+origin/workflow-configuration
Diffstat (limited to 'Twilio/TaskRouter/WorkflowRule.php')
-rw-r--r--Twilio/TaskRouter/WorkflowRule.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/Twilio/TaskRouter/WorkflowRule.php b/Twilio/TaskRouter/WorkflowRule.php
new file mode 100644
index 0000000..bb3ed6b
--- /dev/null
+++ b/Twilio/TaskRouter/WorkflowRule.php
@@ -0,0 +1,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;
+ }
+} \ No newline at end of file