pypaystack2 2.1.1__tar.gz → 3.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. pypaystack2-3.0.1/.github/workflows/documentation-release.yml +32 -0
  2. pypaystack2-3.0.1/.github/workflows/publish.yml +25 -0
  3. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/.github/workflows/python-package.yml +13 -15
  4. pypaystack2-3.0.1/.pre-commit-config.yaml +19 -0
  5. pypaystack2-3.0.1/.python-version +1 -0
  6. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/CHANGELOG.md +53 -11
  7. pypaystack2-3.0.1/PKG-INFO +164 -0
  8. pypaystack2-3.0.1/README.md +148 -0
  9. pypaystack2-3.0.1/docs/assets/illustration-0.png +0 -0
  10. pypaystack2-3.0.1/docs/assets/illustration-1.png +0 -0
  11. pypaystack2-3.0.1/docs/how-to-guides.md +3 -0
  12. pypaystack2-3.0.1/docs/index.md +405 -0
  13. pypaystack2-3.0.1/docs/reference/apple_pay.md +2 -0
  14. pypaystack2-3.0.1/docs/reference/bulk_charges.md +2 -0
  15. pypaystack2-3.0.1/docs/reference/charge.md +2 -0
  16. pypaystack2-3.0.1/docs/reference/customer.md +2 -0
  17. pypaystack2-3.0.1/docs/reference/dedicated_accounts.md +2 -0
  18. pypaystack2-3.0.1/docs/reference/disputes.md +2 -0
  19. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/docs/reference/index.md +7 -11
  20. pypaystack2-3.0.1/docs/reference/integration.md +2 -0
  21. pypaystack2-3.0.1/docs/reference/miscellaneous.md +2 -0
  22. pypaystack2-3.0.1/docs/reference/payment_pages.md +2 -0
  23. pypaystack2-3.0.1/docs/reference/payment_requests.md +2 -0
  24. pypaystack2-3.0.1/docs/reference/plans.md +2 -0
  25. pypaystack2-3.0.1/docs/reference/products.md +2 -0
  26. pypaystack2-3.0.1/docs/reference/refunds.md +2 -0
  27. pypaystack2-3.0.1/docs/reference/settlements.md +2 -0
  28. pypaystack2-3.0.1/docs/reference/splits.md +2 -0
  29. pypaystack2-3.0.1/docs/reference/subaccounts.md +2 -0
  30. pypaystack2-3.0.1/docs/reference/subscriptions.md +2 -0
  31. pypaystack2-3.0.1/docs/reference/terminals.md +2 -0
  32. pypaystack2-3.0.1/docs/reference/transactions.md +2 -0
  33. pypaystack2-3.0.1/docs/reference/transfer_recipients.md +2 -0
  34. pypaystack2-3.0.1/docs/reference/transfers.md +2 -0
  35. pypaystack2-3.0.1/docs/reference/transfers_control.md +2 -0
  36. pypaystack2-3.0.1/docs/reference/verification.md +2 -0
  37. pypaystack2-3.0.1/docs/tutorials/tutorial-00.md +474 -0
  38. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/mkdocs.yml +29 -6
  39. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/pyproject.toml +20 -4
  40. pypaystack2-3.0.1/src/pypaystack2/__init__.py +58 -0
  41. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/src/pypaystack2/_metadata.py +2 -2
  42. pypaystack2-3.0.1/src/pypaystack2/base_clients.py +353 -0
  43. {pypaystack2-2.1.1/src/pypaystack2/utils → pypaystack2-3.0.1/src/pypaystack2}/enums.py +41 -36
  44. pypaystack2-3.0.1/src/pypaystack2/exceptions.py +14 -0
  45. pypaystack2-3.0.1/src/pypaystack2/fees_calculation_mixin.py +350 -0
  46. pypaystack2-3.0.1/src/pypaystack2/main_clients.py +245 -0
  47. pypaystack2-3.0.1/src/pypaystack2/models/__init__.py +171 -0
  48. pypaystack2-3.0.1/src/pypaystack2/models/payload_models.py +181 -0
  49. pypaystack2-3.0.1/src/pypaystack2/models/response_models.py +850 -0
  50. pypaystack2-2.1.1/tests/__init__.py → pypaystack2-3.0.1/src/pypaystack2/py.typed +0 -0
  51. pypaystack2-3.0.1/src/pypaystack2/sub_clients/__init__.py +102 -0
  52. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/__init__.py +59 -0
  53. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/apple_pay.py +143 -0
  54. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/bulk_charges.py +257 -0
  55. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/charge.py +320 -0
  56. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/customers.py +367 -0
  57. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/dedicated_accounts.py +467 -0
  58. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/disputes.py +382 -0
  59. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/integration.py +80 -0
  60. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/miscellaneous.py +150 -0
  61. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/payment_pages.py +288 -0
  62. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/payment_requests.py +438 -0
  63. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/plans.py +240 -0
  64. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/products.py +231 -0
  65. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/refunds.py +159 -0
  66. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/settlements.py +116 -0
  67. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/splits.py +300 -0
  68. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/subaccounts.py +251 -0
  69. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/subscriptions.py +301 -0
  70. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/terminals.py +343 -0
  71. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/transactions.py +556 -0
  72. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/transfer_recipients.py +295 -0
  73. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/transfers.py +274 -0
  74. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/transfers_control.py +228 -0
  75. pypaystack2-3.0.1/src/pypaystack2/sub_clients/async_clients/verification.py +155 -0
  76. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/__init__.py +55 -0
  77. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/apple_pay.py +148 -0
  78. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/bulk_charges.py +257 -0
  79. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/charge.py +320 -0
  80. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/customers.py +366 -0
  81. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/dedicated_accounts.py +467 -0
  82. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/disputes.py +385 -0
  83. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/integration.py +80 -0
  84. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/miscellaneous.py +150 -0
  85. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/payment_pages.py +288 -0
  86. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/payment_requests.py +439 -0
  87. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/plans.py +240 -0
  88. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/products.py +231 -0
  89. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/refunds.py +159 -0
  90. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/settlements.py +115 -0
  91. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/splits.py +301 -0
  92. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/subaccounts.py +251 -0
  93. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/subscriptions.py +301 -0
  94. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/terminals.py +342 -0
  95. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/transactions.py +558 -0
  96. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/transfer_recipients.py +298 -0
  97. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/transfers.py +275 -0
  98. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/transfers_control.py +228 -0
  99. pypaystack2-3.0.1/src/pypaystack2/sub_clients/sync_clients/verification.py +155 -0
  100. pypaystack2-3.0.1/src/pypaystack2/types.py +13 -0
  101. {pypaystack2-2.1.1/tests/test_api → pypaystack2-3.0.1/tests}/__init__.py +0 -0
  102. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/tests/test__metadata.py +6 -5
  103. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/tests/test_baseapi.py +61 -41
  104. pypaystack2-3.0.1/tests/test_paystack.py +191 -0
  105. pypaystack2-3.0.1/tests/test_paystack_fees_calculation.py +116 -0
  106. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_apple_pay.py +77 -0
  107. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_bulk_charges.py +79 -0
  108. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_charge.py +76 -0
  109. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_customers.py +93 -0
  110. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_dedicated_accounts.py +47 -0
  111. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_disputes.py +50 -0
  112. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_integration.py +37 -0
  113. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_miscellaneous.py +46 -0
  114. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_payment_pages.py +74 -0
  115. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_payment_requests.py +105 -0
  116. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_plans.py +53 -0
  117. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_products.py +58 -0
  118. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_refunds.py +40 -0
  119. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_settlements.py +30 -0
  120. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_splits.py +81 -0
  121. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_subaccounts.py +55 -0
  122. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_subscriptions.py +88 -0
  123. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_terminals.py +39 -0
  124. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_transactions.py +103 -0
  125. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_transfer_recipients.py +98 -0
  126. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_transfers.py +59 -0
  127. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_transfers_control.py +69 -0
  128. pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients/test_verification.py +55 -0
  129. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/__init__.py +0 -0
  130. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_apple_pay.py +73 -0
  131. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_bulk_charges.py +66 -0
  132. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_charge.py +70 -0
  133. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_customers.py +87 -0
  134. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_dedicated_accounts.py +44 -0
  135. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_disputes.py +48 -0
  136. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_integration.py +33 -0
  137. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_miscellaneous.py +42 -0
  138. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_payment_pages.py +67 -0
  139. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_payment_requests.py +89 -0
  140. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_plans.py +53 -0
  141. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_products.py +58 -0
  142. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_refunds.py +38 -0
  143. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_settlements.py +27 -0
  144. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_splits.py +77 -0
  145. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_subaccounts.py +51 -0
  146. {pypaystack2-2.1.1/tests/test_api/test_sync → pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients}/test_subscriptions.py +28 -28
  147. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_terminals.py +38 -0
  148. {pypaystack2-2.1.1/tests/test_api/test_sync → pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients}/test_transactions.py +42 -31
  149. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_transfer_recipients.py +84 -0
  150. pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients/test_transfers.py +51 -0
  151. {pypaystack2-2.1.1/tests/test_api/test_sync → pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients}/test_transfers_control.py +26 -25
  152. {pypaystack2-2.1.1/tests/test_api/test_sync → pypaystack2-3.0.1/tests/test_sub_clients/test_sync_clients}/test_verification.py +15 -18
  153. pypaystack2-3.0.1/uv.lock +1057 -0
  154. pypaystack2-2.1.1/.python-version +0 -1
  155. pypaystack2-2.1.1/PKG-INFO +0 -37
  156. pypaystack2-2.1.1/README.md +0 -23
  157. pypaystack2-2.1.1/docs/how-to-guides.md +0 -125
  158. pypaystack2-2.1.1/docs/index.md +0 -95
  159. pypaystack2-2.1.1/docs/reference/apple_pay.md +0 -1
  160. pypaystack2-2.1.1/docs/reference/bulk_charges.md +0 -1
  161. pypaystack2-2.1.1/docs/reference/charge.md +0 -1
  162. pypaystack2-2.1.1/docs/reference/customer.md +0 -1
  163. pypaystack2-2.1.1/docs/reference/dedicated_accounts.md +0 -1
  164. pypaystack2-2.1.1/docs/reference/disputes.md +0 -1
  165. pypaystack2-2.1.1/docs/reference/integration.md +0 -1
  166. pypaystack2-2.1.1/docs/reference/miscellaneous.md +0 -1
  167. pypaystack2-2.1.1/docs/reference/payment_pages.md +0 -1
  168. pypaystack2-2.1.1/docs/reference/payment_requests.md +0 -1
  169. pypaystack2-2.1.1/docs/reference/plans.md +0 -1
  170. pypaystack2-2.1.1/docs/reference/products.md +0 -1
  171. pypaystack2-2.1.1/docs/reference/refunds.md +0 -1
  172. pypaystack2-2.1.1/docs/reference/settlements.md +0 -1
  173. pypaystack2-2.1.1/docs/reference/splits.md +0 -1
  174. pypaystack2-2.1.1/docs/reference/subaccounts.md +0 -1
  175. pypaystack2-2.1.1/docs/reference/subscriptions.md +0 -1
  176. pypaystack2-2.1.1/docs/reference/terminals.md +0 -1
  177. pypaystack2-2.1.1/docs/reference/transactions.md +0 -1
  178. pypaystack2-2.1.1/docs/reference/transfer_recipients.md +0 -1
  179. pypaystack2-2.1.1/docs/reference/transfers.md +0 -1
  180. pypaystack2-2.1.1/docs/reference/transfers_control.md +0 -1
  181. pypaystack2-2.1.1/docs/reference/verification.md +0 -1
  182. pypaystack2-2.1.1/docs/tutorials/tutorial1.md +0 -384
  183. pypaystack2-2.1.1/src/pypaystack2/__init__.py +0 -89
  184. pypaystack2-2.1.1/src/pypaystack2/api/__init__.py +0 -74
  185. pypaystack2-2.1.1/src/pypaystack2/api/apple_pay.py +0 -168
  186. pypaystack2-2.1.1/src/pypaystack2/api/bulk_charges.py +0 -278
  187. pypaystack2-2.1.1/src/pypaystack2/api/charge.py +0 -344
  188. pypaystack2-2.1.1/src/pypaystack2/api/customers.py +0 -469
  189. pypaystack2-2.1.1/src/pypaystack2/api/dedicated_accounts.py +0 -573
  190. pypaystack2-2.1.1/src/pypaystack2/api/disputes.py +0 -444
  191. pypaystack2-2.1.1/src/pypaystack2/api/integration.py +0 -66
  192. pypaystack2-2.1.1/src/pypaystack2/api/miscellaneous.py +0 -174
  193. pypaystack2-2.1.1/src/pypaystack2/api/payment_pages.py +0 -328
  194. pypaystack2-2.1.1/src/pypaystack2/api/payment_requests.py +0 -513
  195. pypaystack2-2.1.1/src/pypaystack2/api/plans.py +0 -336
  196. pypaystack2-2.1.1/src/pypaystack2/api/products.py +0 -305
  197. pypaystack2-2.1.1/src/pypaystack2/api/refunds.py +0 -201
  198. pypaystack2-2.1.1/src/pypaystack2/api/settlements.py +0 -158
  199. pypaystack2-2.1.1/src/pypaystack2/api/splits.py +0 -357
  200. pypaystack2-2.1.1/src/pypaystack2/api/subaccounts.py +0 -334
  201. pypaystack2-2.1.1/src/pypaystack2/api/subscriptions.py +0 -310
  202. pypaystack2-2.1.1/src/pypaystack2/api/terminals.py +0 -350
  203. pypaystack2-2.1.1/src/pypaystack2/api/transactions.py +0 -773
  204. pypaystack2-2.1.1/src/pypaystack2/api/transfer_recipients.py +0 -368
  205. pypaystack2-2.1.1/src/pypaystack2/api/transfers.py +0 -326
  206. pypaystack2-2.1.1/src/pypaystack2/api/transfers_control.py +0 -191
  207. pypaystack2-2.1.1/src/pypaystack2/api/verification.py +0 -181
  208. pypaystack2-2.1.1/src/pypaystack2/baseapi.py +0 -156
  209. pypaystack2-2.1.1/src/pypaystack2/exceptions.py +0 -22
  210. pypaystack2-2.1.1/src/pypaystack2/paystack.py +0 -117
  211. pypaystack2-2.1.1/src/pypaystack2/utils/__init__.py +0 -76
  212. pypaystack2-2.1.1/src/pypaystack2/utils/helpers.py +0 -120
  213. pypaystack2-2.1.1/src/pypaystack2/utils/models.py +0 -340
  214. pypaystack2-2.1.1/tests/test_api/test_async/test_apple_pay.py +0 -74
  215. pypaystack2-2.1.1/tests/test_api/test_async/test_bulk_charges.py +0 -92
  216. pypaystack2-2.1.1/tests/test_api/test_async/test_charge.py +0 -128
  217. pypaystack2-2.1.1/tests/test_api/test_async/test_customers.py +0 -127
  218. pypaystack2-2.1.1/tests/test_api/test_async/test_dedicated_accounts.py +0 -43
  219. pypaystack2-2.1.1/tests/test_api/test_async/test_disputes.py +0 -49
  220. pypaystack2-2.1.1/tests/test_api/test_async/test_integration.py +0 -42
  221. pypaystack2-2.1.1/tests/test_api/test_async/test_payment_requests.py +0 -130
  222. pypaystack2-2.1.1/tests/test_api/test_async/test_plans.py +0 -77
  223. pypaystack2-2.1.1/tests/test_api/test_async/test_products.py +0 -85
  224. pypaystack2-2.1.1/tests/test_api/test_async/test_refunds.py +0 -52
  225. pypaystack2-2.1.1/tests/test_api/test_async/test_settlements.py +0 -42
  226. pypaystack2-2.1.1/tests/test_api/test_async/test_transfer_recipients.py +0 -114
  227. pypaystack2-2.1.1/tests/test_api/test_sync/test_apple_pay.py +0 -78
  228. pypaystack2-2.1.1/tests/test_api/test_sync/test_bulk_charges.py +0 -91
  229. pypaystack2-2.1.1/tests/test_api/test_sync/test_charge.py +0 -120
  230. pypaystack2-2.1.1/tests/test_api/test_sync/test_customers.py +0 -127
  231. pypaystack2-2.1.1/tests/test_api/test_sync/test_dedicated_accounts.py +0 -43
  232. pypaystack2-2.1.1/tests/test_api/test_sync/test_disputes.py +0 -48
  233. pypaystack2-2.1.1/tests/test_api/test_sync/test_integration.py +0 -42
  234. pypaystack2-2.1.1/tests/test_api/test_sync/test_payment_requests.py +0 -122
  235. pypaystack2-2.1.1/tests/test_api/test_sync/test_plans.py +0 -77
  236. pypaystack2-2.1.1/tests/test_api/test_sync/test_products.py +0 -85
  237. pypaystack2-2.1.1/tests/test_api/test_sync/test_refunds.py +0 -52
  238. pypaystack2-2.1.1/tests/test_api/test_sync/test_settlements.py +0 -42
  239. pypaystack2-2.1.1/tests/test_api/test_sync/test_splits.py +0 -39
  240. pypaystack2-2.1.1/tests/test_api/test_sync/test_subaccounts.py +0 -45
  241. pypaystack2-2.1.1/tests/test_api/test_sync/test_terminals.py +0 -45
  242. pypaystack2-2.1.1/tests/test_api/test_sync/test_transfer_recipients.py +0 -122
  243. pypaystack2-2.1.1/tests/test_api/test_sync/test_transfers.py +0 -53
  244. pypaystack2-2.1.1/tests/test_paystack.py +0 -159
  245. pypaystack2-2.1.1/tests/test_utils.py +0 -18
  246. pypaystack2-2.1.1/uv.lock +0 -888
  247. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/.gitattributes +0 -0
  248. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/.github/FUNDING.yml +0 -0
  249. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/.gitignore +0 -0
  250. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/.nojekyll +0 -0
  251. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/LICENSE +0 -0
  252. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/Makefile +0 -0
  253. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/docs/assets/pypaystack2.svg +0 -0
  254. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/docs/explanation.md +0 -0
  255. {pypaystack2-2.1.1 → pypaystack2-3.0.1}/docs/stylesheets/extra.css +0 -0
  256. {pypaystack2-2.1.1/tests/test_api/test_async → pypaystack2-3.0.1/tests/test_sub_clients}/__init__.py +0 -0
  257. {pypaystack2-2.1.1/tests/test_api → pypaystack2-3.0.1/tests/test_sub_clients}/mocked_api_testcase.py +0 -0
  258. {pypaystack2-2.1.1/tests/test_api/test_sync → pypaystack2-3.0.1/tests/test_sub_clients/test_async_clients}/__init__.py +0 -0
