Skip to content

Commit

Permalink
fix: Subscription notification should always return billing period wh…
Browse files Browse the repository at this point in the history
…en set (#75)
  • Loading branch information
davidgrayston-paddle authored Nov 20, 2024
1 parent 337ee58 commit d1341ee
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ 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.

## [Unreleased]
## 1.1.2 - 2024-11-20

### Added
- Added `traffic_source` property to `paddle_billing.Entities.NotificationSetting` entity
### Fixed
- `paddle_billing.Notifications.Entities.Subscription` and `paddle_billing.Notifications.Entities.SubscriptionCreated` `current_billing_period` would return `None` if `billing_details` was `None`. `current_billing_period` will now return `TimePeriod` when set.

## 1.1.1 - 2024-11-14

Expand Down
2 changes: 1 addition & 1 deletion paddle_billing/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.1",
"User-Agent": "PaddleSDK/python 1.1.2",
}
)

Expand Down
2 changes: 1 addition & 1 deletion paddle_billing/Notifications/Entities/Subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def from_dict(data: dict) -> Subscription:
paused_at=datetime.fromisoformat(data["paused_at"]) if data.get("paused_at") else None,
started_at=datetime.fromisoformat(data["started_at"]) if data.get("started_at") else None,
current_billing_period=(
TimePeriod.from_dict(data["current_billing_period"]) if data.get("billing_details") else None
TimePeriod.from_dict(data["current_billing_period"]) if data.get("current_billing_period") else None
),
scheduled_change=(
SubscriptionScheduledChange.from_dict(data["scheduled_change"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def from_dict(data: dict) -> SubscriptionCreated:
paused_at=datetime.fromisoformat(data["paused_at"]) if data.get("paused_at") else None,
started_at=datetime.fromisoformat(data["started_at"]) if data.get("started_at") else None,
current_billing_period=(
TimePeriod.from_dict(data["current_billing_period"]) if data.get("billing_details") else None
TimePeriod.from_dict(data["current_billing_period"]) if data.get("current_billing_period") else None
),
scheduled_change=(
SubscriptionScheduledChange.from_dict(data["scheduled_change"])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


setup(
version="1.1.1",
version="1.1.2",
author="Paddle and contributors",
author_email="[email protected]",
description="Paddle's Python SDK for Paddle Billing",
Expand Down

0 comments on commit d1341ee

Please sign in to comment.