Conversation
| # Data register 10 (product) ADD | ||
| { | ||
| "action": "A", | ||
| "type": "01", # cuenta corriente |
There was a problem hiding this comment.
We will probably never have other products, but I'm okay with passing them explicitly as they leave the door open.
| # Data register 30 (relationship product-holder) MODIFY | ||
| "relationships": [ | ||
| { | ||
| "action": "M", | ||
| "type": "AUT", # New relationship | ||
| "created_at": "20250301", | ||
| "previous_type": "TIT" # Previous relationship | ||
| } | ||
| ] |
There was a problem hiding this comment.
I don't know if we will ever allow account holders with a type different than TIT, so it's still in the air if this will ever be used, but again, I'm ok with overspecifying to cover all potential scenarios.
| "holders": [ | ||
| # Data register 20 - MODIFY holders data only (NO relationships) | ||
| { | ||
| "action": "M", | ||
| "name": "Aitor Garcia Rey", | ||
| "id_type": "01", | ||
| "id": "22754545R", | ||
| "country": "ES", | ||
| "created_at": "19790513", | ||
| "names": [ | ||
| # Data register 21 - Changing / adding holder's name (type X only in complementary files) | ||
| { | ||
| "action": "A", | ||
| "name": "Aitor Perez", # New name to ADD | ||
| }, | ||
| { | ||
| "action": "M", | ||
| "name": "Alberto Molpeceres", # New name that MODIFY the previous one | ||
| }, | ||
| ], | ||
| "ids": [ | ||
| # Data register 22 - Changing / adding holder's identifier (type X only in complementary files) | ||
| { | ||
| "action": "A", | ||
| "id_type": "02", # Passport | ||
| "id": "ABC123456", # Passport ADDED to holder | ||
| "country": "ES" | ||
| }, | ||
| { | ||
| "action": "M", | ||
| "id_type": "01", # DNI | ||
| "id": "12345678P", # New DNI (from NIE to DNI for example) | ||
| "country": "ES" | ||
| }, | ||
| ] | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
What worries me more about the holders' declaration is that our system doesn't have "general" holders per se.
So, if the holder of account A in Company Alpha changes its name, we should report it here. But if the same company or person also holds account A in Company Beta, we will, by default, report it twice in this block, as if they were different people, while we should report it just once.
Anyway, that seems to be a problem for Devengo Payments, so I'm ok with this as a broad structure.
However, one change we have to make is the country. The field in my initial PoC was an oversimplification, but for holders, we need separate countries:
https://github.com/devengoapp/ftf/blob/main/lib/ftf/generator.rb#L71-L74
expedition_country: holder.country.to_s.rjust(2, " "),
nationality_country: holder.country.to_s.rjust(2, " "),
residence_country: holder.country.to_s.rjust(2, " "),Please cf. pages 34 and 35 of the official documentation.
7183