Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/source/datatype.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
===========================================
Data Types
===========================================

The Data Types module defines structured data models used throughout
the PaystackEase library when sending requests to the Paystack API.

These models are implemented using **Pydantic**, which provides automatic
data validation and type checking before data is sent to the API.

Using these models ensures that required fields are provided and that
data types are correct.


Bulk Charge Data Models
-----------------------

These models are used when interacting with the Bulk Charges API.


.. py:class:: BulkChargeItem(authorization: str, amount: int, reference: str)

Represents a single bulk charge request.

:param authorization: Authorization code obtained from a successful card transaction.
:type authorization: str

:param amount: Amount to charge in the smallest currency unit (e.g. kobo for NGN).
:type amount: int

:param reference: A unique reference used to identify the transaction.
:type reference: str


.. py:class:: BulkChargeListObject(charges: list[BulkChargeItem])

Container object used when initiating multiple bulk charges.

:param charges: A list of bulk charge items.
:type charges: list[BulkChargeItem]
4 changes: 4 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ If you want to download the sdist packages directly:
:maxdepth: 1
:caption: Contents:

bulkcharge
convert
datatype

usage
submodules
paystackease.apis
Expand Down
Loading