summaryrefslogtreecommitdiffstats
path: root/Twilio/Rest/Preview.php
diff options
context:
space:
mode:
Diffstat (limited to 'Twilio/Rest/Preview.php')
-rw-r--r--Twilio/Rest/Preview.php137
1 files changed, 137 insertions, 0 deletions
diff --git a/Twilio/Rest/Preview.php b/Twilio/Rest/Preview.php
new file mode 100644
index 0000000..35d79b9
--- /dev/null
+++ b/Twilio/Rest/Preview.php
@@ -0,0 +1,137 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _ _ _| _ _
+ * | (_)\/(_)(_|\/| |(/_ v1.0.0
+ * / /
+ */
+
+namespace Twilio\Rest;
+
+use Twilio\Domain;
+use Twilio\Exceptions\TwilioException;
+use Twilio\Rest\Preview\Wireless;
+
+/**
+ * @property \Twilio\Rest\Preview\Wireless wireless
+ * @property \Twilio\Rest\Preview\Wireless\CommandList commands
+ * @property \Twilio\Rest\Preview\Wireless\DeviceList devices
+ * @property \Twilio\Rest\Preview\Wireless\RatePlanList ratePlans
+ * @method \Twilio\Rest\Preview\Wireless\CommandContext commands(string $sid)
+ * @method \Twilio\Rest\Preview\Wireless\DeviceContext devices(string $sid)
+ * @method \Twilio\Rest\Preview\Wireless\RatePlanContext ratePlans(string $sid)
+ */
+class Preview extends Domain {
+ protected $_wireless = null;
+
+ /**
+ * Construct the Preview Domain
+ *
+ * @param \Twilio\Rest\Client $client Twilio\Rest\Client to communicate with
+ * Twilio
+ * @return \Twilio\Rest\Preview Domain for Preview
+ */
+ public function __construct(Client $client) {
+ parent::__construct($client);
+
+ $this->baseUrl = 'https://preview.twilio.com';
+ }
+
+ /**
+ * @return \Twilio\Rest\Preview\Wireless Version wireless of preview
+ */
+ protected function getWireless() {
+ if (!$this->_wireless) {
+ $this->_wireless = new Wireless($this);
+ }
+ return $this->_wireless;
+ }
+
+ /**
+ * Magic getter to lazy load version
+ *
+ * @param string $name Version to return
+ * @return \Twilio\Version The requested version
+ * @throws \Twilio\Exceptions\TwilioException For unknown versions
+ */
+ public function __get($name) {
+ $method = 'get' . ucfirst($name);
+ if (method_exists($this, $method)) {
+ return $this->$method();
+ }
+
+ throw new TwilioException('Unknown version ' . $name);
+ }
+
+ /**
+ * Magic caller to get resource contexts
+ *
+ * @param string $name Resource to return
+ * @param array $arguments Context parameters
+ * @return \Twilio\InstanceContext The requested resource context
+ * @throws \Twilio\Exceptions\TwilioException For unknown resource
+ */
+ public function __call($name, $arguments) {
+ $method = 'context' . ucfirst($name);
+ if (method_exists($this, $method)) {
+ return call_user_func_array(array($this, $method), $arguments);
+ }
+
+ throw new TwilioException('Unknown context ' . $name);
+ }
+
+ /**
+ * @return \Twilio\Rest\Preview\Wireless\CommandList
+ */
+ protected function getCommands() {
+ return $this->wireless->commands;
+ }
+
+ /**
+ * @param string $sid The sid
+ * @return \Twilio\Rest\Preview\Wireless\CommandContext
+ */
+ protected function contextCommands($sid) {
+ return $this->wireless->commands($sid);
+ }
+
+ /**
+ * @return \Twilio\Rest\Preview\Wireless\DeviceList
+ */
+ protected function getDevices() {
+ return $this->wireless->devices;
+ }
+
+ /**
+ * @param string $sid The sid
+ * @return \Twilio\Rest\Preview\Wireless\DeviceContext
+ */
+ protected function contextDevices($sid) {
+ return $this->wireless->devices($sid);
+ }
+
+ /**
+ * @return \Twilio\Rest\Preview\Wireless\RatePlanList
+ */
+ protected function getRatePlans() {
+ return $this->wireless->ratePlans;
+ }
+
+ /**
+ * @param string $sid The sid
+ * @return \Twilio\Rest\Preview\Wireless\RatePlanContext
+ */
+ protected function contextRatePlans($sid) {
+ return $this->wireless->ratePlans($sid);
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString() {
+ return '[Twilio.Preview]';
+ }
+} \ No newline at end of file