Total Complexity | 5 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class PurchaseData |
||
13 | { |
||
14 | private $type; |
||
15 | private $subscriptionId; |
||
16 | private $purchaseToken; |
||
17 | private $productId; |
||
18 | |||
19 | /** |
||
20 | * PurchaseData constructor. |
||
21 | * @param string $type |
||
22 | * @param string|null $subscriptionId |
||
23 | * @param string $purchaseToken |
||
24 | * @param string $productId |
||
25 | */ |
||
26 | public function __construct( |
||
27 | string $type, |
||
28 | ?string $subscriptionId, |
||
29 | string $purchaseToken, |
||
30 | string $productId |
||
31 | ) |
||
32 | { |
||
33 | $this->type = $type; |
||
34 | $this->subscriptionId = $subscriptionId; |
||
35 | $this->purchaseToken = $purchaseToken; |
||
36 | $this->productId = $productId; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getType(): string |
||
43 | { |
||
44 | return $this->type; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * SubscriptionId is null for in-app purchase |
||
49 | * |
||
50 | * @return string|null |
||
51 | */ |
||
52 | public function getSubscriptionId(): ?string |
||
53 | { |
||
54 | return $this->subscriptionId; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getPurchaseToken(): string |
||
61 | { |
||
62 | return $this->purchaseToken; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getProductId(): string |
||
71 | } |
||
72 | } |
||
73 |