diff --git a/CHANGELOG b/CHANGELOG index e553d33fc..b4ca49284 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2020-08-13 Version: 1.36.580 +- Add PipCode and CommodityCode for QueryInstanceBill, QueryBillOverview, QueryBill, QuerySettleBill, QueryAccountBill, QuerySplitItemBill. +- Support BillOwnerId filter for QueryInstanceBill, QueryBillOverview, QueryBill, QuerySettleBill, QueryAccountBill, QuerySplitItemBill. + 2020-08-13 Version: 1.36.579 - Release DetectKneeXRay DetectSpineMRI TranslateMed. diff --git a/VERSION b/VERSION index 0dcae2bb6..5cfced496 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.579 \ No newline at end of file +1.36.580 \ No newline at end of file diff --git a/bssopenapi/CMakeLists.txt b/bssopenapi/CMakeLists.txt index 22088523d..a30e635a5 100644 --- a/bssopenapi/CMakeLists.txt +++ b/bssopenapi/CMakeLists.txt @@ -113,6 +113,8 @@ set(bssopenapi_public_header_model include/alibabacloud/bssopenapi/model/QueryResellerAvailableQuotaResult.h include/alibabacloud/bssopenapi/model/QueryResourcePackageInstancesRequest.h include/alibabacloud/bssopenapi/model/QueryResourcePackageInstancesResult.h + include/alibabacloud/bssopenapi/model/QuerySettleBillRequest.h + include/alibabacloud/bssopenapi/model/QuerySettleBillResult.h include/alibabacloud/bssopenapi/model/QuerySettlementBillRequest.h include/alibabacloud/bssopenapi/model/QuerySettlementBillResult.h include/alibabacloud/bssopenapi/model/QuerySplitItemBillRequest.h @@ -232,6 +234,8 @@ set(bssopenapi_src src/model/QueryResellerAvailableQuotaResult.cc src/model/QueryResourcePackageInstancesRequest.cc src/model/QueryResourcePackageInstancesResult.cc + src/model/QuerySettleBillRequest.cc + src/model/QuerySettleBillResult.cc src/model/QuerySettlementBillRequest.cc src/model/QuerySettlementBillResult.cc src/model/QuerySplitItemBillRequest.cc diff --git a/bssopenapi/include/alibabacloud/bssopenapi/BssOpenApiClient.h b/bssopenapi/include/alibabacloud/bssopenapi/BssOpenApiClient.h index 6975dd685..cdc5fe626 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/BssOpenApiClient.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/BssOpenApiClient.h @@ -114,6 +114,8 @@ #include "model/QueryResellerAvailableQuotaResult.h" #include "model/QueryResourcePackageInstancesRequest.h" #include "model/QueryResourcePackageInstancesResult.h" +#include "model/QuerySettleBillRequest.h" +#include "model/QuerySettleBillResult.h" #include "model/QuerySettlementBillRequest.h" #include "model/QuerySettlementBillResult.h" #include "model/QuerySplitItemBillRequest.h" @@ -285,6 +287,9 @@ namespace AlibabaCloud typedef Outcome QueryResourcePackageInstancesOutcome; typedef std::future QueryResourcePackageInstancesOutcomeCallable; typedef std::function&)> QueryResourcePackageInstancesAsyncHandler; + typedef Outcome QuerySettleBillOutcome; + typedef std::future QuerySettleBillOutcomeCallable; + typedef std::function&)> QuerySettleBillAsyncHandler; typedef Outcome QuerySettlementBillOutcome; typedef std::future QuerySettlementBillOutcomeCallable; typedef std::function&)> QuerySettlementBillAsyncHandler; @@ -464,6 +469,9 @@ namespace AlibabaCloud QueryResourcePackageInstancesOutcome queryResourcePackageInstances(const Model::QueryResourcePackageInstancesRequest &request)const; void queryResourcePackageInstancesAsync(const Model::QueryResourcePackageInstancesRequest& request, const QueryResourcePackageInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryResourcePackageInstancesOutcomeCallable queryResourcePackageInstancesCallable(const Model::QueryResourcePackageInstancesRequest& request) const; + QuerySettleBillOutcome querySettleBill(const Model::QuerySettleBillRequest &request)const; + void querySettleBillAsync(const Model::QuerySettleBillRequest& request, const QuerySettleBillAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + QuerySettleBillOutcomeCallable querySettleBillCallable(const Model::QuerySettleBillRequest& request) const; QuerySettlementBillOutcome querySettlementBill(const Model::QuerySettlementBillRequest &request)const; void querySettlementBillAsync(const Model::QuerySettlementBillRequest& request, const QuerySettlementBillAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QuerySettlementBillOutcomeCallable querySettlementBillCallable(const Model::QuerySettlementBillRequest& request) const; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/AllocateCostUnitResourceRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/AllocateCostUnitResourceRequest.h index 7d3c5ec58..4bee1ed2f 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/AllocateCostUnitResourceRequest.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/AllocateCostUnitResourceRequest.h @@ -36,6 +36,7 @@ namespace AlibabaCloud std::string resourceId; std::string commodityCode; long resourceUserId; + std::string apportionCode; }; public: diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillRequest.h index 7091a5027..3cc2a8e25 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillRequest.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setPageNum(int pageNum); long getOwnerID()const; void setOwnerID(long ownerID); + long getBillOwnerId()const; + void setBillOwnerId(long billOwnerId); bool getIsGroupByProduct()const; void setIsGroupByProduct(bool isGroupByProduct); int getPageSize()const; @@ -53,6 +55,7 @@ namespace AlibabaCloud std::string billingCycle_; int pageNum_; long ownerID_; + long billOwnerId_; bool isGroupByProduct_; int pageSize_; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillResult.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillResult.h index f63f1772b..e353d6d3d 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillResult.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryAccountBillResult.h @@ -44,6 +44,7 @@ namespace AlibabaCloud float outstandingAmount; float paymentAmount; float deductedByPrepaidCard; + std::string pipCode; float invoiceDiscount; std::string subscriptionType; float pretaxGrossAmount; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewRequest.h index 3d9f4d404..7e5c48d28 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewRequest.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewRequest.h @@ -41,6 +41,8 @@ namespace AlibabaCloud void setSubscriptionType(const std::string& subscriptionType); std::string getBillingCycle()const; void setBillingCycle(const std::string& billingCycle); + long getBillOwnerId()const; + void setBillOwnerId(long billOwnerId); std::string getProductType()const; void setProductType(const std::string& productType); @@ -48,6 +50,7 @@ namespace AlibabaCloud std::string productCode_; std::string subscriptionType_; std::string billingCycle_; + long billOwnerId_; std::string productType_; }; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewResult.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewResult.h index e1bcff051..e1cda319d 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewResult.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillOverviewResult.h @@ -49,12 +49,14 @@ namespace AlibabaCloud std::string paymentCurrency; float paymentAmount; float deductedByPrepaidCard; + std::string pipCode; float invoiceDiscount; std::string item; std::string subscriptionType; float pretaxGrossAmount; float pretaxAmount; std::string currency; + std::string commodityCode; float pretaxAmountLocal; }; std::string billingCycle; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillRequest.h index ed5e561e4..5e308cde9 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillRequest.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillRequest.h @@ -51,6 +51,8 @@ namespace AlibabaCloud void setOwnerId(long ownerId); int getPageNum()const; void setPageNum(int pageNum); + long getBillOwnerId()const; + void setBillOwnerId(long billOwnerId); std::string getProductType()const; void setProductType(const std::string& productType); int getPageSize()const; @@ -65,6 +67,7 @@ namespace AlibabaCloud std::string type_; long ownerId_; int pageNum_; + long billOwnerId_; std::string productType_; int pageSize_; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillResult.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillResult.h index 996e5ddd3..1f363415c 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillResult.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryBillResult.h @@ -51,6 +51,7 @@ namespace AlibabaCloud std::string subscriptionType; float pretaxGrossAmount; std::string currency; + std::string commodityCode; std::string usageStartTime; std::string status; std::string paymentTransactionID; @@ -60,6 +61,7 @@ namespace AlibabaCloud std::string productCode; std::string productType; float outstandingAmount; + std::string pipCode; std::string ownerID; float pretaxAmount; std::string recordID; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillRequest.h index 3e00876aa..2ef2ae442 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillRequest.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillRequest.h @@ -47,6 +47,8 @@ namespace AlibabaCloud void setOwnerId(long ownerId); int getPageNum()const; void setPageNum(int pageNum); + long getBillOwnerId()const; + void setBillOwnerId(long billOwnerId); std::string getBillingDate()const; void setBillingDate(const std::string& billingDate); std::string getProductType()const; @@ -65,6 +67,7 @@ namespace AlibabaCloud std::string billingCycle_; long ownerId_; int pageNum_; + long billOwnerId_; std::string billingDate_; std::string productType_; bool isBillingItem_; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillResult.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillResult.h index b8a647b98..e3fdd55e8 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillResult.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QueryInstanceBillResult.h @@ -51,6 +51,7 @@ namespace AlibabaCloud float pretaxGrossAmount; std::string instanceConfig; std::string currency; + std::string commodityCode; std::string costUnit; std::string resourceGroup; std::string billingType; @@ -64,6 +65,7 @@ namespace AlibabaCloud std::string billingItem; std::string nickName; std::string intranetIP; + std::string pipCode; std::string servicePeriodUnit; std::string servicePeriod; std::string deductedByResourcePackage; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySettleBillRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySettleBillRequest.h new file mode 100644 index 000000000..61f46b94d --- /dev/null +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySettleBillRequest.h @@ -0,0 +1,78 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYSETTLEBILLREQUEST_H_ +#define ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYSETTLEBILLREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace BssOpenApi + { + namespace Model + { + class ALIBABACLOUD_BSSOPENAPI_EXPORT QuerySettleBillRequest : public RpcServiceRequest + { + + public: + QuerySettleBillRequest(); + ~QuerySettleBillRequest(); + + std::string getProductCode()const; + void setProductCode(const std::string& productCode); + bool getIsHideZeroCharge()const; + void setIsHideZeroCharge(bool isHideZeroCharge); + bool getIsDisplayLocalCurrency()const; + void setIsDisplayLocalCurrency(bool isDisplayLocalCurrency); + std::string getSubscriptionType()const; + void setSubscriptionType(const std::string& subscriptionType); + std::string getBillingCycle()const; + void setBillingCycle(const std::string& billingCycle); + std::string getType()const; + void setType(const std::string& type); + long getOwnerId()const; + void setOwnerId(long ownerId); + long getBillOwnerId()const; + void setBillOwnerId(long billOwnerId); + std::string getProductType()const; + void setProductType(const std::string& productType); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + int getMaxResults()const; + void setMaxResults(int maxResults); + + private: + std::string productCode_; + bool isHideZeroCharge_; + bool isDisplayLocalCurrency_; + std::string subscriptionType_; + std::string billingCycle_; + std::string type_; + long ownerId_; + long billOwnerId_; + std::string productType_; + std::string nextToken_; + int maxResults_; + + }; + } + } +} +#endif // !ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYSETTLEBILLREQUEST_H_ \ No newline at end of file diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySettleBillResult.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySettleBillResult.h new file mode 100644 index 000000000..a171765f4 --- /dev/null +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySettleBillResult.h @@ -0,0 +1,100 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYSETTLEBILLRESULT_H_ +#define ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYSETTLEBILLRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace BssOpenApi + { + namespace Model + { + class ALIBABACLOUD_BSSOPENAPI_EXPORT QuerySettleBillResult : public ServiceResult + { + public: + struct Data + { + struct Item + { + float afterTaxAmount; + std::string productName; + std::string subOrderId; + float deductedByCashCoupons; + std::string paymentTime; + float tax; + std::string paymentCurrency; + float paymentAmount; + float deductedByPrepaidCard; + float invoiceDiscount; + std::string usageEndTime; + std::string item; + std::string subscriptionType; + float pretaxGrossAmount; + std::string currency; + std::string commodityCode; + std::string usageStartTime; + std::string status; + std::string paymentTransactionID; + float deductedByCoupons; + std::string roundDownDiscount; + std::string productDetail; + std::string productCode; + std::string productType; + float outstandingAmount; + std::string pipCode; + std::string ownerID; + float pretaxAmount; + std::string recordID; + float pretaxAmountLocal; + }; + std::string billingCycle; + int totalCount; + std::string accountID; + std::string nextToken; + int maxResults; + std::vector items; + std::string accountName; + }; + + + QuerySettleBillResult(); + explicit QuerySettleBillResult(const std::string &payload); + ~QuerySettleBillResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYSETTLEBILLRESULT_H_ \ No newline at end of file diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillRequest.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillRequest.h index 411e0b5aa..2e2b4f54f 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillRequest.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillRequest.h @@ -45,6 +45,8 @@ namespace AlibabaCloud void setOwnerId(long ownerId); int getPageNum()const; void setPageNum(int pageNum); + long getBillOwnerId()const; + void setBillOwnerId(long billOwnerId); std::string getProductType()const; void setProductType(const std::string& productType); int getPageSize()const; @@ -56,6 +58,7 @@ namespace AlibabaCloud std::string billingCycle_; long ownerId_; int pageNum_; + long billOwnerId_; std::string productType_; int pageSize_; diff --git a/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillResult.h b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillResult.h index 3e2b462bd..8ed2224f3 100644 --- a/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillResult.h +++ b/bssopenapi/include/alibabacloud/bssopenapi/model/QuerySplitItemBillResult.h @@ -52,6 +52,7 @@ namespace AlibabaCloud float pretaxGrossAmount; std::string instanceConfig; std::string currency; + std::string commodityCode; std::string costUnit; std::string resourceGroup; std::string billingType; @@ -65,6 +66,7 @@ namespace AlibabaCloud std::string billingItem; std::string nickName; std::string intranetIP; + std::string pipCode; std::string servicePeriod; std::string splitItemID; std::string deductedByResourcePackage; diff --git a/bssopenapi/src/BssOpenApiClient.cc b/bssopenapi/src/BssOpenApiClient.cc index aa32907dc..adb881f68 100644 --- a/bssopenapi/src/BssOpenApiClient.cc +++ b/bssopenapi/src/BssOpenApiClient.cc @@ -1707,6 +1707,42 @@ BssOpenApiClient::QueryResourcePackageInstancesOutcomeCallable BssOpenApiClient: return task->get_future(); } +BssOpenApiClient::QuerySettleBillOutcome BssOpenApiClient::querySettleBill(const QuerySettleBillRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return QuerySettleBillOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return QuerySettleBillOutcome(QuerySettleBillResult(outcome.result())); + else + return QuerySettleBillOutcome(outcome.error()); +} + +void BssOpenApiClient::querySettleBillAsync(const QuerySettleBillRequest& request, const QuerySettleBillAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, querySettleBill(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +BssOpenApiClient::QuerySettleBillOutcomeCallable BssOpenApiClient::querySettleBillCallable(const QuerySettleBillRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->querySettleBill(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + BssOpenApiClient::QuerySettlementBillOutcome BssOpenApiClient::querySettlementBill(const QuerySettlementBillRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/bssopenapi/src/model/AllocateCostUnitResourceRequest.cc b/bssopenapi/src/model/AllocateCostUnitResourceRequest.cc index caba1bc34..669a8982b 100644 --- a/bssopenapi/src/model/AllocateCostUnitResourceRequest.cc +++ b/bssopenapi/src/model/AllocateCostUnitResourceRequest.cc @@ -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); } } diff --git a/bssopenapi/src/model/QueryAccountBillRequest.cc b/bssopenapi/src/model/QueryAccountBillRequest.cc index 44884063c..3be90d1fd 100644 --- a/bssopenapi/src/model/QueryAccountBillRequest.cc +++ b/bssopenapi/src/model/QueryAccountBillRequest.cc @@ -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_; diff --git a/bssopenapi/src/model/QueryAccountBillResult.cc b/bssopenapi/src/model/QueryAccountBillResult.cc index 6b0aecb39..a88a0e648 100644 --- a/bssopenapi/src/model/QueryAccountBillResult.cc +++ b/bssopenapi/src/model/QueryAccountBillResult.cc @@ -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()) diff --git a/bssopenapi/src/model/QueryBillOverviewRequest.cc b/bssopenapi/src/model/QueryBillOverviewRequest.cc index af2cac8e6..451c3f6b6 100644 --- a/bssopenapi/src/model/QueryBillOverviewRequest.cc +++ b/bssopenapi/src/model/QueryBillOverviewRequest.cc @@ -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_; diff --git a/bssopenapi/src/model/QueryBillOverviewResult.cc b/bssopenapi/src/model/QueryBillOverviewResult.cc index 00215c8d6..817dc37d3 100644 --- a/bssopenapi/src/model/QueryBillOverviewResult.cc +++ b/bssopenapi/src/model/QueryBillOverviewResult.cc @@ -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()) diff --git a/bssopenapi/src/model/QueryBillRequest.cc b/bssopenapi/src/model/QueryBillRequest.cc index 65d45530f..cd1446dfe 100644 --- a/bssopenapi/src/model/QueryBillRequest.cc +++ b/bssopenapi/src/model/QueryBillRequest.cc @@ -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_; diff --git a/bssopenapi/src/model/QueryBillResult.cc b/bssopenapi/src/model/QueryBillResult.cc index 135c9703b..0d9ee0a00 100644 --- a/bssopenapi/src/model/QueryBillResult.cc +++ b/bssopenapi/src/model/QueryBillResult.cc @@ -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()) diff --git a/bssopenapi/src/model/QueryInstanceBillRequest.cc b/bssopenapi/src/model/QueryInstanceBillRequest.cc index 5ccdc86d3..1d5fd1aec 100644 --- a/bssopenapi/src/model/QueryInstanceBillRequest.cc +++ b/bssopenapi/src/model/QueryInstanceBillRequest.cc @@ -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_; diff --git a/bssopenapi/src/model/QueryInstanceBillResult.cc b/bssopenapi/src/model/QueryInstanceBillResult.cc index 4f54476a9..acbcd980f 100644 --- a/bssopenapi/src/model/QueryInstanceBillResult.cc +++ b/bssopenapi/src/model/QueryInstanceBillResult.cc @@ -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()) diff --git a/bssopenapi/src/model/QuerySettleBillRequest.cc b/bssopenapi/src/model/QuerySettleBillRequest.cc new file mode 100644 index 000000000..89b102514 --- /dev/null +++ b/bssopenapi/src/model/QuerySettleBillRequest.cc @@ -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 + +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)); +} + diff --git a/bssopenapi/src/model/QuerySettleBillResult.cc b/bssopenapi/src/model/QuerySettleBillResult.cc new file mode 100644 index 000000000..65c6c9bb6 --- /dev/null +++ b/bssopenapi/src/model/QuerySettleBillResult.cc @@ -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 +#include + +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_; +} + diff --git a/bssopenapi/src/model/QuerySplitItemBillRequest.cc b/bssopenapi/src/model/QuerySplitItemBillRequest.cc index c7f233ee4..790ee41cc 100644 --- a/bssopenapi/src/model/QuerySplitItemBillRequest.cc +++ b/bssopenapi/src/model/QuerySplitItemBillRequest.cc @@ -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_; diff --git a/bssopenapi/src/model/QuerySplitItemBillResult.cc b/bssopenapi/src/model/QuerySplitItemBillResult.cc index 320706cf6..faabba696 100644 --- a/bssopenapi/src/model/QuerySplitItemBillResult.cc +++ b/bssopenapi/src/model/QuerySplitItemBillResult.cc @@ -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())