forked from mollie/mollie-api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.py
More file actions
35 lines (27 loc) · 969 Bytes
/
client.py
File metadata and controls
35 lines (27 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from .base import ObjectBase
class Client(ObjectBase):
# Documented properties
@property
def id(self):
return self._get_property("id")
@property
def resource(self):
return self._get_property("resource")
@property
def organisation_created_at(self):
return self._get_property("organizationCreatedAt")
# documented _links
def get_organization(self):
"""Return the client’s organization. Only available when the include could have been used."""
url = self._get_link("organization")
if url:
return self.client.organizations.from_url(url)
else:
return None
def get_onboarding(self):
"""Return the client’s onboarding status. Only available when the include could have been used."""
url = self._get_link("onboarding")
if url:
return self.client.onboarding.from_url(url)
else:
return None