package cn.iocoder.yudao.framework.sms.core.client.impl.yCloud;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.iocoder.yudao.framework.sms.core.client.SmsCodeMapping;
import cn.iocoder.yudao.framework.sms.core.enums.SmsFrameworkErrorCodeConstants;

/**
 * ycloud SmsCodeMapping 实现类
 *
 * @author Jayden
 * @date 2024/11/7
 */
public class YCloudSmsCodeMapping implements SmsCodeMapping {
    @Override
    public ErrorCode apply(String apiCode) {
        switch (apiCode) {
            case "accepted":
            case "read":
            case "send":
            case "delivered":
                return GlobalErrorCodeConstants.SUCCESS;
        }
        return SmsFrameworkErrorCodeConstants.SMS_UNKNOWN;
    }
}
