ApplePayPresentParams constructor

  1. @JsonSerializable(explicitToJson: true)
const ApplePayPresentParams({
  1. required List<ApplePayCartSummaryItem> cartItems,
  2. required String country,
  3. required String currency,
  4. List<ApplePayContactFieldsType>? requiredShippingAddressFields,
  5. List<ApplePayContactFieldsType>? requiredBillingContactFields,
  6. List<ApplePayShippingMethod>? shippingMethods,
  7. @Default(false) bool jcbEnabled,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory ApplePayPresentParams({
  /// Line Items of the payment request.
  required List<ApplePayCartSummaryItem> cartItems,

  /// The two letter ISO 3166 country code representing the merchant.
  required String country,

  /// The three letter ISO 4217 code for the currency.
  required String currency,

  /// Fields that will be shown on the required shipping address section. If
  /// empty no fields will be displayed.
  List<ApplePayContactFieldsType>? requiredShippingAddressFields,

  /// Fields that will be shown on the required billing address section. If
  /// empty no fields will be displayed.
  List<ApplePayContactFieldsType>? requiredBillingContactFields,

  /// List of available shipping methods for goods.
  List<ApplePayShippingMethod>? shippingMethods,

  /// Add support for jcb as additional payment method.
  @Default(false) bool jcbEnabled,
}) = _ApplePayPresentParams;