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


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


/**
 * https://console.bce.baidu.com/support/?_=1740411162437&timestamp=1740411735793#/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%2Fused_vehicle_invoice&method=post
 * 二手车销售发票识别
 */
@Component
@Slf4j
@CustomPath("usedVehicleInvoice")
public class BUsedVehicleInvoiceHandle extends BaiduBaseHandle<BUsedVehicleInvoiceRequest, BUsedVehicleInvoiceResp> {
    @Override
    public String getUri() {
        return "/rest/2.0/ocr/v1/used_vehicle_invoice";
    }

    @Override
    public String check(BUsedVehicleInvoiceRequest bUsedVehicleInvoiceRequest) {
        return checkImageUri(bUsedVehicleInvoiceRequest);
    }

    @Override
    public String getContent(BUsedVehicleInvoiceRequest bUsedVehicleInvoiceRequest) {
        return getImageContent(bUsedVehicleInvoiceRequest).toString();
    }
}
