give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Resources
/
Contracts
/
CreditsPoolsResourceInterface.php
give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Resources
/
Contracts
Last commit date
CreditsLedgerResourceInterface.php
3 months ago
CreditsPoolsResourceInterface.php
3 months ago
CreditsQuotasResourceInterface.php
3 months ago
CreditsResourceInterface.php
3 months ago
EntitlementsResourceInterface.php
3 months ago
LicensesResourceInterface.php
3 months ago
ProductsResourceInterface.php
3 months ago
TokensResourceInterface.php
3 months ago
CreditsPoolsResourceInterface.php
58 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Give\Vendors\LiquidWeb\LicensingApiClient\Resources\Contracts; |
| 4 | |
| 5 | use JsonException; |
| 6 | use Give\Vendors\LiquidWeb\LicensingApiClient\Exceptions\Contracts\ApiErrorExceptionInterface; |
| 7 | use Give\Vendors\LiquidWeb\LicensingApiClient\Exceptions\MissingAuthenticationException; |
| 8 | use Give\Vendors\LiquidWeb\LicensingApiClient\Exceptions\UnexpectedResponseException; |
| 9 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\Credit\CreatePool; |
| 10 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\Credit\DeletePool as DeletePoolRequest; |
| 11 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\Credit\UpdatePool; |
| 12 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Credit\DeletePool; |
| 13 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Credit\PoolCollection; |
| 14 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Credit\ValueObjects\CreditPool; |
| 15 | use Give\Vendors\Psr\Http\Client\ClientExceptionInterface; |
| 16 | |
| 17 | /** |
| 18 | * Defines the credits pools resource surface. |
| 19 | */ |
| 20 | interface CreditsPoolsResourceInterface |
| 21 | { |
| 22 | /** |
| 23 | * @throws ApiErrorExceptionInterface |
| 24 | * @throws MissingAuthenticationException |
| 25 | * @throws UnexpectedResponseException |
| 26 | * @throws ClientExceptionInterface |
| 27 | * @throws JsonException |
| 28 | */ |
| 29 | public function list(string $licenseKey, bool $active = false): PoolCollection; |
| 30 | |
| 31 | /** |
| 32 | * @throws ApiErrorExceptionInterface |
| 33 | * @throws MissingAuthenticationException |
| 34 | * @throws UnexpectedResponseException |
| 35 | * @throws ClientExceptionInterface |
| 36 | * @throws JsonException |
| 37 | */ |
| 38 | public function create(CreatePool $request): CreditPool; |
| 39 | |
| 40 | /** |
| 41 | * @throws ApiErrorExceptionInterface |
| 42 | * @throws MissingAuthenticationException |
| 43 | * @throws UnexpectedResponseException |
| 44 | * @throws ClientExceptionInterface |
| 45 | * @throws JsonException |
| 46 | */ |
| 47 | public function update(UpdatePool $request): CreditPool; |
| 48 | |
| 49 | /** |
| 50 | * @throws ApiErrorExceptionInterface |
| 51 | * @throws MissingAuthenticationException |
| 52 | * @throws UnexpectedResponseException |
| 53 | * @throws ClientExceptionInterface |
| 54 | * @throws JsonException |
| 55 | */ |
| 56 | public function delete(DeletePoolRequest $request): DeletePool; |
| 57 | } |
| 58 |