CustomerProcessPayment.fromJson constructor

CustomerProcessPayment.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CustomerProcessPayment.fromJson(Map<String, dynamic> json) {
  return CustomerProcessPayment(
    customerKhasCart: json['CustomerKhasCart'] is Iterable ? (json['CustomerKhasCart'] as Iterable).map((e) => CustomerKhasCart.fromJson(Map<String, dynamic>.from(e))).toList() : (json['customerKhasCart'] is Iterable ? (json['customerKhasCart'] as Iterable).map((e) => CustomerKhasCart.fromJson(Map<String, dynamic>.from(e))).toList() : null),
    paymentMethodId: json['payment_method_id'] as String? ?? json['paymentMethodId'] as String?,
    success: json['success'] as bool?,
    message: json['message'] as String?,
    setUpPayment: json['SetUpPayment'] != null ? SetUpPayment.fromJson(Map<String, dynamic>.from(json['SetUpPayment'])) : (json['setUpPayment'] != null ? SetUpPayment.fromJson(Map<String, dynamic>.from(json['setUpPayment'])) : null),
  );
}