-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V08 introduces substructure for related parties (`Party40Choice` in the spec). They can now be either a private party (like before) or a financial institution (new). Because our existing model is too simple, we will read the new financial institution name and postal address into a `RelatedPartyTypeInterface`, but we will not read anything else, and we will not be able to know if it is a private party or a financial institution. Similarly, an `Entry` status code now support proprietary code. It will be read, but we will not be able to know if it is a standard one (eg: `"BOOK"`), or a proprietary one. Fixes #126
- Loading branch information
Showing
17 changed files
with
3,248 additions
and
30 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Genkgo\Camt\Camt054\Decoder\V08; | ||
|
||
use Genkgo\Camt\Camt054\Decoder\V04\Message as BaseMessage; | ||
|
||
class Message extends BaseMessage | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Genkgo\Camt\Camt054\MessageFormat; | ||
|
||
use Genkgo\Camt\Camt054; | ||
use Genkgo\Camt\Decoder; | ||
use Genkgo\Camt\DecoderInterface; | ||
use Genkgo\Camt\MessageFormatInterface; | ||
|
||
final class V08 implements MessageFormatInterface | ||
{ | ||
public function getXmlNs(): string | ||
{ | ||
return 'urn:iso:std:iso:20022:tech:xsd:camt.054.001.08'; | ||
} | ||
|
||
public function getMsgId(): string | ||
{ | ||
return 'camt.054.001.08'; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return 'BankToCustomerDebitCreditNotificationV08'; | ||
} | ||
|
||
public function getDecoder(): DecoderInterface | ||
{ | ||
$entryTransactionDetailDecoder = new Camt054\Decoder\EntryTransactionDetail(new Decoder\Date()); | ||
$entryDecoder = new Decoder\Entry($entryTransactionDetailDecoder); | ||
$recordDecoder = new Decoder\Record($entryDecoder, new Decoder\Date()); | ||
$messageDecoder = new Camt054\Decoder\V08\Message($recordDecoder, new Decoder\Date()); | ||
|
||
return new Decoder($messageDecoder, sprintf('/assets/%s.xsd', $this->getMsgId())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{ | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\Message", | ||
"getEntries": [ | ||
{ | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\Entry", | ||
"getAccountServicerReference": "ACSR160617103200001", | ||
"getAdditionalInfo": "", | ||
"getAmount": { | ||
"__CLASS__": "Money\\Money", | ||
"getAmount": "-20000000", | ||
"getCurrency": { | ||
"__CLASS__": "Money\\Currency", | ||
"getCode": "SEK" | ||
} | ||
}, | ||
"getBankTransactionCode": { | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\BankTransactionCode", | ||
"getDomain": null, | ||
"getProprietary": null | ||
}, | ||
"getBatchPaymentId": null, | ||
"getBookingDate": null, | ||
"getCharges": null, | ||
"getIndex": 0, | ||
"getRecord": { | ||
"__CLASS__": "Genkgo\\Camt\\Camt054\\DTO\\Notification", | ||
"getAccount": { | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\IbanAccount", | ||
"getIban": { | ||
"__CLASS__": "Genkgo\\Camt\\Iban", | ||
"getIban": "CH2801234000123456789" | ||
}, | ||
"getIdentification": "CH2801234000123456789" | ||
}, | ||
"getAdditionalInformation": null, | ||
"getCopyDuplicateIndicator": null, | ||
"getCreatedOn": { | ||
"__CLASS__": "DateTimeImmutable", | ||
"0": "2007-10-18T11:30:00+00:00" | ||
}, | ||
"getElectronicSequenceNumber": null, | ||
"getEntries": [ | ||
"__RECURSIVITY__" | ||
], | ||
"getFromDate": null, | ||
"getId": "AAAASESS-FP-ACCR001", | ||
"getLegalSequenceNumber": null, | ||
"getPagination": null, | ||
"getToDate": null | ||
}, | ||
"getReference": null, | ||
"getReversalIndicator": false, | ||
"getStatus": "BOOK", | ||
"getTransactionDetail": { | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\EntryTransactionDetail", | ||
"getAdditionalTransactionInformation": null, | ||
"getAmount": null, | ||
"getAmountDetails": null, | ||
"getBankTransactionCode": { | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\BankTransactionCode", | ||
"getDomain": null, | ||
"getProprietary": null | ||
}, | ||
"getCharges": null, | ||
"getReference": null, | ||
"getRelatedAgent": null, | ||
"getRelatedAgents": [], | ||
"getRelatedDates": null, | ||
"getRelatedParties": [ | ||
{ | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\RelatedParty", | ||
"getAccount": null, | ||
"getRelatedPartyType": { | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\Creditor", | ||
"getAddress": { | ||
"__CLASS__": "Genkgo\\Camt\\DTO\\Address", | ||
"getAddressLines": [], | ||
"getBuildingNumber": "31", | ||
"getCountry": "CH", | ||
"getCountrySubDivision": null, | ||
"getDepartment": null, | ||
"getPostCode": "3131", | ||
"getStreetName": "Example Street 3 - V1", | ||
"getSubDepartment": null, | ||
"getTownName": "Example Town 3 - V1" | ||
}, | ||
"getName": "Example Creditor 3 - V1" | ||
} | ||
} | ||
], | ||
"getRelatedParty": "__RECURSIVITY__", | ||
"getRemittanceInformation": null, | ||
"getReturnInformation": null | ||
}, | ||
"getTransactionDetails": [ | ||
"__RECURSIVITY__" | ||
], | ||
"getValueDate": null | ||
} | ||
], | ||
"getGroupHeader": { | ||
"__CLASS__": "Genkgo\\Camt\\Camt054\\DTO\\V04\\GroupHeader", | ||
"getAdditionalInformation": null, | ||
"getCreatedOn": { | ||
"__CLASS__": "DateTimeImmutable", | ||
"0": "2007-10-18T11:30:00+00:00" | ||
}, | ||
"getMessageId": "AAAASESS-FP-ACCR001", | ||
"getMessageRecipient": null, | ||
"getOriginalBusinessQuery": null, | ||
"getPagination": null | ||
}, | ||
"getRecords": [ | ||
"__RECURSIVITY__" | ||
] | ||
} |
Oops, something went wrong.