deleteSubUserIdRelation static method
Removes the existing relation of a sub-user.
It's also possible to delete a relationship between the users. By giving subUserId as a parameter, you can use deleteSubUserIdRelation method and delete a relationship between subUserId and its master.
subUserId
Id of the user has the purchases of another user. User id can be retrieved via getUserId method.
Callbacks boolean
and GenericError in case of failure.
Implementation
static Future<BaseResponse> deleteSubUserIdRelation(String subUserId) async {
List<Object?>? response = await _channel
.invokeMethod('deleteSubUserIdRelation', {"subUserId": subUserId});
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;
}