From e123a27607abdd6bd7ada98d71112df77aaca6d8 Mon Sep 17 00:00:00 2001 From: David Grayston Date: Tue, 12 Nov 2024 22:22:45 +0000 Subject: [PATCH] feat: Remove card and paypal from payment method notification entities --- paddle_billing/Notifications/Entities/PaymentMethod.py | 6 ------ .../Notifications/Entities/PaymentMethodDeleted.py | 6 ------ 2 files changed, 12 deletions(-) diff --git a/paddle_billing/Notifications/Entities/PaymentMethod.py b/paddle_billing/Notifications/Entities/PaymentMethod.py index 5bf6d11..4339987 100644 --- a/paddle_billing/Notifications/Entities/PaymentMethod.py +++ b/paddle_billing/Notifications/Entities/PaymentMethod.py @@ -4,8 +4,6 @@ from paddle_billing.Notifications.Entities.Entity import Entity from paddle_billing.Notifications.Entities.Shared import ( - Card, - Paypal, SavedPaymentMethodOrigin, SavedPaymentMethodType, ) @@ -17,8 +15,6 @@ class PaymentMethod(Entity): customer_id: str address_id: str type: SavedPaymentMethodType | None - card: Card | None - paypal: Paypal | None origin: SavedPaymentMethodOrigin saved_at: datetime updated_at: datetime @@ -30,8 +26,6 @@ def from_dict(data: dict) -> PaymentMethod: customer_id=data["customer_id"], address_id=data["address_id"], type=SavedPaymentMethodType(data["type"]), - card=Card.from_dict(data["card"]) if data.get("card") else None, - paypal=Paypal.from_dict(data["paypal"]) if data.get("paypal") else None, origin=SavedPaymentMethodOrigin(data["origin"]), saved_at=datetime.fromisoformat(data["saved_at"]), updated_at=datetime.fromisoformat(data["updated_at"]), diff --git a/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py b/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py index 3f12b11..978cf52 100644 --- a/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py +++ b/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py @@ -4,8 +4,6 @@ from paddle_billing.Notifications.Entities.Entity import Entity from paddle_billing.Notifications.Entities.Shared import ( - Card, - Paypal, SavedPaymentMethodDeletionReason, SavedPaymentMethodOrigin, SavedPaymentMethodType, @@ -18,8 +16,6 @@ class PaymentMethodDeleted(Entity): customer_id: str address_id: str type: SavedPaymentMethodType | None - card: Card | None - paypal: Paypal | None origin: SavedPaymentMethodOrigin saved_at: datetime updated_at: datetime @@ -32,8 +28,6 @@ def from_dict(data: dict) -> PaymentMethodDeleted: customer_id=data["customer_id"], address_id=data["address_id"], type=SavedPaymentMethodType(data["type"]), - card=Card.from_dict(data["card"]) if data.get("card") else None, - paypal=Paypal.from_dict(data["paypal"]) if data.get("paypal") else None, origin=SavedPaymentMethodOrigin(data["origin"]), saved_at=datetime.fromisoformat(data["saved_at"]), updated_at=datetime.fromisoformat(data["updated_at"]),