Added audit status.
This commit is contained in:
@@ -31,21 +31,21 @@ DomainClient::DomainClient(const Credentials &credentials, const ClientConfigura
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "domain");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
DomainClient::DomainClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "domain");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
DomainClient::DomainClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "domain");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
DomainClient::~DomainClient()
|
||||
@@ -411,6 +411,42 @@ DomainClient::CheckDomainOutcomeCallable DomainClient::checkDomainCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DomainClient::CheckDomainStatusOutcome DomainClient::checkDomainStatus(const CheckDomainStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CheckDomainStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CheckDomainStatusOutcome(CheckDomainStatusResult(outcome.result()));
|
||||
else
|
||||
return CheckDomainStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DomainClient::checkDomainStatusAsync(const CheckDomainStatusRequest& request, const CheckDomainStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, checkDomainStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DomainClient::CheckDomainStatusOutcomeCallable DomainClient::checkDomainStatusCallable(const CheckDomainStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CheckDomainStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->checkDomainStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DomainClient::CheckDomainSunriseClaimOutcome DomainClient::checkDomainSunriseClaim(const CheckDomainSunriseClaimRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -591,6 +627,42 @@ DomainClient::ConfirmTransferInEmailOutcomeCallable DomainClient::confirmTransfe
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DomainClient::CreateFixedPriceDemandOrderOutcome DomainClient::createFixedPriceDemandOrder(const CreateFixedPriceDemandOrderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateFixedPriceDemandOrderOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateFixedPriceDemandOrderOutcome(CreateFixedPriceDemandOrderResult(outcome.result()));
|
||||
else
|
||||
return CreateFixedPriceDemandOrderOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DomainClient::createFixedPriceDemandOrderAsync(const CreateFixedPriceDemandOrderRequest& request, const CreateFixedPriceDemandOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createFixedPriceDemandOrder(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DomainClient::CreateFixedPriceDemandOrderOutcomeCallable DomainClient::createFixedPriceDemandOrderCallable(const CreateFixedPriceDemandOrderRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateFixedPriceDemandOrderOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createFixedPriceDemandOrder(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DomainClient::DeleteContactTemplatesOutcome DomainClient::deleteContactTemplates(const DeleteContactTemplatesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
40
domain/src/model/CheckDomainStatusRequest.cc
Normal file
40
domain/src/model/CheckDomainStatusRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/CheckDomainStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Domain::Model::CheckDomainStatusRequest;
|
||||
|
||||
CheckDomainStatusRequest::CheckDomainStatusRequest() :
|
||||
RpcServiceRequest("domain", "2018-02-08", "CheckDomainStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
CheckDomainStatusRequest::~CheckDomainStatusRequest()
|
||||
{}
|
||||
|
||||
std::string CheckDomainStatusRequest::getDomain()const
|
||||
{
|
||||
return domain_;
|
||||
}
|
||||
|
||||
void CheckDomainStatusRequest::setDomain(const std::string& domain)
|
||||
{
|
||||
domain_ = domain;
|
||||
setParameter("Domain", domain);
|
||||
}
|
||||
|
||||
81
domain/src/model/CheckDomainStatusResult.cc
Normal file
81
domain/src/model/CheckDomainStatusResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/CheckDomainStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Domain;
|
||||
using namespace AlibabaCloud::Domain::Model;
|
||||
|
||||
CheckDomainStatusResult::CheckDomainStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CheckDomainStatusResult::CheckDomainStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CheckDomainStatusResult::~CheckDomainStatusResult()
|
||||
{}
|
||||
|
||||
void CheckDomainStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto moduleNode = value["Module"];
|
||||
if(!moduleNode["Domain"].isNull())
|
||||
module_.domain = moduleNode["Domain"].asString();
|
||||
if(!moduleNode["Price"].isNull())
|
||||
module_.price = std::stof(moduleNode["Price"].asString());
|
||||
if(!moduleNode["RegDate"].isNull())
|
||||
module_.regDate = std::stol(moduleNode["RegDate"].asString());
|
||||
if(!moduleNode["DeadDate"].isNull())
|
||||
module_.deadDate = std::stol(moduleNode["DeadDate"].asString());
|
||||
if(!moduleNode["EndTime"].isNull())
|
||||
module_.endTime = std::stol(moduleNode["EndTime"].asString());
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int CheckDomainStatusResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string CheckDomainStatusResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
CheckDomainStatusResult::Module CheckDomainStatusResult::getModule()const
|
||||
{
|
||||
return module_;
|
||||
}
|
||||
|
||||
bool CheckDomainStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
domain/src/model/CreateFixedPriceDemandOrderRequest.cc
Normal file
73
domain/src/model/CreateFixedPriceDemandOrderRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/CreateFixedPriceDemandOrderRequest.h>
|
||||
|
||||
using AlibabaCloud::Domain::Model::CreateFixedPriceDemandOrderRequest;
|
||||
|
||||
CreateFixedPriceDemandOrderRequest::CreateFixedPriceDemandOrderRequest() :
|
||||
RpcServiceRequest("domain", "2018-02-08", "CreateFixedPriceDemandOrder")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateFixedPriceDemandOrderRequest::~CreateFixedPriceDemandOrderRequest()
|
||||
{}
|
||||
|
||||
std::string CreateFixedPriceDemandOrderRequest::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
void CreateFixedPriceDemandOrderRequest::setCode(const std::string& code)
|
||||
{
|
||||
code_ = code;
|
||||
setParameter("Code", code);
|
||||
}
|
||||
|
||||
std::string CreateFixedPriceDemandOrderRequest::getContactId()const
|
||||
{
|
||||
return contactId_;
|
||||
}
|
||||
|
||||
void CreateFixedPriceDemandOrderRequest::setContactId(const std::string& contactId)
|
||||
{
|
||||
contactId_ = contactId;
|
||||
setParameter("ContactId", contactId);
|
||||
}
|
||||
|
||||
std::string CreateFixedPriceDemandOrderRequest::getDomain()const
|
||||
{
|
||||
return domain_;
|
||||
}
|
||||
|
||||
void CreateFixedPriceDemandOrderRequest::setDomain(const std::string& domain)
|
||||
{
|
||||
domain_ = domain;
|
||||
setParameter("Domain", domain);
|
||||
}
|
||||
|
||||
std::string CreateFixedPriceDemandOrderRequest::getSource()const
|
||||
{
|
||||
return source_;
|
||||
}
|
||||
|
||||
void CreateFixedPriceDemandOrderRequest::setSource(const std::string& source)
|
||||
{
|
||||
source_ = source;
|
||||
setParameter("Source", source);
|
||||
}
|
||||
|
||||
77
domain/src/model/CreateFixedPriceDemandOrderResult.cc
Normal file
77
domain/src/model/CreateFixedPriceDemandOrderResult.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/CreateFixedPriceDemandOrderResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Domain;
|
||||
using namespace AlibabaCloud::Domain::Model;
|
||||
|
||||
CreateFixedPriceDemandOrderResult::CreateFixedPriceDemandOrderResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateFixedPriceDemandOrderResult::CreateFixedPriceDemandOrderResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateFixedPriceDemandOrderResult::~CreateFixedPriceDemandOrderResult()
|
||||
{}
|
||||
|
||||
void CreateFixedPriceDemandOrderResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto moduleNode = value["Module"];
|
||||
if(!moduleNode["OrderNo"].isNull())
|
||||
module_.orderNo = moduleNode["OrderNo"].asString();
|
||||
if(!moduleNode["Price"].isNull())
|
||||
module_.price = std::stol(moduleNode["Price"].asString());
|
||||
if(!moduleNode["Domain"].isNull())
|
||||
module_.domain = moduleNode["Domain"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
int CreateFixedPriceDemandOrderResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string CreateFixedPriceDemandOrderResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
CreateFixedPriceDemandOrderResult::Module CreateFixedPriceDemandOrderResult::getModule()const
|
||||
{
|
||||
return module_;
|
||||
}
|
||||
|
||||
bool CreateFixedPriceDemandOrderResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -43,46 +43,48 @@ void QueryBrokerDemandResult::parse(const std::string &payload)
|
||||
for (auto valueDataDemand : allDataNode)
|
||||
{
|
||||
Demand dataObject;
|
||||
if(!valueDataDemand["BizId"].isNull())
|
||||
dataObject.bizId = valueDataDemand["BizId"].asString();
|
||||
if(!valueDataDemand["Status"].isNull())
|
||||
dataObject.status = valueDataDemand["Status"].asString();
|
||||
if(!valueDataDemand["DemandDomain"].isNull())
|
||||
dataObject.demandDomain = valueDataDemand["DemandDomain"].asString();
|
||||
if(!valueDataDemand["DemandPrice"].isNull())
|
||||
dataObject.demandPrice = std::stof(valueDataDemand["DemandPrice"].asString());
|
||||
if(!valueDataDemand["Mobile"].isNull())
|
||||
dataObject.mobile = valueDataDemand["Mobile"].asString();
|
||||
if(!valueDataDemand["Description"].isNull())
|
||||
dataObject.description = valueDataDemand["Description"].asString();
|
||||
if(!valueDataDemand["BizId"].isNull())
|
||||
dataObject.bizId = valueDataDemand["BizId"].asString();
|
||||
if(!valueDataDemand["BargainSellerMobile"].isNull())
|
||||
dataObject.bargainSellerMobile = valueDataDemand["BargainSellerMobile"].asString();
|
||||
if(!valueDataDemand["PublishTime"].isNull())
|
||||
dataObject.publishTime = std::stol(valueDataDemand["PublishTime"].asString());
|
||||
if(!valueDataDemand["PayDomain"].isNull())
|
||||
dataObject.payDomain = valueDataDemand["PayDomain"].asString();
|
||||
if(!valueDataDemand["ProduceType"].isNull())
|
||||
dataObject.produceType = std::stoi(valueDataDemand["ProduceType"].asString());
|
||||
if(!valueDataDemand["DemandDomain"].isNull())
|
||||
dataObject.demandDomain = valueDataDemand["DemandDomain"].asString();
|
||||
if(!valueDataDemand["Description"].isNull())
|
||||
dataObject.description = valueDataDemand["Description"].asString();
|
||||
if(!valueDataDemand["Mobile"].isNull())
|
||||
dataObject.mobile = valueDataDemand["Mobile"].asString();
|
||||
if(!valueDataDemand["ServicePayPrice"].isNull())
|
||||
dataObject.servicePayPrice = std::stof(valueDataDemand["ServicePayPrice"].asString());
|
||||
if(!valueDataDemand["PayPrice"].isNull())
|
||||
dataObject.payPrice = std::stof(valueDataDemand["PayPrice"].asString());
|
||||
if(!valueDataDemand["PayTime"].isNull())
|
||||
dataObject.payTime = std::stol(valueDataDemand["PayTime"].asString());
|
||||
if(!valueDataDemand["ProduceType"].isNull())
|
||||
dataObject.produceType = std::stoi(valueDataDemand["ProduceType"].asString());
|
||||
if(!valueDataDemand["BargainSellerPrice"].isNull())
|
||||
dataObject.bargainSellerPrice = std::stof(valueDataDemand["BargainSellerPrice"].asString());
|
||||
if(!valueDataDemand["BargainSellerMobile"].isNull())
|
||||
dataObject.bargainSellerMobile = valueDataDemand["BargainSellerMobile"].asString();
|
||||
if(!valueDataDemand["ServicePayPrice"].isNull())
|
||||
dataObject.servicePayPrice = std::stof(valueDataDemand["ServicePayPrice"].asString());
|
||||
if(!valueDataDemand["OrderType"].isNull())
|
||||
dataObject.orderType = std::stoi(valueDataDemand["OrderType"].asString());
|
||||
if(!valueDataDemand["PayDomain"].isNull())
|
||||
dataObject.payDomain = valueDataDemand["PayDomain"].asString();
|
||||
if(!valueDataDemand["AuditStatus"].isNull())
|
||||
dataObject.auditStatus = std::stoi(valueDataDemand["AuditStatus"].asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["TotalItemNum"].isNull())
|
||||
totalItemNum_ = std::stoi(value["TotalItemNum"].asString());
|
||||
if(!value["CurrentPageNum"].isNull())
|
||||
currentPageNum_ = std::stoi(value["CurrentPageNum"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalPageNum"].isNull())
|
||||
totalPageNum_ = std::stoi(value["TotalPageNum"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalItemNum"].isNull())
|
||||
totalItemNum_ = std::stoi(value["TotalItemNum"].asString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user