Coupon template
This commit is contained in:
@@ -61,6 +61,8 @@ set(cams_public_header_model
|
||||
include/alibabacloud/cams/model/GetChatappUploadAuthorizationResult.h
|
||||
include/alibabacloud/cams/model/GetChatappVerifyCodeRequest.h
|
||||
include/alibabacloud/cams/model/GetChatappVerifyCodeResult.h
|
||||
include/alibabacloud/cams/model/GetCommerceSettingRequest.h
|
||||
include/alibabacloud/cams/model/GetCommerceSettingResult.h
|
||||
include/alibabacloud/cams/model/GetMigrationVerifyCodeRequest.h
|
||||
include/alibabacloud/cams/model/GetMigrationVerifyCodeResult.h
|
||||
include/alibabacloud/cams/model/GetPhoneNumberVerificationStatusRequest.h
|
||||
@@ -97,6 +99,8 @@ set(cams_public_header_model
|
||||
include/alibabacloud/cams/model/SubmitIsvCustomerTermsResult.h
|
||||
include/alibabacloud/cams/model/UpdateAccountWebhookRequest.h
|
||||
include/alibabacloud/cams/model/UpdateAccountWebhookResult.h
|
||||
include/alibabacloud/cams/model/UpdateCommerceSettingRequest.h
|
||||
include/alibabacloud/cams/model/UpdateCommerceSettingResult.h
|
||||
include/alibabacloud/cams/model/UpdatePhoneWebhookRequest.h
|
||||
include/alibabacloud/cams/model/UpdatePhoneWebhookResult.h )
|
||||
|
||||
@@ -142,6 +146,8 @@ set(cams_src
|
||||
src/model/GetChatappUploadAuthorizationResult.cc
|
||||
src/model/GetChatappVerifyCodeRequest.cc
|
||||
src/model/GetChatappVerifyCodeResult.cc
|
||||
src/model/GetCommerceSettingRequest.cc
|
||||
src/model/GetCommerceSettingResult.cc
|
||||
src/model/GetMigrationVerifyCodeRequest.cc
|
||||
src/model/GetMigrationVerifyCodeResult.cc
|
||||
src/model/GetPhoneNumberVerificationStatusRequest.cc
|
||||
@@ -178,6 +184,8 @@ set(cams_src
|
||||
src/model/SubmitIsvCustomerTermsResult.cc
|
||||
src/model/UpdateAccountWebhookRequest.cc
|
||||
src/model/UpdateAccountWebhookResult.cc
|
||||
src/model/UpdateCommerceSettingRequest.cc
|
||||
src/model/UpdateCommerceSettingResult.cc
|
||||
src/model/UpdatePhoneWebhookRequest.cc
|
||||
src/model/UpdatePhoneWebhookResult.cc )
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
#include "model/GetChatappUploadAuthorizationResult.h"
|
||||
#include "model/GetChatappVerifyCodeRequest.h"
|
||||
#include "model/GetChatappVerifyCodeResult.h"
|
||||
#include "model/GetCommerceSettingRequest.h"
|
||||
#include "model/GetCommerceSettingResult.h"
|
||||
#include "model/GetMigrationVerifyCodeRequest.h"
|
||||
#include "model/GetMigrationVerifyCodeResult.h"
|
||||
#include "model/GetPhoneNumberVerificationStatusRequest.h"
|
||||
@@ -98,6 +100,8 @@
|
||||
#include "model/SubmitIsvCustomerTermsResult.h"
|
||||
#include "model/UpdateAccountWebhookRequest.h"
|
||||
#include "model/UpdateAccountWebhookResult.h"
|
||||
#include "model/UpdateCommerceSettingRequest.h"
|
||||
#include "model/UpdateCommerceSettingResult.h"
|
||||
#include "model/UpdatePhoneWebhookRequest.h"
|
||||
#include "model/UpdatePhoneWebhookResult.h"
|
||||
|
||||
@@ -169,6 +173,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetChatappVerifyCodeResult> GetChatappVerifyCodeOutcome;
|
||||
typedef std::future<GetChatappVerifyCodeOutcome> GetChatappVerifyCodeOutcomeCallable;
|
||||
typedef std::function<void(const CamsClient*, const Model::GetChatappVerifyCodeRequest&, const GetChatappVerifyCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetChatappVerifyCodeAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetCommerceSettingResult> GetCommerceSettingOutcome;
|
||||
typedef std::future<GetCommerceSettingOutcome> GetCommerceSettingOutcomeCallable;
|
||||
typedef std::function<void(const CamsClient*, const Model::GetCommerceSettingRequest&, const GetCommerceSettingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetCommerceSettingAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetMigrationVerifyCodeResult> GetMigrationVerifyCodeOutcome;
|
||||
typedef std::future<GetMigrationVerifyCodeOutcome> GetMigrationVerifyCodeOutcomeCallable;
|
||||
typedef std::function<void(const CamsClient*, const Model::GetMigrationVerifyCodeRequest&, const GetMigrationVerifyCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMigrationVerifyCodeAsyncHandler;
|
||||
@@ -223,6 +230,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::UpdateAccountWebhookResult> UpdateAccountWebhookOutcome;
|
||||
typedef std::future<UpdateAccountWebhookOutcome> UpdateAccountWebhookOutcomeCallable;
|
||||
typedef std::function<void(const CamsClient*, const Model::UpdateAccountWebhookRequest&, const UpdateAccountWebhookOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAccountWebhookAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdateCommerceSettingResult> UpdateCommerceSettingOutcome;
|
||||
typedef std::future<UpdateCommerceSettingOutcome> UpdateCommerceSettingOutcomeCallable;
|
||||
typedef std::function<void(const CamsClient*, const Model::UpdateCommerceSettingRequest&, const UpdateCommerceSettingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateCommerceSettingAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdatePhoneWebhookResult> UpdatePhoneWebhookOutcome;
|
||||
typedef std::future<UpdatePhoneWebhookOutcome> UpdatePhoneWebhookOutcomeCallable;
|
||||
typedef std::function<void(const CamsClient*, const Model::UpdatePhoneWebhookRequest&, const UpdatePhoneWebhookOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdatePhoneWebhookAsyncHandler;
|
||||
@@ -291,6 +301,9 @@ namespace AlibabaCloud
|
||||
GetChatappVerifyCodeOutcome getChatappVerifyCode(const Model::GetChatappVerifyCodeRequest &request)const;
|
||||
void getChatappVerifyCodeAsync(const Model::GetChatappVerifyCodeRequest& request, const GetChatappVerifyCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetChatappVerifyCodeOutcomeCallable getChatappVerifyCodeCallable(const Model::GetChatappVerifyCodeRequest& request) const;
|
||||
GetCommerceSettingOutcome getCommerceSetting(const Model::GetCommerceSettingRequest &request)const;
|
||||
void getCommerceSettingAsync(const Model::GetCommerceSettingRequest& request, const GetCommerceSettingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetCommerceSettingOutcomeCallable getCommerceSettingCallable(const Model::GetCommerceSettingRequest& request) const;
|
||||
GetMigrationVerifyCodeOutcome getMigrationVerifyCode(const Model::GetMigrationVerifyCodeRequest &request)const;
|
||||
void getMigrationVerifyCodeAsync(const Model::GetMigrationVerifyCodeRequest& request, const GetMigrationVerifyCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetMigrationVerifyCodeOutcomeCallable getMigrationVerifyCodeCallable(const Model::GetMigrationVerifyCodeRequest& request) const;
|
||||
@@ -345,6 +358,9 @@ namespace AlibabaCloud
|
||||
UpdateAccountWebhookOutcome updateAccountWebhook(const Model::UpdateAccountWebhookRequest &request)const;
|
||||
void updateAccountWebhookAsync(const Model::UpdateAccountWebhookRequest& request, const UpdateAccountWebhookAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateAccountWebhookOutcomeCallable updateAccountWebhookCallable(const Model::UpdateAccountWebhookRequest& request) const;
|
||||
UpdateCommerceSettingOutcome updateCommerceSetting(const Model::UpdateCommerceSettingRequest &request)const;
|
||||
void updateCommerceSettingAsync(const Model::UpdateCommerceSettingRequest& request, const UpdateCommerceSettingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateCommerceSettingOutcomeCallable updateCommerceSettingCallable(const Model::UpdateCommerceSettingRequest& request) const;
|
||||
UpdatePhoneWebhookOutcome updatePhoneWebhook(const Model::UpdatePhoneWebhookRequest &request)const;
|
||||
void updatePhoneWebhookAsync(const Model::UpdatePhoneWebhookRequest& request, const UpdatePhoneWebhookAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdatePhoneWebhookOutcomeCallable updatePhoneWebhookCallable(const Model::UpdatePhoneWebhookRequest& request) const;
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
std::string packageName;
|
||||
std::string autofillText;
|
||||
bool isOptOut;
|
||||
std::string couponCode;
|
||||
};
|
||||
ButtonsItem buttonsItem;
|
||||
std::vector<ButtonsItem> buttons;
|
||||
@@ -53,6 +54,28 @@ public:
|
||||
std::string fileType;
|
||||
int codeExpirationMinutes;
|
||||
bool addSecretRecommendation;
|
||||
bool hasExpiration;
|
||||
struct CardsItem {
|
||||
struct CardComponentsItem {
|
||||
std::string type;
|
||||
std::string format;
|
||||
std::string text;
|
||||
std::string url;
|
||||
struct ButtonsItem {
|
||||
std::string text;
|
||||
std::string type;
|
||||
std::string url;
|
||||
std::string urlType;
|
||||
std::string phoneNumber;
|
||||
};
|
||||
ButtonsItem buttonsItem;
|
||||
std::vector<ButtonsItem> buttons;
|
||||
};
|
||||
CardComponentsItem cardComponentsItem;
|
||||
std::vector<CardComponentsItem> cardComponents;
|
||||
};
|
||||
CardsItem cardsItem;
|
||||
std::vector<CardsItem> cards;
|
||||
};
|
||||
CreateChatappTemplateRequest();
|
||||
~CreateChatappTemplateRequest();
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace AlibabaCloud
|
||||
};
|
||||
std::string autofillText;
|
||||
std::string type;
|
||||
std::string couponCode;
|
||||
bool isOptOut;
|
||||
std::string signatureHash;
|
||||
std::string packageName;
|
||||
@@ -57,12 +58,34 @@ namespace AlibabaCloud
|
||||
ExtendAttrs extendAttrs;
|
||||
std::string url;
|
||||
};
|
||||
struct 轮播卡片列表
|
||||
{
|
||||
struct 卡片控件列表
|
||||
{
|
||||
struct 卡片按钮列表
|
||||
{
|
||||
std::string type;
|
||||
std::string phoneNumber;
|
||||
std::string text;
|
||||
std::string urlType;
|
||||
std::string url;
|
||||
};
|
||||
std::string type;
|
||||
std::string format;
|
||||
std::string text;
|
||||
std::string url;
|
||||
std::vector<卡片控件列表::卡片按钮列表> buttons1;
|
||||
};
|
||||
std::vector<轮播卡片列表::卡片控件列表> cardComponents;
|
||||
};
|
||||
bool hasExpiration;
|
||||
std::string thumbUrl;
|
||||
std::string fileName;
|
||||
std::string text;
|
||||
int duration;
|
||||
std::string latitude;
|
||||
std::string longitude;
|
||||
std::string offerExpirationTimeMs;
|
||||
std::string url;
|
||||
std::string caption;
|
||||
bool addSecretRecommendation;
|
||||
@@ -73,6 +96,7 @@ namespace AlibabaCloud
|
||||
std::string fileType;
|
||||
std::string locationAddress;
|
||||
std::vector<Component::Button> buttons;
|
||||
std::vector<Component::轮播卡片列表> cards;
|
||||
};
|
||||
std::vector<Component> components;
|
||||
std::string templateCode;
|
||||
|
||||
@@ -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_CAMS_MODEL_GETCOMMERCESETTINGREQUEST_H_
|
||||
#define ALIBABACLOUD_CAMS_MODEL_GETCOMMERCESETTINGREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cams/CamsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cams {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAMS_EXPORT GetCommerceSettingRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetCommerceSettingRequest();
|
||||
~GetCommerceSettingRequest();
|
||||
std::string getPhoneNumber() const;
|
||||
void setPhoneNumber(const std::string &phoneNumber);
|
||||
std::string getApiCode() const;
|
||||
void setApiCode(const std::string &apiCode);
|
||||
std::string getProdCode() const;
|
||||
void setProdCode(const std::string &prodCode);
|
||||
std::string getCustSpaceId() const;
|
||||
void setCustSpaceId(const std::string &custSpaceId);
|
||||
|
||||
private:
|
||||
std::string phoneNumber_;
|
||||
std::string apiCode_;
|
||||
std::string prodCode_;
|
||||
std::string custSpaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cams
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAMS_MODEL_GETCOMMERCESETTINGREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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_CAMS_MODEL_GETCOMMERCESETTINGRESULT_H_
|
||||
#define ALIBABACLOUD_CAMS_MODEL_GETCOMMERCESETTINGRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cams/CamsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cams
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAMS_EXPORT GetCommerceSettingResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
bool cartEnable;
|
||||
bool catalogVisible;
|
||||
};
|
||||
|
||||
|
||||
GetCommerceSettingResult();
|
||||
explicit GetCommerceSettingResult(const std::string &payload);
|
||||
~GetCommerceSettingResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAMS_MODEL_GETCOMMERCESETTINGRESULT_H_
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
std::string packageName;
|
||||
std::string autofillText;
|
||||
bool isOptOut;
|
||||
std::string couponCode;
|
||||
};
|
||||
ButtonsItem buttonsItem;
|
||||
std::vector<ButtonsItem> buttons;
|
||||
@@ -53,6 +54,28 @@ public:
|
||||
std::string fileType;
|
||||
int codeExpirationMinutes;
|
||||
bool addSecretRecommendation;
|
||||
bool hasExpiration;
|
||||
struct CardsItem {
|
||||
struct CardComponentsItem {
|
||||
std::string type;
|
||||
std::string format;
|
||||
std::string text;
|
||||
std::string url;
|
||||
struct ButtonsItem {
|
||||
std::string text;
|
||||
std::string type;
|
||||
std::string url;
|
||||
std::string urlType;
|
||||
std::string phoneNumber;
|
||||
};
|
||||
ButtonsItem buttonsItem;
|
||||
std::vector<ButtonsItem> buttons;
|
||||
};
|
||||
CardComponentsItem cardComponentsItem;
|
||||
std::vector<CardComponentsItem> cardComponents;
|
||||
};
|
||||
CardsItem cardsItem;
|
||||
std::vector<CardsItem> cards;
|
||||
};
|
||||
ModifyChatappTemplateRequest();
|
||||
~ModifyChatappTemplateRequest();
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_CAMS_MODEL_UPDATECOMMERCESETTINGREQUEST_H_
|
||||
#define ALIBABACLOUD_CAMS_MODEL_UPDATECOMMERCESETTINGREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cams/CamsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cams {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAMS_EXPORT UpdateCommerceSettingRequest : public RpcServiceRequest {
|
||||
public:
|
||||
UpdateCommerceSettingRequest();
|
||||
~UpdateCommerceSettingRequest();
|
||||
std::string getPhoneNumber() const;
|
||||
void setPhoneNumber(const std::string &phoneNumber);
|
||||
std::string getApiCode() const;
|
||||
void setApiCode(const std::string &apiCode);
|
||||
bool getCatalogVisible() const;
|
||||
void setCatalogVisible(bool catalogVisible);
|
||||
bool getCartEnable() const;
|
||||
void setCartEnable(bool cartEnable);
|
||||
std::string getProdCode() const;
|
||||
void setProdCode(const std::string &prodCode);
|
||||
std::string getCustSpaceId() const;
|
||||
void setCustSpaceId(const std::string &custSpaceId);
|
||||
|
||||
private:
|
||||
std::string phoneNumber_;
|
||||
std::string apiCode_;
|
||||
bool catalogVisible_;
|
||||
bool cartEnable_;
|
||||
std::string prodCode_;
|
||||
std::string custSpaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cams
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAMS_MODEL_UPDATECOMMERCESETTINGREQUEST_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_CAMS_MODEL_UPDATECOMMERCESETTINGRESULT_H_
|
||||
#define ALIBABACLOUD_CAMS_MODEL_UPDATECOMMERCESETTINGRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cams/CamsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cams
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAMS_EXPORT UpdateCommerceSettingResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UpdateCommerceSettingResult();
|
||||
explicit UpdateCommerceSettingResult(const std::string &payload);
|
||||
~UpdateCommerceSettingResult();
|
||||
std::string getMessage()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAMS_MODEL_UPDATECOMMERCESETTINGRESULT_H_
|
||||
@@ -31,21 +31,21 @@ CamsClient::CamsClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "cams");
|
||||
}
|
||||
|
||||
CamsClient::CamsClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "cams");
|
||||
}
|
||||
|
||||
CamsClient::CamsClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "cams");
|
||||
}
|
||||
|
||||
CamsClient::~CamsClient()
|
||||
@@ -771,6 +771,42 @@ CamsClient::GetChatappVerifyCodeOutcomeCallable CamsClient::getChatappVerifyCode
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CamsClient::GetCommerceSettingOutcome CamsClient::getCommerceSetting(const GetCommerceSettingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetCommerceSettingOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetCommerceSettingOutcome(GetCommerceSettingResult(outcome.result()));
|
||||
else
|
||||
return GetCommerceSettingOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CamsClient::getCommerceSettingAsync(const GetCommerceSettingRequest& request, const GetCommerceSettingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getCommerceSetting(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CamsClient::GetCommerceSettingOutcomeCallable CamsClient::getCommerceSettingCallable(const GetCommerceSettingRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetCommerceSettingOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getCommerceSetting(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CamsClient::GetMigrationVerifyCodeOutcome CamsClient::getMigrationVerifyCode(const GetMigrationVerifyCodeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1419,6 +1455,42 @@ CamsClient::UpdateAccountWebhookOutcomeCallable CamsClient::updateAccountWebhook
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CamsClient::UpdateCommerceSettingOutcome CamsClient::updateCommerceSetting(const UpdateCommerceSettingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateCommerceSettingOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateCommerceSettingOutcome(UpdateCommerceSettingResult(outcome.result()));
|
||||
else
|
||||
return UpdateCommerceSettingOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CamsClient::updateCommerceSettingAsync(const UpdateCommerceSettingRequest& request, const UpdateCommerceSettingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateCommerceSetting(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CamsClient::UpdateCommerceSettingOutcomeCallable CamsClient::updateCommerceSettingCallable(const UpdateCommerceSettingRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateCommerceSettingOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateCommerceSetting(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CamsClient::UpdatePhoneWebhookOutcome CamsClient::updatePhoneWebhook(const UpdatePhoneWebhookRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -48,12 +48,29 @@ void CreateChatappTemplateRequest::setComponents(const std::vector<CreateChatapp
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PackageName", components[dep1].buttons[dep2].packageName);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".AutofillText", components[dep1].buttons[dep2].autofillText);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".IsOptOut", components[dep1].buttons[dep2].isOptOut ? "true" : "false");
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".CouponCode", components[dep1].buttons[dep2].couponCode);
|
||||
}
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ThumbUrl", components[dep1].thumbUrl);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Duration", std::to_string(components[dep1].duration));
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".FileType", components[dep1].fileType);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".CodeExpirationMinutes", std::to_string(components[dep1].codeExpirationMinutes));
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".AddSecretRecommendation", components[dep1].addSecretRecommendation ? "true" : "false");
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".HasExpiration", components[dep1].hasExpiration ? "true" : "false");
|
||||
for(int dep2 = 0; dep2 != components[dep1].cards.size(); dep2++) {
|
||||
for(int dep3 = 0; dep3 != components[dep1].cards[dep2].cardComponents.size(); dep3++) {
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Type", components[dep1].cards[dep2].cardComponents[dep3].type);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Format", components[dep1].cards[dep2].cardComponents[dep3].format);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Text", components[dep1].cards[dep2].cardComponents[dep3].text);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Url", components[dep1].cards[dep2].cardComponents[dep3].url);
|
||||
for(int dep4 = 0; dep4 != components[dep1].cards[dep2].cardComponents[dep3].buttons.size(); dep4++) {
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".Text", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].text);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".Type", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].type);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".Url", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].url);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".UrlType", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].urlType);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".PhoneNumber", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].phoneNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,10 @@ void GetChatappTemplateDetailResult::parse(const std::string &payload)
|
||||
componentObject.addSecretRecommendation = dataNodeComponentscomponent["AddSecretRecommendation"].asString() == "true";
|
||||
if(!dataNodeComponentscomponent["CodeExpirationMinutes"].isNull())
|
||||
componentObject.codeExpirationMinutes = std::stoi(dataNodeComponentscomponent["CodeExpirationMinutes"].asString());
|
||||
if(!dataNodeComponentscomponent["hasExpiration"].isNull())
|
||||
componentObject.hasExpiration = dataNodeComponentscomponent["hasExpiration"].asString() == "true";
|
||||
if(!dataNodeComponentscomponent["OfferExpirationTimeMs"].isNull())
|
||||
componentObject.offerExpirationTimeMs = dataNodeComponentscomponent["OfferExpirationTimeMs"].asString();
|
||||
auto allButtonsNode = dataNodeComponentscomponent["Buttons"]["button"];
|
||||
for (auto dataNodeComponentscomponentButtonsbutton : allButtonsNode)
|
||||
{
|
||||
@@ -116,6 +120,8 @@ void GetChatappTemplateDetailResult::parse(const std::string &payload)
|
||||
buttonsObject.autofillText = dataNodeComponentscomponentButtonsbutton["AutofillText"].asString();
|
||||
if(!dataNodeComponentscomponentButtonsbutton["IsOptOut"].isNull())
|
||||
buttonsObject.isOptOut = dataNodeComponentscomponentButtonsbutton["IsOptOut"].asString() == "true";
|
||||
if(!dataNodeComponentscomponentButtonsbutton["CouponCode"].isNull())
|
||||
buttonsObject.couponCode = dataNodeComponentscomponentButtonsbutton["CouponCode"].asString();
|
||||
auto extendAttrsNode = value["ExtendAttrs"];
|
||||
if(!extendAttrsNode["NextTemplateCode"].isNull())
|
||||
buttonsObject.extendAttrs.nextTemplateCode = extendAttrsNode["NextTemplateCode"].asString();
|
||||
@@ -129,6 +135,42 @@ void GetChatappTemplateDetailResult::parse(const std::string &payload)
|
||||
buttonsObject.extendAttrs.intentCode = extendAttrsNode["IntentCode"].asString();
|
||||
componentObject.buttons.push_back(buttonsObject);
|
||||
}
|
||||
auto allCardsNode = dataNodeComponentscomponent["Cards"]["轮播卡片列表"];
|
||||
for (auto dataNodeComponentscomponentCards轮播卡片列表 : allCardsNode)
|
||||
{
|
||||
Data::Component::轮播卡片列表 cardsObject;
|
||||
auto allCardComponentsNode = dataNodeComponentscomponentCards轮播卡片列表["CardComponents"]["卡片控件列表"];
|
||||
for (auto dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表 : allCardComponentsNode)
|
||||
{
|
||||
Data::Component::轮播卡片列表::卡片控件列表 cardComponentsObject;
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Type"].isNull())
|
||||
cardComponentsObject.type = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Type"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Text"].isNull())
|
||||
cardComponentsObject.text = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Text"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Url"].isNull())
|
||||
cardComponentsObject.url = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Url"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Format"].isNull())
|
||||
cardComponentsObject.format = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Format"].asString();
|
||||
auto allButtons1Node = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表["Buttons"]["卡片按钮列表"];
|
||||
for (auto dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表 : allButtons1Node)
|
||||
{
|
||||
Data::Component::轮播卡片列表::卡片控件列表::卡片按钮列表 buttons1Object;
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["Type"].isNull())
|
||||
buttons1Object.type = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["Type"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["Text"].isNull())
|
||||
buttons1Object.text = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["Text"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["Url"].isNull())
|
||||
buttons1Object.url = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["Url"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["UrlType"].isNull())
|
||||
buttons1Object.urlType = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["UrlType"].asString();
|
||||
if(!dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["PhoneNumber"].isNull())
|
||||
buttons1Object.phoneNumber = dataNodeComponentscomponentCards轮播卡片列表CardComponents卡片控件列表Buttons卡片按钮列表["PhoneNumber"].asString();
|
||||
cardComponentsObject.buttons1.push_back(buttons1Object);
|
||||
}
|
||||
cardsObject.cardComponents.push_back(cardComponentsObject);
|
||||
}
|
||||
componentObject.cards.push_back(cardsObject);
|
||||
}
|
||||
data_.components.push_back(componentObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
|
||||
63
cams/src/model/GetCommerceSettingRequest.cc
Normal file
63
cams/src/model/GetCommerceSettingRequest.cc
Normal 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/cams/model/GetCommerceSettingRequest.h>
|
||||
|
||||
using AlibabaCloud::Cams::Model::GetCommerceSettingRequest;
|
||||
|
||||
GetCommerceSettingRequest::GetCommerceSettingRequest()
|
||||
: RpcServiceRequest("cams", "2020-06-06", "GetCommerceSetting") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetCommerceSettingRequest::~GetCommerceSettingRequest() {}
|
||||
|
||||
std::string GetCommerceSettingRequest::getPhoneNumber() const {
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void GetCommerceSettingRequest::setPhoneNumber(const std::string &phoneNumber) {
|
||||
phoneNumber_ = phoneNumber;
|
||||
setParameter(std::string("PhoneNumber"), phoneNumber);
|
||||
}
|
||||
|
||||
std::string GetCommerceSettingRequest::getApiCode() const {
|
||||
return apiCode_;
|
||||
}
|
||||
|
||||
void GetCommerceSettingRequest::setApiCode(const std::string &apiCode) {
|
||||
apiCode_ = apiCode;
|
||||
setParameter(std::string("ApiCode"), apiCode);
|
||||
}
|
||||
|
||||
std::string GetCommerceSettingRequest::getProdCode() const {
|
||||
return prodCode_;
|
||||
}
|
||||
|
||||
void GetCommerceSettingRequest::setProdCode(const std::string &prodCode) {
|
||||
prodCode_ = prodCode;
|
||||
setParameter(std::string("ProdCode"), prodCode);
|
||||
}
|
||||
|
||||
std::string GetCommerceSettingRequest::getCustSpaceId() const {
|
||||
return custSpaceId_;
|
||||
}
|
||||
|
||||
void GetCommerceSettingRequest::setCustSpaceId(const std::string &custSpaceId) {
|
||||
custSpaceId_ = custSpaceId;
|
||||
setParameter(std::string("CustSpaceId"), custSpaceId);
|
||||
}
|
||||
|
||||
68
cams/src/model/GetCommerceSettingResult.cc
Normal file
68
cams/src/model/GetCommerceSettingResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/cams/model/GetCommerceSettingResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cams;
|
||||
using namespace AlibabaCloud::Cams::Model;
|
||||
|
||||
GetCommerceSettingResult::GetCommerceSettingResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetCommerceSettingResult::GetCommerceSettingResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetCommerceSettingResult::~GetCommerceSettingResult()
|
||||
{}
|
||||
|
||||
void GetCommerceSettingResult::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["CartEnable"].isNull())
|
||||
data_.cartEnable = dataNode["CartEnable"].asString() == "true";
|
||||
if(!dataNode["CatalogVisible"].isNull())
|
||||
data_.catalogVisible = dataNode["CatalogVisible"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetCommerceSettingResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetCommerceSettingResult::Data GetCommerceSettingResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetCommerceSettingResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -48,12 +48,29 @@ void ModifyChatappTemplateRequest::setComponents(const std::vector<ModifyChatapp
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PackageName", components[dep1].buttons[dep2].packageName);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".AutofillText", components[dep1].buttons[dep2].autofillText);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".IsOptOut", components[dep1].buttons[dep2].isOptOut ? "true" : "false");
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".CouponCode", components[dep1].buttons[dep2].couponCode);
|
||||
}
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ThumbUrl", components[dep1].thumbUrl);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Duration", std::to_string(components[dep1].duration));
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".FileType", components[dep1].fileType);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".CodeExpirationMinutes", std::to_string(components[dep1].codeExpirationMinutes));
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".AddSecretRecommendation", components[dep1].addSecretRecommendation ? "true" : "false");
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".HasExpiration", components[dep1].hasExpiration ? "true" : "false");
|
||||
for(int dep2 = 0; dep2 != components[dep1].cards.size(); dep2++) {
|
||||
for(int dep3 = 0; dep3 != components[dep1].cards[dep2].cardComponents.size(); dep3++) {
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Type", components[dep1].cards[dep2].cardComponents[dep3].type);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Format", components[dep1].cards[dep2].cardComponents[dep3].format);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Text", components[dep1].cards[dep2].cardComponents[dep3].text);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Url", components[dep1].cards[dep2].cardComponents[dep3].url);
|
||||
for(int dep4 = 0; dep4 != components[dep1].cards[dep2].cardComponents[dep3].buttons.size(); dep4++) {
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".Text", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].text);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".Type", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].type);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".Url", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].url);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".UrlType", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].urlType);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Cards." + std::to_string(dep2 + 1) + ".CardComponents." + std::to_string(dep3 + 1) + ".Buttons." + std::to_string(dep4 + 1) + ".PhoneNumber", components[dep1].cards[dep2].cardComponents[dep3].buttons[dep4].phoneNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
81
cams/src/model/UpdateCommerceSettingRequest.cc
Normal file
81
cams/src/model/UpdateCommerceSettingRequest.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/cams/model/UpdateCommerceSettingRequest.h>
|
||||
|
||||
using AlibabaCloud::Cams::Model::UpdateCommerceSettingRequest;
|
||||
|
||||
UpdateCommerceSettingRequest::UpdateCommerceSettingRequest()
|
||||
: RpcServiceRequest("cams", "2020-06-06", "UpdateCommerceSetting") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateCommerceSettingRequest::~UpdateCommerceSettingRequest() {}
|
||||
|
||||
std::string UpdateCommerceSettingRequest::getPhoneNumber() const {
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void UpdateCommerceSettingRequest::setPhoneNumber(const std::string &phoneNumber) {
|
||||
phoneNumber_ = phoneNumber;
|
||||
setParameter(std::string("PhoneNumber"), phoneNumber);
|
||||
}
|
||||
|
||||
std::string UpdateCommerceSettingRequest::getApiCode() const {
|
||||
return apiCode_;
|
||||
}
|
||||
|
||||
void UpdateCommerceSettingRequest::setApiCode(const std::string &apiCode) {
|
||||
apiCode_ = apiCode;
|
||||
setParameter(std::string("ApiCode"), apiCode);
|
||||
}
|
||||
|
||||
bool UpdateCommerceSettingRequest::getCatalogVisible() const {
|
||||
return catalogVisible_;
|
||||
}
|
||||
|
||||
void UpdateCommerceSettingRequest::setCatalogVisible(bool catalogVisible) {
|
||||
catalogVisible_ = catalogVisible;
|
||||
setParameter(std::string("CatalogVisible"), catalogVisible ? "true" : "false");
|
||||
}
|
||||
|
||||
bool UpdateCommerceSettingRequest::getCartEnable() const {
|
||||
return cartEnable_;
|
||||
}
|
||||
|
||||
void UpdateCommerceSettingRequest::setCartEnable(bool cartEnable) {
|
||||
cartEnable_ = cartEnable;
|
||||
setParameter(std::string("CartEnable"), cartEnable ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string UpdateCommerceSettingRequest::getProdCode() const {
|
||||
return prodCode_;
|
||||
}
|
||||
|
||||
void UpdateCommerceSettingRequest::setProdCode(const std::string &prodCode) {
|
||||
prodCode_ = prodCode;
|
||||
setParameter(std::string("ProdCode"), prodCode);
|
||||
}
|
||||
|
||||
std::string UpdateCommerceSettingRequest::getCustSpaceId() const {
|
||||
return custSpaceId_;
|
||||
}
|
||||
|
||||
void UpdateCommerceSettingRequest::setCustSpaceId(const std::string &custSpaceId) {
|
||||
custSpaceId_ = custSpaceId;
|
||||
setParameter(std::string("CustSpaceId"), custSpaceId);
|
||||
}
|
||||
|
||||
58
cams/src/model/UpdateCommerceSettingResult.cc
Normal file
58
cams/src/model/UpdateCommerceSettingResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/cams/model/UpdateCommerceSettingResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cams;
|
||||
using namespace AlibabaCloud::Cams::Model;
|
||||
|
||||
UpdateCommerceSettingResult::UpdateCommerceSettingResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateCommerceSettingResult::UpdateCommerceSettingResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateCommerceSettingResult::~UpdateCommerceSettingResult()
|
||||
{}
|
||||
|
||||
void UpdateCommerceSettingResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateCommerceSettingResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string UpdateCommerceSettingResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user