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

eleme.openapi.h5.sdk.pay.enums.RefundStatus Maven / Gradle / Ivy

There is a newer version: 1.0.11-RELEASE
Show newest version
package eleme.openapi.h5.sdk.pay.enums;

import lombok.Getter;

/**
 * 退款状态
 */
@Getter
public enum RefundStatus {
    /**
     * 退款成功
     */
    SUCCESS("SUCCESS"),

    /**
     * 退款失败
     */
    FAIL("FAIL"),

    /**
     * 退款处理中
     */
    PROCESSING("PROCESSING"),

    ;

    private String code;

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

    /**
     * 根据code获取枚举
     *
     * @param code 退款状态
     * @return 退款枚举
     */
    public RefundStatus getByCode(String code) {
        for (RefundStatus refundStatus : RefundStatus.values()) {
            if (refundStatus.getCode().equals(code)) {
                return refundStatus;
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy