it.auties.whatsapp.model.mobile.VerificationCodeStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whatsappweb4j Show documentation
Show all versions of whatsappweb4j Show documentation
Standalone fully-featured Whatsapp Web API for Java and Kotlin
The newest version!
package it.auties.whatsapp.model.mobile;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
public enum VerificationCodeStatus {
OK,
SENT,
ERROR;
@JsonCreator
public static VerificationCodeStatus of(String name) {
return Arrays.stream(values()).filter(entry -> entry.name().equalsIgnoreCase(name)).findFirst().orElse(ERROR);
}
public boolean isSuccessful() {
return this == OK || this == SENT;
}
}