@@ -0,0 +1,32 @@
1
+ name: Generate [version] documentation
2
+
3
+ on:
4
+ release:
5
+ types: [ published ]
6
+
7
+ jobs:
8
+ build:
9
+ name: Deploy docs to GitHub Pages
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Set up Python
14
+ uses: actions/setup-python@v4
15
+ with:
16
+ python-version: "3.10"
17
+ fetch-depth: 0
18
+ - uses: astral-sh/setup-uv@v1
19
+ with:
20
+ version: "latest"
21
+ - name: Install dependencies
22
+ run: uv sync -p 3.10
23
+ - name: Setup doc deploy
24
+ run: |
25
+ git config --global user.name Docs deploy
26
+ git config --global user.email docs@dummy.bot.com
27
+ - name: Set release notes tag
28
+ run: |
29
+ export RELEASE_TAG_VERSION="${{ github.event.release.tag_name }}"
30
+ echo RELEASE_TAG_VERSION="${RELEASE_TAG_VERSION:1}" >> "$GITHUB_ENV"
31
+ - name: Build docs website
32
+ run: uv run mike deploy "${RELEASE_TAG_VERSION}" --push
@@ -0,0 +1,25 @@
1
+ name: Publish Pypaystack2 [version] to PYPI
2
+
3
+ on:
4
+ release:
5
+ types: [ "published" ]
6
+
7
+ jobs:
8
+ run:
9
+ name: "Build and publish release"
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Install uv
14
+ uses: astral-sh/setup-uv@v3
15
+ with:
16
+ enable-cache: true
17
+ cache-dependency-glob: uv.lock
18
+ - name: Set up Python
19
+ run: uv python install 3.12 # Or whatever version I want to use.
20
+
21
+ - name: Build
22
+ run: uv build
23
+
24
+ - name: Publish
25
+ run: uv publish -t ${{ secrets.PYPI_TOKEN }}
@@ -1,7 +1,7 @@
1
1
  # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
