Modify QueryAccountBill, support group by product.
This commit is contained in:
@@ -27,6 +27,17 @@ QueryAccountBillRequest::QueryAccountBillRequest() :
|
||||
QueryAccountBillRequest::~QueryAccountBillRequest()
|
||||
{}
|
||||
|
||||
std::string QueryAccountBillRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void QueryAccountBillRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setCoreParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
std::string QueryAccountBillRequest::getBillingCycle()const
|
||||
{
|
||||
return billingCycle_;
|
||||
@@ -60,6 +71,17 @@ void QueryAccountBillRequest::setOwnerID(long ownerID)
|
||||
setCoreParameter("OwnerID", std::to_string(ownerID));
|
||||
}
|
||||
|
||||
bool QueryAccountBillRequest::getIsGroupByProduct()const
|
||||
{
|
||||
return isGroupByProduct_;
|
||||
}
|
||||
|
||||
void QueryAccountBillRequest::setIsGroupByProduct(bool isGroupByProduct)
|
||||
{
|
||||
isGroupByProduct_ = isGroupByProduct;
|
||||
setCoreParameter("IsGroupByProduct", isGroupByProduct ? "true" : "false");
|
||||
}
|
||||
|
||||
int QueryAccountBillRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
|
||||
@@ -80,6 +80,12 @@ void QueryAccountBillResult::parse(const std::string &payload)
|
||||
itemObject.currency = dataNodeItemsItem["Currency"].asString();
|
||||
if(!dataNodeItemsItem["OwnerName"].isNull())
|
||||
itemObject.ownerName = dataNodeItemsItem["OwnerName"].asString();
|
||||
if(!dataNodeItemsItem["ProductCode"].isNull())
|
||||
itemObject.productCode = dataNodeItemsItem["ProductCode"].asString();
|
||||
if(!dataNodeItemsItem["ProductName"].isNull())
|
||||
itemObject.productName = dataNodeItemsItem["ProductName"].asString();
|
||||
if(!dataNodeItemsItem["SubscriptionType"].isNull())
|
||||
itemObject.subscriptionType = dataNodeItemsItem["SubscriptionType"].asString();
|
||||
data_.items.push_back(itemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user