getLinkedUpiAccounts method
void
getLinkedUpiAccounts({})
Implementation
void getLinkedUpiAccounts({required String? customerMobile, required OnSuccess<List<UpiAccount>> onSuccess,
required OnFailure<Error> onFailure} ) async {
try {
if(!_isTurboPluginAvailable){
_emitFailure(onFailure);
return;
}
final Map<dynamic, dynamic> getLinkedUpiAccountsResponse = await _channel.invokeMethod('getLinkedUpiAccounts', customerMobile);
if(getLinkedUpiAccountsResponse["data"]!=""){
onSuccess(_getUpiAccounts(getLinkedUpiAccountsResponse["data"]));
}else {
onFailure(Error(errorCode:"" , errorDescription: "No Account Found"));
}
} on PlatformException catch (error) {
onFailure(Error(errorCode:error.code , errorDescription: error.message!));
}
}