AttributeError when trying to get Subscription object form Client object
Closed this issue · 3 comments
adamlj commented
Documentation states that "client.subscription returns a subscription object".
Trying to access the subscription object on the client object like this:
paymill_client = client_service.detail(paymill.models.client.Client(id='client_id123'))
print paymill_client.subscription
Throws the following error:
AttributeError
'NoneType' object has no attribute 'properties'
.virtualenvs/portail/local/lib/python2.7/site-packages/paymill/models/client.py in __getattribute__
return ListProperty(subscription.Subscription).wrap(attr) ...
.virtualenvs/portail/local/lib/python2.7/site-packages/jsonobject/base_properties.py in wrap
wrapper = self.type_to_property(self.item_type) if self.item_type else None ...
.virtualenvs/portail/local/lib/python2.7/site-packages/jsonobject/base_properties.py in item_type
self.set_item_type(self._item_type_deferred) ...
.virtualenvs/portail/local/lib/python2.7/site-packages/jsonobject/base_properties.py in set_item_type
allowed_types = set(self.type_config.properties.keys())
Using the following packages
jsonobject==0.6.3
paymill-jsonobject==0.7.1beta
paymill-wrapper==2.1.0