Repository: mollie/mollie-api-python

Issue:
Methods api: add support for 'pricing'
https://docs.mollie.com/changelog/v2/changelog#tuesday-4th

Discussion:

Patch:
diff --git a/mollie/api/objects/method.py b/mollie/api/objects/method.py
index 438fe7c..fb444a2 100644
--- a/mollie/api/objects/method.py
+++ b/mollie/api/objects/method.py
@@ -46,6 +46,10 @@ class Method(Base):
     def maximum_amount(self):
         return self._get_property('maximumAmount')
 
+    @property
+    def pricing(self):
+        return self._get_property('pricing')
+
     @property
     def image_svg(self):
         try:


Test patch:
diff --git a/tests/responses/method_get_ideal.json b/tests/responses/method_get_ideal.json
index d7fc452..8090051 100644
--- a/tests/responses/method_get_ideal.json
+++ b/tests/responses/method_get_ideal.json
@@ -24,5 +24,15 @@
     "size2x": "https://www.mollie.com/external/icons/payment-methods/ideal%402x.png",
     "svg": "https://www.mollie.com/external/icons/payment-methods/ideal.svg"
   },
+  "pricing": [
+    {
+      "description": "The Netherlands",
+      "fixed": {
+        "value": "0.29",
+        "currency": "EUR"
+      },
+      "variable": "0"
+    }
+  ],
   "resource": "method"
 }
diff --git a/tests/test_methods.py b/tests/test_methods.py
index eeabc3e..50edd04 100644
--- a/tests/test_methods.py
+++ b/tests/test_methods.py
@@ -24,6 +24,11 @@ def test_method_get(client, response):
     assert method.image_svg == 'https://www.mollie.com/external/icons/payment-methods/ideal.svg'
     assert method.image_size1x == 'https://www.mollie.com/external/icons/payment-methods/ideal.png'
     assert method.image_size2x == 'https://www.mollie.com/external/icons/payment-methods/ideal%402x.png'
+    assert method.pricing == [{
+        'description': 'The Netherlands',
+        'fixed': {'value': '0.29', 'currency': 'EUR'},
+        'variable': '0'
+    }]
 
 
 def test_method_get_missing_images(client, response):