File tree Expand file tree Collapse file tree 6 files changed +17
-9
lines changed
Expand file tree Collapse file tree 6 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a
1212
1313This 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.
1414
15+ ## 1.2.1 - 2024-03-20
16+
17+ ### Fixed
18+
19+ - Handled missing ` unitPriceOverrides ` in the ` subscriptions.getPaymentMethodChangeTransaction ` operation.
20+
21+ ---
22+
1523## 1.2.0 - 2024-03-19
1624
1725### Changed
Original file line number Diff line number Diff line change 11{
22 "name" : " @paddle/paddle-node-sdk" ,
3- "version" : " 1.2.0 " ,
3+ "version" : " 1.2.1 " ,
44 "description" : " A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript." ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -37,9 +37,8 @@ export class Price {
3737 this . trialPeriod = price . trial_period ? new TimePeriod ( price . trial_period ) : null ;
3838 this . taxMode = price . tax_mode ;
3939 this . unitPrice = new Money ( price . unit_price ) ;
40- this . unitPriceOverrides = price . unit_price_overrides . map (
41- ( unit_price_override ) => new UnitPriceOverride ( unit_price_override ) ,
42- ) ;
40+ this . unitPriceOverrides =
41+ price . unit_price_overrides ?. map ( ( unit_price_override ) => new UnitPriceOverride ( unit_price_override ) ) ?? [ ] ;
4342 this . quantity = new PriceQuantity ( price . quantity ) ;
4443 this . status = price . status ;
4544 this . createdAt = price . created_at ;
Original file line number Diff line number Diff line change @@ -43,9 +43,10 @@ export class PriceNotification {
4343 this . trialPeriod = price . trial_period ? new TimePeriodNotification ( price . trial_period ) : null ;
4444 this . taxMode = price . tax_mode ;
4545 this . unitPrice = new MoneyNotification ( price . unit_price ) ;
46- this . unitPriceOverrides = price . unit_price_overrides . map (
47- ( unit_price_override ) => new UnitPriceOverrideNotification ( unit_price_override ) ,
48- ) ;
46+ this . unitPriceOverrides =
47+ price . unit_price_overrides ?. map (
48+ ( unit_price_override ) => new UnitPriceOverrideNotification ( unit_price_override ) ,
49+ ) ?? [ ] ;
4950 this . quantity = new PriceQuantityNotification ( price . quantity ) ;
5051 this . status = price . status ;
5152 this . createdAt = price . created_at ?? null ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export interface IPriceNotificationResponse {
2525 trial_period ?: ITimePeriodNotification | null ;
2626 tax_mode : TaxMode ;
2727 unit_price : IMoneyNotificationResponse ;
28- unit_price_overrides : IUnitPriceOverrideNotificationResponse [ ] ;
28+ unit_price_overrides : IUnitPriceOverrideNotificationResponse [ ] | null ;
2929 quantity : IPriceQuantityNotification ;
3030 status : Status ;
3131 created_at ?: string | null ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export interface IPriceResponse {
2525 trial_period ?: ITimePeriod | null ;
2626 tax_mode : TaxMode ;
2727 unit_price : IMoneyResponse ;
28- unit_price_overrides : IUnitPriceOverrideResponse [ ] ;
28+ unit_price_overrides : IUnitPriceOverrideResponse [ ] | null ;
2929 quantity : IPriceQuantity ;
3030 status : Status ;
3131 created_at : string ;
You can’t perform that action at this time.
0 commit comments