| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,28 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-namespace Telnyx\ApiOperations; |
|
| 4 |
- |
|
| 5 |
-/** |
|
| 6 |
- * Trait for creatable resources. Adds a `create()` static method to the class. |
|
| 7 |
- * |
|
| 8 |
- * This trait should only be applied to classes that derive from TelnyxObject. |
|
| 9 |
- */ |
|
| 10 |
-trait Create |
|
| 11 |
-{
|
|
| 12 |
- /** |
|
| 13 |
- * @param array|null $params |
|
| 14 |
- * @param array|string|null $options |
|
| 15 |
- * |
|
| 16 |
- * @return \Telnyx\ApiResource The created resource. |
|
| 17 |
- */ |
|
| 18 |
- public static function create($params = null, $options = null) |
|
| 19 |
- {
|
|
| 20 |
- self::_validateParams($params); |
|
| 21 |
- $url = static::classUrl(); |
|
| 22 |
- |
|
| 23 |
- list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
| 24 |
- $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); |
|
| 25 |
- $obj->setLastResponse($response); |
|
| 26 |
- return $obj; |
|
| 27 |
- } |
|
| 28 |
-} |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,28 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+namespace Telnyx\ApiOperations; |
|
| 4 |
+ |
|
| 5 |
+/** |
|
| 6 |
+ * Trait for creatable resources. Adds a `create()` static method to the class. |
|
| 7 |
+ * |
|
| 8 |
+ * This trait should only be applied to classes that derive from TelnyxObject. |
|
| 9 |
+ */ |
|
| 10 |
+trait Create |
|
| 11 |
+{
|
|
| 12 |
+ /** |
|
| 13 |
+ * @param array|null $params |
|
| 14 |
+ * @param array|string|null $options |
|
| 15 |
+ * |
|
| 16 |
+ * @return \Telnyx\ApiResource The created resource. |
|
| 17 |
+ */ |
|
| 18 |
+ public static function create($params = null, $options = null) |
|
| 19 |
+ {
|
|
| 20 |
+ self::_validateParams($params); |
|
| 21 |
+ $url = static::classUrl(); |
|
| 22 |
+ |
|
| 23 |
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
| 24 |
+ $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); |
|
| 25 |
+ $obj->setLastResponse($response); |
|
| 26 |
+ return $obj; |
|
| 27 |
+ } |
|
| 28 |
+} |
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,28 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-namespace Telnyx\ApiOperations; |
|
| 4 |
- |
|
| 5 |
-/** |
|
| 6 |
- * Trait for creatable resources. Adds a `create()` static method to the class. |
|
| 7 |
- * |
|
| 8 |
- * This trait should only be applied to classes that derive from TelnyxObject. |
|
| 9 |
- */ |
|
| 10 |
-trait Create |
|
| 11 |
-{
|
|
| 12 |
- /** |
|
| 13 |
- * @param array|null $params |
|
| 14 |
- * @param array|string|null $options |
|
| 15 |
- * |
|
| 16 |
- * @return \Telnyx\ApiResource The created resource. |
|
| 17 |
- */ |
|
| 18 |
- public static function create($params = null, $options = null) |
|
| 19 |
- {
|
|
| 20 |
- self::_validateParams($params); |
|
| 21 |
- $url = static::classUrl(); |
|
| 22 |
- |
|
| 23 |
- list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
| 24 |
- $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); |
|
| 25 |
- $obj->setLastResponse($response); |
|
| 26 |
- return $obj; |
|
| 27 |
- } |
|
| 28 |
-} |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,28 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+namespace Telnyx\ApiOperations; |
|
| 4 |
+ |
|
| 5 |
+/** |
|
| 6 |
+ * Trait for creatable resources. Adds a `create()` static method to the class. |
|
| 7 |
+ * |
|
| 8 |
+ * This trait should only be applied to classes that derive from TelnyxObject. |
|
| 9 |
+ */ |
|
| 10 |
+trait Create |
|
| 11 |
+{
|
|
| 12 |
+ /** |
|
| 13 |
+ * @param array|null $params |
|
| 14 |
+ * @param array|string|null $options |
|
| 15 |
+ * |
|
| 16 |
+ * @return \Telnyx\ApiResource The created resource. |
|
| 17 |
+ */ |
|
| 18 |
+ public static function create($params = null, $options = null) |
|
| 19 |
+ {
|
|
| 20 |
+ self::_validateParams($params); |
|
| 21 |
+ $url = static::classUrl(); |
|
| 22 |
+ |
|
| 23 |
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
| 24 |
+ $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); |
|
| 25 |
+ $obj->setLastResponse($response); |
|
| 26 |
+ return $obj; |
|
| 27 |
+ } |
|
| 28 |
+} |
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,28 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-namespace Telnyx\ApiOperations; |
|
| 4 |
- |
|
| 5 |
-/** |
|
| 6 |
- * Trait for creatable resources. Adds a `create()` static method to the class. |
|
| 7 |
- * |
|
| 8 |
- * This trait should only be applied to classes that derive from TelnyxObject. |
|
| 9 |
- */ |
|
| 10 |
-trait Create |
|
| 11 |
-{
|
|
| 12 |
- /** |
|
| 13 |
- * @param array|null $params |
|
| 14 |
- * @param array|string|null $options |
|
| 15 |
- * |
|
| 16 |
- * @return \Telnyx\ApiResource The created resource. |
|
| 17 |
- */ |
|
| 18 |
- public static function create($params = null, $options = null) |
|
| 19 |
- {
|
|
| 20 |
- self::_validateParams($params); |
|
| 21 |
- $url = static::classUrl(); |
|
| 22 |
- |
|
| 23 |
- list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
| 24 |
- $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); |
|
| 25 |
- $obj->setLastResponse($response); |
|
| 26 |
- return $obj; |
|
| 27 |
- } |
|
| 28 |
-} |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,28 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+namespace Telnyx\ApiOperations; |
|
| 4 |
+ |
|
| 5 |
+/** |
|
| 6 |
+ * Trait for creatable resources. Adds a `create()` static method to the class. |
|
| 7 |
+ * |
|
| 8 |
+ * This trait should only be applied to classes that derive from TelnyxObject. |
|
| 9 |
+ */ |
|
| 10 |
+trait Create |
|
| 11 |
+{
|
|
| 12 |
+ /** |
|
| 13 |
+ * @param array|null $params |
|
| 14 |
+ * @param array|string|null $options |
|
| 15 |
+ * |
|
| 16 |
+ * @return \Telnyx\ApiResource The created resource. |
|
| 17 |
+ */ |
|
| 18 |
+ public static function create($params = null, $options = null) |
|
| 19 |
+ {
|
|
| 20 |
+ self::_validateParams($params); |
|
| 21 |
+ $url = static::classUrl(); |
|
| 22 |
+ |
|
| 23 |
+ list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
| 24 |
+ $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); |
|
| 25 |
+ $obj->setLastResponse($response); |
|
| 26 |
+ return $obj; |
|
| 27 |
+ } |
|
| 28 |
+} |