deleteMasterUserIdRelation static method
Removes all the existing relations of a master.
If you want to delete all the relationships related to the masterUserId, you can use deleteMasterUserIdRelation method by giving masterUserId as a parameter.
masterUserId
Id of the user has the purchases of his/her own. User id can be retrieved via getUserId method.
Callbacks boolean
and GenericError in case of failure.
Implementation
static Future<BaseResponse> deleteMasterUserIdRelation(
String masterUserId) async {
List<Object?>? response = await _channel.invokeMethod(
'deleteMasterUserIdRelation', {"masterUserId": masterUserId});
BaseResponse result = new BaseResponse(false, null);
if (response != null) {
if (response[0] != null) {
result = BaseResponse(response[0].toString() == "true", null);
}
if (response[1] != null) {
GenericError error =
GenericError.fromJson(json.decode(response[1]!.toString()));
result = BaseResponse(false, error);
}
return result;
}
return result;
}