基于转移码的转出接口

This commit is contained in:
sdk-team
2024-10-17 11:52:52 +00:00
parent a7841818f4
commit 183190fd14
14 changed files with 572 additions and 25 deletions

View File

@@ -2823,6 +2823,42 @@ DomainClient::SaveBatchTaskForReserveDropListDomainOutcomeCallable DomainClient:
return task->get_future();
}
DomainClient::SaveBatchTaskForTransferOutByAuthorizationCodeOutcome DomainClient::saveBatchTaskForTransferOutByAuthorizationCode(const SaveBatchTaskForTransferOutByAuthorizationCodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SaveBatchTaskForTransferOutByAuthorizationCodeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SaveBatchTaskForTransferOutByAuthorizationCodeOutcome(SaveBatchTaskForTransferOutByAuthorizationCodeResult(outcome.result()));
else
return SaveBatchTaskForTransferOutByAuthorizationCodeOutcome(outcome.error());
}
void DomainClient::saveBatchTaskForTransferOutByAuthorizationCodeAsync(const SaveBatchTaskForTransferOutByAuthorizationCodeRequest& request, const SaveBatchTaskForTransferOutByAuthorizationCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, saveBatchTaskForTransferOutByAuthorizationCode(request), context);
};
asyncExecute(new Runnable(fn));
}
DomainClient::SaveBatchTaskForTransferOutByAuthorizationCodeOutcomeCallable DomainClient::saveBatchTaskForTransferOutByAuthorizationCodeCallable(const SaveBatchTaskForTransferOutByAuthorizationCodeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SaveBatchTaskForTransferOutByAuthorizationCodeOutcome()>>(
[this, request]()
{
return this->saveBatchTaskForTransferOutByAuthorizationCode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DomainClient::SaveBatchTaskForTransferProhibitionLockOutcome DomainClient::saveBatchTaskForTransferProhibitionLock(const SaveBatchTaskForTransferProhibitionLockRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3903,6 +3939,42 @@ DomainClient::SaveSingleTaskForSynchronizingDnsHostOutcomeCallable DomainClient:
return task->get_future();
}
DomainClient::SaveSingleTaskForTransferOutByAuthorizationCodeOutcome DomainClient::saveSingleTaskForTransferOutByAuthorizationCode(const SaveSingleTaskForTransferOutByAuthorizationCodeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SaveSingleTaskForTransferOutByAuthorizationCodeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SaveSingleTaskForTransferOutByAuthorizationCodeOutcome(SaveSingleTaskForTransferOutByAuthorizationCodeResult(outcome.result()));
else
return SaveSingleTaskForTransferOutByAuthorizationCodeOutcome(outcome.error());
}
void DomainClient::saveSingleTaskForTransferOutByAuthorizationCodeAsync(const SaveSingleTaskForTransferOutByAuthorizationCodeRequest& request, const SaveSingleTaskForTransferOutByAuthorizationCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, saveSingleTaskForTransferOutByAuthorizationCode(request), context);
};
asyncExecute(new Runnable(fn));
}
DomainClient::SaveSingleTaskForTransferOutByAuthorizationCodeOutcomeCallable DomainClient::saveSingleTaskForTransferOutByAuthorizationCodeCallable(const SaveSingleTaskForTransferOutByAuthorizationCodeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SaveSingleTaskForTransferOutByAuthorizationCodeOutcome()>>(
[this, request]()
{
return this->saveSingleTaskForTransferOutByAuthorizationCode(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DomainClient::SaveSingleTaskForTransferProhibitionLockOutcome DomainClient::saveSingleTaskForTransferProhibitionLock(const SaveSingleTaskForTransferProhibitionLockRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -40,22 +40,36 @@ void QueryIntlFixedPriceOrderListResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto moduleNode = value["Module"];
if(!moduleNode["CreateTime"].isNull())
module_.createTime = std::stol(moduleNode["CreateTime"].asString());
if(!moduleNode["UpdateTime"].isNull())
module_.updateTime = std::stol(moduleNode["UpdateTime"].asString());
if(!moduleNode["UserId"].isNull())
module_.userId = moduleNode["UserId"].asString();
if(!moduleNode["BizId"].isNull())
module_.bizId = moduleNode["BizId"].asString();
if(!moduleNode["Domain"].isNull())
module_.domain = moduleNode["Domain"].asString();
if(!moduleNode["Price"].isNull())
module_.price = std::stol(moduleNode["Price"].asString());
if(!moduleNode["Status"].isNull())
module_.status = std::stol(moduleNode["Status"].asString());
if(!moduleNode["OrderType"].isNull())
module_.orderType = std::stol(moduleNode["OrderType"].asString());
if(!moduleNode["TotalItemNum"].isNull())
module_.totalItemNum = std::stoi(moduleNode["TotalItemNum"].asString());
if(!moduleNode["CurrentPageNum"].isNull())
module_.currentPageNum = std::stoi(moduleNode["CurrentPageNum"].asString());
if(!moduleNode["PageSize"].isNull())
module_.pageSize = std::stoi(moduleNode["PageSize"].asString());
if(!moduleNode["TotalPageNum"].isNull())
module_.totalPageNum = std::stoi(moduleNode["TotalPageNum"].asString());
auto allDataNode = moduleNode["Data"]["OrderList"];
for (auto moduleNodeDataOrderList : allDataNode)
{
Module::OrderList orderListObject;
if(!moduleNodeDataOrderList["OrderType"].isNull())
orderListObject.orderType = std::stoi(moduleNodeDataOrderList["OrderType"].asString());
if(!moduleNodeDataOrderList["BizId"].isNull())
orderListObject.bizId = moduleNodeDataOrderList["BizId"].asString();
if(!moduleNodeDataOrderList["UserId"].isNull())
orderListObject.userId = moduleNodeDataOrderList["UserId"].asString();
if(!moduleNodeDataOrderList["Status"].isNull())
orderListObject.status = std::stoi(moduleNodeDataOrderList["Status"].asString());
if(!moduleNodeDataOrderList["Price"].isNull())
orderListObject.price = std::stol(moduleNodeDataOrderList["Price"].asString());
if(!moduleNodeDataOrderList["Domain"].isNull())
orderListObject.domain = moduleNodeDataOrderList["Domain"].asString();
if(!moduleNodeDataOrderList["CreateTime"].isNull())
orderListObject.createTime = std::stol(moduleNodeDataOrderList["CreateTime"].asString());
if(!moduleNodeDataOrderList["UpdateTime"].isNull())
orderListObject.updateTime = std::stol(moduleNodeDataOrderList["UpdateTime"].asString());
module_.data.push_back(orderListObject);
}
}

View File

@@ -0,0 +1,59 @@
/*
* 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/domain/model/SaveBatchTaskForTransferOutByAuthorizationCodeRequest.h>
using AlibabaCloud::Domain::Model::SaveBatchTaskForTransferOutByAuthorizationCodeRequest;
SaveBatchTaskForTransferOutByAuthorizationCodeRequest::SaveBatchTaskForTransferOutByAuthorizationCodeRequest()
: RpcServiceRequest("domain", "2018-01-29", "SaveBatchTaskForTransferOutByAuthorizationCode") {
setMethod(HttpRequest::Method::Post);
}
SaveBatchTaskForTransferOutByAuthorizationCodeRequest::~SaveBatchTaskForTransferOutByAuthorizationCodeRequest() {}
std::string SaveBatchTaskForTransferOutByAuthorizationCodeRequest::getLong() const {
return long_;
}
void SaveBatchTaskForTransferOutByAuthorizationCodeRequest::setLong(const std::string &long) {
long_ = long;
setParameter(std::string("Long"), long);
}
std::vector<SaveBatchTaskForTransferOutByAuthorizationCodeRequest::TransferOutParamList> SaveBatchTaskForTransferOutByAuthorizationCodeRequest::getTransferOutParamList() const {
return transferOutParamList_;
}
void SaveBatchTaskForTransferOutByAuthorizationCodeRequest::setTransferOutParamList(const std::vector<SaveBatchTaskForTransferOutByAuthorizationCodeRequest::TransferOutParamList> &transferOutParamList) {
transferOutParamList_ = transferOutParamList;
for(int dep1 = 0; dep1 != transferOutParamList.size(); dep1++) {
auto transferOutParamListObj = transferOutParamList.at(dep1);
std::string transferOutParamListObjStr = std::string("TransferOutParamList") + "." + std::to_string(dep1 + 1);
setParameter(transferOutParamListObjStr + ".AuthorizationCode", transferOutParamListObj.authorizationCode);
setParameter(transferOutParamListObjStr + ".DomainName", transferOutParamListObj.domainName);
}
}
std::string SaveBatchTaskForTransferOutByAuthorizationCodeRequest::getUserClientIp() const {
return userClientIp_;
}
void SaveBatchTaskForTransferOutByAuthorizationCodeRequest::setUserClientIp(const std::string &userClientIp) {
userClientIp_ = userClientIp;
setParameter(std::string("UserClientIp"), userClientIp);
}

View File

@@ -0,0 +1,51 @@
/*
* 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/domain/model/SaveBatchTaskForTransferOutByAuthorizationCodeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Domain;
using namespace AlibabaCloud::Domain::Model;
SaveBatchTaskForTransferOutByAuthorizationCodeResult::SaveBatchTaskForTransferOutByAuthorizationCodeResult() :
ServiceResult()
{}
SaveBatchTaskForTransferOutByAuthorizationCodeResult::SaveBatchTaskForTransferOutByAuthorizationCodeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SaveBatchTaskForTransferOutByAuthorizationCodeResult::~SaveBatchTaskForTransferOutByAuthorizationCodeResult()
{}
void SaveBatchTaskForTransferOutByAuthorizationCodeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["TaskNo"].isNull())
taskNo_ = value["TaskNo"].asString();
}
std::string SaveBatchTaskForTransferOutByAuthorizationCodeResult::getTaskNo()const
{
return taskNo_;
}

View File

@@ -0,0 +1,63 @@
/*
* 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/domain/model/SaveSingleTaskForTransferOutByAuthorizationCodeRequest.h>
using AlibabaCloud::Domain::Model::SaveSingleTaskForTransferOutByAuthorizationCodeRequest;
SaveSingleTaskForTransferOutByAuthorizationCodeRequest::SaveSingleTaskForTransferOutByAuthorizationCodeRequest()
: RpcServiceRequest("domain", "2018-01-29", "SaveSingleTaskForTransferOutByAuthorizationCode") {
setMethod(HttpRequest::Method::Post);
}
SaveSingleTaskForTransferOutByAuthorizationCodeRequest::~SaveSingleTaskForTransferOutByAuthorizationCodeRequest() {}
std::string SaveSingleTaskForTransferOutByAuthorizationCodeRequest::getDomainName() const {
return domainName_;
}
void SaveSingleTaskForTransferOutByAuthorizationCodeRequest::setDomainName(const std::string &domainName) {
domainName_ = domainName;
setParameter(std::string("DomainName"), domainName);
}
std::string SaveSingleTaskForTransferOutByAuthorizationCodeRequest::getAuthorizationCode() const {
return authorizationCode_;
}
void SaveSingleTaskForTransferOutByAuthorizationCodeRequest::setAuthorizationCode(const std::string &authorizationCode) {
authorizationCode_ = authorizationCode;
setParameter(std::string("AuthorizationCode"), authorizationCode);
}
std::string SaveSingleTaskForTransferOutByAuthorizationCodeRequest::getUserClientIp() const {
return userClientIp_;
}
void SaveSingleTaskForTransferOutByAuthorizationCodeRequest::setUserClientIp(const std::string &userClientIp) {
userClientIp_ = userClientIp;
setParameter(std::string("UserClientIp"), userClientIp);
}
std::string SaveSingleTaskForTransferOutByAuthorizationCodeRequest::getLang() const {
return lang_;
}
void SaveSingleTaskForTransferOutByAuthorizationCodeRequest::setLang(const std::string &lang) {
lang_ = lang;
setParameter(std::string("Lang"), lang);
}

View File

@@ -0,0 +1,51 @@
/*
* 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/domain/model/SaveSingleTaskForTransferOutByAuthorizationCodeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Domain;
using namespace AlibabaCloud::Domain::Model;
SaveSingleTaskForTransferOutByAuthorizationCodeResult::SaveSingleTaskForTransferOutByAuthorizationCodeResult() :
ServiceResult()
{}
SaveSingleTaskForTransferOutByAuthorizationCodeResult::SaveSingleTaskForTransferOutByAuthorizationCodeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SaveSingleTaskForTransferOutByAuthorizationCodeResult::~SaveSingleTaskForTransferOutByAuthorizationCodeResult()
{}
void SaveSingleTaskForTransferOutByAuthorizationCodeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["TaskNo"].isNull())
taskNo_ = value["TaskNo"].asString();
}
std::string SaveSingleTaskForTransferOutByAuthorizationCodeResult::getTaskNo()const
{
return taskNo_;
}