package com.jeequan.jeepay.thirdparty.channel.yspay.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * TODO
 * 卡类型
 * @author crystal
 * @date 2023/12/8 17:57
 */
@Getter
@AllArgsConstructor
public enum YsCardType {

    CREDIT("credit"),

    DEBIT("debit");

    private String type;

    public static YsCardType getVal(String type){
        YsCardType[] values = values();
        for (YsCardType val:values) {
            if(val.getType().equals(type)){
                return val;
            }
        }
        return null;
    }
}
