diff --git a/src/Api/Customers.php b/src/Api/Customers.php index 5d8eaca..b290fcf 100644 --- a/src/Api/Customers.php +++ b/src/Api/Customers.php @@ -65,4 +65,15 @@ public function resetPassword($email, $resetToken, $newPassword) 'newPassword' => $newPassword, ]); } + + /** + * Get the customer by Customer ID. + * + * @param int $id + * @return array + */ + public function show($id) + { + return $this->get('/customers/'.$id); + } } diff --git a/tests/Api/CustomersTest.php b/tests/Api/CustomersTest.php index 6f470ee..c6859f0 100644 --- a/tests/Api/CustomersTest.php +++ b/tests/Api/CustomersTest.php @@ -66,4 +66,15 @@ public function test_can_reset_password() $this->assertTrue($api->ok()); } + + public function test_can_customer_show() + { + Http::fake([ + '*rest/all/V1/customers/1' => Http::response([], 200), + ]); + + $api = MagentoFacade::api('customers')->show(1); + + $this->assertTrue($api->ok()); + } }