public SetPinCommand(final OutputWriter outputWriter) {
}
public static void attachToSubparser(final Subparser subparser) {
subparser.help("Set a registration lock pin, to prevent others from registering this number.");
public SetPinCommand(final OutputWriter outputWriter) {
}
public static void attachToSubparser(final Subparser subparser) {
subparser.help("Set a registration lock pin, to prevent others from registering this number.");
.help("The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)");
}
@Override
public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
try {
.help("The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)");
}
@Override
public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
try {
m.setRegistrationLockPin(Optional.of(registrationLockPin));
} catch (UnauthenticatedResponseException e) {
throw new UnexpectedErrorException("Set pin error failed with unauthenticated response: " + e.getMessage());
m.setRegistrationLockPin(Optional.of(registrationLockPin));
} catch (UnauthenticatedResponseException e) {
throw new UnexpectedErrorException("Set pin error failed with unauthenticated response: " + e.getMessage());