com.aliyun.dingtalkbadge_1_0.Client Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dingtalk Show documentation
Show all versions of dingtalk Show documentation
Alibaba Cloud dingtalk SDK for Java
The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkbadge_1_0;
import com.aliyun.tea.*;
import com.aliyun.dingtalkbadge_1_0.models.*;
public class Client extends com.aliyun.teaopenapi.Client {
public Client(com.aliyun.teaopenapi.models.Config config) throws Exception {
super(config);
com.aliyun.gateway.dingtalk.Client gatewayClient = new com.aliyun.gateway.dingtalk.Client();
this._spi = gatewayClient;
this._endpointRule = "";
if (com.aliyun.teautil.Common.empty(_endpoint)) {
this._endpoint = "api.dingtalk.com";
}
}
/**
* summary :
* 创建钉工牌码用户实例
*
* @param request CreateBadgeCodeUserInstanceRequest
* @param headers CreateBadgeCodeUserInstanceHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateBadgeCodeUserInstanceResponse
*/
public CreateBadgeCodeUserInstanceResponse createBadgeCodeUserInstanceWithOptions(CreateBadgeCodeUserInstanceRequest request, CreateBadgeCodeUserInstanceHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.availableTimes)) {
body.put("availableTimes", request.availableTimes);
}
if (!com.aliyun.teautil.Common.isUnset(request.codeIdentity)) {
body.put("codeIdentity", request.codeIdentity);
}
if (!com.aliyun.teautil.Common.isUnset(request.codeValue)) {
body.put("codeValue", request.codeValue);
}
if (!com.aliyun.teautil.Common.isUnset(request.codeValueType)) {
body.put("codeValueType", request.codeValueType);
}
if (!com.aliyun.teautil.Common.isUnset(request.corpId)) {
body.put("corpId", request.corpId);
}
if (!com.aliyun.teautil.Common.isUnset(request.extInfo)) {
body.put("extInfo", request.extInfo);
}
if (!com.aliyun.teautil.Common.isUnset(request.gmtExpired)) {
body.put("gmtExpired", request.gmtExpired);
}
if (!com.aliyun.teautil.Common.isUnset(request.requestId)) {
body.put("requestId", request.requestId);
}
if (!com.aliyun.teautil.Common.isUnset(request.status)) {
body.put("status", request.status);
}
if (!com.aliyun.teautil.Common.isUnset(request.userCorpRelationType)) {
body.put("userCorpRelationType", request.userCorpRelationType);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdentity)) {
body.put("userIdentity", request.userIdentity);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "CreateBadgeCodeUserInstance"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/userInstances"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new CreateBadgeCodeUserInstanceResponse());
}
/**
* summary :
* 创建钉工牌码用户实例
*
* @param request CreateBadgeCodeUserInstanceRequest
* @return CreateBadgeCodeUserInstanceResponse
*/
public CreateBadgeCodeUserInstanceResponse createBadgeCodeUserInstance(CreateBadgeCodeUserInstanceRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateBadgeCodeUserInstanceHeaders headers = new CreateBadgeCodeUserInstanceHeaders();
return this.createBadgeCodeUserInstanceWithOptions(request, headers, runtime);
}
/**
* summary :
* 创建钉工牌通知消息
*
* @param request CreateBadgeNotifyRequest
* @param headers CreateBadgeNotifyHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return CreateBadgeNotifyResponse
*/
public CreateBadgeNotifyResponse createBadgeNotifyWithOptions(CreateBadgeNotifyRequest request, CreateBadgeNotifyHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.content)) {
body.put("content", request.content);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgId)) {
body.put("msgId", request.msgId);
}
if (!com.aliyun.teautil.Common.isUnset(request.msgType)) {
body.put("msgType", request.msgType);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "CreateBadgeNotify"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/notices"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new CreateBadgeNotifyResponse());
}
/**
* summary :
* 创建钉工牌通知消息
*
* @param request CreateBadgeNotifyRequest
* @return CreateBadgeNotifyResponse
*/
public CreateBadgeNotifyResponse createBadgeNotify(CreateBadgeNotifyRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
CreateBadgeNotifyHeaders headers = new CreateBadgeNotifyHeaders();
return this.createBadgeNotifyWithOptions(request, headers, runtime);
}
/**
* summary :
* 钉工牌解码
*
* @param request DecodeBadgeCodeRequest
* @param headers DecodeBadgeCodeHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return DecodeBadgeCodeResponse
*/
public DecodeBadgeCodeResponse decodeBadgeCodeWithOptions(DecodeBadgeCodeRequest request, DecodeBadgeCodeHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.payCode)) {
body.put("payCode", request.payCode);
}
if (!com.aliyun.teautil.Common.isUnset(request.requestId)) {
body.put("requestId", request.requestId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "DecodeBadgeCode"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/decode"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new DecodeBadgeCodeResponse());
}
/**
* summary :
* 钉工牌解码
*
* @param request DecodeBadgeCodeRequest
* @return DecodeBadgeCodeResponse
*/
public DecodeBadgeCodeResponse decodeBadgeCode(DecodeBadgeCodeRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
DecodeBadgeCodeHeaders headers = new DecodeBadgeCodeHeaders();
return this.decodeBadgeCodeWithOptions(request, headers, runtime);
}
/**
* summary :
* 通知钉工牌码付款结果
*
* @param request NotifyBadgeCodePayResultRequest
* @param headers NotifyBadgeCodePayResultHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return NotifyBadgeCodePayResultResponse
*/
public NotifyBadgeCodePayResultResponse notifyBadgeCodePayResultWithOptions(NotifyBadgeCodePayResultRequest request, NotifyBadgeCodePayResultHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.amount)) {
body.put("amount", request.amount);
}
if (!com.aliyun.teautil.Common.isUnset(request.chargeAmount)) {
body.put("chargeAmount", request.chargeAmount);
}
if (!com.aliyun.teautil.Common.isUnset(request.corpId)) {
body.put("corpId", request.corpId);
}
if (!com.aliyun.teautil.Common.isUnset(request.extInfo)) {
body.put("extInfo", request.extInfo);
}
if (!com.aliyun.teautil.Common.isUnset(request.gmtTradeCreate)) {
body.put("gmtTradeCreate", request.gmtTradeCreate);
}
if (!com.aliyun.teautil.Common.isUnset(request.gmtTradeFinish)) {
body.put("gmtTradeFinish", request.gmtTradeFinish);
}
if (!com.aliyun.teautil.Common.isUnset(request.merchantName)) {
body.put("merchantName", request.merchantName);
}
if (!com.aliyun.teautil.Common.isUnset(request.payChannelDetailList)) {
body.put("payChannelDetailList", request.payChannelDetailList);
}
if (!com.aliyun.teautil.Common.isUnset(request.payCode)) {
body.put("payCode", request.payCode);
}
if (!com.aliyun.teautil.Common.isUnset(request.promotionAmount)) {
body.put("promotionAmount", request.promotionAmount);
}
if (!com.aliyun.teautil.Common.isUnset(request.remark)) {
body.put("remark", request.remark);
}
if (!com.aliyun.teautil.Common.isUnset(request.title)) {
body.put("title", request.title);
}
if (!com.aliyun.teautil.Common.isUnset(request.tradeErrorCode)) {
body.put("tradeErrorCode", request.tradeErrorCode);
}
if (!com.aliyun.teautil.Common.isUnset(request.tradeErrorMsg)) {
body.put("tradeErrorMsg", request.tradeErrorMsg);
}
if (!com.aliyun.teautil.Common.isUnset(request.tradeNo)) {
body.put("tradeNo", request.tradeNo);
}
if (!com.aliyun.teautil.Common.isUnset(request.tradeStatus)) {
body.put("tradeStatus", request.tradeStatus);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "NotifyBadgeCodePayResult"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/payResults"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new NotifyBadgeCodePayResultResponse());
}
/**
* summary :
* 通知钉工牌码付款结果
*
* @param request NotifyBadgeCodePayResultRequest
* @return NotifyBadgeCodePayResultResponse
*/
public NotifyBadgeCodePayResultResponse notifyBadgeCodePayResult(NotifyBadgeCodePayResultRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
NotifyBadgeCodePayResultHeaders headers = new NotifyBadgeCodePayResultHeaders();
return this.notifyBadgeCodePayResultWithOptions(request, headers, runtime);
}
/**
* summary :
* 通知钉工牌码退款结果
*
* @param request NotifyBadgeCodeRefundResultRequest
* @param headers NotifyBadgeCodeRefundResultHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return NotifyBadgeCodeRefundResultResponse
*/
public NotifyBadgeCodeRefundResultResponse notifyBadgeCodeRefundResultWithOptions(NotifyBadgeCodeRefundResultRequest request, NotifyBadgeCodeRefundResultHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.corpId)) {
body.put("corpId", request.corpId);
}
if (!com.aliyun.teautil.Common.isUnset(request.gmtRefund)) {
body.put("gmtRefund", request.gmtRefund);
}
if (!com.aliyun.teautil.Common.isUnset(request.payChannelDetailList)) {
body.put("payChannelDetailList", request.payChannelDetailList);
}
if (!com.aliyun.teautil.Common.isUnset(request.payCode)) {
body.put("payCode", request.payCode);
}
if (!com.aliyun.teautil.Common.isUnset(request.refundAmount)) {
body.put("refundAmount", request.refundAmount);
}
if (!com.aliyun.teautil.Common.isUnset(request.refundOrderNo)) {
body.put("refundOrderNo", request.refundOrderNo);
}
if (!com.aliyun.teautil.Common.isUnset(request.refundPromotionAmount)) {
body.put("refundPromotionAmount", request.refundPromotionAmount);
}
if (!com.aliyun.teautil.Common.isUnset(request.remark)) {
body.put("remark", request.remark);
}
if (!com.aliyun.teautil.Common.isUnset(request.tradeNo)) {
body.put("tradeNo", request.tradeNo);
}
if (!com.aliyun.teautil.Common.isUnset(request.userId)) {
body.put("userId", request.userId);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "NotifyBadgeCodeRefundResult"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/refundResults"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new NotifyBadgeCodeRefundResultResponse());
}
/**
* summary :
* 通知钉工牌码退款结果
*
* @param request NotifyBadgeCodeRefundResultRequest
* @return NotifyBadgeCodeRefundResultResponse
*/
public NotifyBadgeCodeRefundResultResponse notifyBadgeCodeRefundResult(NotifyBadgeCodeRefundResultRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
NotifyBadgeCodeRefundResultHeaders headers = new NotifyBadgeCodeRefundResultHeaders();
return this.notifyBadgeCodeRefundResultWithOptions(request, headers, runtime);
}
/**
* summary :
* 通知钉工牌码验证结果
*
* @param request NotifyBadgeCodeVerifyResultRequest
* @param headers NotifyBadgeCodeVerifyResultHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return NotifyBadgeCodeVerifyResultResponse
*/
public NotifyBadgeCodeVerifyResultResponse notifyBadgeCodeVerifyResultWithOptions(NotifyBadgeCodeVerifyResultRequest request, NotifyBadgeCodeVerifyResultHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.corpId)) {
body.put("corpId", request.corpId);
}
if (!com.aliyun.teautil.Common.isUnset(request.payCode)) {
body.put("payCode", request.payCode);
}
if (!com.aliyun.teautil.Common.isUnset(request.remark)) {
body.put("remark", request.remark);
}
if (!com.aliyun.teautil.Common.isUnset(request.userCorpRelationType)) {
body.put("userCorpRelationType", request.userCorpRelationType);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdentity)) {
body.put("userIdentity", request.userIdentity);
}
if (!com.aliyun.teautil.Common.isUnset(request.verifyEvent)) {
body.put("verifyEvent", request.verifyEvent);
}
if (!com.aliyun.teautil.Common.isUnset(request.verifyLocation)) {
body.put("verifyLocation", request.verifyLocation);
}
if (!com.aliyun.teautil.Common.isUnset(request.verifyNo)) {
body.put("verifyNo", request.verifyNo);
}
if (!com.aliyun.teautil.Common.isUnset(request.verifyResult)) {
body.put("verifyResult", request.verifyResult);
}
if (!com.aliyun.teautil.Common.isUnset(request.verifyTime)) {
body.put("verifyTime", request.verifyTime);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "NotifyBadgeCodeVerifyResult"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/verifyResults"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new NotifyBadgeCodeVerifyResultResponse());
}
/**
* summary :
* 通知钉工牌码验证结果
*
* @param request NotifyBadgeCodeVerifyResultRequest
* @return NotifyBadgeCodeVerifyResultResponse
*/
public NotifyBadgeCodeVerifyResultResponse notifyBadgeCodeVerifyResult(NotifyBadgeCodeVerifyResultRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
NotifyBadgeCodeVerifyResultHeaders headers = new NotifyBadgeCodeVerifyResultHeaders();
return this.notifyBadgeCodeVerifyResultWithOptions(request, headers, runtime);
}
/**
* summary :
* 保存钉工牌企业实例
*
* @param request SaveBadgeCodeCorpInstanceRequest
* @param headers SaveBadgeCodeCorpInstanceHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return SaveBadgeCodeCorpInstanceResponse
*/
public SaveBadgeCodeCorpInstanceResponse saveBadgeCodeCorpInstanceWithOptions(SaveBadgeCodeCorpInstanceRequest request, SaveBadgeCodeCorpInstanceHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.codeIdentity)) {
body.put("codeIdentity", request.codeIdentity);
}
if (!com.aliyun.teautil.Common.isUnset(request.corpId)) {
body.put("corpId", request.corpId);
}
if (!com.aliyun.teautil.Common.isUnset(request.extInfo)) {
body.put("extInfo", request.extInfo);
}
if (!com.aliyun.teautil.Common.isUnset(request.status)) {
body.put("status", request.status);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "SaveBadgeCodeCorpInstance"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/corpInstances"),
new TeaPair("method", "POST"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "none"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new SaveBadgeCodeCorpInstanceResponse());
}
/**
* summary :
* 保存钉工牌企业实例
*
* @param request SaveBadgeCodeCorpInstanceRequest
* @return SaveBadgeCodeCorpInstanceResponse
*/
public SaveBadgeCodeCorpInstanceResponse saveBadgeCodeCorpInstance(SaveBadgeCodeCorpInstanceRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
SaveBadgeCodeCorpInstanceHeaders headers = new SaveBadgeCodeCorpInstanceHeaders();
return this.saveBadgeCodeCorpInstanceWithOptions(request, headers, runtime);
}
/**
* summary :
* 更新钉工牌码用户实例
*
* @param request UpdateBadgeCodeUserInstanceRequest
* @param headers UpdateBadgeCodeUserInstanceHeaders
* @param runtime runtime options for this request RuntimeOptions
* @return UpdateBadgeCodeUserInstanceResponse
*/
public UpdateBadgeCodeUserInstanceResponse updateBadgeCodeUserInstanceWithOptions(UpdateBadgeCodeUserInstanceRequest request, UpdateBadgeCodeUserInstanceHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception {
com.aliyun.teautil.Common.validateModel(request);
java.util.Map body = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(request.availableTimes)) {
body.put("availableTimes", request.availableTimes);
}
if (!com.aliyun.teautil.Common.isUnset(request.codeId)) {
body.put("codeId", request.codeId);
}
if (!com.aliyun.teautil.Common.isUnset(request.codeIdentity)) {
body.put("codeIdentity", request.codeIdentity);
}
if (!com.aliyun.teautil.Common.isUnset(request.codeValue)) {
body.put("codeValue", request.codeValue);
}
if (!com.aliyun.teautil.Common.isUnset(request.corpId)) {
body.put("corpId", request.corpId);
}
if (!com.aliyun.teautil.Common.isUnset(request.extInfo)) {
body.put("extInfo", request.extInfo);
}
if (!com.aliyun.teautil.Common.isUnset(request.gmtExpired)) {
body.put("gmtExpired", request.gmtExpired);
}
if (!com.aliyun.teautil.Common.isUnset(request.status)) {
body.put("status", request.status);
}
if (!com.aliyun.teautil.Common.isUnset(request.userCorpRelationType)) {
body.put("userCorpRelationType", request.userCorpRelationType);
}
if (!com.aliyun.teautil.Common.isUnset(request.userIdentity)) {
body.put("userIdentity", request.userIdentity);
}
java.util.Map realHeaders = new java.util.HashMap<>();
if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) {
realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken));
}
com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap(
new TeaPair("headers", realHeaders),
new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body))
));
com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap(
new TeaPair("action", "UpdateBadgeCodeUserInstance"),
new TeaPair("version", "badge_1.0"),
new TeaPair("protocol", "HTTP"),
new TeaPair("pathname", "/v1.0/badge/codes/userInstances"),
new TeaPair("method", "PUT"),
new TeaPair("authType", "AK"),
new TeaPair("style", "ROA"),
new TeaPair("reqBodyType", "json"),
new TeaPair("bodyType", "json")
));
return TeaModel.toModel(this.execute(params, req, runtime), new UpdateBadgeCodeUserInstanceResponse());
}
/**
* summary :
* 更新钉工牌码用户实例
*
* @param request UpdateBadgeCodeUserInstanceRequest
* @return UpdateBadgeCodeUserInstanceResponse
*/
public UpdateBadgeCodeUserInstanceResponse updateBadgeCodeUserInstance(UpdateBadgeCodeUserInstanceRequest request) throws Exception {
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
UpdateBadgeCodeUserInstanceHeaders headers = new UpdateBadgeCodeUserInstanceHeaders();
return this.updateBadgeCodeUserInstanceWithOptions(request, headers, runtime);
}
}