PaymentMethodDetailsPaypal.fromJson constructor

PaymentMethodDetailsPaypal.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodDetailsPaypal.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodDetailsPaypal(
    payerEmail:
        map['payer_email'] == null ? null : (map['payer_email'] as String),
    payerId: map['payer_id'] == null ? null : (map['payer_id'] as String),
    payerName:
        map['payer_name'] == null ? null : (map['payer_name'] as String),
    sellerProtection: map['seller_protection'] == null
        ? null
        : PaymentMethodDetailsPaypalSellerProtection.fromJson(
            map['seller_protection']),
    transactionId: map['transaction_id'] == null
        ? null
        : (map['transaction_id'] as String),
  );
}