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