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

import java.io.IOException;

/**
 * D0标识，
 * 0: 非D0交易，即按进件商户开通功能结算周期结算
 * 1: D0交易，商户需开通了D0，且此字段送1时，会d0到账
 * 默认值0
 */
public enum PatnerSettleFlag {

    EMPTY, THE_0, THE_1;

    public String toValue() {
        switch (this) {
            case EMPTY: return "";
            case THE_0: return "0";
            case THE_1: return "1";
        }
        return null;
    }

    public static PatnerSettleFlag forValue(String value) throws IOException {
        if (value.equals("")) return EMPTY;
        if (value.equals("0")) return THE_0;
        if (value.equals("1")) return THE_1;
        throw new IOException("Cannot deserialize PatnerSettleFlag");
    }
}
