PaymentMethodUpdateOptions.fromJson constructor
PaymentMethodUpdateOptions.fromJson(
- Object? json
Implementation
factory PaymentMethodUpdateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentMethodUpdateOptions(
billingDetails: map['billing_details'] == null
? null
: PaymentIntentBillingDetails.fromJson(map['billing_details']),
card: map['card'] == null
? null
: PaymentMethodUpdateOptionsCard.fromJson(map['card']),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
link: map['link'] == null ? null : (map['link'] as Object),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
usBankAccount: map['us_bank_account'] == null
? null
: PaymentMethodUsBankAccount.fromJson(map['us_bank_account']),
);
}