From c3d76e85325e756983e42bf98bdec2bffb8bb1e9 Mon Sep 17 00:00:00 2001 From: davidgrayston-paddle Date: Thu, 14 Nov 2024 20:44:23 +0000 Subject: [PATCH] fix: PaymentMethod type property is required (#69) --- CHANGELOG.md | 6 ++++++ paddle_billing/Client.py | 2 +- paddle_billing/Entities/PaymentMethod.py | 2 +- paddle_billing/Notifications/Entities/PaymentMethod.py | 2 +- .../Notifications/Entities/PaymentMethodDeleted.py | 2 +- setup.py | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db431e..e1dd646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-python-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools. +## 1.1.1 - 2024-11-14 + +### Fixed + +- `paddle_billing.Entities.PaymentMethod` `type` property is required + ## 1.1.0 - 2024-11-14 ### Added diff --git a/paddle_billing/Client.py b/paddle_billing/Client.py index bd223e2..cff5fb8 100644 --- a/paddle_billing/Client.py +++ b/paddle_billing/Client.py @@ -202,7 +202,7 @@ def build_request_session(self) -> Session: "Authorization": f"Bearer {self.__api_key}", "Content-Type": "application/json", "Paddle-Version": str(self.use_api_version), - "User-Agent": "PaddleSDK/python 1.1.0", + "User-Agent": "PaddleSDK/python 1.1.1", } ) diff --git a/paddle_billing/Entities/PaymentMethod.py b/paddle_billing/Entities/PaymentMethod.py index f8552e8..355d98a 100644 --- a/paddle_billing/Entities/PaymentMethod.py +++ b/paddle_billing/Entities/PaymentMethod.py @@ -16,7 +16,7 @@ class PaymentMethod(Entity): id: str customer_id: str address_id: str - type: SavedPaymentMethodType | None + type: SavedPaymentMethodType card: Card | None paypal: Paypal | None origin: SavedPaymentMethodOrigin diff --git a/paddle_billing/Notifications/Entities/PaymentMethod.py b/paddle_billing/Notifications/Entities/PaymentMethod.py index 4339987..30f526c 100644 --- a/paddle_billing/Notifications/Entities/PaymentMethod.py +++ b/paddle_billing/Notifications/Entities/PaymentMethod.py @@ -14,7 +14,7 @@ class PaymentMethod(Entity): id: str customer_id: str address_id: str - type: SavedPaymentMethodType | None + type: SavedPaymentMethodType origin: SavedPaymentMethodOrigin saved_at: datetime updated_at: datetime diff --git a/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py b/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py index 978cf52..bcad835 100644 --- a/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py +++ b/paddle_billing/Notifications/Entities/PaymentMethodDeleted.py @@ -15,7 +15,7 @@ class PaymentMethodDeleted(Entity): id: str customer_id: str address_id: str - type: SavedPaymentMethodType | None + type: SavedPaymentMethodType origin: SavedPaymentMethodOrigin saved_at: datetime updated_at: datetime diff --git a/setup.py b/setup.py index 605d94e..9861e57 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( - version="1.1.0", + version="1.1.1", author="Paddle and contributors", author_email="team-dx@paddle.com", description="Paddle's Python SDK for Paddle Billing",