1 | <?php |
||
20 | final class Plan implements CreatableFromArray, ContainsMetadata |
||
21 | { |
||
22 | use LivemodeTrait; |
||
23 | use MetadataTrait; |
||
24 | |||
25 | const AGGREGATE_USAGE_SUM = 'sum'; |
||
26 | const AGGREGATE_USAGE_LAST_DURING_PERIOD = 'last_during_period'; |
||
27 | const AGGREGATE_USAGE_LAST_EVER = 'last_ever'; |
||
28 | const AGGREGATE_USAGE_MAX = 'max'; |
||
29 | |||
30 | const BILLING_SCHEME_PER_UNIT = 'per_unit'; |
||
31 | const BILLING_SCHEME_TIERED = 'tiered'; |
||
32 | |||
33 | const INTERVAL_DAY = 'day'; |
||
34 | const INTERVAL_WEEK = 'week'; |
||
35 | const INTERVAL_MONTH = 'month'; |
||
36 | const INTERVAL_YEAR = 'year'; |
||
37 | |||
38 | const TIERS_MODE_GRADUATED = 'graduated'; |
||
39 | const TIERS_MODE_VOLUME = 'volume'; |
||
40 | |||
41 | const USAGE_TYPE_METERED = 'metered'; |
||
42 | const USAGE_TYPE_LICENSED = 'licensed'; |
||
43 | |||
44 | const ROUND_DOWN = 'down'; |
||
45 | const ROUND_UP = 'up'; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | private $id; |
||
51 | |||
52 | /** |
||
53 | * @var bool |
||
54 | */ |
||
55 | private $active; |
||
56 | |||
57 | /** |
||
58 | * @var ?string |
||
59 | */ |
||
60 | private $aggregateUsage; |
||
61 | |||
62 | /** |
||
63 | * @var Money |
||
64 | */ |
||
65 | private $amount; |
||
66 | |||
67 | /** |
||
68 | * @var string |
||
69 | */ |
||
70 | private $billingScheme; |
||
71 | |||
72 | /** |
||
73 | * @var \DateTimeImmutable |
||
74 | */ |
||
75 | private $createdAt; |
||
76 | |||
77 | /** |
||
78 | * @var Currency |
||
79 | */ |
||
80 | private $currency; |
||
81 | |||
82 | /** |
||
83 | * @var string |
||
84 | */ |
||
85 | private $interval; |
||
86 | |||
87 | /** |
||
88 | * @var int |
||
89 | */ |
||
90 | private $intervalCount; |
||
91 | |||
92 | /** |
||
93 | * @var ?string |
||
94 | */ |
||
95 | private $nickname; |
||
96 | |||
97 | /** |
||
98 | * @var string |
||
99 | */ |
||
100 | private $product; |
||
101 | |||
102 | /** |
||
103 | * @var array |
||
104 | */ |
||
105 | private $tiers; |
||
106 | |||
107 | /** |
||
108 | * @var ?string |
||
109 | */ |
||
110 | private $tiersMode; |
||
111 | |||
112 | /** |
||
113 | * @var ?TransformUsage |
||
114 | */ |
||
115 | private $transformUsage; |
||
116 | |||
117 | /** |
||
118 | * @var ?int |
||
119 | */ |
||
120 | private $trialPeriodDays; |
||
121 | |||
122 | /** |
||
123 | * @var string |
||
124 | */ |
||
125 | private $usageType; |
||
126 | |||
127 | 14 | public static function createFromArray(array $data): self |
|
160 | |||
161 | 1 | public function getId(): string |
|
165 | |||
166 | 1 | public function isActive(): bool |
|
170 | |||
171 | 1 | public function getAgregateUsage(): ?string |
|
175 | |||
176 | 1 | public function getAmount(): Money |
|
180 | |||
181 | 1 | public function getBilingScheme(): string |
|
185 | |||
186 | 1 | public function getCreatedAt(): \DateTimeImmutable |
|
190 | |||
191 | 1 | public function getCurrency(): Currency |
|
195 | |||
196 | 1 | public function getInterval(): string |
|
200 | |||
201 | 1 | public function getIntervalCount(): int |
|
205 | |||
206 | 1 | public function getNickname(): ?string |
|
210 | |||
211 | 1 | public function getProduct(): string |
|
215 | |||
216 | 1 | public function getTiers(): array |
|
220 | |||
221 | 1 | public function getTiersMode(): ?string |
|
225 | |||
226 | 1 | public function getTransformUsage(): ?TransformUsage |
|
230 | |||
231 | 1 | public function getTrialPeriodDays(): ?int |
|
235 | |||
236 | 1 | public function getUsageType(): string |
|
240 | } |
||
241 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..