IssuingTransactionCreateForceCaptureOptions.fromJson constructor

IssuingTransactionCreateForceCaptureOptions.fromJson(
  1. Object? json
)

Implementation

factory IssuingTransactionCreateForceCaptureOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return IssuingTransactionCreateForceCaptureOptions(
    amount: (map['amount'] as num).toInt(),
    card: (map['card'] as String),
    currency: map['currency'] == null ? null : (map['currency'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    merchantData: map['merchant_data'] == null
        ? null
        : AuthorizationMerchantData.fromJson(map['merchant_data']),
    purchaseDetails: map['purchase_details'] == null
        ? null
        : AuthorizationPurchaseDetails.fromJson(map['purchase_details']),
  );
}