package com.heyu.api.baidu.handle.financial;


import com.heyu.api.data.annotation.CustomPath;
import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.financial.BTollInvoiceRequest;
import com.heyu.api.baidu.response.financial.BTollInvoiceResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


/**
 * https://console.bce.baidu.com/support/?_=1740575657628&timestamp=1740578911257#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E8%B4%A2%E5%8A%A1%E7%A5%A8%E6%8D%AEOCR&api=rest%2F2.0%2Focr%2Fv1%2Ftoll_invoice&method=post
 *
 * 过路过桥费发票识别
 *
 *
 */
@Component
@Slf4j
@CustomPath("tollInvoice")
public class BTollInvoiceHandle extends BaiduBaseHandle<BTollInvoiceRequest, BTollInvoiceResp> {
    @Override
    public String getUri() {
        return "/rest/2.0/ocr/v1/toll_invoice";
    }

    @Override
    public String check(BTollInvoiceRequest bTollInvoiceRequest) {
        return checkOfd(bTollInvoiceRequest);
    }

    @Override
    public String getContent(BTollInvoiceRequest bTollInvoiceRequest) {
        return getOfdContent(bTollInvoiceRequest).toString();
    }
}
