diff --git a/src/Customers/CustomersEndpoint.php b/src/Customers/CustomersEndpoint.php index 83749d4..3b91b4f 100644 --- a/src/Customers/CustomersEndpoint.php +++ b/src/Customers/CustomersEndpoint.php @@ -68,6 +68,13 @@ public function list( ); } + public function delete(int $customerId): void + { + $this->restClient->deleteResource( + sprintf('/v2/customers/%d', $customerId) + ); + } + /** * @return Customer[]|PagedCollection */ diff --git a/tests/Customers/CustomerClientIntegrationTest.php b/tests/Customers/CustomerClientIntegrationTest.php index f5d4d5e..acc9191 100644 --- a/tests/Customers/CustomerClientIntegrationTest.php +++ b/tests/Customers/CustomerClientIntegrationTest.php @@ -307,4 +307,15 @@ public function testGetCustomersLazyLoadsPages() ['GET', 'https://api.helpscout.net/v2/customers?page=2'], ]); } + + public function testDeleteCustomer() + { + $this->stubResponse($this->getResponse(201)); + $this->client->customers()->delete(1); + + $this->verifySingleRequest( + 'https://api.helpscout.net/v2/customers/1', + 'DELETE' + ); + } }