Release RecognizeQuotaInvoice RecognizeTicketInvoice RecognizePdf.

This commit is contained in:
sdk-team
2021-07-02 03:25:20 +00:00
parent a0c0379235
commit fe5bdbf24a
17 changed files with 1024 additions and 1 deletions

View File

@@ -483,6 +483,42 @@ OcrClient::RecognizeLicensePlateOutcomeCallable OcrClient::recognizeLicensePlate
return task->get_future();
}
OcrClient::RecognizePDFOutcome OcrClient::recognizePDF(const RecognizePDFRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizePDFOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizePDFOutcome(RecognizePDFResult(outcome.result()));
else
return RecognizePDFOutcome(outcome.error());
}
void OcrClient::recognizePDFAsync(const RecognizePDFRequest& request, const RecognizePDFAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizePDF(request), context);
};
asyncExecute(new Runnable(fn));
}
OcrClient::RecognizePDFOutcomeCallable OcrClient::recognizePDFCallable(const RecognizePDFRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizePDFOutcome()>>(
[this, request]()
{
return this->recognizePDF(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OcrClient::RecognizePassportMRZOutcome OcrClient::recognizePassportMRZ(const RecognizePassportMRZRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -591,6 +627,42 @@ OcrClient::RecognizeQrCodeOutcomeCallable OcrClient::recognizeQrCodeCallable(con
return task->get_future();
}
OcrClient::RecognizeQuotaInvoiceOutcome OcrClient::recognizeQuotaInvoice(const RecognizeQuotaInvoiceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeQuotaInvoiceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeQuotaInvoiceOutcome(RecognizeQuotaInvoiceResult(outcome.result()));
else
return RecognizeQuotaInvoiceOutcome(outcome.error());
}
void OcrClient::recognizeQuotaInvoiceAsync(const RecognizeQuotaInvoiceRequest& request, const RecognizeQuotaInvoiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeQuotaInvoice(request), context);
};
asyncExecute(new Runnable(fn));
}
OcrClient::RecognizeQuotaInvoiceOutcomeCallable OcrClient::recognizeQuotaInvoiceCallable(const RecognizeQuotaInvoiceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeQuotaInvoiceOutcome()>>(
[this, request]()
{
return this->recognizeQuotaInvoice(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OcrClient::RecognizeStampOutcome OcrClient::recognizeStamp(const RecognizeStampRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -735,6 +807,42 @@ OcrClient::RecognizeTaxiInvoiceOutcomeCallable OcrClient::recognizeTaxiInvoiceCa
return task->get_future();
}
OcrClient::RecognizeTicketInvoiceOutcome OcrClient::recognizeTicketInvoice(const RecognizeTicketInvoiceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeTicketInvoiceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeTicketInvoiceOutcome(RecognizeTicketInvoiceResult(outcome.result()));
else
return RecognizeTicketInvoiceOutcome(outcome.error());
}
void OcrClient::recognizeTicketInvoiceAsync(const RecognizeTicketInvoiceRequest& request, const RecognizeTicketInvoiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeTicketInvoice(request), context);
};
asyncExecute(new Runnable(fn));
}
OcrClient::RecognizeTicketInvoiceOutcomeCallable OcrClient::recognizeTicketInvoiceCallable(const RecognizeTicketInvoiceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeTicketInvoiceOutcome()>>(
[this, request]()
{
return this->recognizeTicketInvoice(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OcrClient::RecognizeTrainTicketOutcome OcrClient::recognizeTrainTicket(const RecognizeTrainTicketRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ocr/model/RecognizePDFRequest.h>
using AlibabaCloud::Ocr::Model::RecognizePDFRequest;
RecognizePDFRequest::RecognizePDFRequest() :
RpcServiceRequest("ocr", "2019-12-30", "RecognizePDF")
{
setMethod(HttpRequest::Method::Post);
}
RecognizePDFRequest::~RecognizePDFRequest()
{}
std::string RecognizePDFRequest::getFileURL()const
{
return fileURL_;
}
void RecognizePDFRequest::setFileURL(const std::string& fileURL)
{
fileURL_ = fileURL;
setBodyParameter("FileURL", fileURL);
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ocr/model/RecognizePDFResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ocr;
using namespace AlibabaCloud::Ocr::Model;
RecognizePDFResult::RecognizePDFResult() :
ServiceResult()
{}
RecognizePDFResult::RecognizePDFResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizePDFResult::~RecognizePDFResult()
{}
void RecognizePDFResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Height"].isNull())
data_.height = std::stol(dataNode["Height"].asString());
if(!dataNode["Width"].isNull())
data_.width = std::stol(dataNode["Width"].asString());
if(!dataNode["OrgHeight"].isNull())
data_.orgHeight = std::stol(dataNode["OrgHeight"].asString());
if(!dataNode["OrgWidth"].isNull())
data_.orgWidth = std::stol(dataNode["OrgWidth"].asString());
if(!dataNode["PageIndex"].isNull())
data_.pageIndex = std::stol(dataNode["PageIndex"].asString());
if(!dataNode["Angle"].isNull())
data_.angle = std::stol(dataNode["Angle"].asString());
auto allWordsInfoNode = dataNode["WordsInfo"]["wordsInfoItem"];
for (auto dataNodeWordsInfowordsInfoItem : allWordsInfoNode)
{
Data::WordsInfoItem wordsInfoItemObject;
if(!dataNodeWordsInfowordsInfoItem["Angle"].isNull())
wordsInfoItemObject.angle = std::stol(dataNodeWordsInfowordsInfoItem["Angle"].asString());
if(!dataNodeWordsInfowordsInfoItem["Word"].isNull())
wordsInfoItemObject.word = dataNodeWordsInfowordsInfoItem["Word"].asString();
if(!dataNodeWordsInfowordsInfoItem["Height"].isNull())
wordsInfoItemObject.height = std::stol(dataNodeWordsInfowordsInfoItem["Height"].asString());
if(!dataNodeWordsInfowordsInfoItem["Width"].isNull())
wordsInfoItemObject.width = std::stol(dataNodeWordsInfowordsInfoItem["Width"].asString());
if(!dataNodeWordsInfowordsInfoItem["X"].isNull())
wordsInfoItemObject.x = std::stol(dataNodeWordsInfowordsInfoItem["X"].asString());
if(!dataNodeWordsInfowordsInfoItem["Y"].isNull())
wordsInfoItemObject.y = std::stol(dataNodeWordsInfowordsInfoItem["Y"].asString());
auto allPositionsNode = dataNodeWordsInfowordsInfoItem["Positions"]["positionsItem"];
for (auto dataNodeWordsInfowordsInfoItemPositionspositionsItem : allPositionsNode)
{
Data::WordsInfoItem::PositionsItem positionsObject;
if(!dataNodeWordsInfowordsInfoItemPositionspositionsItem["X"].isNull())
positionsObject.x = std::stol(dataNodeWordsInfowordsInfoItemPositionspositionsItem["X"].asString());
if(!dataNodeWordsInfowordsInfoItemPositionspositionsItem["Y"].isNull())
positionsObject.y = std::stol(dataNodeWordsInfowordsInfoItemPositionspositionsItem["Y"].asString());
wordsInfoItemObject.positions.push_back(positionsObject);
}
data_.wordsInfo.push_back(wordsInfoItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string RecognizePDFResult::getMessage()const
{
return message_;
}
RecognizePDFResult::Data RecognizePDFResult::getData()const
{
return data_;
}
std::string RecognizePDFResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ocr/model/RecognizeQuotaInvoiceRequest.h>
using AlibabaCloud::Ocr::Model::RecognizeQuotaInvoiceRequest;
RecognizeQuotaInvoiceRequest::RecognizeQuotaInvoiceRequest() :
RpcServiceRequest("ocr", "2019-12-30", "RecognizeQuotaInvoice")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeQuotaInvoiceRequest::~RecognizeQuotaInvoiceRequest()
{}
std::string RecognizeQuotaInvoiceRequest::getImageURL()const
{
return imageURL_;
}
void RecognizeQuotaInvoiceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,107 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ocr/model/RecognizeQuotaInvoiceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ocr;
using namespace AlibabaCloud::Ocr::Model;
RecognizeQuotaInvoiceResult::RecognizeQuotaInvoiceResult() :
ServiceResult()
{}
RecognizeQuotaInvoiceResult::RecognizeQuotaInvoiceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeQuotaInvoiceResult::~RecognizeQuotaInvoiceResult()
{}
void RecognizeQuotaInvoiceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Angle"].isNull())
data_.angle = std::stol(dataNode["Angle"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stol(dataNode["Height"].asString());
if(!dataNode["Width"].isNull())
data_.width = std::stol(dataNode["Width"].asString());
if(!dataNode["OrgHeight"].isNull())
data_.orgHeight = std::stol(dataNode["OrgHeight"].asString());
if(!dataNode["OrgWidth"].isNull())
data_.orgWidth = std::stol(dataNode["OrgWidth"].asString());
auto allKeyValueInfosNode = dataNode["KeyValueInfos"]["keyValueInfosItem"];
for (auto dataNodeKeyValueInfoskeyValueInfosItem : allKeyValueInfosNode)
{
Data::KeyValueInfosItem keyValueInfosItemObject;
if(!dataNodeKeyValueInfoskeyValueInfosItem["Key"].isNull())
keyValueInfosItemObject.key = dataNodeKeyValueInfoskeyValueInfosItem["Key"].asString();
if(!dataNodeKeyValueInfoskeyValueInfosItem["Value"].isNull())
keyValueInfosItemObject.value = dataNodeKeyValueInfoskeyValueInfosItem["Value"].asString();
if(!dataNodeKeyValueInfoskeyValueInfosItem["ValueScore"].isNull())
keyValueInfosItemObject.valueScore = std::stof(dataNodeKeyValueInfoskeyValueInfosItem["ValueScore"].asString());
auto allValuePositionsNode = dataNodeKeyValueInfoskeyValueInfosItem["ValuePositions"]["valuePositionsItem"];
for (auto dataNodeKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem : allValuePositionsNode)
{
Data::KeyValueInfosItem::ValuePositionsItem valuePositionsObject;
if(!dataNodeKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["X"].isNull())
valuePositionsObject.x = std::stol(dataNodeKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["X"].asString());
if(!dataNodeKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["Y"].isNull())
valuePositionsObject.y = std::stol(dataNodeKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["Y"].asString());
keyValueInfosItemObject.valuePositions.push_back(valuePositionsObject);
}
data_.keyValueInfos.push_back(keyValueInfosItemObject);
}
auto contentNode = dataNode["Content"];
if(!contentNode["SumAmount"].isNull())
data_.content.sumAmount = contentNode["SumAmount"].asString();
if(!contentNode["InvoiceCode"].isNull())
data_.content.invoiceCode = contentNode["InvoiceCode"].asString();
if(!contentNode["InvoiceNo"].isNull())
data_.content.invoiceNo = contentNode["InvoiceNo"].asString();
if(!contentNode["InvoiceAmount"].isNull())
data_.content.invoiceAmount = contentNode["InvoiceAmount"].asString();
if(!contentNode["InvoiceDetails"].isNull())
data_.content.invoiceDetails = contentNode["InvoiceDetails"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string RecognizeQuotaInvoiceResult::getMessage()const
{
return message_;
}
RecognizeQuotaInvoiceResult::Data RecognizeQuotaInvoiceResult::getData()const
{
return data_;
}
std::string RecognizeQuotaInvoiceResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ocr/model/RecognizeTicketInvoiceRequest.h>
using AlibabaCloud::Ocr::Model::RecognizeTicketInvoiceRequest;
RecognizeTicketInvoiceRequest::RecognizeTicketInvoiceRequest() :
RpcServiceRequest("ocr", "2019-12-30", "RecognizeTicketInvoice")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeTicketInvoiceRequest::~RecognizeTicketInvoiceRequest()
{}
std::string RecognizeTicketInvoiceRequest::getImageURL()const
{
return imageURL_;
}
void RecognizeTicketInvoiceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,135 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ocr/model/RecognizeTicketInvoiceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ocr;
using namespace AlibabaCloud::Ocr::Model;
RecognizeTicketInvoiceResult::RecognizeTicketInvoiceResult() :
ServiceResult()
{}
RecognizeTicketInvoiceResult::RecognizeTicketInvoiceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeTicketInvoiceResult::~RecognizeTicketInvoiceResult()
{}
void RecognizeTicketInvoiceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Count"].isNull())
data_.count = std::stol(dataNode["Count"].asString());
if(!dataNode["Height"].isNull())
data_.height = std::stol(dataNode["Height"].asString());
if(!dataNode["Width"].isNull())
data_.width = std::stol(dataNode["Width"].asString());
if(!dataNode["OrgHeight"].isNull())
data_.orgHeight = std::stol(dataNode["OrgHeight"].asString());
if(!dataNode["OrgWidth"].isNull())
data_.orgWidth = std::stol(dataNode["OrgWidth"].asString());
auto allResultsNode = dataNode["Results"]["resultsItem"];
for (auto dataNodeResultsresultsItem : allResultsNode)
{
Data::ResultsItem resultsItemObject;
if(!dataNodeResultsresultsItem["Index"].isNull())
resultsItemObject.index = std::stol(dataNodeResultsresultsItem["Index"].asString());
if(!dataNodeResultsresultsItem["Type"].isNull())
resultsItemObject.type = dataNodeResultsresultsItem["Type"].asString();
auto allKeyValueInfosNode = dataNodeResultsresultsItem["KeyValueInfos"]["keyValueInfosItem"];
for (auto dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem : allKeyValueInfosNode)
{
Data::ResultsItem::KeyValueInfosItem keyValueInfosObject;
if(!dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["Key"].isNull())
keyValueInfosObject.key = dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["Key"].asString();
if(!dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["Value"].isNull())
keyValueInfosObject.value = dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["Value"].asString();
if(!dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["ValueScore"].isNull())
keyValueInfosObject.valueScore = std::stof(dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["ValueScore"].asString());
auto allValuePositionsNode = dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItem["ValuePositions"]["valuePositionsItem"];
for (auto dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem : allValuePositionsNode)
{
Data::ResultsItem::KeyValueInfosItem::ValuePositionsItem valuePositionsObject;
if(!dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["X"].isNull())
valuePositionsObject.x = std::stol(dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["X"].asString());
if(!dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["Y"].isNull())
valuePositionsObject.y = std::stol(dataNodeResultsresultsItemKeyValueInfoskeyValueInfosItemValuePositionsvaluePositionsItem["Y"].asString());
keyValueInfosObject.valuePositions.push_back(valuePositionsObject);
}
resultsItemObject.keyValueInfos.push_back(keyValueInfosObject);
}
auto allSliceRectangleNode = dataNodeResultsresultsItem["SliceRectangle"]["sliceRectangleItem"];
for (auto dataNodeResultsresultsItemSliceRectanglesliceRectangleItem : allSliceRectangleNode)
{
Data::ResultsItem::SliceRectangleItem sliceRectangleObject;
if(!dataNodeResultsresultsItemSliceRectanglesliceRectangleItem["X"].isNull())
sliceRectangleObject.x = std::stol(dataNodeResultsresultsItemSliceRectanglesliceRectangleItem["X"].asString());
if(!dataNodeResultsresultsItemSliceRectanglesliceRectangleItem["Y"].isNull())
sliceRectangleObject.y = std::stol(dataNodeResultsresultsItemSliceRectanglesliceRectangleItem["Y"].asString());
resultsItemObject.sliceRectangle.push_back(sliceRectangleObject);
}
auto contentNode = value["Content"];
if(!contentNode["InvoiceCode"].isNull())
resultsItemObject.content.invoiceCode = contentNode["InvoiceCode"].asString();
if(!contentNode["InvoiceNumber"].isNull())
resultsItemObject.content.invoiceNumber = contentNode["InvoiceNumber"].asString();
if(!contentNode["InvoiceDate"].isNull())
resultsItemObject.content.invoiceDate = contentNode["InvoiceDate"].asString();
if(!contentNode["AntiFakeCode"].isNull())
resultsItemObject.content.antiFakeCode = contentNode["AntiFakeCode"].asString();
if(!contentNode["PayeeName"].isNull())
resultsItemObject.content.payeeName = contentNode["PayeeName"].asString();
if(!contentNode["PayeeRegisterNo"].isNull())
resultsItemObject.content.payeeRegisterNo = contentNode["PayeeRegisterNo"].asString();
if(!contentNode["PayerName"].isNull())
resultsItemObject.content.payerName = contentNode["PayerName"].asString();
if(!contentNode["PayerRegisterNo"].isNull())
resultsItemObject.content.payerRegisterNo = contentNode["PayerRegisterNo"].asString();
if(!contentNode["SumAmount"].isNull())
resultsItemObject.content.sumAmount = contentNode["SumAmount"].asString();
data_.results.push_back(resultsItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string RecognizeTicketInvoiceResult::getMessage()const
{
return message_;
}
RecognizeTicketInvoiceResult::Data RecognizeTicketInvoiceResult::getData()const
{
return data_;
}
std::string RecognizeTicketInvoiceResult::getCode()const
{
return code_;
}