GooglePayPaymentMethodParams constructor

  1. @JsonSerializable(explicitToJson: true)
const GooglePayPaymentMethodParams({
  1. bool? existingPaymentMethodRequired,
  2. required int amount,
  3. GooglePayBillingAddressConfig? billingAddressConfig,
  4. GooglePayShippingAddressConfig? shippingAddressConfig,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory GooglePayPaymentMethodParams({
  /// If true, Google Pay is considered "available" if the customer's Google Pay wallet has an existing payment method.
  ///
  /// Defaults to false.
  bool? existingPaymentMethodRequired,

  /// Total monetary value of the transaction.
  /// Provide this value in the currency’s smallest unit.
  required int amount,

  /// Describes the configuration for billing address collection in the Google Pay sheet.
  GooglePayBillingAddressConfig? billingAddressConfig,

  /// Describes the configuration for shipping address collection in the Google Pay sheet.
  GooglePayShippingAddressConfig? shippingAddressConfig,
}) = _GooglePayPaymentMethodParams;