2
  # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
3
 
4
- name: pypaystack2 package test
4
+ name: Pypaystack2 Linting,Formatting and Testing
5
5
 
6
6
  on:
7
7
  push:
@@ -10,33 +10,31 @@ on:
10
10
  branches: [ "main" ]
11
11
 
12
12
  env:
13
- PAYSTACK_AUTHORIZATION_KEY: ${{ secrets.PAYSTACK_AUTHORIZATION_KEY }}
13
+ PAYSTACK_SECRET_KEY: ${{ secrets.PAYSTACK_SECRET_KEY }}
14
14
 
15
15
  jobs:
16
- build:
16
+ test:
17
17
 
18
18
  runs-on: ubuntu-latest
19
19
  strategy:
20
20
  fail-fast: false
21
21
  matrix:
22
- python-version: [ "3.9","3.10", "3.11","3.12" ]
22
+ python-version: [ "3.11","3.12", "3.13" ]
23
23
 
24
24
  steps:
25
25
  - uses: actions/checkout@v3
26
26
  - name: Set up Python ${{ matrix.python-version }}
27
- uses: actions/setup-python@v3
27
+ uses: actions/setup-python@v4
28
28
  with:
29
29
  python-version: ${{ matrix.python-version }}
30
- - name: Install dependencies
31
- run: |
32
- python -m pip install --upgrade pip
33
- python -m pip install -r requirements.txt
30
+ - uses: astral-sh/setup-uv@v1
31
+ with:
32
+ version: "latest"
33
+ - name: Install dependencies with uv
34
+ run: uv sync -p ${{ matrix.python-version }}
34
35
  - name: Format with ruff
