raphaelm / python-sepaxml

SEPA Direct Debit XML generation in python
MIT License
112 stars 43 forks source link

saving the SEPA file #18

Closed hennesdekok closed 5 years ago

hennesdekok commented 5 years ago

Hello, I can't find a way to save the created SEPA file. Could you give an example on how to do this? Also, when I try to change the type from for instance "pain.008.002.02" to "PAIN.001.001.03". The error message I get is as follows: "The output SEPA file contains validation errors. This is likely due to an illegal value in one of your input fields"

Many thanks in advance.

raphaelm commented 5 years ago

Hello, I can't find a way to save the created SEPA file. Could you give an example on how to do this?

For example like this:

with open('file.xml', 'w') as f:
    f.write(sepa.export(validate=True))

Also, when I try to change the type from for instance "pain.008.002.02" to "PAIN.001.001.03". The error message I get is as follows: "The output SEPA file contains validation errors. This is likely due to an illegal value in one of your input fields"

You can't just change the type, you also need to use SepaTransfer instead of `SepaDD in that case.