ApplePayParams class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
ApplePayParams.new({required String merchantCountryCode, required String currencyCode, List<
String> ? additionalEnabledNetworks, required List<ApplePayCartSummaryItem> cartItems, List<ApplePayContactFieldsType> ? requiredShippingAddressFields, List<ApplePayContactFieldsType> ? requiredBillingContactFields, List<ApplePayShippingMethod> ? shippingMethods, List<ApplePayMerchantCapability> ? merchantCapabilities, ApplePayShippingType? shippingType, List<String> ? supportedCountries, bool? supportsCouponCode, String? couponCode, PaymentRequestType? request}) -
constfactory
-
ApplePayParams.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
additionalEnabledNetworks
→ List<
String> ? -
The SDK accepts Amex, Mastercard, Visa, and Discover for Apple Pay by default. Set this property to enable other card networks, for example:
"JCB", "barcode", "chinaUnionPay"
. A full list of possible networks can be found at https://developer.apple.com/documentation/passkit/pkpaymentnetwork.no setterinherited -
cartItems
→ List<
ApplePayCartSummaryItem> -
The list of items that describe a purchase. For example: total, tax, discount, and grand total.
no setterinherited
-
copyWith
→ $ApplePayParamsCopyWith<
ApplePayParams> -
Create a copy of ApplePayParams
with the given fields replaced by the non-null parameter values.
no setterinherited
- couponCode → String?
-
Default coupon code display in the apple pay sheet
no setterinherited
- currencyCode → String
-
ISO 4217 alphabetic currency code.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
merchantCapabilities
→ List<
ApplePayMerchantCapability> ? -
Set the payment capabilities you support. If set, 3DS is required.
no setterinherited
- merchantCountryCode → String
-
ISO 3166-1 alpha-2 country code where the transaction is processed.
no setterinherited
- request → PaymentRequestType?
-
Use this to support different types of payment request.
no setterinherited
-
requiredBillingContactFields
→ List<
ApplePayContactFieldsType> ? -
The list of fields that you need for a billing contact in order to process the transaction.
no setterinherited
-
requiredShippingAddressFields
→ List<
ApplePayContactFieldsType> ? -
The list of fields that you need for a shipping contact in order to process the transaction. If provided, you must implement the PlatformPayButton component's
onShippingContactSelected
callback and callupdatePlatformPaySheet
from there.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shippingMethods
→ List<
ApplePayShippingMethod> ? -
An array of shipping method objects that describe the supported shipping methods. If provided, you must implement the PlatformPayButton component's
onShippingMethodSelected
callback and callupdatePlatformPaySheet
from there.no setterinherited - shippingType → ApplePayShippingType?
-
An optional value that indicates how to ship purchased items. Defaults to 'Shipping'.
no setterinherited
-
supportedCountries
→ List<
String> ? -
A list of two-letter ISO 3166 country codes for limiting payment to cards from specific countries or regions.
no setterinherited
- supportsCouponCode → bool?
-
Enables support for coupon codes in the Apple Pay button.
When this is set to true it shows the coupon code field and if
couponCode
has a value it will display the value as defaultno setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_ApplePayParams value)) → TResult -
Available on ApplePayParams, provided by the ApplePayParamsPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ApplePayParams value)?) → TResult? -
Available on ApplePayParams, provided by the ApplePayParamsPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_ApplePayParams value)?, {required TResult orElse()}) → TResult -
Available on ApplePayParams, provided by the ApplePayParamsPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String merchantCountryCode, String currencyCode, List< String> ? additionalEnabledNetworks, List<ApplePayCartSummaryItem> cartItems, List<ApplePayContactFieldsType> ? requiredShippingAddressFields, List<ApplePayContactFieldsType> ? requiredBillingContactFields, List<ApplePayShippingMethod> ? shippingMethods, List<ApplePayMerchantCapability> ? merchantCapabilities, ApplePayShippingType? shippingType, List<String> ? supportedCountries, bool? supportsCouponCode, String? couponCode, PaymentRequestType? request)?, {required TResult orElse()}) → TResult -
Available on ApplePayParams, provided by the ApplePayParamsPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ApplePayParams to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String merchantCountryCode, String currencyCode, List< String> ? additionalEnabledNetworks, List<ApplePayCartSummaryItem> cartItems, List<ApplePayContactFieldsType> ? requiredShippingAddressFields, List<ApplePayContactFieldsType> ? requiredBillingContactFields, List<ApplePayShippingMethod> ? shippingMethods, List<ApplePayMerchantCapability> ? merchantCapabilities, ApplePayShippingType? shippingType, List<String> ? supportedCountries, bool? supportsCouponCode, String? couponCode, PaymentRequestType? request)) → TResult -
Available on ApplePayParams, provided by the ApplePayParamsPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String merchantCountryCode, String currencyCode, List< String> ? additionalEnabledNetworks, List<ApplePayCartSummaryItem> cartItems, List<ApplePayContactFieldsType> ? requiredShippingAddressFields, List<ApplePayContactFieldsType> ? requiredBillingContactFields, List<ApplePayShippingMethod> ? shippingMethods, List<ApplePayMerchantCapability> ? merchantCapabilities, ApplePayShippingType? shippingType, List<String> ? supportedCountries, bool? supportsCouponCode, String? couponCode, PaymentRequestType? request)?) → TResult? -
Available on ApplePayParams, provided by the ApplePayParamsPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited