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,27 @@
1
+<?php
2
+
3
+namespace Telnyx\ApiOperations;
4
+
5
+/**
6
+ * Trait for deletable resources. Adds a `delete()` method to the class.
7
+ *
8
+ * This trait should only be applied to classes that derive from TelnyxObject.
9
+ */
10
+trait Delete
11
+{
12
+    /**
13
+     * @param array|null $params
14
+     * @param array|string|null $opts
15
+     *
16
+     * @return \Telnyx\ApiResource The deleted resource.
17
+     */
18
+    public function delete($params = null, $opts = null)
19
+    {
20
+        self::_validateParams($params);
21
+
22
+        $url = $this->instanceUrl();
23
+        list($response, $opts) = $this->_request('delete', $url, $params, $opts);
24
+        $this->refreshFrom($response, $opts);
25
+        return $this;
26
+    }
27
+}