Added customer all and get

This commit is contained in:
mathiaspalmqvist committed 2025-06-30 10:59:53 +02:00
1 parent 4a2b1b6a44
commit 410906b2cd
7 files changed
+140 -7

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Mattitja\BokioApiLaravel\Resources;
use Mattitja\BokioApiLaravel\BokioClient;
class Customer
{
public function __construct(
protected BokioClient $client
) {}
/**
* Get a list of all customers.
*/
public function all(int $page = 1, int $pageSize = 25): object
{
return $this->client->get('customers', [
'page' => $page,
'pageSize' => $pageSize,
]);
}
public function get(string $customerId): object
{
return $this->client->get('customers/'.$customerId);
}
}