StripeError class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
- StripeError({String? type, String? code, String? decline_code, String? message, String? param})
-
constfactory
-
StripeError.fromJson(Map<
String, dynamic> json) -
factory
Properties
- code → String?
-
For some errors that could be handled programmatically,
a short string indicating the error code reported.
no setterinherited
-
copyWith
→ $StripeErrorCopyWith<
StripeError> -
Create a copy of StripeError
with the given fields replaced by the non-null parameter values.
no setterinherited
- decline_code → String?
-
For card errors resulting from a card issuer decline, a short string
indicating the card issuer’s reason for the decline if they provide one.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
A human-readable message providing more details about the error.
For card errors, these messages can be shown to your users.
no setterinherited
- param → String?
-
If the error is parameter-specific, the parameter related to the error.
For example, you can use this to display a message near the correct form
field.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String?
-
The type of error returned. One of api_error, card_error,
idempotency_error, or invalid_request_error
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_PaymentElementChangeEvent value)) → TResult -
Available on StripeError, provided by the StripeErrorPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PaymentElementChangeEvent value)?) → TResult? -
Available on StripeError, provided by the StripeErrorPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_PaymentElementChangeEvent value)?, {required TResult orElse()}) → TResult -
Available on StripeError, provided by the StripeErrorPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String? type, String? code, String? decline_code, String? message, String? param)?, {required TResult orElse()}) → TResult -
Available on StripeError, provided by the StripeErrorPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this StripeError to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String? type, String? code, String? decline_code, String? message, String? param)) → TResult -
Available on StripeError, provided by the StripeErrorPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String? type, String? code, String? decline_code, String? message, String? param)?) → TResult? -
Available on StripeError, provided by the StripeErrorPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited