give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Resources
/
Contracts
/
EntitlementsResourceInterface.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
EntitlementsResourceInterface.php
78 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\Entitlement\SwitchTier; |
| 10 | use Give\Vendors\LiquidWeb\LicensingApiClient\Requests\Entitlement\Upsert; |
| 11 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement\Cancel; |
| 12 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement\Delete; |
| 13 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement\Suspend; |
| 14 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement\SwitchTier as SwitchTierResponse; |
| 15 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement\Unsuspend; |
| 16 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement\Upsert as UpsertResponse; |
| 17 | use Give\Vendors\Psr\Http\Client\ClientExceptionInterface; |
| 18 | |
| 19 | /** |
| 20 | * Defines the entitlements resource surface. |
| 21 | */ |
| 22 | interface EntitlementsResourceInterface |
| 23 | { |
| 24 | /** |
| 25 | * @throws ApiErrorExceptionInterface |
| 26 | * @throws MissingAuthenticationException |
| 27 | * @throws UnexpectedResponseException |
| 28 | * @throws ClientExceptionInterface |
| 29 | * @throws JsonException |
| 30 | */ |
| 31 | public function upsert(Upsert $request): UpsertResponse; |
| 32 | |
| 33 | /** |
| 34 | * @throws ApiErrorExceptionInterface |
| 35 | * @throws MissingAuthenticationException |
| 36 | * @throws UnexpectedResponseException |
| 37 | * @throws ClientExceptionInterface |
| 38 | * @throws JsonException |
| 39 | */ |
| 40 | public function switchTier(SwitchTier $request): SwitchTierResponse; |
| 41 | |
| 42 | /** |
| 43 | * @throws ApiErrorExceptionInterface |
| 44 | * @throws MissingAuthenticationException |
| 45 | * @throws UnexpectedResponseException |
| 46 | * @throws ClientExceptionInterface |
| 47 | * @throws JsonException |
| 48 | */ |
| 49 | public function suspend(string $licenseKey, string $productSlug, string $tier): Suspend; |
| 50 | |
| 51 | /** |
| 52 | * @throws ApiErrorExceptionInterface |
| 53 | * @throws MissingAuthenticationException |
| 54 | * @throws UnexpectedResponseException |
| 55 | * @throws ClientExceptionInterface |
| 56 | * @throws JsonException |
| 57 | */ |
| 58 | public function unsuspend(string $licenseKey, string $productSlug, string $tier): Unsuspend; |
| 59 | |
| 60 | /** |
| 61 | * @throws ApiErrorExceptionInterface |
| 62 | * @throws MissingAuthenticationException |
| 63 | * @throws UnexpectedResponseException |
| 64 | * @throws ClientExceptionInterface |
| 65 | * @throws JsonException |
| 66 | */ |
| 67 | public function cancel(string $licenseKey, string $productSlug, string $tier, ?string $reason = null): Cancel; |
| 68 | |
| 69 | /** |
| 70 | * @throws ApiErrorExceptionInterface |
| 71 | * @throws MissingAuthenticationException |
| 72 | * @throws UnexpectedResponseException |
| 73 | * @throws ClientExceptionInterface |
| 74 | * @throws JsonException |
| 75 | */ |
| 76 | public function delete(string $licenseKey, string $productSlug, string $tier): Delete; |
| 77 | } |
| 78 |