package com.jeequan.jeepay.core.model.device;

import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.utils.StringKit;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/***
* 收银插件  厂商参数
*
* @author zx
*
* @date 2021/12/30 9:01
*/
@Data
public class PluginProviderParams {

    /**
     * 默认商品标题
     */
    private String subject;

    /**
     * 默认商品描述
     */
    private String body;

    /**
     * appSecret
     */
    private String appSecret;


    public String deSenData() {
        if (StringUtils.isNotBlank(this.appSecret)) {
            this.appSecret = StringKit.autoDesensitization(this.appSecret);
        }

        return JSONObject.toJSONString(this);
    }

}
