Repository: mollie/mollie-api-python

Issue:
Missing metadata property on some objects
On the objects
- customer
- order
- payment
- refund

There is a property to access the metadata
```python
@property
def metadata(self):
    return self._get_property('metadata')
```

However, all other objects that do have metadata according the API documentation (example: https://docs.mollie.com/reference/v2/subscriptions-api/get-subscription) do **NOT** have this property.

I believe this is an inconsistency as I am able to access the underlying metadata using:
```python
metadata = subscription._get_property("metadata")
```

Hopefully you can add the metadata property to all objects that have metadata attached for consistency and clarity.

Thanks!

Discussion:

Patch:
diff --git a/mollie/api/objects/order_line.py b/mollie/api/objects/order_line.py
index 290cadf..ebbd500 100644
--- a/mollie/api/objects/order_line.py
+++ b/mollie/api/objects/order_line.py
@@ -122,6 +122,10 @@ class OrderLine(Base):
     def created_at(self):
         return self._get_property('createdAt')
 
+    @property
+    def metadata(self):
+        return self._get_property('metadata')
+
     # additional methods
 
     def is_created(self):
diff --git a/mollie/api/objects/subscription.py b/mollie/api/objects/subscription.py
index 8983f57..eee9fd1 100644
--- a/mollie/api/objects/subscription.py
+++ b/mollie/api/objects/subscription.py
@@ -81,6 +81,10 @@ class Subscription(Base):
     def webhook_url(self):
         return self._get_property('webhookUrl')
 
+    @property
+    def metadata(self):
+        return self._get_property('metadata')
+
     @property
     def customer(self):
         """Return the customer for this subscription."""


Test patch:
diff --git a/tests/responses/order_single.json b/tests/responses/order_single.json
index 4a49090..e7095d9 100644
--- a/tests/responses/order_single.json
+++ b/tests/responses/order_single.json
@@ -92,6 +92,7 @@
         "currency": "EUR"
       },
       "createdAt": "2018-08-02T09:29:56+00:00",
+      "metadata": {"brickwatch_url": "https://www.brickwatch.net/nl-NL/set/42083/Bugatti-Chiron.html"},
       "_links": {
         "productUrl": {
           "href": "https://shop.lego.com/nl-NL/Bugatti-Chiron-42083",
diff --git a/tests/responses/subscription_single.json b/tests/responses/subscription_single.json
index a722f9f..06e9831 100644
--- a/tests/responses/subscription_single.json
+++ b/tests/responses/subscription_single.json
@@ -13,6 +13,7 @@
   "description": "Quarterly payment",
   "method": "ideal",
   "webhookUrl": "https://webshop.example.org/payments/webhook",
+  "metadata": {"order_id": 1337},
   "_links": {
     "self": {
       "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/subscriptions/sub_rVKGtNd6s3",
diff --git a/tests/test_customer_subscriptions.py b/tests/test_customer_subscriptions.py
index dcc6738..87b5945 100644
--- a/tests/test_customer_subscriptions.py
+++ b/tests/test_customer_subscriptions.py
@@ -41,6 +41,7 @@ def test_get_customer_subscription_by_id(client, response):
     assert subscription.start_date is None
     assert subscription.canceled_at is None
     assert subscription.customer is not None
+    assert subscription.metadata == {'order_id': 1337}
     assert subscription.is_active() is True
     assert subscription.is_suspended() is False
     assert subscription.is_pending() is False
diff --git a/tests/test_order_lines.py b/tests/test_order_lines.py
index 453d87c..fa458c0 100644
--- a/tests/test_order_lines.py
+++ b/tests/test_order_lines.py
@@ -43,6 +43,7 @@ def test_get_order_lines(client, response):
     assert line.image_url == 'https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$'
     assert line.product_url == 'https://shop.lego.com/nl-NL/Bugatti-Chiron-42083'
     assert line.created_at == '2018-08-02T09:29:56+00:00'
+    assert line.metadata == {'brickwatch_url': 'https://www.brickwatch.net/nl-NL/set/42083/Bugatti-Chiron.html'}
     assert line.is_created() is True
     assert line.is_authorized() is False
     assert line.is_paid() is False