SetupIntentConfirmOptions.fromJson constructor
SetupIntentConfirmOptions.fromJson(
- Object? json
Implementation
factory SetupIntentConfirmOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return SetupIntentConfirmOptions(
confirmationToken: map['confirmation_token'] == null
? null
: (map['confirmation_token'] as String),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
mandateData: map['mandate_data'] == null
? null
: PaymentIntentConfirmOptionsMandateData.fromJson(
map['mandate_data']),
paymentMethod: map['payment_method'] == null
? null
: (map['payment_method'] as String),
paymentMethodData: map['payment_method_data'] == null
? null
: PaymentIntentPaymentMethodData.fromJson(map['payment_method_data']),
paymentMethodOptions: map['payment_method_options'] == null
? null
: SetupIntentCreateOptionsPaymentMethodOptions.fromJson(
map['payment_method_options']),
returnUrl:
map['return_url'] == null ? null : (map['return_url'] as String),
useStripeSdk: map['use_stripe_sdk'] == null
? null
: (map['use_stripe_sdk'] as bool),
);
}