PaymentLinkCreateOptionsPaymentIntentData.fromJson constructor
PaymentLinkCreateOptionsPaymentIntentData.fromJson(
- Object? json
Implementation
factory PaymentLinkCreateOptionsPaymentIntentData.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentLinkCreateOptionsPaymentIntentData(
captureMethod: map['capture_method'] == null
? null
: PaymentIntentCaptureMethod.fromJson(map['capture_method']),
description:
map['description'] == null ? null : (map['description'] as String),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
setupFutureUsage: map['setup_future_usage'] == null
? null
: SessionSetupFutureUsage.fromJson(map['setup_future_usage']),
statementDescriptor: map['statement_descriptor'] == null
? null
: (map['statement_descriptor'] as String),
statementDescriptorSuffix: map['statement_descriptor_suffix'] == null
? null
: (map['statement_descriptor_suffix'] as String),
transferGroup: map['transfer_group'] == null
? null
: (map['transfer_group'] as String),
);
}