Utils
APIResponse
dataclass
A model for representing the data gotten from making a call to Kudas' API.
Attributes:
Name | Type | Description |
---|---|---|
status_code |
int
|
The HTTP status code of the call. |
status |
Optional[str]
|
The status of the response. |
message |
Optional[str]
|
The message of the response. |
data |
Optional[dict]
|
The data from the response. |
raw |
Union[list, dict]
|
The original data gotten from the response before separating it.
into |
Source code in pykuda2/utils.py
BillType
CardChannel
Gender
HTTPMethod
Mode
ServiceType
Bases: str
, Enum
An enumeration of Service Types Provided by Kuda
Attributes:
Name | Type | Description |
---|---|---|
ADMIN_CREATE_VIRTUAL_ACCOUNT |
Create a virtual account under your main account |
|
ADMIN_VIRTUAL_ACCOUNTS |
Get all Virtual account |
|
ADMIN_UPDATE_VIRTUAL_ACCOUNT |
Update virtual account details |
|
ADMIN_DISABLE_VIRTUAL_ACCOUNT |
Deactivate a virtual account |
|
ADMIN_ENABLE_VIRTUAL_ACCOUNT |
Reactivate a virtual account |
|
RETRIEVE_SINGLE_VIRTUAL_ACCOUNT |
Retrieve the details on a created virtual account |
|
BANK_LIST |
Get a list of all banks |
|
NAME_ENQUIRY |
Retrieve the name linked to a bank account |
|
SINGLE_FUND_TRANSFER |
Transfer money from your main account |
|
VIRTUAL_ACCOUNT_FUND_TRANSFER |
Transfer money from a virtual account |
|
TRANSACTION_STATUS_QUERY |
Get the status of a bank transfer |
|
RETRIEVE_VIRTUAL_ACCOUNT_BALANCE |
Retrieve the account balance on a virtual account |
|
ADMIN_MAIN_ACCOUNT_TRANSACTIONS |
Get all transactions on your account |
|
ADMIN_MAIN_ACCOUNT_FILTERED_TRANSACTIONS |
Get a date filtered range of transactions on your account |
|
ADMIN_VIRTUAL_ACCOUNT_TRANSACTIONS |
Get all transactions on a virtual account |
|
ADMIN_VIRTUAL_ACCOUNT_FILTERED_TRANSACTIONS |
Get a date filtered range of transactions on a virtual account |
|
FUND_VIRTUAL_ACCOUNT |
Transfer money from your main account to your virtual account |
|
WITHDRAW_VIRTUAL_ACCOUNT |
Transfer money from your virtual account to your main account |
|
UPDATE_VIRTUAL_ACCOUNT_LIMIT |
Updated transfer limits up to N5,000,000 daily on your most critical virtual accounts |
|
FUND_TRANSFER_INSTRUCTION |
Instruction for single transaction above the limit of One (1) million naira |
|
SEARCH_FUND_TRANSFER_INSTRUCTION |
Search for transfer instructions and return the status of the transaction |
|
RETRIEVE_TRANSACTION_LOGS |
Fetch all transaction from logs |
|
GET_GIFT_CARD |
gets a list of all gift card supported |
|
ADMIN_BUY_GIFT_CARD |
purchase gift card from admin account |
|
BUY_GIFT_CARD |
purchase gift card from virtual account |
|
GIFT_CARD_TSQ |
status of all gift cards purchased |
|
CREATE_PLAIN_SAVE |
Create a plain savings account |
|
GET_PLAIN_SAVE |
Gets a specific plain savings account information |
|
GET_ALL_CUSTOMER_PLAIN_SAVE |
Gets all plain savings account information |
|
PLAIN_SAVE_DEBIT_CREDIT |
Credit or debit a plain savings account |
|
RETRIEVE_PLAIN_SAVE_TRANSACTIONS |
Retrieves plain savings account transactions |
|
CREATE_OPEN_FLEXIBLE_SAVE |
Create an open flexible account |
|
PRE_CREATE_OPEN_FLEXIBLE_SAVE |
Pre create an open flexible account |
|
GET_OPEN_FLEXIBLE_SAVE |
Get a specific open flexible savings account information |
|
GET_ALL_CUSTOMER_OPEN_FLEXIBLE_SAVE |
Get all open flexible savings account information |
|
COMPLETE_OPEN_FLEXIBLE_SAVE_WITHDRAWAL |
Withdraw from an open flexible savings account |
|
RETRIEVE_OPEN_FLEXIBLE_SAVE_TRANSACTIONS |
Get all open flexible account transactions |
|
CREATE_FIXED_SAVE |
Create fixed savings account |
|
GET_FIXED_SAVE |
Get a specific fixed account information |
|
GET_ALL_CUSTOMER_FIXED_SAVE |
Get all fixed account information |
|
COMPLETE_FIXED_SAVE_WITHDRAWAL |
Close a fixed savings account |
|
RETRIEVE_FIXED_SAVE_TRANSACTIONS |
Get all fixed savings account transaction |
|
REQUEST_CARD |
Request for a new card |
|
GET_CUSTOMER_CARDS |
Get a list of all the cards requested |
|
ACTIVATE_CARD |
Activates a new card |
|
DEACTIVATE_CARD |
Deactivate a card |
|
MANAGE_CARD_TRANSACTION_LIMIT |
Set a limit for a card |
|
MANAGE_CARD_CHANNEL |
Manage where card can be used |
|
CHANGE_CARD_PIN |
Change a card's 4digit PIN |
|
BLOCK_CARD |
Block a card |
|
UNBLOCK_CARD |
Unblock a card that was blocked |
|
GET_BILLERS_BY_TYPE |
Get type of bill |
|
VERIFY_BILL_CUSTOMER |
Verify customer's identity |
|
ADMIN_PURCHASE_BILL |
Purchase a bill from ADMIN account |
|
PURCHASE_BILL |
Purchase a bill from Virtual account |
|
BILL_TSQ |
Get status of bill |
|
ADMIN_GET_PURCHASED_BILLS |
Get a list of bills purchased with ADMIN account |
|
GET_PURCHASED_BILLS |
Get a list of bills purchased with Virtual account |
|
NO_OP |
This is a non-existent service type. It's used to for endpoints with no service type so as not to alter the already existing API. |
Source code in pykuda2/utils.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
TransactionStatus
TransactionType
TransferInstruction
dataclass
A model for transfer instructions.
Attributes:
Name | Type | Description |
---|---|---|
account_number |
str
|
The beneficiary's account number. |
account_name |
str
|
The beneficiary's account name. |
beneficiary_bank_code |
str
|
The beneficiary's bank code. |
amount |
Union[int, float]
|
The transaction amount. Amount is in naira and kobo. |
bank_code |
str
|
The beneficiary's bank code. |
narration |
str
|
Transaction description. |
bank_name |
str
|
The beneficiary's bank name. |
long_code |
str
|
The beneficiary's long code. |
reference |
str
|
A unique identifier for the transfer. |
Source code in pykuda2/utils.py
generate_number(length)
Generates random numbers of the provided length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
length |
int
|
The length the generated number should be. |
required |
Returns:
Type | Description |
---|---|
int
|
The random number. |