PaypalSellerProtection.fromJson constructor

PaypalSellerProtection.fromJson(
  1. Object? json
)

Implementation

factory PaypalSellerProtection.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaypalSellerProtection(
    disputeCategories: map['dispute_categories'] == null
        ? null
        : (map['dispute_categories'] as List<Object?>)
            .map((el) =>
                PaymentMethodDetailsPaypalSellerProtectionDisputeCategoriesItem
                    .fromJson(el))
            .toList(),
    status: PaymentMethodDetailsPaypalSellerProtectionStatus.fromJson(
        map['status']),
  );
}