add subscription process create endpoint

This commit is contained in:
2025-01-03 09:19:29 +01:00
parent 549078f1b7
commit abcfea9480
2 changed files with 43 additions and 0 deletions

View File

@ -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
*/