Add PipCode and CommodityCode for QueryInstanceBill, QueryBillOverview, QueryBill, QuerySettleBill, QueryAccountBill, QuerySplitItemBill.
This commit is contained in:
@@ -41,6 +41,7 @@ void AllocateCostUnitResourceRequest::setResourceInstanceList(const std::vector<
|
||||
setParameter(resourceInstanceListObjStr + ".ResourceId", resourceInstanceListObj.resourceId);
|
||||
setParameter(resourceInstanceListObjStr + ".CommodityCode", resourceInstanceListObj.commodityCode);
|
||||
setParameter(resourceInstanceListObjStr + ".ResourceUserId", std::to_string(resourceInstanceListObj.resourceUserId));
|
||||
setParameter(resourceInstanceListObjStr + ".ApportionCode", resourceInstanceListObj.apportionCode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,17 @@ void QueryAccountBillRequest::setOwnerID(long ownerID)
|
||||
setParameter("OwnerID", std::to_string(ownerID));
|
||||
}
|
||||
|
||||
long QueryAccountBillRequest::getBillOwnerId()const
|
||||
{
|
||||
return billOwnerId_;
|
||||
}
|
||||
|
||||
void QueryAccountBillRequest::setBillOwnerId(long billOwnerId)
|
||||
{
|
||||
billOwnerId_ = billOwnerId;
|
||||
setParameter("BillOwnerId", std::to_string(billOwnerId));
|
||||
}
|
||||
|
||||
bool QueryAccountBillRequest::getIsGroupByProduct()const
|
||||
{
|
||||
return isGroupByProduct_;
|
||||
|
||||
@@ -86,6 +86,8 @@ void QueryAccountBillResult::parse(const std::string &payload)
|
||||
itemObject.productName = dataNodeItemsItem["ProductName"].asString();
|
||||
if(!dataNodeItemsItem["SubscriptionType"].isNull())
|
||||
itemObject.subscriptionType = dataNodeItemsItem["SubscriptionType"].asString();
|
||||
if(!dataNodeItemsItem["PipCode"].isNull())
|
||||
itemObject.pipCode = dataNodeItemsItem["PipCode"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -60,6 +60,17 @@ void QueryBillOverviewRequest::setBillingCycle(const std::string& billingCycle)
|
||||
setParameter("BillingCycle", billingCycle);
|
||||
}
|
||||
|
||||
long QueryBillOverviewRequest::getBillOwnerId()const
|
||||
{
|
||||
return billOwnerId_;
|
||||
}
|
||||
|
||||
void QueryBillOverviewRequest::setBillOwnerId(long billOwnerId)
|
||||
{
|
||||
billOwnerId_ = billOwnerId;
|
||||
setParameter("BillOwnerId", std::to_string(billOwnerId));
|
||||
}
|
||||
|
||||
std::string QueryBillOverviewRequest::getProductType()const
|
||||
{
|
||||
return productType_;
|
||||
|
||||
@@ -90,6 +90,10 @@ void QueryBillOverviewResult::parse(const std::string &payload)
|
||||
itemObject.paymentCurrency = dataNodeItemsItem["PaymentCurrency"].asString();
|
||||
if(!dataNodeItemsItem["RoundDownDiscount"].isNull())
|
||||
itemObject.roundDownDiscount = dataNodeItemsItem["RoundDownDiscount"].asString();
|
||||
if(!dataNodeItemsItem["PipCode"].isNull())
|
||||
itemObject.pipCode = dataNodeItemsItem["PipCode"].asString();
|
||||
if(!dataNodeItemsItem["CommodityCode"].isNull())
|
||||
itemObject.commodityCode = dataNodeItemsItem["CommodityCode"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -115,6 +115,17 @@ void QueryBillRequest::setPageNum(int pageNum)
|
||||
setParameter("PageNum", std::to_string(pageNum));
|
||||
}
|
||||
|
||||
long QueryBillRequest::getBillOwnerId()const
|
||||
{
|
||||
return billOwnerId_;
|
||||
}
|
||||
|
||||
void QueryBillRequest::setBillOwnerId(long billOwnerId)
|
||||
{
|
||||
billOwnerId_ = billOwnerId;
|
||||
setParameter("BillOwnerId", std::to_string(billOwnerId));
|
||||
}
|
||||
|
||||
std::string QueryBillRequest::getProductType()const
|
||||
{
|
||||
return productType_;
|
||||
|
||||
@@ -112,6 +112,10 @@ void QueryBillResult::parse(const std::string &payload)
|
||||
itemObject.roundDownDiscount = dataNodeItemsItem["RoundDownDiscount"].asString();
|
||||
if(!dataNodeItemsItem["SubOrderId"].isNull())
|
||||
itemObject.subOrderId = dataNodeItemsItem["SubOrderId"].asString();
|
||||
if(!dataNodeItemsItem["PipCode"].isNull())
|
||||
itemObject.pipCode = dataNodeItemsItem["PipCode"].asString();
|
||||
if(!dataNodeItemsItem["CommodityCode"].isNull())
|
||||
itemObject.commodityCode = dataNodeItemsItem["CommodityCode"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
@@ -93,6 +93,17 @@ void QueryInstanceBillRequest::setPageNum(int pageNum)
|
||||
setParameter("PageNum", std::to_string(pageNum));
|
||||
}
|
||||
|
||||
long QueryInstanceBillRequest::getBillOwnerId()const
|
||||
{
|
||||
return billOwnerId_;
|
||||
}
|
||||
|
||||
void QueryInstanceBillRequest::setBillOwnerId(long billOwnerId)
|
||||
{
|
||||
billOwnerId_ = billOwnerId;
|
||||
setParameter("BillOwnerId", std::to_string(billOwnerId));
|
||||
}
|
||||
|
||||
std::string QueryInstanceBillRequest::getBillingDate()const
|
||||
{
|
||||
return billingDate_;
|
||||
|
||||
@@ -130,6 +130,10 @@ void QueryInstanceBillResult::parse(const std::string &payload)
|
||||
itemObject.billingDate = dataNodeItemsItem["BillingDate"].asString();
|
||||
if(!dataNodeItemsItem["ServicePeriodUnit"].isNull())
|
||||
itemObject.servicePeriodUnit = dataNodeItemsItem["ServicePeriodUnit"].asString();
|
||||
if(!dataNodeItemsItem["PipCode"].isNull())
|
||||
itemObject.pipCode = dataNodeItemsItem["PipCode"].asString();
|
||||
if(!dataNodeItemsItem["CommodityCode"].isNull())
|
||||
itemObject.commodityCode = dataNodeItemsItem["CommodityCode"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
150
bssopenapi/src/model/QuerySettleBillRequest.cc
Normal file
150
bssopenapi/src/model/QuerySettleBillRequest.cc
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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/bssopenapi/model/QuerySettleBillRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::QuerySettleBillRequest;
|
||||
|
||||
QuerySettleBillRequest::QuerySettleBillRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "QuerySettleBill")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
QuerySettleBillRequest::~QuerySettleBillRequest()
|
||||
{}
|
||||
|
||||
std::string QuerySettleBillRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
bool QuerySettleBillRequest::getIsHideZeroCharge()const
|
||||
{
|
||||
return isHideZeroCharge_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setIsHideZeroCharge(bool isHideZeroCharge)
|
||||
{
|
||||
isHideZeroCharge_ = isHideZeroCharge;
|
||||
setParameter("IsHideZeroCharge", isHideZeroCharge ? "true" : "false");
|
||||
}
|
||||
|
||||
bool QuerySettleBillRequest::getIsDisplayLocalCurrency()const
|
||||
{
|
||||
return isDisplayLocalCurrency_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setIsDisplayLocalCurrency(bool isDisplayLocalCurrency)
|
||||
{
|
||||
isDisplayLocalCurrency_ = isDisplayLocalCurrency;
|
||||
setParameter("IsDisplayLocalCurrency", isDisplayLocalCurrency ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string QuerySettleBillRequest::getSubscriptionType()const
|
||||
{
|
||||
return subscriptionType_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setSubscriptionType(const std::string& subscriptionType)
|
||||
{
|
||||
subscriptionType_ = subscriptionType;
|
||||
setParameter("SubscriptionType", subscriptionType);
|
||||
}
|
||||
|
||||
std::string QuerySettleBillRequest::getBillingCycle()const
|
||||
{
|
||||
return billingCycle_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setBillingCycle(const std::string& billingCycle)
|
||||
{
|
||||
billingCycle_ = billingCycle;
|
||||
setParameter("BillingCycle", billingCycle);
|
||||
}
|
||||
|
||||
std::string QuerySettleBillRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
long QuerySettleBillRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
long QuerySettleBillRequest::getBillOwnerId()const
|
||||
{
|
||||
return billOwnerId_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setBillOwnerId(long billOwnerId)
|
||||
{
|
||||
billOwnerId_ = billOwnerId;
|
||||
setParameter("BillOwnerId", std::to_string(billOwnerId));
|
||||
}
|
||||
|
||||
std::string QuerySettleBillRequest::getProductType()const
|
||||
{
|
||||
return productType_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setProductType(const std::string& productType)
|
||||
{
|
||||
productType_ = productType;
|
||||
setParameter("ProductType", productType);
|
||||
}
|
||||
|
||||
std::string QuerySettleBillRequest::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setNextToken(const std::string& nextToken)
|
||||
{
|
||||
nextToken_ = nextToken;
|
||||
setParameter("NextToken", nextToken);
|
||||
}
|
||||
|
||||
int QuerySettleBillRequest::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void QuerySettleBillRequest::setMaxResults(int maxResults)
|
||||
{
|
||||
maxResults_ = maxResults;
|
||||
setParameter("MaxResults", std::to_string(maxResults));
|
||||
}
|
||||
|
||||
149
bssopenapi/src/model/QuerySettleBillResult.cc
Normal file
149
bssopenapi/src/model/QuerySettleBillResult.cc
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* 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/bssopenapi/model/QuerySettleBillResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
QuerySettleBillResult::QuerySettleBillResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QuerySettleBillResult::QuerySettleBillResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QuerySettleBillResult::~QuerySettleBillResult()
|
||||
{}
|
||||
|
||||
void QuerySettleBillResult::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["BillingCycle"].isNull())
|
||||
data_.billingCycle = dataNode["BillingCycle"].asString();
|
||||
if(!dataNode["AccountID"].isNull())
|
||||
data_.accountID = dataNode["AccountID"].asString();
|
||||
if(!dataNode["AccountName"].isNull())
|
||||
data_.accountName = dataNode["AccountName"].asString();
|
||||
if(!dataNode["NextToken"].isNull())
|
||||
data_.nextToken = dataNode["NextToken"].asString();
|
||||
if(!dataNode["MaxResults"].isNull())
|
||||
data_.maxResults = std::stoi(dataNode["MaxResults"].asString());
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
|
||||
auto allItemsNode = dataNode["Items"]["Item"];
|
||||
for (auto dataNodeItemsItem : allItemsNode)
|
||||
{
|
||||
Data::Item itemObject;
|
||||
if(!dataNodeItemsItem["RecordID"].isNull())
|
||||
itemObject.recordID = dataNodeItemsItem["RecordID"].asString();
|
||||
if(!dataNodeItemsItem["Item"].isNull())
|
||||
itemObject.item = dataNodeItemsItem["Item"].asString();
|
||||
if(!dataNodeItemsItem["OwnerID"].isNull())
|
||||
itemObject.ownerID = dataNodeItemsItem["OwnerID"].asString();
|
||||
if(!dataNodeItemsItem["UsageStartTime"].isNull())
|
||||
itemObject.usageStartTime = dataNodeItemsItem["UsageStartTime"].asString();
|
||||
if(!dataNodeItemsItem["UsageEndTime"].isNull())
|
||||
itemObject.usageEndTime = dataNodeItemsItem["UsageEndTime"].asString();
|
||||
if(!dataNodeItemsItem["PaymentTime"].isNull())
|
||||
itemObject.paymentTime = dataNodeItemsItem["PaymentTime"].asString();
|
||||
if(!dataNodeItemsItem["ProductCode"].isNull())
|
||||
itemObject.productCode = dataNodeItemsItem["ProductCode"].asString();
|
||||
if(!dataNodeItemsItem["ProductType"].isNull())
|
||||
itemObject.productType = dataNodeItemsItem["ProductType"].asString();
|
||||
if(!dataNodeItemsItem["SubscriptionType"].isNull())
|
||||
itemObject.subscriptionType = dataNodeItemsItem["SubscriptionType"].asString();
|
||||
if(!dataNodeItemsItem["ProductName"].isNull())
|
||||
itemObject.productName = dataNodeItemsItem["ProductName"].asString();
|
||||
if(!dataNodeItemsItem["ProductDetail"].isNull())
|
||||
itemObject.productDetail = dataNodeItemsItem["ProductDetail"].asString();
|
||||
if(!dataNodeItemsItem["PretaxGrossAmount"].isNull())
|
||||
itemObject.pretaxGrossAmount = std::stof(dataNodeItemsItem["PretaxGrossAmount"].asString());
|
||||
if(!dataNodeItemsItem["DeductedByCoupons"].isNull())
|
||||
itemObject.deductedByCoupons = std::stof(dataNodeItemsItem["DeductedByCoupons"].asString());
|
||||
if(!dataNodeItemsItem["InvoiceDiscount"].isNull())
|
||||
itemObject.invoiceDiscount = std::stof(dataNodeItemsItem["InvoiceDiscount"].asString());
|
||||
if(!dataNodeItemsItem["PretaxAmount"].isNull())
|
||||
itemObject.pretaxAmount = std::stof(dataNodeItemsItem["PretaxAmount"].asString());
|
||||
if(!dataNodeItemsItem["Currency"].isNull())
|
||||
itemObject.currency = dataNodeItemsItem["Currency"].asString();
|
||||
if(!dataNodeItemsItem["PretaxAmountLocal"].isNull())
|
||||
itemObject.pretaxAmountLocal = std::stof(dataNodeItemsItem["PretaxAmountLocal"].asString());
|
||||
if(!dataNodeItemsItem["Tax"].isNull())
|
||||
itemObject.tax = std::stof(dataNodeItemsItem["Tax"].asString());
|
||||
if(!dataNodeItemsItem["PaymentAmount"].isNull())
|
||||
itemObject.paymentAmount = std::stof(dataNodeItemsItem["PaymentAmount"].asString());
|
||||
if(!dataNodeItemsItem["DeductedByCashCoupons"].isNull())
|
||||
itemObject.deductedByCashCoupons = std::stof(dataNodeItemsItem["DeductedByCashCoupons"].asString());
|
||||
if(!dataNodeItemsItem["DeductedByPrepaidCard"].isNull())
|
||||
itemObject.deductedByPrepaidCard = std::stof(dataNodeItemsItem["DeductedByPrepaidCard"].asString());
|
||||
if(!dataNodeItemsItem["OutstandingAmount"].isNull())
|
||||
itemObject.outstandingAmount = std::stof(dataNodeItemsItem["OutstandingAmount"].asString());
|
||||
if(!dataNodeItemsItem["AfterTaxAmount"].isNull())
|
||||
itemObject.afterTaxAmount = std::stof(dataNodeItemsItem["AfterTaxAmount"].asString());
|
||||
if(!dataNodeItemsItem["Status"].isNull())
|
||||
itemObject.status = dataNodeItemsItem["Status"].asString();
|
||||
if(!dataNodeItemsItem["PaymentCurrency"].isNull())
|
||||
itemObject.paymentCurrency = dataNodeItemsItem["PaymentCurrency"].asString();
|
||||
if(!dataNodeItemsItem["PaymentTransactionID"].isNull())
|
||||
itemObject.paymentTransactionID = dataNodeItemsItem["PaymentTransactionID"].asString();
|
||||
if(!dataNodeItemsItem["RoundDownDiscount"].isNull())
|
||||
itemObject.roundDownDiscount = dataNodeItemsItem["RoundDownDiscount"].asString();
|
||||
if(!dataNodeItemsItem["SubOrderId"].isNull())
|
||||
itemObject.subOrderId = dataNodeItemsItem["SubOrderId"].asString();
|
||||
if(!dataNodeItemsItem["PipCode"].isNull())
|
||||
itemObject.pipCode = dataNodeItemsItem["PipCode"].asString();
|
||||
if(!dataNodeItemsItem["CommodityCode"].isNull())
|
||||
itemObject.commodityCode = dataNodeItemsItem["CommodityCode"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string QuerySettleBillResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
QuerySettleBillResult::Data QuerySettleBillResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QuerySettleBillResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QuerySettleBillResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,17 @@ void QuerySplitItemBillRequest::setPageNum(int pageNum)
|
||||
setParameter("PageNum", std::to_string(pageNum));
|
||||
}
|
||||
|
||||
long QuerySplitItemBillRequest::getBillOwnerId()const
|
||||
{
|
||||
return billOwnerId_;
|
||||
}
|
||||
|
||||
void QuerySplitItemBillRequest::setBillOwnerId(long billOwnerId)
|
||||
{
|
||||
billOwnerId_ = billOwnerId;
|
||||
setParameter("BillOwnerId", std::to_string(billOwnerId));
|
||||
}
|
||||
|
||||
std::string QuerySplitItemBillRequest::getProductType()const
|
||||
{
|
||||
return productType_;
|
||||
|
||||
@@ -132,6 +132,10 @@ void QuerySplitItemBillResult::parse(const std::string &payload)
|
||||
itemObject.splitItemID = dataNodeItemsItem["SplitItemID"].asString();
|
||||
if(!dataNodeItemsItem["SplitItemName"].isNull())
|
||||
itemObject.splitItemName = dataNodeItemsItem["SplitItemName"].asString();
|
||||
if(!dataNodeItemsItem["PipCode"].isNull())
|
||||
itemObject.pipCode = dataNodeItemsItem["PipCode"].asString();
|
||||
if(!dataNodeItemsItem["CommodityCode"].isNull())
|
||||
itemObject.commodityCode = dataNodeItemsItem["CommodityCode"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user