diff --git a/CHANGELOG b/CHANGELOG index 6732a6b2b..a04063e36 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +2020-07-08 Version: 1.36.509 +- Remove GetFootwearPosition PullTakeShoesEvent PullTryOnShoesEvent. +- Add GetFootwearEvent. +- Please ignore the pd s pot. + 2020-07-08 Version: 1.36.508 - Generated 2020-05-18 for `dataworks-public`. diff --git a/VERSION b/VERSION index 00293c49f..9ad556abb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.508 \ No newline at end of file +1.36.509 \ No newline at end of file diff --git a/reid/CMakeLists.txt b/reid/CMakeLists.txt index 743accb1f..f7ca3e3d6 100644 --- a/reid/CMakeLists.txt +++ b/reid/CMakeLists.txt @@ -39,6 +39,8 @@ set(reid_public_header_model include/alibabacloud/reid/model/DescribeIpcLiveAddressResult.h include/alibabacloud/reid/model/DescribeOverviewDataRequest.h include/alibabacloud/reid/model/DescribeOverviewDataResult.h + include/alibabacloud/reid/model/GetFootwearEventRequest.h + include/alibabacloud/reid/model/GetFootwearEventResult.h include/alibabacloud/reid/model/GetFootwearPositionRequest.h include/alibabacloud/reid/model/GetFootwearPositionResult.h include/alibabacloud/reid/model/ImportSpecialPersonnelRequest.h @@ -84,6 +86,8 @@ set(reid_src src/model/DescribeIpcLiveAddressResult.cc src/model/DescribeOverviewDataRequest.cc src/model/DescribeOverviewDataResult.cc + src/model/GetFootwearEventRequest.cc + src/model/GetFootwearEventResult.cc src/model/GetFootwearPositionRequest.cc src/model/GetFootwearPositionResult.cc src/model/ImportSpecialPersonnelRequest.cc diff --git a/reid/include/alibabacloud/reid/ReidClient.h b/reid/include/alibabacloud/reid/ReidClient.h index df188e844..bc82ff2e4 100644 --- a/reid/include/alibabacloud/reid/ReidClient.h +++ b/reid/include/alibabacloud/reid/ReidClient.h @@ -40,6 +40,8 @@ #include "model/DescribeIpcLiveAddressResult.h" #include "model/DescribeOverviewDataRequest.h" #include "model/DescribeOverviewDataResult.h" +#include "model/GetFootwearEventRequest.h" +#include "model/GetFootwearEventResult.h" #include "model/GetFootwearPositionRequest.h" #include "model/GetFootwearPositionResult.h" #include "model/ImportSpecialPersonnelRequest.h" @@ -100,6 +102,9 @@ namespace AlibabaCloud typedef Outcome DescribeOverviewDataOutcome; typedef std::future DescribeOverviewDataOutcomeCallable; typedef std::function&)> DescribeOverviewDataAsyncHandler; + typedef Outcome GetFootwearEventOutcome; + typedef std::future GetFootwearEventOutcomeCallable; + typedef std::function&)> GetFootwearEventAsyncHandler; typedef Outcome GetFootwearPositionOutcome; typedef std::future GetFootwearPositionOutcomeCallable; typedef std::function&)> GetFootwearPositionAsyncHandler; @@ -168,6 +173,9 @@ namespace AlibabaCloud DescribeOverviewDataOutcome describeOverviewData(const Model::DescribeOverviewDataRequest &request)const; void describeOverviewDataAsync(const Model::DescribeOverviewDataRequest& request, const DescribeOverviewDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeOverviewDataOutcomeCallable describeOverviewDataCallable(const Model::DescribeOverviewDataRequest& request) const; + GetFootwearEventOutcome getFootwearEvent(const Model::GetFootwearEventRequest &request)const; + void getFootwearEventAsync(const Model::GetFootwearEventRequest& request, const GetFootwearEventAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetFootwearEventOutcomeCallable getFootwearEventCallable(const Model::GetFootwearEventRequest& request) const; GetFootwearPositionOutcome getFootwearPosition(const Model::GetFootwearPositionRequest &request)const; void getFootwearPositionAsync(const Model::GetFootwearPositionRequest& request, const GetFootwearPositionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetFootwearPositionOutcomeCallable getFootwearPositionCallable(const Model::GetFootwearPositionRequest& request) const; diff --git a/reid/include/alibabacloud/reid/model/GetFootwearEventRequest.h b/reid/include/alibabacloud/reid/model/GetFootwearEventRequest.h new file mode 100644 index 000000000..a571fbe05 --- /dev/null +++ b/reid/include/alibabacloud/reid/model/GetFootwearEventRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_REID_MODEL_GETFOOTWEAREVENTREQUEST_H_ +#define ALIBABACLOUD_REID_MODEL_GETFOOTWEAREVENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT GetFootwearEventRequest : public RpcServiceRequest + { + + public: + GetFootwearEventRequest(); + ~GetFootwearEventRequest(); + + std::string getDate()const; + void setDate(const std::string& date); + long getStoreId()const; + void setStoreId(long storeId); + + private: + std::string date_; + long storeId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_GETFOOTWEAREVENTREQUEST_H_ \ No newline at end of file diff --git a/reid/include/alibabacloud/reid/model/GetFootwearEventResult.h b/reid/include/alibabacloud/reid/model/GetFootwearEventResult.h new file mode 100644 index 000000000..53fb637a7 --- /dev/null +++ b/reid/include/alibabacloud/reid/model/GetFootwearEventResult.h @@ -0,0 +1,74 @@ +/* + * 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_REID_MODEL_GETFOOTWEAREVENTRESULT_H_ +#define ALIBABACLOUD_REID_MODEL_GETFOOTWEAREVENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Reid + { + namespace Model + { + class ALIBABACLOUD_REID_EXPORT GetFootwearEventResult : public ServiceResult + { + public: + struct FootwearEvent + { + long storeId; + int tryOnEventCount; + int takeEventCount; + std::string skuId; + std::string positionNumber; + std::string date; + }; + + + GetFootwearEventResult(); + explicit GetFootwearEventResult(const std::string &payload); + ~GetFootwearEventResult(); + std::string getMessage()const; + std::vector getFootwearEventList()const; + std::string getDynamicCode()const; + std::string getErrorCode()const; + std::string getDynamicMessage()const; + std::string getErrorMessage()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::vector footwearEventList_; + std::string dynamicCode_; + std::string errorCode_; + std::string dynamicMessage_; + std::string errorMessage_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_REID_MODEL_GETFOOTWEAREVENTRESULT_H_ \ No newline at end of file diff --git a/reid/src/ReidClient.cc b/reid/src/ReidClient.cc index a0d0f0814..79d975dac 100644 --- a/reid/src/ReidClient.cc +++ b/reid/src/ReidClient.cc @@ -31,21 +31,21 @@ ReidClient::ReidClient(const Credentials &credentials, const ClientConfiguration RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2"); } ReidClient::ReidClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2"); } ReidClient::ReidClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2"); } ReidClient::~ReidClient() @@ -375,6 +375,42 @@ ReidClient::DescribeOverviewDataOutcomeCallable ReidClient::describeOverviewData return task->get_future(); } +ReidClient::GetFootwearEventOutcome ReidClient::getFootwearEvent(const GetFootwearEventRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetFootwearEventOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetFootwearEventOutcome(GetFootwearEventResult(outcome.result())); + else + return GetFootwearEventOutcome(outcome.error()); +} + +void ReidClient::getFootwearEventAsync(const GetFootwearEventRequest& request, const GetFootwearEventAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getFootwearEvent(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ReidClient::GetFootwearEventOutcomeCallable ReidClient::getFootwearEventCallable(const GetFootwearEventRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getFootwearEvent(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + ReidClient::GetFootwearPositionOutcome ReidClient::getFootwearPosition(const GetFootwearPositionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/reid/src/model/GetFootwearEventRequest.cc b/reid/src/model/GetFootwearEventRequest.cc new file mode 100644 index 000000000..d1694b378 --- /dev/null +++ b/reid/src/model/GetFootwearEventRequest.cc @@ -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 + +using AlibabaCloud::Reid::Model::GetFootwearEventRequest; + +GetFootwearEventRequest::GetFootwearEventRequest() : + RpcServiceRequest("reid", "2019-09-28", "GetFootwearEvent") +{ + setMethod(HttpRequest::Method::Post); +} + +GetFootwearEventRequest::~GetFootwearEventRequest() +{} + +std::string GetFootwearEventRequest::getDate()const +{ + return date_; +} + +void GetFootwearEventRequest::setDate(const std::string& date) +{ + date_ = date; + setBodyParameter("Date", date); +} + +long GetFootwearEventRequest::getStoreId()const +{ + return storeId_; +} + +void GetFootwearEventRequest::setStoreId(long storeId) +{ + storeId_ = storeId; + setBodyParameter("StoreId", std::to_string(storeId)); +} + diff --git a/reid/src/model/GetFootwearEventResult.cc b/reid/src/model/GetFootwearEventResult.cc new file mode 100644 index 000000000..0d5b2c7ad --- /dev/null +++ b/reid/src/model/GetFootwearEventResult.cc @@ -0,0 +1,116 @@ +/* + * 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::Reid; +using namespace AlibabaCloud::Reid::Model; + +GetFootwearEventResult::GetFootwearEventResult() : + ServiceResult() +{} + +GetFootwearEventResult::GetFootwearEventResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetFootwearEventResult::~GetFootwearEventResult() +{} + +void GetFootwearEventResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allFootwearEventListNode = value["FootwearEventList"]["FootwearEvent"]; + for (auto valueFootwearEventListFootwearEvent : allFootwearEventListNode) + { + FootwearEvent footwearEventListObject; + if(!valueFootwearEventListFootwearEvent["PositionNumber"].isNull()) + footwearEventListObject.positionNumber = valueFootwearEventListFootwearEvent["PositionNumber"].asString(); + if(!valueFootwearEventListFootwearEvent["TryOnEventCount"].isNull()) + footwearEventListObject.tryOnEventCount = std::stoi(valueFootwearEventListFootwearEvent["TryOnEventCount"].asString()); + if(!valueFootwearEventListFootwearEvent["SkuId"].isNull()) + footwearEventListObject.skuId = valueFootwearEventListFootwearEvent["SkuId"].asString(); + if(!valueFootwearEventListFootwearEvent["StoreId"].isNull()) + footwearEventListObject.storeId = std::stol(valueFootwearEventListFootwearEvent["StoreId"].asString()); + if(!valueFootwearEventListFootwearEvent["TakeEventCount"].isNull()) + footwearEventListObject.takeEventCount = std::stoi(valueFootwearEventListFootwearEvent["TakeEventCount"].asString()); + if(!valueFootwearEventListFootwearEvent["Date"].isNull()) + footwearEventListObject.date = valueFootwearEventListFootwearEvent["Date"].asString(); + footwearEventList_.push_back(footwearEventListObject); + } + if(!value["ErrorCode"].isNull()) + errorCode_ = value["ErrorCode"].asString(); + if(!value["ErrorMessage"].isNull()) + errorMessage_ = value["ErrorMessage"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["DynamicCode"].isNull()) + dynamicCode_ = value["DynamicCode"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["DynamicMessage"].isNull()) + dynamicMessage_ = value["DynamicMessage"].asString(); + +} + +std::string GetFootwearEventResult::getMessage()const +{ + return message_; +} + +std::vector GetFootwearEventResult::getFootwearEventList()const +{ + return footwearEventList_; +} + +std::string GetFootwearEventResult::getDynamicCode()const +{ + return dynamicCode_; +} + +std::string GetFootwearEventResult::getErrorCode()const +{ + return errorCode_; +} + +std::string GetFootwearEventResult::getDynamicMessage()const +{ + return dynamicMessage_; +} + +std::string GetFootwearEventResult::getErrorMessage()const +{ + return errorMessage_; +} + +std::string GetFootwearEventResult::getCode()const +{ + return code_; +} + +bool GetFootwearEventResult::getSuccess()const +{ + return success_; +} +