salesking / sepa_king

Ruby gem for creating SEPA XML files
MIT License
149 stars 118 forks source link

Add structured address support for debit and credit #77

Closed tobischo closed 6 years ago

tobischo commented 6 years ago

Non-EU countries require address information in the SEPA files (for example Switzerland). This is required both for credit transfers as well as for direct debits. sepa_king only supports providing addresses for direct debits at this time. This PR adds support for providing addresses for credit transfers.

Furthermore there are different ways of providing the addresses. The address information can be provided via AdrLine as already implemented for direct debits. The address information can also be provided via individual fields. This adds support for StrtNm, BldgNb, PstCd and TwnNm. Not every country requires all of those fields so they are made optional allowing the user of the library to pass only the fields that are required for the individual use case. It also makes AdrLine optional which does not have to have 2 lines, but may be provided with just one line. This would be the case if only a post_code and a town_name are required in a single line.

Following specification as defined in

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9d536afae3642031cc4e319b162d6cffbf7cdad7 on tobischo:feature/creditor_address_and_structured_address_fields into 47f3079a95de749416d51e50ecc08284ab33c771 on salesking:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9d536afae3642031cc4e319b162d6cffbf7cdad7 on tobischo:feature/creditor_address_and_structured_address_fields into 47f3079a95de749416d51e50ecc08284ab33c771 on salesking:master.