forked from andela-sjames/paystack-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettlement.py
More file actions
25 lines (19 loc) · 806 Bytes
/
settlement.py
File metadata and controls
25 lines (19 loc) · 806 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
"""Script used to define the paystack settlement class."""
from paystackapi.base import PayStackBase
class Settlement(PayStackBase):
"""docstring for settlement."""
@classmethod
def fetch(cls, **kwargs):
"""
Function defined to fetch settlement.
Args:
from: Lower bound of date range.
Leave undefined to export settlement from day one.
to: Upper bound of date range.
Leave undefined to export settlements till date.
subaccount: code to export only settlements for that subaccount.
Set to none to export only transactions for the account.
Returns:
Json data from paystack API.
"""
return cls().requests.get("settlement", qs=kwargs)