Selaa lähdekoodia

Remove GetFootwearPosition PullTakeShoesEvent PullTryOnShoesEvent.

sdk-team 6 vuotta sitten
vanhempi
sitoutus
fd6a6949fb

+ 5 - 0
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`.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.508
+1.36.509

+ 4 - 0
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

+ 8 - 0
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<Error, Model::DescribeOverviewDataResult> DescribeOverviewDataOutcome;
 			typedef std::future<DescribeOverviewDataOutcome> DescribeOverviewDataOutcomeCallable;
 			typedef std::function<void(const ReidClient*, const Model::DescribeOverviewDataRequest&, const DescribeOverviewDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeOverviewDataAsyncHandler;
+			typedef Outcome<Error, Model::GetFootwearEventResult> GetFootwearEventOutcome;
+			typedef std::future<GetFootwearEventOutcome> GetFootwearEventOutcomeCallable;
+			typedef std::function<void(const ReidClient*, const Model::GetFootwearEventRequest&, const GetFootwearEventOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFootwearEventAsyncHandler;
 			typedef Outcome<Error, Model::GetFootwearPositionResult> GetFootwearPositionOutcome;
 			typedef std::future<GetFootwearPositionOutcome> GetFootwearPositionOutcomeCallable;
 			typedef std::function<void(const ReidClient*, const Model::GetFootwearPositionRequest&, const GetFootwearPositionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
 			GetFootwearPositionOutcomeCallable getFootwearPositionCallable(const Model::GetFootwearPositionRequest& request) const;

+ 51 - 0
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 <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/reid/ReidExport.h>
+
+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_

+ 74 - 0
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 <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/reid/ReidExport.h>
+
+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<FootwearEvent> 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<FootwearEvent> footwearEventList_;
+				std::string dynamicCode_;
+				std::string errorCode_;
+				std::string dynamicMessage_;
+				std::string errorMessage_;
+				std::string code_;
+				bool success_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_REID_MODEL_GETFOOTWEAREVENTRESULT_H_

+ 39 - 3
reid/src/ReidClient.cc

@@ -31,21 +31,21 @@ ReidClient::ReidClient(const Credentials &credentials, const ClientConfiguration
 	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, "1.1.8");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8.2");
 }
 
 ReidClient::ReidClient(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, "1.1.8");
+	endpointProvider_ = std::make_shared<EndpointProvider>(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<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "1.1.8");
+	endpointProvider_ = std::make_shared<EndpointProvider>(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<const AsyncCallerContext>& 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<std::packaged_task<GetFootwearEventOutcome()>>(
+			[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();

+ 51 - 0
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 <alibabacloud/reid/model/GetFootwearEventRequest.h>
+
+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));
+}
+

+ 116 - 0
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 <alibabacloud/reid/model/GetFootwearEventResult.h>
+#include <json/json.h>
+
+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::FootwearEvent> 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_;
+}
+