Uso de cuenta al agregar y editar para Toku

This commit is contained in:
Juan Pablo Vial
2025-07-01 17:14:53 -04:00
parent 8a043b21bc
commit 7714e25270
6 changed files with 118 additions and 65 deletions

View File

@ -29,15 +29,15 @@ class Customer extends AbstractEndPoint
$request_uri = "/customers/{$id}";
return $this->sendGet($request_uri, [200], [404, 422]);
}
public function add(array $data): bool
public function add(array $data, ?string $accountKey = null): bool
{
$request_uri = "/customers";
return $this->sendAdd($request_uri, $data, [200, 201], [400, 422]);
return $this->sendAdd($request_uri, $data, [200, 201], [400, 422], $accountKey);
}
public function edit(string $id, array $data): bool
public function edit(string $id, array $data, ?string $accountKey = null): bool
{
$request_uri = "customers/{$id}";
return $this->sendEdit($request_uri, $data, [200], [400, 404, 422]);
return $this->sendEdit($request_uri, $data, [200], [400, 404, 422], $accountKey);
}
public function delete(string $id): void
{