35
- run: |
36
- ruff format .
36
+ run: uv run ruff format .
37
37
  - name: Lint with ruff
38
- run: |
39
- ruff check . --fix
38
+ run: uv run ruff check . --fix
40
39
  - name: Test package
41
- run: |
42
- pytest
40
+ run: uv run pytest
@@ -0,0 +1,19 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v3.2.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ - id: check-added-large-files
11
+ - repo: https://github.com/astral-sh/ruff-pre-commit
12
+ # Ruff version.
13
+ rev: v0.9.9
14
+ hooks:
15
+ # Run the linter.
16
+ - id: ruff
17
+ args: [ --fix ]
18
+ # Run the formatter.
19
+ - id: ruff-format
@@ -0,0 +1 @@
1
+ 3.11
@@ -7,7 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## unreleased
9
9
 
10
- ## [2.1.1] - 2024-12-09
10
+ ## [3.0.1] - (4th October 2025)
11
+
12
+ ### Fixed
13
+
14
+ - Missing `update_existing_subscriptions` parameter in `AsyncPlanClient.update` and `PlanClient.update`
15
+
16
+ ## [3.0.0] - (9th March 2025)
17
+
18
+ ### Added
19
+
20
+ - Pydantic v2 to project dependencies.
21
+ - Utility methods for fees calculation `calculate_fee`, `to_base_unit`, `to_subunit`.
22
+ - `ClientNetworkError`. An exception raised for all network related errors.
23
+
24
+ ### Changed
25
+
26
+ - `auth_key` parameter to `secret_key`.
27
+ - secret key environmental variable name from `PAYSTACK_AUTHORIZATION_KEY` to `PAYSTACK_SECRET_KEY`
28
+ - `MissingAuthKeyException` to `MissingSecretKeyException`
29
+ - Rename wrappers to clients. All usages of wrappers are now deprecated in favour of clients.
30
+ `Paystack` wrapper class in the past is now `PaystackClient` likewise all other api wrappers
31
+ are now sub clients e.g. `ApplePay` is now `ApplePayClient`
32
+
33
+ ### Fixed
34
+
35
+ - Unused `amount` parameter in `TransactionClient.export`
36
+
37
+ ### Removed
38
+
39
+ - Support for `python<=3.10`
40
+ - Package defined `HTTPMethod` enum. Now using `HTTPMethod` from the standard lib.
41
+ - `validate_amount` and `validate_interval` helper methods
42
+ - `InvalidMethodException`, `InvalidDataException`
43
+
44
+ ## [2.1.1] - (9th December 2024)
11
45
 
