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


import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.financial.BShoppingReceiptRequest;
import com.heyu.api.baidu.response.financial.BShoppingReceiptResp;
import org.springframework.stereotype.Component;

/***
 * https://console.bce.baidu.com/support/?_=1740575657628&timestamp=1740579777572#/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%2Fshopping_receipt&method=post
 *购物小票识别
 *
 */
@Component
public class BShoppingReceiptHandle extends BaiduBaseHandle<BShoppingReceiptRequest, BShoppingReceiptResp> {
    @Override
    public String getUri() {
        return "/rest/2.0/ocr/v1/shopping_receipt";
    }

    @Override
    public String check(BShoppingReceiptRequest bShoppingReceiptRequest) {
        return checkProbabilityLocation(bShoppingReceiptRequest);
    }

    @Override
    public String getContent(BShoppingReceiptRequest bShoppingReceiptRequest) {
        return getProbabilityLocationContent(bShoppingReceiptRequest).toString();
    }
}
