File tree Expand file tree Collapse file tree
ui/src/components/Checkout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ export function CheckoutAccountCredit(): MockScenario {
169169 cycle_days_total : 1 ,
170170 cycle_remaining_percent : 1 ,
171171 } ,
172- payer_credit : {
172+ payer : {
173173 remaining_balance : {
174174 amount : 1 ,
175175 amount_formatted : '100.00' ,
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ const billingCreditsFromJSON = (data: BillingCreditsJSON): BillingCredits => {
2828 cycleRemainingPercent : data . proration . cycle_remaining_percent ,
2929 }
3030 : null ,
31- payerCredit : data . payer_credit
31+ payer : data . payer
3232 ? {
33- remainingBalance : billingMoneyAmountFromJSON ( data . payer_credit . remaining_balance ) ,
34- appliedAmount : billingMoneyAmountFromJSON ( data . payer_credit . applied_amount ) ,
33+ remainingBalance : billingMoneyAmountFromJSON ( data . payer . remaining_balance ) ,
34+ appliedAmount : billingMoneyAmountFromJSON ( data . payer . applied_amount ) ,
3535 }
3636 : null ,
3737 total : billingMoneyAmountFromJSON ( data . total ) ,
Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ export interface BillingPayerCredit {
704704
705705export interface BillingCredits {
706706 proration : BillingProrationCreditDetail | null ;
707- payerCredit : BillingPayerCredit | null ;
707+ payer : BillingPayerCredit | null ;
708708 total : BillingMoneyAmount ;
709709}
710710
Original file line number Diff line number Diff line change @@ -769,7 +769,7 @@ export interface BillingPayerCreditJSON {
769769 */
770770export interface BillingCreditsJSON {
771771 proration : BillingProrationCreditDetailJSON | null ;
772- payer_credit : BillingPayerCreditJSON | null ;
772+ payer : BillingPayerCreditJSON | null ;
773773 total : BillingMoneyAmountJSON ;
774774}
775775
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ export const CheckoutForm = withCardStateProvider(() => {
3636 }
3737
3838 const showProratedCredit = ! ! totals . credits ?. proration ?. amount && totals . credits . proration . amount . amount > 0 ;
39- const showAccountCredits =
40- ! ! totals . credits ?. payerCredit ?. appliedAmount && totals . credits . payerCredit . appliedAmount . amount > 0 ;
39+ const showAccountCredits = ! ! totals . credits ?. payer ?. appliedAmount && totals . credits . payer . appliedAmount . amount > 0 ;
4140 const showPastDue = ! ! totals . pastDue ?. amount && totals . pastDue . amount > 0 ;
4241 const showDowngradeInfo = ! isImmediatePlanChange ;
4342
@@ -92,7 +91,7 @@ export const CheckoutForm = withCardStateProvider(() => {
9291 < LineItems . Group variant = 'tertiary' >
9392 < LineItems . Title title = { localizationKeys ( 'billing.payerCreditRemainder' ) } />
9493 < LineItems . Description
95- text = { `- ${ totals . credits ?. payerCredit ?. appliedAmount ?. currencySymbol } ${ totals . credits ?. payerCredit ?. appliedAmount ?. amountFormatted } ` }
94+ text = { `- ${ totals . credits ?. payer ?. appliedAmount ?. currencySymbol } ${ totals . credits ?. payer ?. appliedAmount ?. amountFormatted } ` }
9695 />
9796 </ LineItems . Group >
9897 ) }
You can’t perform that action at this time.
0 commit comments