@@ 29-45 (lines=17) @@ | ||
26 | * @param IbanBankAccount $ibanBankAccount |
|
27 | * @return BankAccount |
|
28 | */ |
|
29 | public function translateIbanDtoToMango(IbanBankAccount $ibanBankAccount) : BankAccount |
|
30 | { |
|
31 | $bankAccount = new BankAccount(); |
|
32 | $bankAccount->Tag = $ibanBankAccount->getTag(); |
|
33 | $bankAccount->OwnerName = $ibanBankAccount->getOwnerName(); |
|
34 | $bankAccount->Details = new BankAccountDetailsIBAN(); |
|
35 | $bankAccount->Details->IBAN = $ibanBankAccount->getIban(); |
|
36 | $bankAccount->Details->BIC = $ibanBankAccount->getBic(); |
|
37 | $bankAccount->OwnerAddress = new Address(); |
|
38 | $bankAccount->OwnerAddress->AddressLine1 = $ibanBankAccount->getOwnerAddress()->getAddressLine1(); |
|
39 | $bankAccount->OwnerAddress->AddressLine2 = $ibanBankAccount->getOwnerAddress()->getAddressLine2(); |
|
40 | $bankAccount->OwnerAddress->City = $ibanBankAccount->getOwnerAddress()->getCity(); |
|
41 | $bankAccount->OwnerAddress->Country = $ibanBankAccount->getOwnerAddress()->getCountry(); |
|
42 | $bankAccount->OwnerAddress->PostalCode = $ibanBankAccount->getOwnerAddress()->getPostalCode(); |
|
43 | $bankAccount->OwnerAddress->Region = $ibanBankAccount->getOwnerAddress()->getRegion(); |
|
44 | return $bankAccount; |
|
45 | } |
|
46 | ||
47 | public function translateMangoToIbanDto(BankAccount $bankAccount) : IbanBankAccount |
|
48 | { |
|
@@ 72-88 (lines=17) @@ | ||
69 | return $ibanBankAccount; |
|
70 | } |
|
71 | ||
72 | public function translateGbDtoToMango(GbBankAccount $gbBankAccount) : BankAccount |
|
73 | { |
|
74 | $bankAccount = new BankAccount(); |
|
75 | $bankAccount->Tag = $gbBankAccount->getTag(); |
|
76 | $bankAccount->OwnerName = $gbBankAccount->getOwnerName(); |
|
77 | $bankAccount->Details = new BankAccountDetailsGB(); |
|
78 | $bankAccount->Details->AccountNumber = $gbBankAccount->getAccountNumber(); |
|
79 | $bankAccount->Details->SortCode = $gbBankAccount->getSortCode(); |
|
80 | $bankAccount->OwnerAddress = new Address(); |
|
81 | $bankAccount->OwnerAddress->AddressLine1 = $gbBankAccount->getOwnerAddress()->getAddressLine1(); |
|
82 | $bankAccount->OwnerAddress->AddressLine2 = $gbBankAccount->getOwnerAddress()->getAddressLine2(); |
|
83 | $bankAccount->OwnerAddress->City = $gbBankAccount->getOwnerAddress()->getCity(); |
|
84 | $bankAccount->OwnerAddress->Country = $gbBankAccount->getOwnerAddress()->getCountry(); |
|
85 | $bankAccount->OwnerAddress->PostalCode = $gbBankAccount->getOwnerAddress()->getPostalCode(); |
|
86 | $bankAccount->OwnerAddress->Region = $gbBankAccount->getOwnerAddress()->getRegion(); |
|
87 | return $bankAccount; |
|
88 | } |
|
89 | ||
90 | public function translateMangoToGbDto(BankAccount $bankAccount) : GbBankAccount |
|
91 | { |