Skip to content

Commit 262bd9d

Browse files
authored
[Release] v3.5.0 (#203)
1 parent f7bde25 commit 262bd9d

25 files changed

+129
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ in a response, this weakens the Typescript type but does not cause existing usag
2020
This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by
2121
adding additional type guards.
2222

23-
## [unreleased]
23+
## 3.5.0 - 2025-12-16
2424

2525
### Added
2626

27+
- Added support for `location` value in `tax_mode` enum to automatically present prices as inclusive or exclusive of tax based on customer location. See [related changelog](https://developer.paddle.com/changelog/2025/default-automatic-tax-setting?utm_source=dx&utm_medium=paddle-node-sdk)
28+
- Added support for `requiresPaymentMethod` field in trial period to specify whether a payment method is required during trial
29+
- Added `remittanceReference` field to payout notification entity
2730
- Added new report filter names `remittance_reference` and `transaction_updated_at`. See [related changelog](https://developer.paddle.com/changelog/2025/payout-reconciliation-report?utm_source=dx&utm_medium=paddle-node-sdk).
2831
- Added `payout_reconciliation` report type. See [related changelog](https://developer.paddle.com/changelog/2025/payout-reconciliation-report?utm_source=dx&utm_medium=paddle-node-sdk).
2932

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@paddle/paddle-node-sdk",
3-
"version": "3.4.0",
3+
"version": "3.5.0",
44
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
55
"main": "dist/cjs/index.cjs.node.js",
66
"module": "dist/esm/index.esm.node.js",

src/entities/price/price.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import { type CatalogType, type Status, type TaxMode } from '../../enums/index.js';
8-
import { ImportMeta, Money, TimePeriod, UnitPriceOverride } from '../shared/index.js';
8+
import { ImportMeta, Money, TimePeriod, TrialPeriod, UnitPriceOverride } from '../shared/index.js';
99
import { PriceQuantity } from './price-quantity.js';
1010
import { type ICustomData, type IPriceResponse } from '../../types/index.js';
1111
import { Product } from '../product/index.js';
@@ -17,7 +17,7 @@ export class Price {
1717
public readonly name: string | null;
1818
public readonly type: CatalogType;
1919
public readonly billingCycle: TimePeriod | null;
20-
public readonly trialPeriod: TimePeriod | null;
20+
public readonly trialPeriod: TrialPeriod | null;
2121
public readonly taxMode: TaxMode;
2222
public readonly unitPrice: Money;
2323
public readonly unitPriceOverrides: UnitPriceOverride[];
@@ -36,7 +36,7 @@ export class Price {
3636
this.type = price.type;
3737
this.name = price.name ? price.name : null;
3838
this.billingCycle = price.billing_cycle ? new TimePeriod(price.billing_cycle) : null;
39-
this.trialPeriod = price.trial_period ? new TimePeriod(price.trial_period) : null;
39+
this.trialPeriod = price.trial_period ? new TrialPeriod(price.trial_period) : null;
4040
this.taxMode = price.tax_mode;
4141
this.unitPrice = new Money(price.unit_price);
4242
this.unitPriceOverrides =

src/entities/shared/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
export * from './time-period.js';
8+
export * from './trial-period.js';
89
export * from './money.js';
910
export * from './unit-price-override.js';
1011
export * from './billing-details.js';
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* ! Autogenerated code !
3+
* Do not make changes to this file.
4+
* Changes may be overwritten as part of auto-generation.
5+
*/
6+
7+
import { type Interval } from '../../enums/index.js';
8+
import { type ITrialPeriodResponse } from '../../types/index.js';
9+
10+
export class TrialPeriod {
11+
public readonly interval: Interval;
12+
public readonly frequency: number;
13+
public readonly requiresPaymentMethod: boolean | undefined;
14+
15+
constructor(trialPeriod: ITrialPeriodResponse) {
16+
this.interval = trialPeriod.interval;
17+
this.frequency = trialPeriod.frequency;
18+
this.requiresPaymentMethod = trialPeriod.requires_payment_method;
19+
}
20+
}

src/enums/shared/tax-mode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* Changes may be overwritten as part of auto-generation.
55
*/
66

7-
export type TaxMode = 'account_setting' | 'external' | 'internal';
7+
export type TaxMode = 'account_setting' | 'external' | 'internal' | 'location';

src/notifications/entities/payout/payout-notification.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ import { type IPayoutNotificationResponse } from '../../types/index.js';
99

1010
export class PayoutNotification {
1111
public readonly id: string;
12+
public readonly remittanceReference: string;
1213
public readonly status: PayoutStatus;
1314
public readonly amount: string;
1415
public readonly currencyCode: CurrencyCode;
1516

1617
constructor(payout: IPayoutNotificationResponse) {
1718
this.id = payout.id;
19+
this.remittanceReference = payout.remittance_reference;
1820
this.status = payout.status;
1921
this.amount = payout.amount;
2022
this.currencyCode = payout.currency_code;

src/notifications/entities/price/price-notification.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ImportMetaNotification,
1010
MoneyNotification,
1111
TimePeriodNotification,
12+
TrialPeriodNotification,
1213
UnitPriceOverrideNotification,
1314
} from '../shared/index.js';
1415
import { PriceQuantityNotification } from './price-quantity-notification.js';
@@ -22,7 +23,7 @@ export class PriceNotification {
2223
public readonly name: string | null;
2324
public readonly type: CatalogType | null;
2425
public readonly billingCycle: TimePeriodNotification | null;
25-
public readonly trialPeriod: TimePeriodNotification | null;
26+
public readonly trialPeriod: TrialPeriodNotification | null;
2627
public readonly taxMode: TaxMode;
2728
public readonly unitPrice: MoneyNotification;
2829
public readonly unitPriceOverrides: UnitPriceOverrideNotification[];
@@ -40,7 +41,7 @@ export class PriceNotification {
4041
this.type = price.type ? price.type : null;
4142
this.name = price.name ? price.name : null;
4243
this.billingCycle = price.billing_cycle ? new TimePeriodNotification(price.billing_cycle) : null;
43-
this.trialPeriod = price.trial_period ? new TimePeriodNotification(price.trial_period) : null;
44+
this.trialPeriod = price.trial_period ? new TrialPeriodNotification(price.trial_period) : null;
4445
this.taxMode = price.tax_mode;
4546
this.unitPrice = new MoneyNotification(price.unit_price);
4647
this.unitPriceOverrides =

src/notifications/entities/shared/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
export * from './time-period-notification.js';
8+
export * from './trial-period-notification.js';
89
export * from './money-notification.js';
910
export * from './unit-price-override-notification.js';
1011
export * from './billing-details-notification.js';
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* ! Autogenerated code !
3+
* Do not make changes to this file.
4+
* Changes may be overwritten as part of auto-generation.
5+
*/
6+
7+
import { type Interval } from '../../../enums/index.js';
8+
import { type ITrialPeriodNotificationResponse } from '../../types/index.js';
9+
10+
export class TrialPeriodNotification {
11+
public readonly interval: Interval;
12+
public readonly frequency: number;
13+
public readonly requiresPaymentMethod: boolean | undefined;
14+
15+
constructor(trialPeriod: ITrialPeriodNotificationResponse) {
16+
this.interval = trialPeriod.interval;
17+
this.frequency = trialPeriod.frequency;
18+
this.requiresPaymentMethod = trialPeriod.requires_payment_method;
19+
}
20+
}

0 commit comments

Comments
 (0)