PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / vendor / vendor-prefixed / stellarwp / licensing-api-client / src / Responses / Entitlement / Suspend.php

Suspend.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at vendor/vendor-prefixed/stellarwp/licensing-api-client/src/Responses/Entitlement/Suspend.php

53 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php declare(strict_types=1);
2
3 namespace Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Entitlement;
4
5 use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Contracts\Response;
6
7 /**
8 * Represents a suspended entitlement response payload.
9 *
10 * @implements Response<array{
11 * product_slug: string,
12 * tier: string,
13 * status: string
14 * }>
15 */
16 final class Suspend implements Response
17 {
18 public string $productSlug;
19
20 public string $tier;
21
22 public string $status;
23
24 private function __construct(string $productSlug, string $tier, string $status) {
25 $this->productSlug = $productSlug;
26 $this->tier = $tier;
27 $this->status = $status;
28 }
29
30 /**
31 * @param array{
32 * product_slug: string,
33 * tier: string,
34 * status: string
35 * } $attributes
36 */
37 public static function from(array $attributes): self {
38 return new self(
39 $attributes['product_slug'],
40 $attributes['tier'],
41 $attributes['status']
42 );
43 }
44
45 public function toArray(): array {
46 return [
47 'product_slug' => $this->productSlug,
48 'tier' => $this->tier,
49 'status' => $this->status,
50 ];
51 }
52 }
53