Customers can now be created
This commit is contained in:
1 parent
27ddeeacb5
commit
0802d5cac2
5 files changed
+140
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Mattitja\BokioApiLaravel\Resources;
|
||||
|
||||
use Mattitja\BokioApiLaravel\BokioClient;
|
||||
use Mattitja\BokioApiLaravel\Validation\CustomerValidator;
|
||||
|
||||
class Customer
|
||||
{
|
||||
@@ -32,4 +33,11 @@ class Customer
|
||||
{
|
||||
return $this->client->get('customers/'.$customerId);
|
||||
}
|
||||
|
||||
public function create(array $data): object
|
||||
{
|
||||
$validated = CustomerValidator::validate($data);
|
||||
|
||||
return $this->client->post('customers', $validated);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user