Added customer all and get
This commit is contained in:
1 parent
4a2b1b6a44
commit
410906b2cd
7 files changed
+140
-7
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user