Skip to content

Commit

Permalink
Enrollment confirmation banner (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbents authored Aug 1, 2023
1 parent 0827a6d commit 0effc79
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export interface RevolutCheckoutInstance {
option: RevolutPaymentsModuleOptions
) => RevolutPaymentsModuleInstance
/** The upsell SDK module */
upsell: (option: RevolutUpsellModuleOptions) => RevolutPaymentsModuleInstance
upsell: (option: RevolutUpsellModuleOptions) => RevolutUpsellModuleInstance
}

export interface RevolutPaymentsModuleInstance {
Expand Down Expand Up @@ -685,6 +685,8 @@ export interface RevolutUpsellModuleInstance {
cardGatewayBanner: UpsellModuleCardGatewayBannerInstance
/** Promotional banner */
promotionalBanner: UpsellModulePromotionalBannerInstance
/** Enrollment confirmation banner */
enrollmentConfirmationBanner: UpsellModuleEnrollmentConfirmationBannerInstance
/** Manually destroy the instance */
destroy: () => void
/** Controls the language of the text in the widget */
Expand Down Expand Up @@ -729,6 +731,24 @@ export interface WidgetUpsellPromotionalBannerOptions {
}
}

export interface UpsellModuleEnrollmentConfirmationBannerInstance {
mount: (
target: string | HTMLElement,
options: WidgetUpsellEnrollmentConfirmationBannerOptions
) => void
destroy: () => void
}

export interface WidgetUpsellEnrollmentConfirmationBannerOptions {
orderToken: string
/** Prefilled customer details within the banner */
customer?: Partial<CustomerDetails>
/** Whether promotional banner should be shown if user has not enrolled */
promotionalBanner?: boolean
/** Style object for promotional banner customisation */
promotionalBannerStyle?: WidgetUpsellPromotionalBannerOptions['style']
}

export interface RevolutUpsellModuleOptions {
publicToken: string
locale?: string | 'auto'
Expand Down

0 comments on commit 0effc79

Please sign in to comment.