PaymentMethod constructor
- @JsonSerializable(explicitToJson: true)
const
PaymentMethod(
{ - required String id,
- @Default("payment_method") String object,
- BillingDetails? billingDetails,
- String? customer,
- @Default({}) Map<String, dynamic> metadata,
- @Default(true) bool livemode,
- int? created,
- CardPaymentMethod? card,
- SepaDebit? sepaDebit,
- BacsDebit? bacsDebit,
- AuBecsDebit? auBecsDebit,
- Sofort? sofort,
- Ideal? ideal,
- Fpx? fpx,
- Upi? upi,
- UsBankAccount? usBankAccount,
- required PaymentMethodType type,
})
Implementation
@JsonSerializable(explicitToJson: true)
const factory PaymentMethod({
/// Unique identifier for the object.
required String id,
/// String representing the object’s type.
/// Objects of the same type share the same value.
@Default("payment_method") String object,
/// Billing information associated with the PaymentMethod that may be used
/// or required by particular types of payment methods.
BillingDetails? billingDetails,
/// The ID of the Customer to which this PaymentMethod is saved.
/// This will not be set when the PaymentMethod has not been saved to a
/// Customer.
String? customer,
/// Set of key-value pairs that you can attach to an object.
/// This can be useful for storing additional information about the object
/// in a structured format.
@Default({}) Map<String, dynamic> metadata,
/// Has the value true if the object exists in live mode or the value false
/// if the object exists in test mode.
@Default(true) bool livemode,
/// Time at which the object was created.
/// Measured in seconds since the Unix epoch.
int? created,
/// Containing additional data in case paymentmethod type is card.
CardPaymentMethod? card,
/// Containing additional data in case paymentmethod type is sepa.
SepaDebit? sepaDebit,
/// Containing additional data in case paymentmethod type is Bacs debit.
BacsDebit? bacsDebit,
/// Containing additional data in case paymentmethod type is Aubecs debit.
AuBecsDebit? auBecsDebit,
/// Containing additional data in case paymentmethod type is sofort.
Sofort? sofort,
/// Containing additional data in case paymentmethod type is Ideal.
Ideal? ideal,
/// Containing additional data in case paymentmethod type is FPX.
Fpx? fpx,
/// Containing additional data in case paymentmethod type is UPI.
Upi? upi,
UsBankAccount? usBankAccount,
/// The type of the PaymentMethod.
/// An additional hash is included on the PaymentMethod with a name
/// matching this value.
/// It contains additional information specific to the PaymentMethod type.
required PaymentMethodType type,
}) = _PaymentMethod;