mapPaymentMethodsResult function
Implementation
PaymentMethodsResult mapPaymentMethodsResult(String json) {
final map = jsonDecode(json);
switch (map[type]) {
case success:
return PaymentMethodsSuccess.fromJson(map[paymentMethods]);
case error:
return PaymentMethodsError(map[devErrorMessage]);
default:
throw Exception(unknownResult);
}
}