]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Add documentation on Upgrading to 2.x 34/head
authorRaphael Michel <mail@raphaelmichel.de>
Fri, 7 Dec 2018 16:13:07 +0000 (17:13 +0100)
committerRaphael Michel <mail@raphaelmichel.de>
Fri, 7 Dec 2018 16:13:07 +0000 (17:13 +0100)
docs/debits.rst
docs/index.rst
docs/reading.rst
docs/upgrading_1_2.rst [new file with mode: 0644]
fints/client.py

index 73bc44e88e66a4ef6816010538479655e1051311..2038338f7d3bfcfea400dd26d60fa7cc51a62735 100644 (file)
@@ -1,3 +1,5 @@
+.. _debits:
+
 Creating SEPA debits
 ====================
 
index 12c466edd5f644319c3c4891e752155d43185fd4..1ace6bd7e76750bd14301ac4a596db518c53634e 100644 (file)
@@ -20,6 +20,7 @@ Library user documentation content
    transfers
    debits
    tested
+   upgrading_1_2
 
 
 Library developer documentation content
index 1782d3f473b4fb38f99f3867094c11c004c82edc..851d7d4eef148c66333da392ccc6dd8a37605ac5 100644 (file)
@@ -16,6 +16,8 @@ This method will return a list of named tuples of the following type:
 
 You will need this account object for many further operations to show which account you want to operate on.
 
+.. _information:
+
 Fetching bank information
 -------------------------
 
@@ -39,6 +41,7 @@ You can fetch the current balance of an account with the ``get_balance`` operati
 This method will return a list of ``Balance`` objects from the ``mt-940`` library. You can find more information
 in `their documentation <https://mt940.readthedocs.io/en/latest/mt940.html#mt940.models.Balance>`_.
 
+.. _transactions:
 
 Reading account transactions
 ----------------------------
diff --git a/docs/upgrading_1_2.rst b/docs/upgrading_1_2.rst
new file mode 100644 (file)
index 0000000..d4f51b6
--- /dev/null
@@ -0,0 +1,35 @@
+Upgrading from python-fints 1.x
+===============================
+
+This library has seen a major rewrite in version 2.0 and the API has changed in a lot of places. These are the most
+important changes to know:
+
+* The ``get_statement`` method was renamed to ``get_transactions``. → :ref:`transactions`
+
+* The ``start_simple_sepa_transfer`` method was renamed to ``simple_sepa_transfer`` and no longer takes a TAN method
+  and TAN medium description as an argument. → :ref:`transfers`
+
+* The ``start_sepa_transfer`` method was renamed to ``sepa_transfer`` and no longer takes a TAN method and TAN
+  medium description as an argument. The new parameter ``pain_descriptor`` should be passed with the version of the
+  PAIN format, e.g. ``urn:iso:std:iso:20022:tech:xsd:pain.001.001.03``. → :ref:`transfers`
+
+* The ``start_sepa_debit`` method was renamed to ``sepa_debit`` and no longer takes a TAN method and TAN
+  medium description as an argument. The new parameter ``pain_descriptor`` should be passed with the version of the
+  PAIN format, e.g. ``urn:iso:std:iso:20022:tech:xsd:pain.008.003.01``. Also, a new paramter ``cor1`` is optionally
+  available. → :ref:`debits`
+
+* Working with TANs has changed a lot. ``get_tan_methos`` has been renamed to ``get_tan_mechanisms`` and has a new
+  return data type. The chosen TAN method is now set on a client level with ``set_tan_mechanism`` and
+  ``set_tan_medium``. You can find more informations in the chapter :ref:`tans` and a full example in the chapter
+  :ref:`transfers`.
+
+* Debug logging output now contains parsed syntax structures instead of data blobs and is much easier to read.
+
+* A new parser for FinTS has been added that is more robust and performs more validation.
+
+In exchange, you get a couple of great new features:
+
+* A new method :func:`fints.client.FinTS3Client.get_information` was added. → :ref:`information`
+
+* It is now possible to serialize and store the state of the client to enable multi-step operations in a stateless
+  environment. → :ref:`client-state`
index 94bb9520394c5eeb1cbab72abe3b35d3369f66d2..c9d5b4b4c15d7a19e2d10da5cd74582b2ad89a34 100644 (file)
@@ -661,7 +661,7 @@ class FinTS3Client:
         xml = sepa.export().decode()
         return self.sepa_transfer(account, xml)
 
-    def sepa_transfer(self, account: SEPAAccount, pain_message: bytes, multiple=False,
+    def sepa_transfer(self, account: SEPAAccount, pain_message: str, multiple=False,
                       control_sum=None, currency='EUR', book_as_single=False,
                       pain_descriptor='urn:iso:std:iso:20022:tech:xsd:pain.001.001.03'):
         """