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,67 @@
1
+<?php
2
+
3
+namespace Telnyx;
4
+
5
+/**
6
+ * Class MessagingProfile
7
+ *
8
+ * @package Telnyx
9
+ */
10
+class MessagingProfile extends ApiResource
11
+{
12
+    const OBJECT_NAME = "messaging_profile";
13
+
14
+    use ApiOperations\All;
15
+    use ApiOperations\Create;
16
+    use ApiOperations\Delete;
17
+    use ApiOperations\Retrieve;
18
+    use ApiOperations\Update;
19
+
20
+
21
+    /**
22
+     * List all phone numbers associated with a messaging profile.
23
+     *
24
+     * @param array|null $params
25
+     * @param array|string|null $options
26
+     *
27
+     * @return
28
+     */
29
+    public function phone_numbers($params = null, $options = null)
30
+    {
31
+        $url = $this->instanceUrl() . '/phone_numbers';
32
+        list($response, $opts) = $this->_request('get', $url, $params, $options);
33
+        $this->refreshFrom($response, $opts);
34
+        return $this;
35
+    }
36
+
37
+    /**
38
+     * List all short codes associated with a messaging profile.
39
+     *
40
+     * @param array|null $params
41
+     * @param array|string|null $options
42
+     *
43
+     * @return
44
+     */
45
+    public function short_codes($params = null, $options = null)
46
+    {
47
+        $url = $this->instanceUrl() . '/short_codes';
48
+        list($response, $opts) = $this->_request('get', $url, $params, $options);
49
+        $this->refreshFrom($response, $opts);
50
+        return $this;
51
+    }
52
+
53
+    /**
54
+     * List all sender IDs associated with a messaging profile.
55
+     * @param array|null $params
56
+     * @param array|string|null $options
57
+     *
58
+     * @return
59
+     */
60
+    public function alphanumeric_sender_ids($params = null, $options = null)
61
+    {
62
+        $url = $this->instanceUrl() . '/alphanumeric_sender_ids';
63
+        list($response, $opts) = $this->_request('get', $url, $params, $options);
64
+        $this->refreshFrom($response, $opts);
65
+        return $this;
66
+    }
67
+}