12
46
  ### Added
13
47
 
@@ -22,7 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
56
 
23
57
  - Charge.setAddress -> Charge.submitAddress
24
58
 
25
- ## [2.1.0] - 2024-10-08
59
+ ## [2.1.0] - (8th October 2024)
26
60
 
27
61
  ### Added
28
62
 
@@ -58,7 +92,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
92
  - Redundant payload from Subscription.send_update_link
59
93
  - Redundant payload from AsyncSubscription.send_update_link
60
94
 
61
- ## [2.0.3] - 2024-03-24
95
+ ## [2.0.3] - (24th March 2024)
62
96
 
63
97
  ### Added
64
98
 
@@ -71,7 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
71
105
  `Response` with the `data` parameter containing a `content` field with the bytes content returned.
72
106
  - Mismatched source code and documentation links in docs
73
107
 
74
- ## [2.0.2] - 2023-12-01
108
+ ## [2.0.2] - (1st December 2023)
75
109
 
76
110
  ### Added
77
111
 
@@ -91,13 +125,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
91
125
 
92
126
  - Broken docstrings API reference documentation links
93
127
 
94
- ## [2.0.1] - 2023-07-27
128
+ ## [2.0.1] - (27th July 2023)
95
129
 
96
130
  ### Changed
97
131
 
98
132
  - Refactor project internals
99
133
 
100
- ## [2.0.0] - 2023-05-18
134
+ ## [2.0.0] - (18th May 2023)
101
135
 
102
136
  ### Added
103
137
 
@@ -108,25 +142,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
108
142
 
109
143
  - Use `httpx` in place of `requests`
110
144
 
111
- ## [1.1.3] - 2023-03-10
145
+ ## [1.1.3] - (10th March 2023)
112
146
 
113
147
  ### Added
114
148
 
115
149
  - `Paystack` class which had bindings to other wrappers
116
150
 
117
- ## [1.0.3] - 2022-12-26
151
+ ## [1.0.3] - (26th December 2022)
118
152
 
119
153
  ### Added
120
154
 
121
155
  - Cleanup documentation
122
156
 
123
- ## [1.0.2] - 2022-12-25
157
+ ## [1.0.2] - (25th December 2022)
124
158
 
125
159
  ### Added
126
160
 
127
161
  - Implement additional wrappers to cover all endpoints provided by paystack
128
162
 
129
- ## [1.0.0] - 2022-07-25
163
+ ## [1.0.0] - (25th July 2022)
130
164
 
131
165
  ### Added
132
166
 
@@ -136,7 +170,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
136
170
 
137
171
  - Breaks projects were it is added as a dependency
138
172
 
139
- [unreleased]: https://github.com/gray-adeyi/pypaystack2/compare/v2.0.3...HEAD
173
+ [unreleased]: https://github.com/gray-adeyi/pypaystack2/compare/v2.1.1...HEAD
174
+
175
+ [2.1.1]: https://github.com/gray-adeyi/pypaystack2/compare/v2.1.0...v2.1.1
176
+
177
+ [2.1.0]: https://github.com/gray-adeyi/pypaystack2/compare/v2.0.3...v2.1.0
140
178
 
141
179
  [2.0.3]: https://github.com/gray-adeyi/pypaystack2/compare/v2.0.2...v2.0.3
