CustomerSheetInitParamsPatterns extension
Adds pattern-matching-related methods to CustomerSheetInitParams.
Methods
-
map<
TResult extends Object?> (TResult $default(_CustomerSheetInitParamsDeprecated value), {required TResult adapter(_CustomerSheetInitParamsAdapter value), required TResult session(_CustomerSheetInitParamsSession value)}) → TResult -
Available on CustomerSheetInitParams, provided by the CustomerSheetInitParamsPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_CustomerSheetInitParamsDeprecated value)?, {TResult? adapter(_CustomerSheetInitParamsAdapter value)?, TResult? session(_CustomerSheetInitParamsSession value)?}) → TResult? -
Available on CustomerSheetInitParams, provided by the CustomerSheetInitParamsPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_CustomerSheetInitParamsDeprecated value)?, {TResult adapter(_CustomerSheetInitParamsAdapter value)?, TResult session(_CustomerSheetInitParamsSession value)?, required TResult orElse()}) → TResult -
Available on CustomerSheetInitParams, provided by the CustomerSheetInitParamsPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(ThemeMode? style, PaymentSheetAppearance? appearance, String? setupIntentClientSecret, String customerId, String customerEphemeralKeySecret, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List< CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance, bool? opensCardScannerAutomatically)?, {TResult adapter(String? setupIntentClientSecret, String customerId, IntentConfiguration? intentConfiguration, String? customerEphemeralKeySecret, ThemeMode? style, PaymentSheetAppearance? appearance, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List<CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance)?, TResult session(String? setupIntentClientSecret, String? customerId, IntentConfiguration intentConfiguration, String? customerEphemeralKeySecret, ThemeMode? style, PaymentSheetAppearance? appearance, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List<CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance)?, required TResult orElse()}) → TResult -
Available on CustomerSheetInitParams, provided by the CustomerSheetInitParamsPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> (TResult $default(ThemeMode? style, PaymentSheetAppearance? appearance, String? setupIntentClientSecret, String customerId, String customerEphemeralKeySecret, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List< CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance, bool? opensCardScannerAutomatically), {required TResult adapter(String? setupIntentClientSecret, String customerId, IntentConfiguration? intentConfiguration, String? customerEphemeralKeySecret, ThemeMode? style, PaymentSheetAppearance? appearance, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List<CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance), required TResult session(String? setupIntentClientSecret, String? customerId, IntentConfiguration intentConfiguration, String? customerEphemeralKeySecret, ThemeMode? style, PaymentSheetAppearance? appearance, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List<CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance)}) → TResult -
Available on CustomerSheetInitParams, provided by the CustomerSheetInitParamsPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(ThemeMode? style, PaymentSheetAppearance? appearance, String? setupIntentClientSecret, String customerId, String customerEphemeralKeySecret, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List< CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance, bool? opensCardScannerAutomatically)?, {TResult? adapter(String? setupIntentClientSecret, String customerId, IntentConfiguration? intentConfiguration, String? customerEphemeralKeySecret, ThemeMode? style, PaymentSheetAppearance? appearance, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List<CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance)?, TResult? session(String? setupIntentClientSecret, String? customerId, IntentConfiguration intentConfiguration, String? customerEphemeralKeySecret, ThemeMode? style, PaymentSheetAppearance? appearance, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, bool applePayEnabled, bool googlePayEnabled, List<CardBrand> ? preferredNetworks, CardBrandAcceptance? cardBrandAcceptance)?}) → TResult? -
Available on CustomerSheetInitParams, provided by the CustomerSheetInitParamsPatterns extension
A variant ofwhenthat fallback to returningnull