package com.wzj.soopin.transaction.enums.easypay;


import java.io.IOException;

/**
 * 附加手续费计算方式
 *
 * 手续费计算方式
 *
 * 手续费费用类型
 *
 * 是否允许退货
 */
public enum AddCalcType {
    THE_0, THE_1;

    public String toValue() {
        return switch (this) {
            case THE_0 -> "0";
            case THE_1 -> "1";
        };
    }

    public static AddCalcType forValue(String value) throws IOException {
        return switch (value) {
            case "0" -> THE_0;
            case "1" -> THE_1;
            default -> throw new IOException("Cannot deserialize AddCalcType");
        };
    }
}
