All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yandex.money.api.model.AccountStatus Maven / Gradle / Ivy

Go to download

This Java library contains classes that allows you to do payments using Yandex.Money public API.

The newest version!
package com.yandex.money.api.model;

/**
 * Account status.
 *
 * @author Slava Yasevich ([email protected])
 */
public enum AccountStatus {
    /**
     * Anonymous account.
     */
    ANONYMOUS("anonymous"),
    /**
     * Named account.
     */
    NAMED("named"),
    /**
     * Identified account.
     */
    IDENTIFIED("identified"),
    /**
     * Unknown account.
     */
    UNKNOWN("unknown");

    private final String code;

    AccountStatus(String code) {
        this.code = code;
    }

    public static AccountStatus parse(String code) {
        if (code == null) {
            return null;
        }
        for (AccountStatus value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return UNKNOWN;
    }

    public String getCode() {
        return code;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy