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,30 @@
1
+<?php
2
+
3
+namespace Telnyx;
4
+
5
+/**
6
+ * Class TelephonyCredential
7
+ *
8
+ * @package Telnyx
9
+ */
10
+class TelephonyCredential extends ApiResource
11
+{
12
+    const OBJECT_NAME = "credential"; // The record_type is 'credential' and the endpoint is /telephony_credentials which is changed in classUrl() below
13
+
14
+    use ApiOperations\All;
15
+    use ApiOperations\Create;
16
+    use ApiOperations\Retrieve;
17
+    use ApiOperations\Update;
18
+    use ApiOperations\Delete;
19
+
20
+    /**
21
+     * @return string The endpoint URL for the given class.
22
+     */
23
+    public static function classUrl()
24
+    {
25
+        // NOTE: This function override compensates for the different way this endpoint is spelled.
26
+        // 'faxs' vs 'faxes'
27
+        // Original function inside ApiResource.php
28
+        return "/v2/telephony_credentials";
29
+    }
30
+}