PaymentMethodDTO.fromJson constructor
Implementation
PaymentMethodDTO.fromJson(Map<String, dynamic> json) {
creditCard = json['creditCard'] != null
? PaymentMethod.values.firstWhere((element) =>
element.toString().split('.').last == json['creditCard'])
: null;
cash = json['cash'];
cashOnDelivery = json['cashOnDelivery'];
eft = json['eft'];
paypal = json['paypal'];
stripe = json['stripe'];
bkmExpress = json['bkmExpress'];
}