for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/** Namespace */
namespace MatheusBastos\CafeApi;
/**
* Subscriptions Api class
* @package MatheusBastos\CafeApi
*/
class Subscriptions extends CafeApi
{
* Subscriptions constructor
* @param string $api_url
* @param string $email
* @param string $password
public function __construct(string $api_url, string $email, string $password)
parent::__construct($api_url, $email, $password);
}
* Index
* @return Subscriptions
public function index(): Subscriptions
$this->request('GET', '/subscription');
return $this;
* Create
* @param array $fields
public function create(array $fields): Subscriptions
$this->request('POST', '/subscription', $fields);
* Read
public function read(): Subscriptions
$this->request('GET', '/subscription/plans');
* Update
public function update(array $fields): Subscriptions
$this->request('PUT', '/subscription', $fields);