PaymentIntentPatterns extension

Adds pattern-matching-related methods to PaymentIntent.

on

Methods

map<TResult extends Object?>(TResult $default(_PaymentIntent value)) → TResult

Available on PaymentIntent, provided by the PaymentIntentPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_PaymentIntent value)?) → TResult?

Available on PaymentIntent, provided by the PaymentIntentPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_PaymentIntent value)?, {required TResult orElse()}) → TResult

Available on PaymentIntent, provided by the PaymentIntentPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String object, int amount, int? amountCapturable, PaymentIntentAmountDetails? amountDetails, int? amountReceived, String? application, int? applicationFeeAmount, PaymentIntentAutomaticPaymentMethods? automaticPaymentMethods, int? canceledAt, PaymentIntentCancellationReason? cancellationReason, String clientSecret, PaymentIntentCaptureMethod captureMethod, PaymentIntentConfirmationMethod confirmationMethod, int? created, String currency, String? customer, String? description, String? invoice, StripeError? lastPaymentError, String? latestCharge, bool livemode, Map<String, dynamic> metadata, dynamic nextAction, String? onBehalfOf, String? paymentMethod, Map paymentMethodOptions, List<PaymentMethodType> paymentMethodTypes, dynamic processing, String? receiptEmail, String? review, PaymentIntentSetupFutureUsage? setupFutureUsage, ShippingDetails? shipping, String? statementDescriptor, String? statementDescriptorSuffix, PaymentIntentsStatus status, dynamic transferData, dynamic transferGroup)?, {required TResult orElse()}) → TResult

Available on PaymentIntent, provided by the PaymentIntentPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(String id, String object, int amount, int? amountCapturable, PaymentIntentAmountDetails? amountDetails, int? amountReceived, String? application, int? applicationFeeAmount, PaymentIntentAutomaticPaymentMethods? automaticPaymentMethods, int? canceledAt, PaymentIntentCancellationReason? cancellationReason, String clientSecret, PaymentIntentCaptureMethod captureMethod, PaymentIntentConfirmationMethod confirmationMethod, int? created, String currency, String? customer, String? description, String? invoice, StripeError? lastPaymentError, String? latestCharge, bool livemode, Map<String, dynamic> metadata, dynamic nextAction, String? onBehalfOf, String? paymentMethod, Map paymentMethodOptions, List<PaymentMethodType> paymentMethodTypes, dynamic processing, String? receiptEmail, String? review, PaymentIntentSetupFutureUsage? setupFutureUsage, ShippingDetails? shipping, String? statementDescriptor, String? statementDescriptorSuffix, PaymentIntentsStatus status, dynamic transferData, dynamic transferGroup)) → TResult

Available on PaymentIntent, provided by the PaymentIntentPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String object, int amount, int? amountCapturable, PaymentIntentAmountDetails? amountDetails, int? amountReceived, String? application, int? applicationFeeAmount, PaymentIntentAutomaticPaymentMethods? automaticPaymentMethods, int? canceledAt, PaymentIntentCancellationReason? cancellationReason, String clientSecret, PaymentIntentCaptureMethod captureMethod, PaymentIntentConfirmationMethod confirmationMethod, int? created, String currency, String? customer, String? description, String? invoice, StripeError? lastPaymentError, String? latestCharge, bool livemode, Map<String, dynamic> metadata, dynamic nextAction, String? onBehalfOf, String? paymentMethod, Map paymentMethodOptions, List<PaymentMethodType> paymentMethodTypes, dynamic processing, String? receiptEmail, String? review, PaymentIntentSetupFutureUsage? setupFutureUsage, ShippingDetails? shipping, String? statementDescriptor, String? statementDescriptorSuffix, PaymentIntentsStatus status, dynamic transferData, dynamic transferGroup)?) → TResult?

Available on PaymentIntent, provided by the PaymentIntentPatterns extension

A variant of when that fallback to returning null