Skip to content

Commit 02ec949

Browse files
mikekennethnioperas06
authored andcommitted
Update Readme.md & core.py
1 parent 5dc113a commit 02ec949

File tree

5 files changed

+48
-1
lines changed

5 files changed

+48
-1
lines changed
185 Bytes
Binary file not shown.
2.8 KB
Binary file not shown.
1.42 KB
Binary file not shown.

kkiapay/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def refund_transaction(self, transaction_id):
5757
)
5858

5959
def setup_payout(self, algorithm: str, destination: str, destination_type: str, roof_amount: str = None,
60-
send_notification: bool = True, rate_frequency: str = DESTINATION_TYPES["1"],
60+
send_notification: bool = True, rate_frequency: str = RATE_FREQUENCIES["1"],
6161
country_code: str = "229"):
6262
options = {
6363
"destination": country_code + destination if destination_type == "1" else destination,

readme.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,53 @@ Here's the plan for what's coming:
6363
- [ ] Add better errors and exceptions handling
6464
- [ ] Add tests.
6565

66+
67+
## Schedule Payout
68+
69+
### Example
70+
Below is an example of the function usage:
71+
```python
72+
# Setup Scheduled Payout using 'ROOF' algorithm
73+
schedule_payout = k.setup_payout(algorithm = '2',
74+
roof_amount = '10000',
75+
destination = '61000000',
76+
destination_type = '1',
77+
send_notification = True,
78+
country_code = '229'
79+
)
80+
81+
print(schedule_payout)
82+
#{
83+
# 'response':
84+
# {
85+
# 'merchant': '5d34445784deb700073a0281',
86+
# 'meta_data': '',
87+
# 'algorithm': 'roof',
88+
# 'rate_frequency': '',
89+
# 'roof_amount': '10000',
90+
# 'active': True,
91+
# 'send_notification': True,
92+
# 'destination_type': 'MOBILE_MONEY',
93+
# 'destination': '22961000000',
94+
# 'job_name': '',
95+
# 'account': '5d34445784deb700073a0282'
96+
# },
97+
# 'status_code': 200
98+
#}
99+
```
100+
101+
### Attribute Matrix
102+
| Name | Required | Possible Values | Description |
103+
|:-----------------:|:--------:|:------------------------------------------:|:---------------------------------------------------------------------------------:|
104+
| **algorithm** | **M** | {"1": 'rate', "2": 'roof'} | Specify the algorithm to be used. |
105+
| **destination_type** | **M** | {"1": 'MOBILE_MONEY', "2": 'BANK_ACCOUNT'} | Specify the Destination type |
106+
| **destination** | **M** | '61000000' | Specify the Destination number/account Number |
107+
| **rate_frequency** | M/O | {"1": '3d', "2": '1w', "3": '1m'} | Specify the Rate Frequency. Required in case 'rate' algorithm is used |
108+
| **roof_amount** | M/O | '10000' | Specify the Roof amount. |
109+
| **send_notification** | O | Boolean (True, False) | Specify is a Notification should be sent |
110+
| **country_code** | O | '229' | Specify the Country Code of the destination number is case 'MOBILE MONEY' is used |
111+
112+
66113
## Contributing
67114

68115
Check our [contribution guide](CONTRIBUTING.md).

0 commit comments

Comments
 (0)