give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Resources
/
Contracts
/
LicensesResourceInterface.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
LicensesResourceInterface.php
146 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Give\Vendors\LiquidWeb\LicensingApiClient\Resources\Contracts; |
| 4 | |
| 5 | use Generator; |
| 6 | use JsonException; |
| 7 | use Give\Vendors\LiquidWeb\LicensingApiClient\Exceptions\Contracts\ApiErrorExceptionInterface; |
| 8 | use Give\Vendors\LiquidWeb\LicensingApiClient\Exceptions\MissingAuthenticationException; |
| 9 | use Give\Vendors\LiquidWeb\LicensingApiClient\Exceptions\UnexpectedResponseException; |
| 10 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\Activate; |
| 11 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\Alias\ImportAliases; |
| 12 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\Alias\RemoveAliases; |
| 13 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\Deactivate; |
| 14 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\DeleteActivation; |
| 15 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\LicenseReference; |
| 16 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\Listing\ListRequest; |
| 17 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\License\RegenerateKey; |
| 18 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\Activate as ActivateResponse; |
| 19 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\Alias\ImportAliases as ImportAliasesResponse; |
| 20 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\Alias\RemoveAliases as RemoveAliasesResponse; |
| 21 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\Deactivate as DeactivateResponse; |
| 22 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\DeleteActivation as DeleteActivationResponse; |
| 23 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\Listing\Listing; |
| 24 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\RegenerateKey as RegenerateKeyResponse; |
| 25 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\StatusChange; |
| 26 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License\Validate; |
| 27 | use Give\Vendors\Psr\Http\Client\ClientExceptionInterface; |
| 28 | |
| 29 | /** |
| 30 | * Defines the licenses resource surface. |
| 31 | */ |
| 32 | interface LicensesResourceInterface |
| 33 | { |
| 34 | /** |
| 35 | * @throws ApiErrorExceptionInterface |
| 36 | * @throws MissingAuthenticationException |
| 37 | * @throws UnexpectedResponseException |
| 38 | * @throws ClientExceptionInterface |
| 39 | * @throws JsonException |
| 40 | */ |
| 41 | public function list(ListRequest $request): Listing; |
| 42 | |
| 43 | /** |
| 44 | * @throws ApiErrorExceptionInterface |
| 45 | * @throws MissingAuthenticationException |
| 46 | * @throws UnexpectedResponseException |
| 47 | * @throws ClientExceptionInterface |
| 48 | * @throws JsonException |
| 49 | * |
| 50 | * @return Generator<int, Listing, mixed, void> |
| 51 | */ |
| 52 | public function pages(ListRequest $request): Generator; |
| 53 | |
| 54 | /** |
| 55 | * @throws ApiErrorExceptionInterface |
| 56 | * @throws MissingAuthenticationException |
| 57 | * @throws UnexpectedResponseException |
| 58 | * @throws ClientExceptionInterface |
| 59 | * @throws JsonException |
| 60 | */ |
| 61 | public function activate(Activate $request): ActivateResponse; |
| 62 | |
| 63 | /** |
| 64 | * @throws ApiErrorExceptionInterface |
| 65 | * @throws MissingAuthenticationException |
| 66 | * @throws UnexpectedResponseException |
| 67 | * @throws ClientExceptionInterface |
| 68 | * @throws JsonException |
| 69 | */ |
| 70 | public function deactivate(Deactivate $request): DeactivateResponse; |
| 71 | |
| 72 | /** |
| 73 | * @throws ApiErrorExceptionInterface |
| 74 | * @throws MissingAuthenticationException |
| 75 | * @throws UnexpectedResponseException |
| 76 | * @throws ClientExceptionInterface |
| 77 | * @throws JsonException |
| 78 | */ |
| 79 | public function deleteActivation(DeleteActivation $request): DeleteActivationResponse; |
| 80 | |
| 81 | /** |
| 82 | * @param list<string> $productSlugs |
| 83 | * |
| 84 | * @throws ApiErrorExceptionInterface |
| 85 | * @throws MissingAuthenticationException |
| 86 | * @throws UnexpectedResponseException |
| 87 | * @throws ClientExceptionInterface |
| 88 | * @throws JsonException |
| 89 | */ |
| 90 | public function validate(string $licenseKey, array $productSlugs, string $domain): Validate; |
| 91 | |
| 92 | /** |
| 93 | * @throws ApiErrorExceptionInterface |
| 94 | * @throws MissingAuthenticationException |
| 95 | * @throws UnexpectedResponseException |
| 96 | * @throws ClientExceptionInterface |
| 97 | * @throws JsonException |
| 98 | */ |
| 99 | public function suspend(LicenseReference $request): StatusChange; |
| 100 | |
| 101 | /** |
| 102 | * @throws ApiErrorExceptionInterface |
| 103 | * @throws MissingAuthenticationException |
| 104 | * @throws UnexpectedResponseException |
| 105 | * @throws ClientExceptionInterface |
| 106 | * @throws JsonException |
| 107 | */ |
| 108 | public function reinstate(LicenseReference $request): StatusChange; |
| 109 | |
| 110 | /** |
| 111 | * @throws ApiErrorExceptionInterface |
| 112 | * @throws MissingAuthenticationException |
| 113 | * @throws UnexpectedResponseException |
| 114 | * @throws ClientExceptionInterface |
| 115 | * @throws JsonException |
| 116 | */ |
| 117 | public function ban(LicenseReference $request): StatusChange; |
| 118 | |
| 119 | /** |
| 120 | * @throws ApiErrorExceptionInterface |
| 121 | * @throws MissingAuthenticationException |
| 122 | * @throws UnexpectedResponseException |
| 123 | * @throws ClientExceptionInterface |
| 124 | * @throws JsonException |
| 125 | */ |
| 126 | public function regenerateKey(RegenerateKey $request): RegenerateKeyResponse; |
| 127 | |
| 128 | /** |
| 129 | * @throws ApiErrorExceptionInterface |
| 130 | * @throws MissingAuthenticationException |
| 131 | * @throws UnexpectedResponseException |
| 132 | * @throws ClientExceptionInterface |
| 133 | * @throws JsonException |
| 134 | */ |
| 135 | public function importAliases(ImportAliases $request): ImportAliasesResponse; |
| 136 | |
| 137 | /** |
| 138 | * @throws ApiErrorExceptionInterface |
| 139 | * @throws MissingAuthenticationException |
| 140 | * @throws UnexpectedResponseException |
| 141 | * @throws ClientExceptionInterface |
| 142 | * @throws JsonException |
| 143 | */ |
| 144 | public function removeAliases(RemoveAliases $request): RemoveAliasesResponse; |
| 145 | } |
| 146 |