BillingDetailsCollectionConfiguration constructor

  1. @JsonSerializable(explicitToJson: true)
const BillingDetailsCollectionConfiguration({
  1. CollectionMode? name,
  2. CollectionMode? phone,
  3. CollectionMode? email,
  4. AddressCollectionMode? address,
  5. bool? attachDefaultsToPaymentMethod,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory BillingDetailsCollectionConfiguration({
  /// How to collect the name field.
  ///
  /// Defaults to `CollectionMode.automatic`.
  CollectionMode? name,

  /// How to collect the phone field.
  ///
  /// Defaults to `CollectionMode.automatic`.
  CollectionMode? phone,

  /// How to collect the email field.
  ///
  /// Defaults to `CollectionMode.automatic`.
  CollectionMode? email,

  /// How to collect the billing address.
  ///
  /// Defaults to `CollectionMode.automatic`.
  AddressCollectionMode? address,

  /// Whether the values included in `Configuration.defaultBillingDetails` should be attached to the payment method, this includes fields that aren't displayed in the form.
  ///
  /// If `false` (the default), those values will only be used to prefill the corresponding fields in the form.
  bool? attachDefaultsToPaymentMethod,
}) = _BillingDetailsCollectionConfiguration;