@@ -8,13 +8,7 @@ import type {
88} from '@clerk/types' ;
99
1010import { commerceTotalsFromJSON } from '../../utils' ;
11- import {
12- BaseResource ,
13- CommercePaymentSource ,
14- CommercePlan ,
15- CommerceSubscription ,
16- isClerkAPIResponseError ,
17- } from './internal' ;
11+ import { BaseResource , CommercePaymentSource , CommercePlan , isClerkAPIResponseError } from './internal' ;
1812
1913export class CommerceCheckout extends BaseResource implements CommerceCheckoutResource {
2014 id ! : string ;
@@ -24,8 +18,8 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe
2418 paymentSource ?: CommercePaymentSource ;
2519 plan ! : CommercePlan ;
2620 planPeriod ! : CommerceSubscriptionPlanPeriod ;
21+ planPeriodStart ! : number | undefined ;
2722 status ! : string ;
28- subscription ?: CommerceSubscription ;
2923 totals ! : CommerceCheckoutTotals ;
3024 isImmediatePlanChange ! : boolean ;
3125
@@ -47,8 +41,8 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe
4741 this . paymentSource = data . payment_source ? new CommercePaymentSource ( data . payment_source ) : undefined ;
4842 this . plan = new CommercePlan ( data . plan ) ;
4943 this . planPeriod = data . plan_period ;
44+ this . planPeriodStart = data . plan_period_start ;
5045 this . status = data . status ;
51- this . subscription = data . subscription ? new CommerceSubscription ( data . subscription ) : undefined ;
5246 this . totals = commerceTotalsFromJSON ( data . totals ) ;
5347 this . isImmediatePlanChange = data . is_immediate_plan_change ;
5448 return this ;
0 commit comments