@@ -49,8 +49,8 @@ protected function constructRequest()
4949 /**
5050 * Send a GET request with query parameters.
5151 *
52- * @param string $path
53- * @param string $parameters
52+ * @param string $path
53+ * @param string $parameters
5454 *
5555 * @return \Illuminate\Http\Client\Response
5656 */
@@ -63,8 +63,8 @@ protected function get($path, $parameters = [])
6363 /**
6464 * Send a POST request with query parameters.
6565 *
66- * @param string $path
67- * @param string $parameters
66+ * @param string $path
67+ * @param string $parameters
6868 *
6969 * @return \Illuminate\Http\Client\Response
7070 */
@@ -74,12 +74,40 @@ protected function post($path, $parameters = [])
7474 ->post ($ this ->apiRequest .$ path , $ parameters ));
7575 }
7676
77+ /**
78+ * Send a PUT request.
79+ *
80+ * @param $path
81+ * @param array $parameters
82+ *
83+ * @return \Illuminate\Http\Client\Response|void
84+ */
85+ protected function put ($ path , $ parameters = [])
86+ {
87+ return $ this ->checkExceptions (Http::withToken ($ this ->magento ->token )
88+ ->put ($ this ->apiRequest .$ path , $ parameters ));
89+ }
90+
91+ /**
92+ * Send a DELETE request.
93+ *
94+ * @param $path
95+ * @param array $parameters
96+ *
97+ * @return \Illuminate\Http\Client\Response|void
98+ */
99+ protected function delete ($ path , $ parameters = [])
100+ {
101+ return $ this ->checkExceptions (Http::withToken ($ this ->magento ->token )
102+ ->delete ($ this ->apiRequest .$ path , $ parameters ));
103+ }
104+
77105 /**
78106 * Check for any type of invalid API Responses.
79107 *
80108 * @param \Illuminate\Http\Client\Response $response
81- * @throws \Exception
82109 * @return void
110+ * @throws \Exception
83111 */
84112 protected function checkExceptions ($ response )
85113 {
@@ -93,8 +121,8 @@ protected function checkExceptions($response)
93121 /**
94122 * Validates the usage of the store code as needed.
95123 *
96- * @throws \Exception
97124 * @return void
125+ * @throws \Exception
98126 */
99127 protected function validateSingleStoreCode ()
100128 {
0 commit comments