for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Lifeboat\Services;
use Lifeboat\Exceptions\ApiException;
use Lifeboat\Exceptions\OAuthException;
use Lifeboat\Models\Customer;
use Lifeboat\Resource\ListResource;
/**
* Class Customers
* @package Lifeboat\Services
*/
class Customers extends ApiService {
* @param int $id
* @return Customer|null
* @throws ApiException
* @throws OAuthException
public function fetch(int $id): ?Customer
{
/** @var Customer|null $fetch */
$fetch = $this->_get('api/customers/customer' . $id);
return $fetch;
}
* @param array $data
public function create(array $data): ?Customer
/** @var Customer|null $create */
$create = $this->_post('api/customers/customer', $data);
return $create;
public function update(int $id, array $data): ?Customer
/** @var Customer|null $post */
$post = $this->_post('api/customers/customer/' . $id, $data);
return $post;
* @param string $search
* @return ListResource
public function all(string $search = ''): ListResource {
return new ListResource($this->getClient(), 'api/customers/all', ['search' => $search], 20);