1 | <?php declare(strict_types = 1); |
||
13 | final class MonetaryAccountService |
||
14 | { |
||
15 | /** |
||
16 | * @var Client |
||
17 | */ |
||
18 | private $client; |
||
19 | |||
20 | /** |
||
21 | * @param Client $client |
||
22 | */ |
||
23 | public function __construct(Client $client) |
||
27 | |||
28 | /** |
||
29 | * @param Id $id |
||
30 | * @return MonetaryAccountBank |
||
31 | */ |
||
32 | public function byUserAndId(User $user, Id $id): MonetaryAccountBank |
||
36 | |||
37 | /** |
||
38 | * @param User $user |
||
39 | * @return MonetaryAccountBank[] |
||
40 | */ |
||
41 | public function listByUser(User $user) |
||
45 | |||
46 | /** |
||
47 | * @param MonetaryAccountBank $monetaryAccount |
||
48 | * @return void |
||
49 | */ |
||
50 | public function changeDescription(MonetaryAccountBank $monetaryAccount, string $description) |
||
56 | |||
57 | public function changeDailyLimit(MonetaryAccountBank $monetaryAccount, Money $dailyLimit) |
||
66 | |||
67 | /** |
||
68 | * @param MonetaryAccountBank $monetaryAccountBank |
||
69 | * @return void |
||
70 | */ |
||
71 | public function closeAccount(MonetaryAccountBank $monetaryAccountBank, string $reason = '') |
||
85 | |||
86 | public function reopenAccount(MonetaryAccountBank $monetaryAccountBank) |
||
93 | |||
94 | /** |
||
95 | * @param MonetaryAccountBank $monetaryAccountBank |
||
96 | * @param NotificationFilter $notificationFilter |
||
97 | * @return void |
||
98 | */ |
||
99 | public function addNotificationFilter(MonetaryAccountBank $monetaryAccountBank, NotificationFilter $notificationFilter) |
||
106 | |||
107 | /** |
||
108 | * @param MonetaryAccountBank $monetaryAccountBank |
||
109 | * @param NotificationFilter $notificationFilter |
||
110 | * @return void |
||
111 | */ |
||
112 | public function removeNotificationFilter(MonetaryAccountBank $monetaryAccountBank, NotificationFilter $notificationFilter) |
||
124 | |||
125 | private function updateMonetaryAccount(MonetaryAccountBank $monetaryAccountBank, array $newFields) |
||
130 | |||
131 | /** |
||
132 | * @param MonetaryAccountBank $monetaryAccountBank |
||
133 | * @param $notificationFilters |
||
134 | * @return void |
||
135 | */ |
||
136 | private function updateNotificationFilters(MonetaryAccountBank $monetaryAccountBank, $notificationFilters) |
||
144 | } |
||
145 |