give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Resources
/
Contracts
/
TokensResourceInterface.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
TokensResourceInterface.php
56 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\Token\Create as CreateRequest; |
| 10 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\Token\Revoke as RevokeRequest; |
| 11 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Token\Auth; |
| 12 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Token\TokenList; |
| 13 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Token\ValueObjects\TokenItem; |
| 14 | use Give\Vendors\Psr\Http\Client\ClientExceptionInterface; |
| 15 | |
| 16 | /** |
| 17 | * Defines the tokens resource surface. |
| 18 | */ |
| 19 | interface TokensResourceInterface |
| 20 | { |
| 21 | /** |
| 22 | * @throws ApiErrorExceptionInterface |
| 23 | * @throws MissingAuthenticationException |
| 24 | * @throws UnexpectedResponseException |
| 25 | * @throws ClientExceptionInterface |
| 26 | * @throws JsonException |
| 27 | */ |
| 28 | public function list(string $licenseKey): TokenList; |
| 29 | |
| 30 | /** |
| 31 | * @throws ApiErrorExceptionInterface |
| 32 | * @throws MissingAuthenticationException |
| 33 | * @throws UnexpectedResponseException |
| 34 | * @throws ClientExceptionInterface |
| 35 | * @throws JsonException |
| 36 | */ |
| 37 | public function create(CreateRequest $request): TokenItem; |
| 38 | |
| 39 | /** |
| 40 | * @throws ApiErrorExceptionInterface |
| 41 | * @throws MissingAuthenticationException |
| 42 | * @throws UnexpectedResponseException |
| 43 | * @throws ClientExceptionInterface |
| 44 | * @throws JsonException |
| 45 | */ |
| 46 | public function revoke(RevokeRequest $request): TokenItem; |
| 47 | |
| 48 | /** |
| 49 | * @throws ApiErrorExceptionInterface |
| 50 | * @throws UnexpectedResponseException |
| 51 | * @throws ClientExceptionInterface |
| 52 | * @throws JsonException |
| 53 | */ |
| 54 | public function auth(string $licenseKey, string $token, string $domain): Auth; |
| 55 | } |
| 56 |