1 | <?php |
||
18 | class Card |
||
19 | { |
||
20 | /** |
||
21 | * @var CardRegistrationsQueryInterface |
||
22 | */ |
||
23 | private $cardRegistrationQuery; |
||
24 | /** |
||
25 | * @var CardQueryInterface |
||
26 | */ |
||
27 | private $cardQuery; |
||
28 | |||
29 | public function __construct(CardRegistrationsQueryInterface $cardRegistrationsQuery, CardQueryInterface $cardQuery) |
||
34 | |||
35 | /** |
||
36 | * @param string $userId |
||
37 | * @param string $currency |
||
38 | * @param string $cardType |
||
39 | * @param string $tag |
||
40 | * @return null|\PartFire\MangoPayBundle\Models\DTOs\CardRegistration |
||
41 | * Create a card registration |
||
42 | */ |
||
43 | public function createRegistration(string $userId, string $currency, string $cardType, string $tag) |
||
47 | |||
48 | /** |
||
49 | * @param $cardRegisteredId |
||
50 | * update cardRegister after payment form |
||
51 | * @param $registrationData |
||
52 | * @return null|\PartFire\MangoPayBundle\Models\DTOs\CardRegistration |
||
53 | */ |
||
54 | public function updateRegistration(string $cardRegisteredId, string $registrationData, string $errorCode) |
||
55 | { |
||
56 | return $this->cardRegistrationQuery->update($cardRegisteredId, $registrationData, $errorCode); |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @param string $cardRegisteredId |
||
61 | * @return null|\PartFire\MangoPayBundle\Models\DTOs\CardRegistration |
||
62 | */ |
||
63 | public function getRegistration(string $cardRegisteredId) |
||
67 | |||
68 | /** |
||
69 | * @param $cardId |
||
70 | * @return null|\PartFire\MangoPayBundle\Models\DTOs\Card |
||
71 | */ |
||
72 | public function get($cardId) |
||
76 | |||
77 | public function getAll() |
||
81 | |||
82 | /** |
||
83 | * @param $cardId |
||
84 | * @return null|\PartFire\MangoPayBundle\Models\DTOs\Card |
||
85 | */ |
||
86 | public function deactivate($cardId) |
||
90 | } |
||
91 |