+ public void handleCommand(final Namespace ns, final RegistrationManager m) throws CommandException {
+ final boolean voiceVerification = Boolean.TRUE.equals(ns.getBoolean("voice"));
+ final var captcha = ns.getString("captcha");
+
+ register(m, voiceVerification, captcha);
+ }
+
+ @Override
+ public TypeReference<RegistrationParams> getRequestType() {
+ return new TypeReference<>() {};
+ }
+
+ @Override
+ public List<OutputType> getSupportedOutputTypes() {
+ return List.of(OutputType.PLAIN_TEXT, OutputType.JSON);
+ }
+
+ @Override
+ public void handleCommand(
+ final RegistrationParams request, final RegistrationManager m, final JsonWriter jsonWriter
+ ) throws CommandException {
+ register(m, Boolean.TRUE.equals(request.voice()), request.captcha());
+ }
+
+ private void register(
+ final RegistrationManager m, final boolean voiceVerification, final String captcha
+ ) throws CommandException {