for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ItsMeLePassos\CafeApi;
use ItsMeLePassos\CafeApi\API\CafeApiController;
class WalletController extends CafeApiController
{
/**
* Wallets constructor.
* @param string $apiUrl
* @param string $email
* @param string $password
*/
public function __construct(string $apiUrl, string $email, string $password)
parent::__construct($apiUrl, $email, $password);
}
* @param array|null $headers
* @return WalletController
public function index(?array $headers): WalletController
$this->request(
"GET",
"/wallets",
null,
$headers
);
return $this;
* @param array $fields
public function create(array $fields): WalletController
"POST",
$fields
* @param int $walletId
public function read(int $walletId): WalletController
"/wallets/{$walletId}"
public function update(int $walletId, array $fields): WalletController
"PUT",
"/wallets/{$walletId}",
public function delete(int $walletId): WalletController
"DELETE",