CustomerSheetInitParamsPatterns extension

Adds pattern-matching-related methods to CustomerSheetInitParams.

on

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

A switch-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 of map that fallback to returning null.
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 of map that fallback to returning orElse.
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 of when that fallback to an orElse callback.
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

A switch-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 of when that fallback to returning null