pypaystack2 2.0.3__tar.gz → 2.1.0__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.
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/CHANGELOG.md +42 -0
- pypaystack2-2.1.0/Makefile +4 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/PKG-INFO +2 -2
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/pyproject.toml +9 -18
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/_metadata.py +1 -1
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/apple_pay.py +10 -4
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/payment_pages.py +3 -3
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/payment_requests.py +14 -4
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/splits.py +2 -2
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/subscriptions.py +2 -4
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/transactions.py +8 -8
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/baseapi.py +12 -17
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/utils/models.py +8 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_apple_pay.py +6 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_bulk_charges.py +2 -3
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_customers.py +1 -1
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_dedicated_accounts.py +7 -13
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_disputes.py +7 -12
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_payment_requests.py +2 -2
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_settlements.py +1 -1
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_apple_pay.py +3 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_bulk_charges.py +1 -3
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_customers.py +1 -1
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_dedicated_accounts.py +7 -13
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_disputes.py +6 -12
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_payment_requests.py +2 -2
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_settlements.py +1 -1
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_transfers.py +3 -5
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_baseapi.py +9 -0
- pypaystack2-2.1.0/uv.lock +824 -0
- pypaystack2-2.0.3/requirements-dev.lock +0 -129
- pypaystack2-2.0.3/requirements.lock +0 -31
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/.gitattributes +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/.github/FUNDING.yml +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/.github/workflows/python-package.yml +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/.gitignore +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/.nojekyll +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/.python-version +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/LICENSE +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/README.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/assets/pypaystack2.svg +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/explanation.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/how-to-guides.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/index.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/apple_pay.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/bulk_charges.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/charge.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/customer.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/dedicated_accounts.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/disputes.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/index.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/integration.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/miscellaneous.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/payment_pages.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/payment_requests.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/plans.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/products.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/refunds.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/settlements.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/splits.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/subaccounts.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/subscriptions.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/terminals.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/transactions.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/transfer_recipients.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/transfers.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/transfers_control.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/reference/verification.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/stylesheets/extra.css +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/docs/tutorials/tutorial1.md +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/mkdocs.yml +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/bulk_charges.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/charge.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/customers.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/dedicated_accounts.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/disputes.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/integration.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/miscellaneous.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/plans.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/products.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/refunds.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/settlements.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/subaccounts.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/terminals.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/transfer_recipients.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/transfers.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/transfers_control.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/api/verification.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/exceptions.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/paystack.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/utils/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/utils/enums.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/src/pypaystack2/utils/helpers.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test__metadata.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/mocked_api_testcase.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_charge.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_integration.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_plans.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_products.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_refunds.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_transfer_recipients.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/__init__.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_charge.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_integration.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_plans.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_products.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_refunds.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_splits.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_subaccounts.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_subscriptions.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_terminals.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_transactions.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_transfer_recipients.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_transfers_control.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_sync/test_verification.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_paystack.py +0 -0
- {pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_utils.py +0 -0
|
@@ -5,6 +5,48 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## unreleased
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Charge.setAddress -> Charge.submitAddress
|
|
13
|
+
|
|
14
|
+
## [2.1.0] - 2024-10-08
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Param documentation for ApplePay.unregister_domain
|
|
19
|
+
- Param documentation for AsyncApplePay.unregister_domain
|
|
20
|
+
- `meta`, `type` and `code` fields to `Response`
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Bumped httpx to 0.27.2
|
|
25
|
+
- Transaction.get_transactions(customer: Optional[int]) -> Transaction.get_transactions(customer: Optional[str])
|
|
26
|
+
- AsyncTransaction.get_transactions(customer: Optional[int]) -> AsyncTransaction.get_transactions(customer:
|
|
27
|
+
Optional[str])
|
|
28
|
+
- Transaction.export(customer: Optional[int]) -> Transaction.export(customer: Optional[str])
|
|
29
|
+
- AsyncTransaction.export(customer: Optional[int]) -> AsyncTransaction.export(customer: Optional[str])
|
|
30
|
+
- Transaction.export(settlement: Optional[int]) -> Transaction.export(settlement: Optional[str])
|
|
31
|
+
- AsyncTransaction.export(settlement: Optional[int]) -> AsyncTransaction.export(settlement: Optional[str])
|
|
32
|
+
- Transaction.export(payment_page: Optional[int]) -> Transaction.export(payment_page: Optional[str])
|
|
33
|
+
- AsyncTransaction.export(payment_page: Optional[int]) -> AsyncTransaction.export(payment_page: Optional[str])
|
|
34
|
+
- PaymentRequest.update `line_item` and `tax` parameter to use `Tax` and `LineItem` inplace of `list`
|
|
35
|
+
- AsyncPaymentRequest.update `line_item` and `tax` parameter to use `Tax` and `LineItem` inplace of `list`
|
|
36
|
+
- PaymentPage.metadata type
|
|
37
|
+
- AsyncPaymentPage.metadata type
|
|
38
|
+
- Plan.update documentation
|
|
39
|
+
|
|
40
|
+
## Fixed
|
|
41
|
+
|
|
42
|
+
- Use of literal "POST" in TransactionSplit.add_or_update
|
|
43
|
+
- Use of literal "POST" in AsyncTransactionSplit.add_or_update
|
|
44
|
+
|
|
45
|
+
## Removed
|
|
46
|
+
|
|
47
|
+
- Redundant payload from Subscription.send_update_link
|
|
48
|
+
- Redundant payload from AsyncSubscription.send_update_link
|
|
49
|
+
|
|
8
50
|
## [2.0.3] - 2024-03-24
|
|
9
51
|
|
|
10
52
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pypaystack2
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A developer-friendly client library for Paystack
|
|
5
5
|
Author-email: Gbenga Adeyi <adeyigbenga005@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -10,7 +10,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
10
10
|
Classifier: Programming Language :: Python
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3.9
|
|
13
|
-
Requires-Dist: httpx>=0.27.
|
|
13
|
+
Requires-Dist: httpx>=0.27.2
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
|
|
16
16
|
# PyPaystack2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pypaystack2"
|
|
3
|
-
version = "2.0
|
|
3
|
+
version = "2.1.0"
|
|
4
4
|
description = "A developer-friendly client library for Paystack"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -14,32 +14,23 @@ classifiers = [
|
|
|
14
14
|
"Programming Language :: Python :: 3",
|
|
15
15
|
]
|
|
16
16
|
|
|
17
|
+
|
|
18
|
+
requires-python = ">= 3.9"
|
|
17
19
|
dependencies = [
|
|
18
|
-
"httpx>=0.27.
|
|
20
|
+
"httpx>=0.27.2",
|
|
19
21
|
]
|
|
20
|
-
requires-python = ">= 3.9"
|
|
21
22
|
|
|
22
23
|
[build-system]
|
|
23
24
|
requires = ["hatchling"]
|
|
24
25
|
build-backend = "hatchling.build"
|
|
25
26
|
|
|
26
|
-
[tool.
|
|
27
|
-
managed = true
|
|
27
|
+
[tool.uv]
|
|
28
28
|
dev-dependencies = [
|
|
29
|
+
"mkdocs>=1.6.1",
|
|
30
|
+
"mkdocs-material>=9.5.39",
|
|
31
|
+
"mkdocstrings[python]>=0.26.1",
|
|
32
|
+
"pytest>=8.3.3",
|
|
29
33
|
"python-dotenv>=1.0.1",
|
|
30
|
-
"mkdocs>=1.5.3",
|
|
31
|
-
"mkdocs-material>=9.5.15",
|
|
32
|
-
"typer>=0.9.0",
|
|
33
|
-
"mkdocstrings[python]>=0.24.1",
|
|
34
|
-
"pytest>=8.1.1",
|
|
35
34
|
"tomli>=2.0.1",
|
|
36
35
|
]
|
|
37
|
-
[tool.rye.scripts]
|
|
38
|
-
docs = "mkdocs serve"
|
|
39
|
-
docs-build = "mkdocs build"
|
|
40
|
-
|
|
41
|
-
[tool.hatch.metadata]
|
|
42
|
-
allow-direct-references = true
|
|
43
36
|
|
|
44
|
-
[tool.hatch.build.targets.wheel]
|
|
45
|
-
packages = ["src/pypaystack2"]
|
|
@@ -66,6 +66,9 @@ class ApplePay(BaseAPI):
|
|
|
66
66
|
def unregister_domain(self, domain_name: str) -> Response:
|
|
67
67
|
"""Unregister a top-level domain or subdomain previously used for your Apple Pay integration.
|
|
68
68
|
|
|
69
|
+
Args:
|
|
70
|
+
domain_name: Domain name to be unregistered
|
|
71
|
+
|
|
69
72
|
Note
|
|
70
73
|
* This feature is available to businesses in all markets except South Africa.
|
|
71
74
|
|
|
@@ -140,11 +143,14 @@ class AsyncApplePay(BaseAsyncAPI):
|
|
|
140
143
|
async def unregister_domain(self, domain_name: str) -> Response:
|
|
141
144
|
"""Unregister a top-level domain or subdomain previously used for your Apple Pay integration.
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
Args:
|
|
147
|
+
domain_name: Domain name to be unregistered
|
|
145
148
|
|
|
146
|
-
|
|
147
|
-
|
|
149
|
+
Note
|
|
150
|
+
* This feature is available to businesses in all markets except South Africa.
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
A named tuple containing the response gotten from paystack's server.
|
|
148
154
|
"""
|
|
149
155
|
|
|
150
156
|
url = self._parse_url("/apple-pay/domain")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, Any
|
|
2
2
|
|
|
3
3
|
from pypaystack2.baseapi import BaseAPI, BaseAsyncAPI
|
|
4
4
|
from pypaystack2.utils import add_to_payload, append_query_params, HTTPMethod, Response
|
|
@@ -18,7 +18,7 @@ class PaymentPage(BaseAPI):
|
|
|
18
18
|
amount: Optional[int] = None,
|
|
19
19
|
split_code: Optional[str] = None,
|
|
20
20
|
slug: Optional[str] = None,
|
|
21
|
-
metadata: Optional[str] = None,
|
|
21
|
+
metadata: Optional[dict[str, Any]] = None,
|
|
22
22
|
redirect_url: Optional[str] = None,
|
|
23
23
|
custom_fields: Optional[list] = None,
|
|
24
24
|
) -> Response:
|
|
@@ -180,7 +180,7 @@ class AsyncPaymentPage(BaseAsyncAPI):
|
|
|
180
180
|
amount: Optional[int] = None,
|
|
181
181
|
split_code: Optional[str] = None,
|
|
182
182
|
slug: Optional[str] = None,
|
|
183
|
-
metadata: Optional[str] = None,
|
|
183
|
+
metadata: Optional[dict[str, Any]] = None,
|
|
184
184
|
redirect_url: Optional[str] = None,
|
|
185
185
|
custom_fields: Optional[list] = None,
|
|
186
186
|
) -> Response:
|
|
@@ -193,8 +193,8 @@ class PaymentRequest(BaseAPI):
|
|
|
193
193
|
amount: int,
|
|
194
194
|
due_date: Optional[str] = None,
|
|
195
195
|
description: Optional[str] = None,
|
|
196
|
-
line_items: Optional[list[
|
|
197
|
-
tax: Optional[list[
|
|
196
|
+
line_items: Optional[list[LineItem]] = None,
|
|
197
|
+
tax: Optional[list[Tax]] = None,
|
|
198
198
|
currency: Optional[Currency] = None,
|
|
199
199
|
send_notification: Optional[bool] = None,
|
|
200
200
|
draft: Optional[bool] = None,
|
|
@@ -226,6 +226,11 @@ class PaymentRequest(BaseAPI):
|
|
|
226
226
|
|
|
227
227
|
amount = validate_amount(amount)
|
|
228
228
|
|
|
229
|
+
if line_items:
|
|
230
|
+
line_items = [item.dict for item in line_items]
|
|
231
|
+
if tax:
|
|
232
|
+
tax = [unit_tax.dict for unit_tax in tax]
|
|
233
|
+
|
|
229
234
|
url = self._parse_url(f"/paymentrequest/{id_or_code}")
|
|
230
235
|
payload = {
|
|
231
236
|
"customer": customer,
|
|
@@ -437,8 +442,8 @@ class AsyncPaymentRequest(BaseAsyncAPI):
|
|
|
437
442
|
amount: int,
|
|
438
443
|
due_date: Optional[str] = None,
|
|
439
444
|
description: Optional[str] = None,
|
|
440
|
-
line_items: Optional[list[
|
|
441
|
-
tax: Optional[list[
|
|
445
|
+
line_items: Optional[list[LineItem]] = None,
|
|
446
|
+
tax: Optional[list[Tax]] = None,
|
|
442
447
|
currency: Optional[Currency] = None,
|
|
443
448
|
send_notification: Optional[bool] = None,
|
|
444
449
|
draft: Optional[bool] = None,
|
|
@@ -470,6 +475,11 @@ class AsyncPaymentRequest(BaseAsyncAPI):
|
|
|
470
475
|
|
|
471
476
|
amount = validate_amount(amount)
|
|
472
477
|
|
|
478
|
+
if line_items:
|
|
479
|
+
line_items = [item.dict for item in line_items]
|
|
480
|
+
if tax:
|
|
481
|
+
tax = [unit_tax.dict for unit_tax in tax]
|
|
482
|
+
|
|
473
483
|
url = self._parse_url(f"/paymentrequest/{id_or_code}")
|
|
474
484
|
payload = {
|
|
475
485
|
"customer": customer,
|
|
@@ -168,7 +168,7 @@ class TransactionSplit(BaseAPI):
|
|
|
168
168
|
share = validate_amount(share)
|
|
169
169
|
payload = {"subaccount": subaccount, "share": share}
|
|
170
170
|
url = self._parse_url(f"/split/{id}/subaccount/add")
|
|
171
|
-
return self._handle_request(
|
|
171
|
+
return self._handle_request(HTTPMethod.POST, url, payload)
|
|
172
172
|
|
|
173
173
|
def remove(self, id: str, subaccount: str) -> Response:
|
|
174
174
|
"""Remove a subaccount from a transaction split
|
|
@@ -339,7 +339,7 @@ class AsyncTransactionSplit(BaseAsyncAPI):
|
|
|
339
339
|
share = validate_amount(share)
|
|
340
340
|
payload = {"subaccount": subaccount, "share": share}
|
|
341
341
|
url = self._parse_url(f"/split/{id}/subaccount/add")
|
|
342
|
-
return await self._handle_request(
|
|
342
|
+
return await self._handle_request(HTTPMethod.POST, url, payload)
|
|
343
343
|
|
|
344
344
|
async def remove(self, id: str, subaccount: str) -> Response:
|
|
345
345
|
"""Remove a subaccount from a transaction split
|
|
@@ -154,8 +154,7 @@ class Subscription(BaseAPI):
|
|
|
154
154
|
"""
|
|
155
155
|
|
|
156
156
|
url = self._parse_url(f"/subscription/{code}/manage/email/")
|
|
157
|
-
|
|
158
|
-
return self._handle_request(HTTPMethod.POST, url, payload)
|
|
157
|
+
return self._handle_request(HTTPMethod.POST, url, None)
|
|
159
158
|
|
|
160
159
|
|
|
161
160
|
class AsyncSubscription(BaseAsyncAPI):
|
|
@@ -308,5 +307,4 @@ class AsyncSubscription(BaseAsyncAPI):
|
|
|
308
307
|
"""
|
|
309
308
|
|
|
310
309
|
url = self._parse_url(f"/subscription/{code}/manage/email/")
|
|
311
|
-
|
|
312
|
-
return await self._handle_request(HTTPMethod.POST, url, payload)
|
|
310
|
+
return await self._handle_request(HTTPMethod.POST, url, None)
|
|
@@ -113,7 +113,7 @@ class Transaction(BaseAPI):
|
|
|
113
113
|
|
|
114
114
|
def get_transactions(
|
|
115
115
|
self,
|
|
116
|
-
customer: Optional[
|
|
116
|
+
customer: Optional[str] = None,
|
|
117
117
|
start_date: Optional[str] = None,
|
|
118
118
|
end_date: Optional[str] = None,
|
|
119
119
|
status: Optional[TransactionStatus] = None,
|
|
@@ -291,13 +291,13 @@ class Transaction(BaseAPI):
|
|
|
291
291
|
page: Optional[int] = None,
|
|
292
292
|
start_date: Optional[str] = None,
|
|
293
293
|
end_date: Optional[str] = None,
|
|
294
|
-
customer: Optional[
|
|
294
|
+
customer: Optional[str] = None,
|
|
295
295
|
status: Optional[TransactionStatus] = None,
|
|
296
296
|
currency: Optional[Currency] = None,
|
|
297
297
|
amount: Optional[int] = None,
|
|
298
298
|
settled: Optional[bool] = None,
|
|
299
|
-
settlement: Optional[
|
|
300
|
-
payment_page: Optional[
|
|
299
|
+
settlement: Optional[str] = None,
|
|
300
|
+
payment_page: Optional[str] = None,
|
|
301
301
|
pagination: int = 50,
|
|
302
302
|
) -> Response:
|
|
303
303
|
"""Fetch transactions carried out on your integration.
|
|
@@ -492,7 +492,7 @@ class AsyncTransaction(BaseAsyncAPI):
|
|
|
492
492
|
|
|
493
493
|
async def get_transactions(
|
|
494
494
|
self,
|
|
495
|
-
customer: Optional[
|
|
495
|
+
customer: Optional[str] = None,
|
|
496
496
|
start_date: Optional[str] = None,
|
|
497
497
|
end_date: Optional[str] = None,
|
|
498
498
|
status: Optional[TransactionStatus] = None,
|
|
@@ -670,13 +670,13 @@ class AsyncTransaction(BaseAsyncAPI):
|
|
|
670
670
|
page: Optional[int] = None,
|
|
671
671
|
start_date: Optional[str] = None,
|
|
672
672
|
end_date: Optional[str] = None,
|
|
673
|
-
customer: Optional[
|
|
673
|
+
customer: Optional[str] = None,
|
|
674
674
|
status: Optional[TransactionStatus] = None,
|
|
675
675
|
currency: Optional[Currency] = None,
|
|
676
676
|
amount: Optional[int] = None,
|
|
677
677
|
settled: Optional[bool] = None,
|
|
678
|
-
settlement: Optional[
|
|
679
|
-
payment_page: Optional[
|
|
678
|
+
settlement: Optional[str] = None,
|
|
679
|
+
payment_page: Optional[str] = None,
|
|
680
680
|
pagination: int = 50,
|
|
681
681
|
) -> Response:
|
|
682
682
|
"""Fetch transactions carried out on your integration.
|
|
@@ -4,7 +4,6 @@ from json import JSONDecodeError
|
|
|
4
4
|
from typing import Union, Optional
|
|
5
5
|
|
|
6
6
|
import httpx
|
|
7
|
-
from httpx import codes
|
|
8
7
|
|
|
9
8
|
from pypaystack2._metadata import __version__
|
|
10
9
|
from pypaystack2.exceptions import InvalidMethodException, MissingAuthKeyException
|
|
@@ -45,9 +44,7 @@ class AbstractAPI(ABC):
|
|
|
45
44
|
"User-Agent": f"PyPaystack2-{__version__}",
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
def _parse_response(
|
|
49
|
-
self, raw_response: httpx.Response, as_error: bool = False
|
|
50
|
-
) -> Response:
|
|
47
|
+
def _parse_response(self, raw_response: httpx.Response) -> Response:
|
|
51
48
|
"""
|
|
52
49
|
Parses an `httpx.Response` into a `Response`.
|
|
53
50
|
|
|
@@ -63,16 +60,20 @@ class AbstractAPI(ABC):
|
|
|
63
60
|
status=False,
|
|
64
61
|
message="pypaystack2 was unable to serialize response as json data",
|
|
65
62
|
data={"content": raw_response.content},
|
|
63
|
+
meta=None,
|
|
64
|
+
type=None,
|
|
65
|
+
code=None,
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
status = response_body.get("status", None)
|
|
69
69
|
message = response_body.get("message", None)
|
|
70
|
-
data = (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
data = response_body.get("data", None)
|
|
71
|
+
meta = response_body.get("meta", None)
|
|
72
|
+
type_ = response_body.get("type", None)
|
|
73
|
+
code = response_body.get("code", None)
|
|
74
|
+
return Response(
|
|
75
|
+
raw_response.status_code, status, message, data, meta, type_, code
|
|
74
76
|
)
|
|
75
|
-
return Response(raw_response.status_code, status, message, data)
|
|
76
77
|
|
|
77
78
|
def _parse_http_method_kwargs(
|
|
78
79
|
self, url: str, method: HTTPMethod, data: Optional[Union[dict, list]]
|
|
@@ -127,10 +128,7 @@ class BaseAPI(AbstractAPI):
|
|
|
127
128
|
)
|
|
128
129
|
|
|
129
130
|
response = http_method(**http_method_kwargs)
|
|
130
|
-
|
|
131
|
-
return self._parse_response(response)
|
|
132
|
-
else:
|
|
133
|
-
return self._parse_response(response, as_error=True)
|
|
131
|
+
return self._parse_response(response)
|
|
134
132
|
|
|
135
133
|
|
|
136
134
|
class BaseAsyncAPI(AbstractAPI):
|
|
@@ -155,7 +153,4 @@ class BaseAsyncAPI(AbstractAPI):
|
|
|
155
153
|
)
|
|
156
154
|
response = await http_method(**http_method_kwargs)
|
|
157
155
|
|
|
158
|
-
|
|
159
|
-
return self._parse_response(response)
|
|
160
|
-
else:
|
|
161
|
-
return self._parse_response(response, as_error=True)
|
|
156
|
+
return self._parse_response(response)
|
|
@@ -324,9 +324,17 @@ class Response(NamedTuple):
|
|
|
324
324
|
status: A flag for the response status
|
|
325
325
|
message: Paystack response message
|
|
326
326
|
data: Data sent from paystack's server if any.
|
|
327
|
+
meta: Additional information about the response.
|
|
328
|
+
type: In cases where the response has a status of `False` or the status code
|
|
329
|
+
is an error status code. the `type` field indicates the type of error e.g. `api_error`
|
|
330
|
+
code: In cases where the response has a status of `False` or the status code
|
|
331
|
+
is an error status code. the `type` field indicates the type of error e.g. `api_error`
|
|
327
332
|
"""
|
|
328
333
|
|
|
329
334
|
status_code: int
|
|
330
335
|
status: bool
|
|
331
336
|
message: str
|
|
332
337
|
data: Optional[Union[dict[str, Any], list[dict[str, Any]]]]
|
|
338
|
+
meta: Optional[dict]
|
|
339
|
+
type: Optional[str]
|
|
340
|
+
code: Optional[str]
|
|
@@ -44,6 +44,9 @@ class AsyncApplePayTestCase(IsolatedAsyncioTestCase):
|
|
|
44
44
|
"hosted at https://example.com/.well-known/apple-developer-merchantid-domain-association"
|
|
45
45
|
),
|
|
46
46
|
data=None,
|
|
47
|
+
meta=None,
|
|
48
|
+
type=None,
|
|
49
|
+
code=None,
|
|
47
50
|
)
|
|
48
51
|
self.assertEqual(response, expected_response)
|
|
49
52
|
|
|
@@ -54,6 +57,9 @@ class AsyncApplePayTestCase(IsolatedAsyncioTestCase):
|
|
|
54
57
|
status=False,
|
|
55
58
|
message="pypaystack2 was unable to serialize response as json data",
|
|
56
59
|
data={"content": b""},
|
|
60
|
+
meta=None,
|
|
61
|
+
type=None,
|
|
62
|
+
code=None,
|
|
57
63
|
)
|
|
58
64
|
self.assertEqual(response, expected_response)
|
|
59
65
|
|
|
@@ -20,6 +20,7 @@ class MockedAsyncBulkChargeTestCase(MockedAsyncAPITestCase):
|
|
|
20
20
|
response = await self.wrapper.initiate(
|
|
21
21
|
body=BulkChargeInstruction.from_dict_many(instructions)
|
|
22
22
|
)
|
|
23
|
+
print(response)
|
|
23
24
|
self.assertEqual(response.status_code, httpx.codes.OK)
|
|
24
25
|
|
|
25
26
|
async def test_can_get_batches(self):
|
|
@@ -56,9 +57,7 @@ class AsyncBulkChargeTestCase(IsolatedAsyncioTestCase):
|
|
|
56
57
|
response = await self.wrapper.initiate(
|
|
57
58
|
body=BulkChargeInstruction.from_dict_many(instructions)
|
|
58
59
|
)
|
|
59
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
60
|
-
self.assertTrue(response.status)
|
|
61
|
-
self.assertEqual(response.message, "Charges have been queued")
|
|
60
|
+
self.assertEqual(response.status_code, httpx.codes.BAD_REQUEST)
|
|
62
61
|
|
|
63
62
|
async def test_can_get_batches(self):
|
|
64
63
|
response = await self.wrapper.get_batches()
|
|
@@ -124,4 +124,4 @@ class AsyncCustomerTestCase(IsolatedAsyncioTestCase):
|
|
|
124
124
|
async def test_can_deactivate(self):
|
|
125
125
|
# TODO: Test properly
|
|
126
126
|
response = await self.wrapper.deactivate(auth_code="AUTH_72btv547")
|
|
127
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
127
|
+
self.assertEqual(response.status_code, httpx.codes.NOT_FOUND)
|
{pypaystack2-2.0.3 → pypaystack2-2.1.0}/tests/test_api/test_async/test_dedicated_accounts.py
RENAMED
|
@@ -25,25 +25,19 @@ class AsyncDedicatedAccountTestCase(IsolatedAsyncioTestCase):
|
|
|
25
25
|
# TODO: Test properly.
|
|
26
26
|
response = await self.wrapper.create(customer="CUS_5qmwswiljybyyne")
|
|
27
27
|
|
|
28
|
-
async def test_can_get_dedicated_accounts(self):
|
|
29
|
-
...
|
|
28
|
+
async def test_can_get_dedicated_accounts(self): ...
|
|
30
29
|
|
|
31
|
-
async def test_can_get_dedicated_account(self):
|
|
32
|
-
...
|
|
30
|
+
async def test_can_get_dedicated_account(self): ...
|
|
33
31
|
|
|
34
|
-
async def test_can_requery(self):
|
|
35
|
-
...
|
|
32
|
+
async def test_can_requery(self): ...
|
|
36
33
|
|
|
37
|
-
async def test_can_deactivate(self):
|
|
38
|
-
...
|
|
34
|
+
async def test_can_deactivate(self): ...
|
|
39
35
|
|
|
40
|
-
async def test_can_split(self):
|
|
41
|
-
...
|
|
36
|
+
async def test_can_split(self): ...
|
|
42
37
|
|
|
43
|
-
async def test_can_remove_split(self):
|
|
44
|
-
...
|
|
38
|
+
async def test_can_remove_split(self): ...
|
|
45
39
|
|
|
46
40
|
async def test_can_get_providers(self):
|
|
47
41
|
# TODO: Test properly.
|
|
48
42
|
response = await self.wrapper.get_providers()
|
|
49
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
43
|
+
self.assertEqual(response.status_code, httpx.codes.UNAUTHORIZED)
|
|
@@ -32,23 +32,18 @@ class AsyncDisputeTestCase(IsolatedAsyncioTestCase):
|
|
|
32
32
|
async def test_can_get_dispute(self):
|
|
33
33
|
# TODO: Test properly.
|
|
34
34
|
response = await self.wrapper.get_dispute(id="114782792")
|
|
35
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
35
|
+
self.assertEqual(response.status_code, httpx.codes.NOT_FOUND)
|
|
36
36
|
|
|
37
37
|
async def test_can_get_transaction_disputes(self):
|
|
38
38
|
# TODO: Test properly.
|
|
39
|
-
response = await self.wrapper.get_transaction_disputes(id="114782792")
|
|
40
|
-
|
|
41
|
-
async def test_can_update_dispute(self):
|
|
42
39
|
...
|
|
43
40
|
|
|
44
|
-
async def
|
|
45
|
-
...
|
|
41
|
+
async def test_can_update_dispute(self): ...
|
|
46
42
|
|
|
47
|
-
async def
|
|
48
|
-
...
|
|
43
|
+
async def test_can_add_evidence(self): ...
|
|
49
44
|
|
|
50
|
-
async def
|
|
51
|
-
...
|
|
45
|
+
async def test_can_get_upload_url(self): ...
|
|
52
46
|
|
|
53
|
-
async def
|
|
54
|
-
|
|
47
|
+
async def test_can_resolve_dispute(self): ...
|
|
48
|
+
|
|
49
|
+
async def test_can_export_disputes(self): ...
|
|
@@ -112,7 +112,7 @@ class AsyncPaymentRequestTestCase(IsolatedAsyncioTestCase):
|
|
|
112
112
|
async def test_can_finalize(self):
|
|
113
113
|
# TODO: Test Properly
|
|
114
114
|
response = await self.wrapper.finalize(id_or_code="PRQ_886l127ke0on6jg")
|
|
115
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
115
|
+
self.assertEqual(response.status_code, httpx.codes.BAD_REQUEST)
|
|
116
116
|
|
|
117
117
|
async def test_can_update(self):
|
|
118
118
|
# TODO: Test Properly
|
|
@@ -121,7 +121,7 @@ class AsyncPaymentRequestTestCase(IsolatedAsyncioTestCase):
|
|
|
121
121
|
amount=300_000,
|
|
122
122
|
customer="CUS_7khpwdrlvde8c6h",
|
|
123
123
|
)
|
|
124
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
124
|
+
self.assertEqual(response.status_code, httpx.codes.BAD_REQUEST)
|
|
125
125
|
|
|
126
126
|
async def test_can_archive(self):
|
|
127
127
|
response = await self.wrapper.archive(id_or_code="PRQ_886l127ke0on6jg")
|
|
@@ -39,4 +39,4 @@ class AsyncSettlementTestCase(IsolatedAsyncioTestCase):
|
|
|
39
39
|
async def test_can_get_settlement_transactions(self):
|
|
40
40
|
# TODO: Test properly
|
|
41
41
|
response = await self.wrapper.get_settlement_transactions(id="hello")
|
|
42
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
42
|
+
self.assertEqual(response.status_code, httpx.codes.INTERNAL_SERVER_ERROR)
|
|
@@ -56,9 +56,7 @@ class BulkChargeTestCase(TestCase):
|
|
|
56
56
|
response = self.wrapper.initiate(
|
|
57
57
|
body=BulkChargeInstruction.from_dict_many(instructions)
|
|
58
58
|
)
|
|
59
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
60
|
-
self.assertTrue(response.status)
|
|
61
|
-
self.assertEqual(response.message, "Charges have been queued")
|
|
59
|
+
self.assertEqual(response.status_code, httpx.codes.BAD_REQUEST)
|
|
62
60
|
|
|
63
61
|
def test_can_get_batches(self):
|
|
64
62
|
response = self.wrapper.get_batches()
|
|
@@ -124,4 +124,4 @@ class CustomerTestCase(TestCase):
|
|
|
124
124
|
def test_can_deactivate(self):
|
|
125
125
|
# TODO: Test properly
|
|
126
126
|
response = self.wrapper.deactivate(auth_code="AUTH_72btv547")
|
|
127
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
127
|
+
self.assertEqual(response.status_code, httpx.codes.NOT_FOUND)
|
|
@@ -25,25 +25,19 @@ class DedicatedAccountTestCase(TestCase):
|
|
|
25
25
|
# TODO: Test properly.
|
|
26
26
|
response = self.wrapper.create(customer="CUS_5qmwswiljybyyne")
|
|
27
27
|
|
|
28
|
-
def test_can_get_dedicated_accounts(self):
|
|
29
|
-
...
|
|
28
|
+
def test_can_get_dedicated_accounts(self): ...
|
|
30
29
|
|
|
31
|
-
def test_can_get_dedicated_account(self):
|
|
32
|
-
...
|
|
30
|
+
def test_can_get_dedicated_account(self): ...
|
|
33
31
|
|
|
34
|
-
def test_can_requery(self):
|
|
35
|
-
...
|
|
32
|
+
def test_can_requery(self): ...
|
|
36
33
|
|
|
37
|
-
def test_can_deactivate(self):
|
|
38
|
-
...
|
|
34
|
+
def test_can_deactivate(self): ...
|
|
39
35
|
|
|
40
|
-
def test_can_split(self):
|
|
41
|
-
...
|
|
36
|
+
def test_can_split(self): ...
|
|
42
37
|
|
|
43
|
-
def test_can_remove_split(self):
|
|
44
|
-
...
|
|
38
|
+
def test_can_remove_split(self): ...
|
|
45
39
|
|
|
46
40
|
def test_can_get_providers(self):
|
|
47
41
|
# TODO: Test properly.
|
|
48
42
|
response = self.wrapper.get_providers()
|
|
49
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
43
|
+
self.assertEqual(response.status_code, httpx.codes.UNAUTHORIZED)
|
|
@@ -31,24 +31,18 @@ class DisputeTestCase(TestCase):
|
|
|
31
31
|
|
|
32
32
|
def test_can_get_dispute(self):
|
|
33
33
|
# TODO: Test properly.
|
|
34
|
-
|
|
35
|
-
self.assertEqual(response.status_code, httpx.codes.OK)
|
|
34
|
+
...
|
|
36
35
|
|
|
37
36
|
def test_can_get_transaction_disputes(self):
|
|
38
37
|
# TODO: Test properly.
|
|
39
38
|
response = self.wrapper.get_transaction_disputes(id="114782792")
|
|
40
39
|
|
|
41
|
-
def test_can_update_dispute(self):
|
|
42
|
-
...
|
|
40
|
+
def test_can_update_dispute(self): ...
|
|
43
41
|
|
|
44
|
-
def test_can_add_evidence(self):
|
|
45
|
-
...
|
|
42
|
+
def test_can_add_evidence(self): ...
|
|
46
43
|
|
|
47
|
-
def test_can_get_upload_url(self):
|
|
48
|
-
...
|
|
44
|
+
def test_can_get_upload_url(self): ...
|
|
49
45
|
|
|
50
|
-
def test_can_resolve_dispute(self):
|
|
51
|
-
...
|
|
46
|
+
def test_can_resolve_dispute(self): ...
|
|
52
47
|
|
|
53
|
-
def test_can_export_disputes(self):
|
|
54
|
-
...
|
|
48
|
+
def test_can_export_disputes(self): ...
|
|
@@ -104,7 +104,7 @@ class PaymentRequestTestCase(TestCase):
|
|
|
104
104
|
def test_can_finalize(self):
|
|
105
105
|
# TODO: Test Properly
|
|
106
106
|
response = self.wrapper.finalize(id_or_code="PRQ_886l127ke0on6jg")
|
|
107
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
107
|
+
self.assertEqual(response.status_code, httpx.codes.BAD_REQUEST)
|
|
108
108
|
|
|
109
109
|
def test_can_update(self):
|
|
110
110
|
# TODO: Test Properly
|
|
@@ -113,7 +113,7 @@ class PaymentRequestTestCase(TestCase):
|
|
|
113
113
|
amount=300_000,
|
|
114
114
|
customer="CUS_7khpwdrlvde8c6h",
|
|
115
115
|
)
|
|
116
|
-
self.assertEqual(response.status_code, httpx.codes.
|
|
116
|
+
self.assertEqual(response.status_code, httpx.codes.BAD_REQUEST)
|
|
117
117
|
|
|
118
118
|
def test_can_archive(self):
|
|
119
119
|
response = self.wrapper.archive(id_or_code="PRQ_886l127ke0on6jg")
|