Skip to content

Commit

Permalink
fix(SubscriptionNotification): mark transactionId as non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
danbillson committed Oct 16, 2024
1 parent 122dcc7 commit 0fb1cbf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a

This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards.

## 1.9.1 - 2024-10-16

### Fixed

- Updated `transactionId` in `SubscriptionNotification` to be a non-nullable field.

---

## 1.9.0 - 2024-10-15

### Added

- Added the `trafficSource` filter on notification settings

---

## 1.8.0 - 2024-10-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paddle/paddle-node-sdk",
"version": "1.9.0",
"version": "1.9.1",
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { type CustomData } from '../../../entities';
export class SubscriptionNotification {
public readonly id: string;
public readonly status: SubscriptionStatus;
public readonly transactionId: string | null;
public readonly transactionId: string;
public readonly customerId: string;
public readonly addressId: string;
public readonly businessId: string | null;
Expand All @@ -45,7 +45,7 @@ export class SubscriptionNotification {
constructor(subscription: ISubscriptionNotificationResponse) {
this.id = subscription.id;
this.status = subscription.status;
this.transactionId = subscription.transaction_id ? subscription.transaction_id : null;
this.transactionId = subscription.transaction_id;
this.customerId = subscription.customer_id;
this.addressId = subscription.address_id;
this.businessId = subscription.business_id ? subscription.business_id : null;
Expand Down

0 comments on commit 0fb1cbf

Please sign in to comment.