Skip to content

Commit

Permalink
feat: Remove card and paypal from payment method notification entities
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgrayston-paddle committed Nov 12, 2024
1 parent 4b63b27 commit e123a27
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions paddle_billing/Notifications/Entities/PaymentMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from paddle_billing.Notifications.Entities.Entity import Entity
from paddle_billing.Notifications.Entities.Shared import (
Card,
Paypal,
SavedPaymentMethodOrigin,
SavedPaymentMethodType,
)
Expand All @@ -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
Expand All @@ -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"]),
Expand Down
6 changes: 0 additions & 6 deletions paddle_billing/Notifications/Entities/PaymentMethodDeleted.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from paddle_billing.Notifications.Entities.Entity import Entity
from paddle_billing.Notifications.Entities.Shared import (
Card,
Paypal,
SavedPaymentMethodDeletionReason,
SavedPaymentMethodOrigin,
SavedPaymentMethodType,
Expand All @@ -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
Expand All @@ -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"]),
Expand Down

0 comments on commit e123a27

Please sign in to comment.