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


import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.traffic.BRoadTransportCertificateRequest;
import com.heyu.api.data.annotation.CustomPath;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;


/**
 * https://console.bce.baidu.com/support/?_=1740411162437&timestamp=1740413029871#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E4%BA%A4%E9%80%9A%E5%9C%BA%E6%99%AFOCR&api=rest%2F2.0%2Focr%2Fv1%2Froad_transport_certificate&method=post
 * <p>
 * <p>
 * 道路运输证识别
 */
@Component
@Slf4j
@CustomPath("roadTransportCertificate")
public class BRoadTransportCertificateHandle extends BaiduBaseHandle<BRoadTransportCertificateRequest, Map> {

    @Override
    public String getUri() {
        return "/rest/2.0/ocr/v1/road_transport_certificate";
    }

    @Override
    public String check(BRoadTransportCertificateRequest bRoadTransportCertificateRequest) {
        return checkPdf(bRoadTransportCertificateRequest);
    }

    @Override
    public String getContent(BRoadTransportCertificateRequest bRoadTransportCertificateRequest) {
        return getPdfContent(bRoadTransportCertificateRequest).toString();
    }
}
