Skip to content

Commit

Permalink
add getCustomer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken-vdE authored Jan 6, 2023
1 parent 20a1cf5 commit 3c73e9c
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,29 @@ public function updateCustomer(int $customerId, array $customer): array
],
]);
}


/**
* @param int $customerId
* @return bool
* @throws GuzzleException
* @throws \JsonException
*/
public function getCustomer(int $customerId): bool
{
return $this->request('get', $this->baseUrl . $this->apiPrefix . 'customers/' . $customerId);
}

/**
* @param int $customerId
* @return bool
* @throws GuzzleException
* @throws \JsonException
*/
public function deleteCustomer(int $customerId): bool
{
return $this->request('delete', $this->baseUrl . $this->apiPrefix . 'customers/' . $customerId);
}

/**
* @param int $page
* @param int $pageSize
Expand All @@ -177,17 +199,6 @@ public function getCustomers(int $page = 1, int $pageSize = 25, array $filterGro
]);
}

/**
* @param int $customerId
* @return bool
* @throws GuzzleException
* @throws \JsonException
*/
public function deleteCustomer(int $customerId): bool
{
return $this->request('delete', $this->baseUrl . $this->apiPrefix . 'customers/' . $customerId);
}

/**
* @param string $email
* @return array
Expand Down

0 comments on commit 3c73e9c

Please sign in to comment.