CheckoutPaypalPaymentMethodOptions.fromJson constructor

CheckoutPaypalPaymentMethodOptions.fromJson(
  1. Object? json
)

Implementation

factory CheckoutPaypalPaymentMethodOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CheckoutPaypalPaymentMethodOptions(
    preferredLocale: map['preferred_locale'] == null
        ? null
        : (map['preferred_locale'] as String),
    reference: map['reference'] == null ? null : (map['reference'] as String),
    setupFutureUsage: map['setup_future_usage'] == null
        ? null
        : CheckoutLinkPaymentMethodOptionsSetupFutureUsage.fromJson(
            map['setup_future_usage']),
  );
}