1 | <?php |
||
27 | final class CardResponse implements ObjectInitializedInterface { |
||
28 | /** |
||
29 | * @var string last four digits of credit card number |
||
30 | */ |
||
31 | private $lastFour = ''; |
||
32 | |||
33 | /** |
||
34 | * @var string credit card's number mask |
||
35 | */ |
||
36 | private $mask = ''; |
||
37 | |||
38 | /** |
||
39 | * @var int credit card's expiration month |
||
40 | */ |
||
41 | private $expirationMonth = 0; |
||
42 | |||
43 | /** |
||
44 | * @var int credit card's expiration year |
||
45 | */ |
||
46 | private $expirationYear = 0; |
||
47 | |||
48 | /** |
||
49 | * @var string card type |
||
50 | */ |
||
51 | private $type = ''; |
||
52 | |||
53 | /** |
||
54 | * @return string last four digits of credit card number |
||
55 | */ |
||
56 | 4 | public function getLastFour() { |
|
59 | |||
60 | /** |
||
61 | * @return string credit card's number mask |
||
62 | */ |
||
63 | 4 | public function getMask() { |
|
66 | |||
67 | /** |
||
68 | * @return int credit card's expiration month |
||
69 | */ |
||
70 | 4 | public function getExpirationMonth() { |
|
73 | |||
74 | /** |
||
75 | * @return int credit card's expiration year |
||
76 | */ |
||
77 | 4 | public function getExpirationYear() { |
|
80 | |||
81 | /** |
||
82 | * @return string card's type |
||
83 | */ |
||
84 | 4 | public function getType() { |
|
87 | |||
88 | /** |
||
89 | * @inheritdoc |
||
90 | * @return CardResponse instance with safely card data |
||
91 | */ |
||
92 | 4 | public static function initializeByObject(stdClass $Object) { |
|
101 | |||
102 | /** |
||
103 | * @inheritdoc |
||
104 | */ |
||
105 | 4 | public function __toString() { |
|
120 | } |
||
121 |