SessionPaypal.fromJson constructor

SessionPaypal.fromJson(
  1. Object? json
)

Implementation

factory SessionPaypal.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SessionPaypal(
    captureMethod: map['capture_method'] == null
        ? null
        : SessionCaptureMethod.fromJson(map['capture_method']),
    preferredLocale: map['preferred_locale'] == null
        ? null
        : SessionPreferredLocale.fromJson(map['preferred_locale']),
    reference: map['reference'] == null ? null : (map['reference'] as String),
    riskCorrelationId: map['risk_correlation_id'] == null
        ? null
        : (map['risk_correlation_id'] as String),
    setupFutureUsage: map['setup_future_usage'] == null
        ? null
        : SessionPaypalSetupFutureUsage.fromJson(map['setup_future_usage']),
  );
}