add subscription process create endpoint
This commit is contained in:
@ -48,6 +48,24 @@ class SubscriptionProcess extends Model
|
||||
return new SubscriptionEntity($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BaseException
|
||||
*/
|
||||
public function create(?string $name): SubscriptionEntity
|
||||
{
|
||||
$data = $this->connection->requestAndParse(
|
||||
'POST',
|
||||
'list.json',
|
||||
[
|
||||
RequestOptions::FORM_PARAMS => array_filter([
|
||||
'name' => trim($name ?? ''),
|
||||
]),
|
||||
]
|
||||
);
|
||||
|
||||
return new SubscriptionEntity($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BaseException
|
||||
*/
|
||||
|
Reference in New Issue
Block a user