salesking / sepa_king

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

just show ChrgBr tag if service_level isn't nil #84

Closed chrisokamoto closed 5 years ago

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling f5ef7b10f727d3ec14e381e434cc6f8092b534eb on chrisokamoto:remove_slev_service_level_nil into 6bc9bf2080adca308ddba4da6154d4fc0b07df0d on salesking:master.

ledermann commented 5 years ago

Thanks for your work! One thing: There is SLEV in DirectDebit, too.

Wouldn't it make sense to change that there, too?

chrisokamoto commented 5 years ago

Maybe @ledermann , but in CreditTransferTransaction we have a service_level attribute that can be 'SEPA', 'URGP' or nil (https://github.com/salesking/sepa_king/blob/v0.11.2/lib/sepa_king/transaction/credit_transfer_transaction.rb#L4). I don't understand why in DebitTransferTransaction (https://github.com/salesking/sepa_king/blob/v0.11.2/lib/sepa_king/transaction/direct_debit_transaction.rb) we don't have this attribute.. should we set a service_level attribute there as well? Does it make sense for debit? My application just uses credit transfer, so that's why I just made the fix for the credit part. But if it makes sense for the debit as well I can do it. :)

ledermann commented 5 years ago

Sorry for confusion: In DirectDebit there is no service_level because it doesn't make sense there. Will merge your PR soon.

chrisokamoto commented 5 years ago

Thank you!! :)