forked from andela-sjames/paystack-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpanel.py
More file actions
34 lines (25 loc) · 945 Bytes
/
cpanel.py
File metadata and controls
34 lines (25 loc) · 945 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
"""Script used to define the paystack Control Panel class."""
from paystackapi.base import PayStackBase
class ControlPanel(PayStackBase):
"""docstring for ControlPanel."""
@classmethod
def fetch_payment_session_timeout(cls):
"""
Method defined to fetch payment session timeout.
Args:
No argument required.
Returns:
Json data from paystack API.
"""
return cls().requests.get('integration/payment_session_timeout')
@classmethod
def update_payment_session_timeout(cls, **kwargs):
"""
Method defined to update payment session timeout.
Args:
timeout: Time before stopping session (in seconds).
Set to 0 to cancel session timeouts
Returns:
Json data from paystack API.
"""
return cls().requests.put('integration/payment_session_timeout', data=kwargs,)