PaymentMethod class abstract

Representation of the payment instruments. See https://stripe.com/docs/payments/payment-methods for more info.

Available extensions
Annotations
  • @freezed

Constructors

PaymentMethod({required String id, required bool livemode, required String paymentMethodType, required BillingDetails billingDetails, @JsonKey.new(name: 'Card') required Card card, @JsonKey.new(name: 'SepaDebit') required SepaDebit sepaDebit, @JsonKey.new(name: 'BacsDebit') required BacsDebit bacsDebit, @JsonKey.new(name: 'AuBecsDebit') required AuBecsDebit auBecsDebit, @JsonKey.new(name: 'Ideal') required Ideal ideal, @JsonKey.new(name: 'Fpx') required Fpx fpx, @JsonKey.new(name: 'Upi') required Upi upi, @JsonKey.new(name: 'USBankAccount') required UsBankAccount usBankAccount, String? customerId})
const
factory
PaymentMethod.fromJson(Map<String, dynamic> json)
factory

Properties

auBecsDebit AuBecsDebit
Containing additional data in case paymentmethod type is Aubecs debit.
no setterinherited
bacsDebit BacsDebit
Containing additional data in case paymentmethod type is Bacs debit.
no setterinherited
billingDetails BillingDetails
Billing information related to the payment method.
no setterinherited
card Card
Containing additional data in case paymentmethod type is card.
no setterinherited
copyWith → $PaymentMethodCopyWith<PaymentMethod>
Create a copy of PaymentMethod with the given fields replaced by the non-null parameter values.
no setterinherited
customerId String?
Id related to the customer to which this paymentmethod has been saved.
no setterinherited
fpx Fpx
Containing additional data in case paymentmethod type is FPX.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier.
no setterinherited
ideal Ideal
Containing additional data in case paymentmethod type is Ideal.
no setterinherited
livemode bool
Whether or not the object exists in livemode.
no setterinherited
paymentMethodType String
The type of the paymentmethod.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sepaDebit SepaDebit
Containing additional data in case paymentmethod type is sepa.
no setterinherited
upi Upi
Containing additional data in case paymentmethod type is UPI.
no setterinherited
usBankAccount UsBankAccount
Containing additional data in case paymentmethod type is Us bank account.
no setterinherited

Methods

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

Available on PaymentMethod, provided by the PaymentMethodPatterns extension

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

Available on PaymentMethod, provided by the PaymentMethodPatterns extension

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

Available on PaymentMethod, provided by the PaymentMethodPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, bool livemode, String paymentMethodType, BillingDetails billingDetails, Card card, SepaDebit sepaDebit, BacsDebit bacsDebit, AuBecsDebit auBecsDebit, Ideal ideal, Fpx fpx, Upi upi, UsBankAccount usBankAccount, String? customerId)?, {required TResult orElse()}) → TResult

Available on PaymentMethod, provided by the PaymentMethodPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this PaymentMethod to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, bool livemode, String paymentMethodType, BillingDetails billingDetails, Card card, SepaDebit sepaDebit, BacsDebit bacsDebit, AuBecsDebit auBecsDebit, Ideal ideal, Fpx fpx, Upi upi, UsBankAccount usBankAccount, String? customerId)) → TResult

Available on PaymentMethod, provided by the PaymentMethodPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, bool livemode, String paymentMethodType, BillingDetails billingDetails, Card card, SepaDebit sepaDebit, BacsDebit bacsDebit, AuBecsDebit auBecsDebit, Ideal ideal, Fpx fpx, Upi upi, UsBankAccount usBankAccount, String? customerId)?) → TResult?

Available on PaymentMethod, provided by the PaymentMethodPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited