PaymentMethod constructor
- @JsonSerializable(explicitToJson: true)
const
PaymentMethod(
{ - required String id,
- required bool livemode,
- required String paymentMethodType,
- required BillingDetails billingDetails,
- @JsonKey(name: 'Card') required Card card,
- @JsonKey(name: 'SepaDebit') required SepaDebit sepaDebit,
- @JsonKey(name: 'BacsDebit') required BacsDebit bacsDebit,
- @JsonKey(name: 'AuBecsDebit') required AuBecsDebit auBecsDebit,
- @JsonKey(name: 'Sofort') required Sofort sofort,
- @JsonKey(name: 'Ideal') required Ideal ideal,
- @JsonKey(name: 'Fpx') required Fpx fpx,
- @JsonKey(name: 'Upi') required Upi upi,
- @JsonKey(name: 'USBankAccount') required UsBankAccount usBankAccount,
- String? customerId,
})
Implementation
@JsonSerializable(explicitToJson: true)
const factory PaymentMethod({
/// Unique identifier.
required String id,
/// Whether or not the object exists in livemode.
required bool livemode,
/// The type of the paymentmethod.
required String paymentMethodType,
/// Billing information related to the payment method.
required BillingDetails billingDetails,
/// Containing additional data in case paymentmethod type is card.
@JsonKey(name: 'Card') required Card card,
/// Containing additional data in case paymentmethod type is sepa.
@JsonKey(name: 'SepaDebit') required SepaDebit sepaDebit,
/// Containing additional data in case paymentmethod type is Bacs debit.
@JsonKey(name: 'BacsDebit') required BacsDebit bacsDebit,
/// Containing additional data in case paymentmethod type is Aubecs debit.
@JsonKey(name: 'AuBecsDebit') required AuBecsDebit auBecsDebit,
/// Containing additional data in case paymentmethod type is sofort.
@JsonKey(name: 'Sofort') required Sofort sofort,
/// Containing additional data in case paymentmethod type is Ideal.
@JsonKey(name: 'Ideal') required Ideal ideal,
/// Containing additional data in case paymentmethod type is FPX.
@JsonKey(name: 'Fpx') required Fpx fpx,
/// Containing additional data in case paymentmethod type is UPI.
@JsonKey(name: 'Upi') required Upi upi,
/// Containing additional data in case paymentmethod type is Us bank account.
@JsonKey(name: 'USBankAccount') required UsBankAccount usBankAccount,
/// Id related to the customer to which this paymentmethod has been saved.
String? customerId,
}) = _PaymentMethod;