mapToQBCustomObjectPermissionLevel static method

QBCustomObjectPermissionLevel mapToQBCustomObjectPermissionLevel(
  1. Map<String, Object> map
)

Implementation

static QBCustomObjectPermissionLevel mapToQBCustomObjectPermissionLevel(
    Map<String, Object> map) {
  QBCustomObjectPermissionLevel permissionLevel =
      QBCustomObjectPermissionLevel();

  if (map.containsKey("access")) {
    permissionLevel.access = map["access"] as String?;
  }
  if (map.containsKey("usersIds")) {
    permissionLevel.usersIds = map["usersIds"] as List<String>?;
  }
  if (map.containsKey("usersGroups")) {
    permissionLevel.usersGroups = map["usersGroups"] as List<String>?;
  }

  return permissionLevel;
}