Browse Source

Release RecognizeVATInvoice.

sdk-team 3 years ago
parent
commit
b0e8e978fc

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1293
+1.36.1294

+ 2 - 0
ocr/include/alibabacloud/ocr/model/RecognizeVATInvoiceResult.h

@@ -47,6 +47,7 @@ namespace AlibabaCloud
 						std::vector<std::string> taxAmounts;
 						std::vector<std::string> invoiceCodes;
 						std::vector<std::string> sumAmounts;
+						std::vector<std::string> itemNames;
 						std::vector<std::string> payerNames;
 						std::vector<std::string> invoiceFakeCodes;
 						std::vector<std::string> payeeBankNames;
@@ -72,6 +73,7 @@ namespace AlibabaCloud
 						std::string taxAmount;
 						std::string payeeBankName;
 						std::string clerk;
+						std::vector<std::string> itemName;
 						std::string payeeRegisterNo;
 						std::string invoiceCode;
 						std::string invoiceDate;

+ 6 - 0
ocr/src/model/RecognizeVATInvoiceResult.cc

@@ -98,6 +98,9 @@ void RecognizeVATInvoiceResult::parse(const std::string &payload)
 		auto allPayeeRegisterNoes = boxNode["PayeeRegisterNoes"]["PayeeRegisterNo"];
 		for (auto value : allPayeeRegisterNoes)
 			data_.box.payeeRegisterNoes.push_back(value.asString());
+		auto allItemNames = boxNode["ItemNames"]["ItemNames"];
+		for (auto value : allItemNames)
+			data_.box.itemNames.push_back(value.asString());
 	auto contentNode = dataNode["Content"];
 	if(!contentNode["PayerAddress"].isNull())
 		data_.content.payerAddress = contentNode["PayerAddress"].asString();
@@ -137,6 +140,9 @@ void RecognizeVATInvoiceResult::parse(const std::string &payload)
 		data_.content.payeeAddress = contentNode["PayeeAddress"].asString();
 	if(!contentNode["InvoiceCode"].isNull())
 		data_.content.invoiceCode = contentNode["InvoiceCode"].asString();
+		auto allItemName = contentNode["ItemName"]["ItemName"];
+		for (auto value : allItemName)
+			data_.content.itemName.push_back(value.asString());
 
 }