IPaymentMethod.fromJson constructor
IPaymentMethod.fromJson(
- Map<String, dynamic> json
)
Implementation
factory IPaymentMethod.fromJson(Map<String, dynamic> json) {
return IPaymentMethod(
paymentMethodGroup: json.containsKey('payment_method_group') &&
json['payment_method_group'] is int
? EPaymentMethodGroup.fromInt(json['payment_method_group'])
: EPaymentMethodGroup.mobileMoney,
paymentMethodFlag: json.containsKey('payment_method_flag') &&
json['payment_method_flag'] is int
? EPaymentMethodFlag.fromInt(json['payment_method_flag'])
: EPaymentMethodFlag.mobileMoney,
id: json.containsKey('_id') ? json['_id'] : '-',
paymentMethodName: json.containsKey('payment_method_name')
? json['payment_method_name']
: '-',
paymentMethodPic: json.containsKey('payment_method_pic')
? json['payment_method_pic']
: '-',
);
}