Browse code

Added README.md appinfo/info.xml appinfo/signature.json lib/Controller/AuthorApiController.php and the providers directory

DoubleBastionAdmin authored on 20/08/2022 16:33:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,48 @@
1
+<?php
2
+
3
+namespace Telnyx;
4
+
5
+/**
6
+ * Class InboundChannel
7
+ *
8
+ * @package Telnyx
9
+ */
10
+class InboundChannel extends ApiResource
11
+{
12
+    const OBJECT_NAME = "inbound_channels";
13
+    const OBJECT_URL = "/v2/phone_numbers/inbound_channels";
14
+
15
+    /**
16
+     * @param array|null $params
17
+     * @param array|string|null $options
18
+     *
19
+     * @return Returns the inbound channels for your account.
20
+     */
21
+    public static function retrieve()
22
+    {
23
+        $url = self::OBJECT_URL;
24
+
25
+        list($response, $opts) = static::_staticRequest('get', $url, null, null);
26
+        $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts);
27
+        $obj->setLastResponse($response);
28
+        return $obj;
29
+    }
30
+
31
+    /**
32
+     * @param array|null $params
33
+     * @param array|string|null $options
34
+     *
35
+     * @return Update the inbound channels for the account
36
+     */
37
+    public static function update($params = null)
38
+    {
39
+        self::_validateParams($params);
40
+        $url = self::OBJECT_URL;
41
+
42
+        list($response, $opts) = static::_staticRequest('patch', $url, $params, null);
43
+        $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts);
44
+        $obj->setLastResponse($response);
45
+        return $obj;
46
+    }
47
+
48
+}