142
180
 
@@ -144,8 +182,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
144
182
 
145
183
  [2.0.1]: https://github.com/gray-adeyi/pypaystack2/compare/v2.0.0...v2.0.1
146
184
 
185
+ [2.0.0]: https://github.com/gray-adeyi/pypaystack2/compare/v1.1.3...v2.0.0
186
+
147
187
  [1.1.3]: https://github.com/gray-adeyi/pypaystack2/compare/v1.0.3...v1.1.3
148
188
 
149
189
  [1.0.3]: https://github.com/gray-adeyi/pypaystack2/compare/v1.0.2...v1.0.3
150
190
 
151
191
  [1.0.2]: https://github.com/gray-adeyi/pypaystack2/compare/v1.0.0...v1.0.2
192
+
193
+ [1.0.0]: https://github.com/gray-adeyi/pypaystack2/releases/tag/v1.0.0
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: pypaystack2
3
+ Version: 3.0.1
4
+ Summary: A developer-friendly client library for Paystack
5
+ Author-email: Gbenga Adeyi <adeyigbenga005@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: paystack,paystack-python,paystackapi,pypaystack
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: >=3.11
13
+ Requires-Dist: httpx>=0.28.1
14
+ Requires-Dist: pydantic>=2.10.6
15
+ Description-Content-Type: text/markdown
16
+
17
+ # PyPaystack2
18
+
19
+ [![Downloads](https://static.pepy.tech/badge/pypaystack2)](https://pepy.tech/project/pypaystack2)
20
+ [![Downloads](https://static.pepy.tech/badge/pypaystack2/month)](https://pepy.tech/project/pypaystack2)
21
+ [![Downloads](https://static.pepy.tech/badge/pypaystack2/week)](https://pepy.tech/project/pypaystack2)
22
+
23
+ PyPaystack2 is an Open Source Python client library for integrating [Paystack](https://paystack.com/) into your python
24
+ projects. It aims at being developer friendly and easy to use.
25
+
26
+ **Version 3 is here now**
27
+
28
+ ## Features
29
+
30
+ - 1st class support for type annotations.
31
+ - Synchronous and Asynchronous clients.
32
+ - Pydantic for data modelling.
33
+ - Fees Calculation utilities.
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ $ pip install -U pypaystack2
39
+ # or install with uv
40
+ $ uv add pypaystack2
41
+ ```
42
+
43
+ ## Usage Preview
44
+
45
+ In the REPL session below, we're using PyPaystack2 to create a `Customer` (user) and a `Plan` on
46
+ [Paystack](https://paystack.com/) and then add the newly created customer as a subscriber to the plan.
47
+
48
+ ### Note
49
+
50
+ The REPL session below assumes the environmental variable `PAYSTACK_SECRET_KEY="YOUR_SECRET_KEY"` is set. if not,
51
+ you can alternatively pass it into the `PaystackClient` on instantiation like so
52
+ `PaystackClient(secret_key='YOUR_SECRET_KEY')` otherwise, you will get a `MissingSecretKeyException` raised prompting
53
+ you to provide a secret key. It also does not handle likely exceptions that calling client methods like
54
+ `client.customers.create`, `client.plans.create` & `client.subscriptions.create` may raise like `ClientNetworkError`
55
+ for network related issues and `ValueError` for validation related issues.
56
+
57
+ ```bash
58
+ Python 3.11.11 (main, Feb 12 2025, 14:51:05) [Clang 19.1.6 ] on linux
59
+ Type "help", "copyright", "credits" or "license" for more information.
60
+ >>> from pypaystack2 import __version__
61
+ >>> print(__version__)
62
+ 3.0.0 # Ensure you're running PyPaystack2 version >= 3.0.0 for the following entries to work
63
+ >>> from pypaystack2 import PaystackClient
64
+ >>> from pypaystack2.enums import Interval
65
+ >>> from pypaystack2.models import Customer, Plan
66
+ >>> client = PaystackClient()
67
+ >>> new_customer_response = client.customers.create(email="johndoe@example.com",first_name="John",last_name="Doe")
68
+ >>> assert new_customer_response.status # Validating the request is successful
69
+ >>> new_customer = new_customer_response.data
70
+ >>> assert isinstance(new_customer,Customer) # Showing that we indeed get an instance of a pydantic model name `Customer` a modelled representation of the data returned by paystack as a result of the request to create a new user
71
+ >>> new_plan_response = client.plans.create(name="Test 1k Daily Contributions", amount=client.to_subunit(1000), interval=Interval.DAILY)
72
+ >>> assert new_plan_response.status # Validating the request is successful
73
+ >>> new_plan = new_plan_response.data # Validating the request is successful
74
+ >>> assert isinstance(new_plan,Plan)
75
+ >>> new_subscription_response = client.subscriptions.create(customer=new_customer.customer_code,plan=new_plan.plan_code)
76
+ >>> assert new_subscription_response.status == True # Validating the request is successful
77
+ >>> print(repr(new_subscription_response))
78
+ Response(
79
+ status_code=<HTTPStatus.OK: 200>,
80
+ status=True,
81
+ message='Subscription successfully created',
82
+ data=Subscription(
83
+ customer=87934333,
84
+ plan=2237384,
85
+ integration=630606,
86
+ domain=<Domain.TEST: 'test'>,
87
+ start=1741208073,
88
+ status='active',
89
+ quantity=1,
90
+ amount=100000,
91
+ subscription_code='SUB_4sje2s7kb30m5bt',
92
+ email_token='uqzg0vneparuxtm',
93
+ authorization=368220905,
94
+ easy_cron_id=None,
95
+ cron_expression='54 20 5 3 *',
96
+ next_payment_date=datetime.datetime(2026, 3, 5, 20, 54, tzinfo=TzInfo(UTC)),
97
+ open_invoice=None,
98
+ invoice_limit=0,
99
+ id=759264,
100
+ split_code=None,
101
+ cancelled_at=None,
102
+ updated_at=datetime.datetime(2025, 3, 5, 20, 54, 33, tzinfo=TzInfo(UTC)),
103
+ payments_count=None,
104
+ most_recent_invoice=None,
105
+ invoices=None,
106
+ invoice_history=None),
107
+ meta=None,
108
+ type=None,
109
+ code=None,
110
+ raw={
111
+ 'status': True,
112
+ 'message': 'Subscription successfully created',
113
+ 'data': {
114
+ 'customer': 87934333,
115
+ 'plan': 2237384,
116
+ 'integration': 630606,
117
+ 'domain': 'test',
118
+ 'start': 1741208073,
119
+ 'status': 'active',
120
+ 'quantity': 1,
121
+ 'amount': 100000,
122
+ 'authorization': 368220905,
123
+ 'invoice_limit': 0,
124
+ 'split_code': None,
125
+ 'metadata': None,
126
+ 'subscription_code': 'SUB_4sje2s7kb30m5bt',
127
+ 'email_token': 'uqzg0vneparuxtm',
128
+ 'id': 759264,
129
+ 'cancelledAt': None,
130
+ 'createdAt': '2025-03-05T20:54:33.000Z',
131
+ 'updatedAt': '2025-03-05T20:54:33.000Z',
132
+ 'cron_expression': '54 20 5 3 *',
133
+ 'next_payment_date': '2026-03-05T20:54:00.000Z',
134
+ 'easy_cron_id': None,
135
+ 'open_invoice': None}
136
+ })
137
+ ```
138
+
139
+ ## Documentation
140
+
141
+ See [Documentation](https://gray-adeyi.github.io/pypaystack2/) for more on this package.
142
+
143
+ ## Disclaimer
144
+
145
+ This project is an Open Source client library for [Paystack](https://paystack.com/). It is not officially endorsed or
146
+ affiliated with [Paystack](https://paystack.com/). All trademarks and company names belong to their respective owners.
147
+
148
+ ## Contributions
149
+
150
+ Thank you for being interested in contributing to PyPaystack2.
151
+ There are many ways you can contribute to the project:
152
+
153
+ - [Star on GitHub](https://github.com/gray-adeyi/pypaystack2/)
154
+ - Try PyPaystack2 and [report bugs/issues you find](https://github.com/gray-adeyi/pypaystack2/issues/new)
155
+ - [Buy me a coffee](https://www.buymeacoffee.com/jigani)
156
+
157
+ ## Other Related Projects
158
+
159
+ | Name | Language | Functionality |
160
+ |------------------------------------------------------------------------------------|-----------------------|----------------------------------------------------------------------------------|
161
+ | [Paystack CLI](https://pypi.org/project/paystack-cli/) | Python | A command line app for interacting with paystack APIs |
162
+ | [paystack](https://github.com/gray-adeyi/paystack) | Go | A client library for integration paystack in go |
163
+ | [@gray-adeyi/paystack-sdk](https://www.npmjs.com/package/@gray-adeyi/paystack-sdk) | Typescript/Javascript | A client library for integrating paystack in Javascript runtimes (Node,Deno,Bun) |
164
+ | [paystack](https://pub.dev/packages/paystack) | Dart | A client library for integration paystack in Dart |
@@ -0,0 +1,148 @@
1
+ # PyPaystack2
2
+
3
+ [![Downloads](https://static.pepy.tech/badge/pypaystack2)](https://pepy.tech/project/pypaystack2)
4
+ [![Downloads](https://static.pepy.tech/badge/pypaystack2/month)](https://pepy.tech/project/pypaystack2)
5
+ [![Downloads](https://static.pepy.tech/badge/pypaystack2/week)](https://pepy.tech/project/pypaystack2)
6
+
7
+ PyPaystack2 is an Open Source Python client library for integrating [Paystack](https://paystack.com/) into your python
8
+ projects. It aims at being developer friendly and easy to use.
9
+
10
+ **Version 3 is here now**
11
+
12
+ ## Features
13
+
14
+ - 1st class support for type annotations.
15
+ - Synchronous and Asynchronous clients.
16
+ - Pydantic for data modelling.
17
+ - Fees Calculation utilities.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ $ pip install -U pypaystack2
23
+ # or install with uv
24
+ $ uv add pypaystack2
25
+ ```
26
+
27
+ ## Usage Preview
28
+
29
+ In the REPL session below, we're using PyPaystack2 to create a `Customer` (user) and a `Plan` on
30
+ [Paystack](https://paystack.com/) and then add the newly created customer as a subscriber to the plan.
31
+
32
+ ### Note
33
+
34
+ The REPL session below assumes the environmental variable `PAYSTACK_SECRET_KEY="YOUR_SECRET_KEY"` is set. if not,
35
+ you can alternatively pass it into the `PaystackClient` on instantiation like so
36
+ `PaystackClient(secret_key='YOUR_SECRET_KEY')` otherwise, you will get a `MissingSecretKeyException` raised prompting
37
+ you to provide a secret key. It also does not handle likely exceptions that calling client methods like
38
+ `client.customers.create`, `client.plans.create` & `client.subscriptions.create` may raise like `ClientNetworkError`
39
+ for network related issues and `ValueError` for validation related issues.
40
+
41
+ ```bash
42
+ Python 3.11.11 (main, Feb 12 2025, 14:51:05) [Clang 19.1.6 ] on linux
43
+ Type "help", "copyright", "credits" or "license" for more information.
44
+ >>> from pypaystack2 import __version__
45
+ >>> print(__version__)
46
+ 3.0.0 # Ensure you're running PyPaystack2 version >= 3.0.0 for the following entries to work
47
+ >>> from pypaystack2 import PaystackClient
48
+ >>> from pypaystack2.enums import Interval
49
+ >>> from pypaystack2.models import Customer, Plan
50
+ >>> client = PaystackClient()
51
+ >>> new_customer_response = client.customers.create(email="johndoe@example.com",first_name="John",last_name="Doe")
52
+ >>> assert new_customer_response.status # Validating the request is successful
53
+ >>> new_customer = new_customer_response.data
54
+ >>> assert isinstance(new_customer,Customer) # Showing that we indeed get an instance of a pydantic model name `Customer` a modelled representation of the data returned by paystack as a result of the request to create a new user
55
+ >>> new_plan_response = client.plans.create(name="Test 1k Daily Contributions", amount=client.to_subunit(1000), interval=Interval.DAILY)
56
+ >>> assert new_plan_response.status # Validating the request is successful
57
+ >>> new_plan = new_plan_response.data # Validating the request is successful
58
+ >>> assert isinstance(new_plan,Plan)
59
+ >>> new_subscription_response = client.subscriptions.create(customer=new_customer.customer_code,plan=new_plan.plan_code)
60
+ >>> assert new_subscription_response.status == True # Validating the request is successful
61
+ >>> print(repr(new_subscription_response))
62
+ Response(
63
+ status_code=<HTTPStatus.OK: 200>,
64
+ status=True,
65
+ message='Subscription successfully created',
66
+ data=Subscription(
67
+ customer=87934333,
68
+ plan=2237384,
69
+ integration=630606,
70
+ domain=<Domain.TEST: 'test'>,
71
+ start=1741208073,
72
+ status='active',
73
+ quantity=1,
74
+ amount=100000,
75
+ subscription_code='SUB_4sje2s7kb30m5bt',
76
+ email_token='uqzg0vneparuxtm',
77
+ authorization=368220905,
78
+ easy_cron_id=None,
79
+ cron_expression='54 20 5 3 *',
80
+ next_payment_date=datetime.datetime(2026, 3, 5, 20, 54, tzinfo=TzInfo(UTC)),
81
+ open_invoice=None,
82
+ invoice_limit=0,
83
+ id=759264,
84
+ split_code=None,
85
+ cancelled_at=None,
86
+ updated_at=datetime.datetime(2025, 3, 5, 20, 54, 33, tzinfo=TzInfo(UTC)),
87
+ payments_count=None,
88
+ most_recent_invoice=None,
89
+ invoices=None,
90
+ invoice_history=None),
91
+ meta=None,
92
+ type=None,
93
+ code=None,
94
+ raw={
95
+ 'status': True,
96
+ 'message': 'Subscription successfully created',
97
+ 'data': {
98
+ 'customer': 87934333,
99
+ 'plan': 2237384,
100
+ 'integration': 630606,
101
+ 'domain': 'test',
102
+ 'start': 1741208073,
103
+ 'status': 'active',
104
+ 'quantity': 1,
105
+ 'amount': 100000,
106
+ 'authorization': 368220905,
107
+ 'invoice_limit': 0,
108
+ 'split_code': None,
109
+ 'metadata': None,
110
+ 'subscription_code': 'SUB_4sje2s7kb30m5bt',
111
+ 'email_token': 'uqzg0vneparuxtm',
112
+ 'id': 759264,
113
+ 'cancelledAt': None,
114
+ 'createdAt': '2025-03-05T20:54:33.000Z',
115
+ 'updatedAt': '2025-03-05T20:54:33.000Z',
116
+ 'cron_expression': '54 20 5 3 *',
117
+ 'next_payment_date': '2026-03-05T20:54:00.000Z',
118
+ 'easy_cron_id': None,
119
+ 'open_invoice': None}
120
+ })
121
+ ```
122
+
123
+ ## Documentation
124
+
125
+ See [Documentation](https://gray-adeyi.github.io/pypaystack2/) for more on this package.
126
+
127
+ ## Disclaimer
128
+
129
+ This project is an Open Source client library for [Paystack](https://paystack.com/). It is not officially endorsed or
130
+ affiliated with [Paystack](https://paystack.com/). All trademarks and company names belong to their respective owners.
131
+
132
+ ## Contributions
133
+
134
+ Thank you for being interested in contributing to PyPaystack2.
135
+ There are many ways you can contribute to the project:
136
+
137
+ - [Star on GitHub](https://github.com/gray-adeyi/pypaystack2/)
138
+ - Try PyPaystack2 and [report bugs/issues you find](https://github.com/gray-adeyi/pypaystack2/issues/new)
139
+ - [Buy me a coffee](https://www.buymeacoffee.com/jigani)
140
+
141
+ ## Other Related Projects
142
+
143
+ | Name | Language | Functionality |
144
+ |------------------------------------------------------------------------------------|-----------------------|----------------------------------------------------------------------------------|
145
+ | [Paystack CLI](https://pypi.org/project/paystack-cli/) | Python | A command line app for interacting with paystack APIs |
146
+ | [paystack](https://github.com/gray-adeyi/paystack) | Go | A client library for integration paystack in go |
147
+ | [@gray-adeyi/paystack-sdk](https://www.npmjs.com/package/@gray-adeyi/paystack-sdk) | Typescript/Javascript | A client library for integrating paystack in Javascript runtimes (Node,Deno,Bun) |
148
+ | [paystack](https://pub.dev/packages/paystack) | Dart | A client library for integration paystack in Dart |
@@ -0,0 +1,3 @@
1
+ # How to guide
2
+
3
+ Coming soon.