1 | <?php |
||
19 | final class Subscription implements CreatableFromArray, ContainsMetadata |
||
20 | { |
||
21 | use LivemodeTrait, MetadataTrait; |
||
22 | |||
23 | const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; |
||
24 | const BILLING_SEND_INVOICE = 'send_invoice'; |
||
25 | |||
26 | const STATUS_TRIALING = 'trialing'; |
||
27 | const STATUS_ACTIVE = 'active'; |
||
28 | const STATUS_PAST_DUE = 'past_due'; |
||
29 | const STATUS_CANCELED = 'canceled'; |
||
30 | const STATUS_UNPAID = 'unpaid'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $id; |
||
36 | |||
37 | /** |
||
38 | * @var ?float |
||
39 | */ |
||
40 | private $applicationFeePercent; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | private $billing; |
||
46 | |||
47 | /** |
||
48 | * @var mixed |
||
49 | */ |
||
50 | private $billingCycleAnchor; |
||
51 | |||
52 | /** |
||
53 | * @var bool |
||
54 | */ |
||
55 | private $cancelAtPeriodEnd; |
||
56 | |||
57 | /** |
||
58 | * @var ?\DateTimeImmutable |
||
59 | */ |
||
60 | private $canceledAt; |
||
61 | |||
62 | /** |
||
63 | * @var \DateTimeImmutable |
||
64 | */ |
||
65 | private $createdAt; |
||
66 | |||
67 | /** |
||
68 | * @var \DateTimeImmutable |
||
69 | */ |
||
70 | private $currentPeriodEndAt; |
||
71 | |||
72 | /** |
||
73 | * @var \DateTimeImmutable |
||
74 | */ |
||
75 | private $currentPeriodStartAt; |
||
76 | |||
77 | /** |
||
78 | * @var string |
||
79 | */ |
||
80 | private $customer; |
||
81 | |||
82 | /** |
||
83 | * @var ?int |
||
84 | */ |
||
85 | private $daysUntilDue; |
||
86 | |||
87 | /** |
||
88 | * @var ?string |
||
89 | */ |
||
90 | private $defaultSource; |
||
91 | |||
92 | /** |
||
93 | * @var ?\DateTimeImmutable |
||
94 | */ |
||
95 | private $endedAt; |
||
96 | |||
97 | /** |
||
98 | * @var ItemCollection |
||
99 | */ |
||
100 | private $items; |
||
101 | |||
102 | /** |
||
103 | * @var Plan |
||
104 | */ |
||
105 | private $plan; |
||
106 | |||
107 | /** |
||
108 | * @var int |
||
109 | */ |
||
110 | private $quantity; |
||
111 | |||
112 | /** |
||
113 | * @var \DateTimeImmutable |
||
114 | */ |
||
115 | private $startAt; |
||
116 | |||
117 | /** |
||
118 | * @var string |
||
119 | */ |
||
120 | private $status; |
||
121 | |||
122 | /** |
||
123 | * @var ?float |
||
124 | */ |
||
125 | private $taxPercent; |
||
126 | |||
127 | /** |
||
128 | * @var ?\DateTimeImmutable |
||
129 | */ |
||
130 | private $trialEndAt; |
||
131 | |||
132 | /** |
||
133 | * @var ?\DateTimeImmutable |
||
134 | */ |
||
135 | private $trialStartAt; |
||
136 | |||
137 | 8 | public static function createFromArray(array $data): self |
|
166 | |||
167 | 1 | public function isBilledAutomatically(): bool |
|
171 | |||
172 | public function isTrialing(): bool |
||
176 | |||
177 | public function isActive(): bool |
||
181 | |||
182 | public function isPastDue(): bool |
||
186 | |||
187 | public function isCanceled(): bool |
||
191 | |||
192 | public function isUnpaid(): bool |
||
196 | |||
197 | public function hasDefaultSource(): bool |
||
201 | |||
202 | 1 | public function getId(): string |
|
206 | |||
207 | 1 | public function getApplicationFeePercent(): ?float |
|
211 | |||
212 | 1 | public function getBilling(): string |
|
216 | |||
217 | 1 | public function getBillingCycleAnchor() |
|
221 | |||
222 | 1 | public function willBeCanceledAtPeriodEnd(): bool |
|
226 | |||
227 | 1 | public function getCanceledAt(): ?\DateTimeImmutable |
|
231 | |||
232 | 1 | public function getCreatedAt(): \DateTimeImmutable |
|
236 | |||
237 | 1 | public function getCurrentPeriodEndAt(): \DateTimeImmutable |
|
241 | |||
242 | 1 | public function getCurrentPeriodStartAt(): \DateTimeImmutable |
|
246 | |||
247 | 1 | public function getCustomer(): string |
|
251 | |||
252 | 1 | public function getDaysUntilDue(): ?int |
|
256 | |||
257 | 1 | public function getDefaultSource(): ?string |
|
261 | |||
262 | 1 | public function getEndedAt(): ?\DateTimeImmutable |
|
266 | |||
267 | 1 | public function getItems(): ItemCollection |
|
271 | |||
272 | 1 | public function getQuantity(): int |
|
276 | |||
277 | 1 | public function getStartAt(): \DateTimeImmutable |
|
281 | |||
282 | 1 | public function getStatus(): string |
|
286 | |||
287 | 1 | public function getTaxPercent(): ?float |
|
291 | |||
292 | 1 | public function getTrialEndAt(): ?\DateTimeImmutable |
|
296 | |||
297 | 1 | public function getTrialStartAt(): ?\DateTimeImmutable |
|
301 | } |
||
302 |
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..