-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathenums.py
63 lines (51 loc) · 1.21 KB
/
enums.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import requests
from enum import Enum
BANK_LIST_URL = "https://api.indicina.co/api/v3/banks"
class Currency(Enum):
NGN = "NGN"
EGP = "EGP"
KES = "KES"
class Bank(Enum):
ACCESS = "044"
ALAT = "035A"
CIB = "818147"
ECOBANK = "050"
FBN = "011"
FCMB = "214"
FIDELITY = "070"
GLOBUS = "00103"
GTB = "058"
HSBC = "818039"
KEYSTONE = "082"
KUDA = "50211"
MBS = "041"
MPESA = "404001"
PROVIDUS ="101"
POLARIS = "076"
STANBIC = "221"
STERLING = "232"
UBA = "033"
UNITY = "215"
UNION = "032"
ZENITH = "057"
@classmethod
def get_bank_list(cls):
response = requests.get(BANK_LIST_URL)
if response.status_code == 200:
bank_list = response.json()['data']
return [(bank['name'], bank['code']) for bank in bank_list]
else:
raise Exception(f"Failed to get bank list. Status code: {response.status_code}")
class StatementType(Enum):
JSON = "json"
CSV = "csv"
PDF = "pdf"
class StatementFormat(Enum):
CUSTOM = "custom"
MBS = "mbs"
MONO = "mono"
OKRA = "okra"
class PDFStatus(Enum):
DONE = "DONE"
FAILED = "FAILED"
IN_PROGRESS = "IN_PROGRESS"