Refactor UpdatePaymentSerializer to include only number_of_months field, add DeletePaymentView for payment deletion, and enhance VerifyPaymentView with payment_id lookup. Introduce pending_payment_id field in DeviceSerializer to track unpaid payments.
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 2m18s

This commit is contained in:
2025-04-08 21:38:43 +05:00
parent c3abdd8e34
commit 9595476569
4 changed files with 52 additions and 16 deletions

View File

@ -5,6 +5,7 @@ from .views import (
VerifyPaymentView,
PaymentDetailAPIView,
UpdatePaymentAPIView,
DeletePaymentView,
)
urlpatterns = [
@ -15,5 +16,12 @@ urlpatterns = [
UpdatePaymentAPIView.as_view(),
name="update-payment",
),
path("verify-payment/", VerifyPaymentView.as_view(), name="verify-payment"),
path(
"payment/<str:pk>/delete/",
DeletePaymentView.as_view(),
name="delete-payment",
),
path(
"payment/<str:pk>/verify/", VerifyPaymentView.as_view(), name="verify-payment"
),
]