Modules¶
mpesapy/models.py¶
-
class
mpesapy.models.
FlatModel
(*args, **kwargs)¶ Defines common fields and function to be used by other models
-
class
mpesapy.models.
MpesaCtoBill
(*args, **kwargs)¶ Table that holds M-Pesa paybill messages
-
class
mpesapy.models.
MpesaCtoBuy
(id, removed, registered_date, updated_date, urlsafe, ipn_notification_id, text_message, mpesa_code, mpesa_amt, mpesa_msisdn, mpesa_sender, processed, date_received, date_processed, counter_checked)¶
-
class
mpesapy.models.
URLSafeField
¶ Creates URL safe identifiers instead of table column ID nor slug field
-
classmethod
encrypt
(hash)¶ Generates the URL safe identifier from the table column ID and salt
- Args:
- hash(str): stringified table column ID
- Returns:
- str: The URL safe identifier
- Raises:
- AssertError: If the table column ID is not stringified
-
classmethod