# frozen_string_literal: true
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.
require 'json'
module TencentCloud
module Essbasic
module V20210526
class Client < TencentCloud::Common::AbstractClient
def initialize(credential, region, profile = nil)
api_version = '2021-05-26'
api_endpoint = 'essbasic.tencentcloudapi.com'
sdk_version = 'ESSBASIC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
super(credential, region, api_version, api_endpoint, sdk_version, profile)
end
# 指定需要批量撤销的签署流程Id,批量撤销合同
# 客户指定需要撤销的签署流程Id,最多100个,超过100不处理;
# 可以撤回:未全部签署完成
# 不可以撤回:已全部签署完成、已拒签、已过期、已撤回、拒绝填写、已解除等合同状态。
# **满足撤销条件的合同会发起异步撤销流程,不满足撤销条件的合同返回失败原因。**
# **合同撤销成功后,会通过合同状态为 CANCEL 的回调消息通知调用方 [具体可参考回调消息](https://qian.tencent.com/developers/scenes/partner/callback_data_types#-%E5%90%88%E5%90%8C%E7%8A%B6%E6%80%81%E9%80%9A%E7%9F%A5---flowstatuschange)**
# **注意:
# 能撤回合同的只能是合同的发起人或者发起企业的超管、法人**
# @param request: Request instance for ChannelBatchCancelFlows.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelBatchCancelFlowsRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelBatchCancelFlowsResponse`
def ChannelBatchCancelFlows(request)
body = send_request('ChannelBatchCancelFlows', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelBatchCancelFlowsResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 撤销签署流程接口,可以撤回:未全部签署完成;不可以撤回(终态):已全部签署完成、已拒签、已过期、已撤回。
# 注意:
# 能撤回合同的只能是合同的发起人或者发起企业的超管、法人
# @param request: Request instance for ChannelCancelFlow.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCancelFlowRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCancelFlowResponse`
def ChannelCancelFlow(request)
body = send_request('ChannelCancelFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCancelFlowResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 此接口(ChannelCancelMultiFlowSignQRCode)用于取消一码多扫二维码。该接口对传入的二维码ID,若还在有效期内,可以提前失效。
# @param request: Request instance for ChannelCancelMultiFlowSignQRCode.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCancelMultiFlowSignQRCodeRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCancelMultiFlowSignQRCodeResponse`
def ChannelCancelMultiFlowSignQRCode(request)
body = send_request('ChannelCancelMultiFlowSignQRCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCancelMultiFlowSignQRCodeResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 此接口(ChannelCancelUserAutoSignEnableUrl)用来撤销发送给个人用户的自动签开通链接,撤销后对应的个人用户开通链接失效。若个人用户已经完成开通,将无法撤销。(处方单场景专用,使用此接口请与客户经理确认)
# @param request: Request instance for ChannelCancelUserAutoSignEnableUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCancelUserAutoSignEnableUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCancelUserAutoSignEnableUrlResponse`
def ChannelCancelUserAutoSignEnableUrl(request)
body = send_request('ChannelCancelUserAutoSignEnableUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCancelUserAutoSignEnableUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 指定需要批量撤销的签署流程Id,获取批量撤销链接 - 不建议使用此接口,可使用ChannelBatchCancelFlows
# 客户指定需要撤销的签署流程Id,最多100个,超过100不处理;
# 接口调用成功返回批量撤销合同的链接,通过链接跳转到电子签小程序完成批量撤销;
# 可以撤回:未全部签署完成
# 不可以撤回:已全部签署完成、已拒签、已过期、已撤回、拒绝填写、已解除等合同状态。
# 注意:
# 能撤回合同的只能是合同的发起人或者发起企业的超管、法人
# @param request: Request instance for ChannelCreateBatchCancelFlowUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateBatchCancelFlowUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateBatchCancelFlowUrlResponse`
def ChannelCreateBatchCancelFlowUrl(request)
body = send_request('ChannelCreateBatchCancelFlowUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateBatchCancelFlowUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 通过此接口,创建小程序批量签署链接,个人/企业员工点击此链接即可跳转小程序进行批量签署。
# 请确保生成链接时候的身份信息和签署合同参与方的信息保持一致。
# 注:
# - 参与人点击链接后需短信验证码才能查看合同内容。
# - 企业用户批量签署,需要传OrganizationName(参与方所在企业名称)参数生成签署链接,`请确保此企业已完成腾讯电子签企业认证`。
# - 个人批量签署,签名区`仅支持手写签名`。
# @param request: Request instance for ChannelCreateBatchSignUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateBatchSignUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateBatchSignUrlResponse`
def ChannelCreateBatchSignUrl(request)
body = send_request('ChannelCreateBatchSignUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateBatchSignUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 此接口(ChannelCreateBoundFlows)用于子客领取合同,经办人需要有相应的角色,合同不能重复领取。
# @param request: Request instance for ChannelCreateBoundFlows.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateBoundFlowsRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateBoundFlowsResponse`
def ChannelCreateBoundFlows(request)
body = send_request('ChannelCreateBoundFlows', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateBoundFlowsResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 上传了word、excel、图片文件后,通过该接口发起文件转换任务,将word、excel、图片文件转换为pdf文件。
# @param request: Request instance for ChannelCreateConvertTaskApi.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateConvertTaskApiRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateConvertTaskApiResponse`
def ChannelCreateConvertTaskApi(request)
body = send_request('ChannelCreateConvertTaskApi', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateConvertTaskApiResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 本接口(ChannelCreateEmbedWebUrl)用于创建常规模块嵌入web的链接
# 本接口支持创建:创建印章,创建模板,修改模板,预览模板,预览合同流程的web链接
# 进入web连接后与当前控制台操作保持一致
# @param request: Request instance for ChannelCreateEmbedWebUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateEmbedWebUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateEmbedWebUrlResponse`
def ChannelCreateEmbedWebUrl(request)
body = send_request('ChannelCreateEmbedWebUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateEmbedWebUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 适用场景:
# 当通过模板或文件发起合同时,若未指定企业签署人信息,则可调用此接口动态补充签署人。同一签署人只允许补充一人,最终实际签署人取决于谁先领取合同完成签署。
# 限制条件:
# 1. 本企业(发起方企业)企业签署人仅支持通过企业名称+姓名+手机号进行补充。
# 2. 个人签署人仅支持通过姓名+手机号进行补充。
# @param request: Request instance for ChannelCreateFlowApprovers.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowApproversRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowApproversResponse`
def ChannelCreateFlowApprovers(request)
body = send_request('ChannelCreateFlowApprovers', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowApproversResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 接口(ChannelCreateFlowByFiles)用PDF文件创建签署流程。
# 注: `此接口静默签(企业自动签)能力为白名单功能,使用前请联系对接的客户经理沟通。`
# @param request: Request instance for ChannelCreateFlowByFiles.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowByFilesRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowByFilesResponse`
def ChannelCreateFlowByFiles(request)
body = send_request('ChannelCreateFlowByFiles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowByFilesResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 接口(ChannelCreateFlowGroupByFiles)用于通过多文件创建合同组签署流程。
# @param request: Request instance for ChannelCreateFlowGroupByFiles.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowGroupByFilesRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowGroupByFilesResponse`
def ChannelCreateFlowGroupByFiles(request)
body = send_request('ChannelCreateFlowGroupByFiles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowGroupByFilesResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 接口(ChannelCreateFlowGroupByTemplates)用于通过多模板创建合同组签署流程。
# @param request: Request instance for ChannelCreateFlowGroupByTemplates.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowGroupByTemplatesRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowGroupByTemplatesResponse`
def ChannelCreateFlowGroupByTemplates(request)
body = send_request('ChannelCreateFlowGroupByTemplates', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowGroupByTemplatesResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 指定需要批量催办的签署流程Id,批量催办合同,最多100个;接口失败后返回错误信息
# 注意:
# 该接口不可直接调用,请联系客户经理申请使用
# 仅能催办当前状态为“待签署”的签署人,且只能催办一次
# @param request: Request instance for ChannelCreateFlowReminds.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowRemindsRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowRemindsResponse`
def ChannelCreateFlowReminds(request)
body = send_request('ChannelCreateFlowReminds', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowRemindsResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 提交企业流程审批结果
# 目前存在两种审核操作,签署审核,发起审核
# 签署审核:通过接口(CreateFlowsByTemplates或ChannelCreateFlowByFiles或ChannelCreatePrepareFlow)发起签署流程后,若指定了参数 NeedSignReview 为true,则可以调用此接口,指定operate=SignReview,提交企业内部签署审批结果;若签署流程状态正常,且本企业存在签署方未签署,同一签署流程可以多次提交签署审批结果,签署时的最后一个“审批结果”有效
# 发起审核:通过接口ChannelCreatePrepareFlow指定发起后需要审核,则可以通过调用此接口,指定operate=CreateReview,提交企业内部审批结果,可多次提交,当通过后,后续提交结果无效
# @param request: Request instance for ChannelCreateFlowSignReview.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowSignReviewRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowSignReviewResponse`
def ChannelCreateFlowSignReview(request)
body = send_request('ChannelCreateFlowSignReview', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowSignReviewResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 创建个人签署H5签署链接,请联系客户经理申请使用
# 该接口用于发起合同后,生成C端签署人的签署链接
# 注意:该接口目前签署人类型仅支持个人签署方(PERSON)
# 注意:该接口可生成签署链接的C端签署人必须仅有手写签名和时间类型的签署控件
# 注意:该接口返回的签署链接是用于APP集成的场景,支持APP打开或浏览器直接打开,不支持微信小程序嵌入。微信小程序请使用小程序跳转或半屏弹窗的方式
# @param request: Request instance for ChannelCreateFlowSignUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowSignUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateFlowSignUrlResponse`
def ChannelCreateFlowSignUrl(request)
body = send_request('ChannelCreateFlowSignUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateFlowSignUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 此接口(ChannelCreateMultiFlowSignQRCode)用于创建一码多扫流程签署二维码。 适用场景:无需填写签署人信息,可通过模板id生成签署二维码,签署人可通过扫描二维码补充签署信息进行实名签署。常用于提前不知道签署人的身份信息场景,例如:劳务工招工、大批量员工入职等场景。
# **本接口适用于发起方没有填写控件的 B2C或者单C模板**
# **若是B2C模板,还要满足以下任意一个条件**
# - 模板中配置的签署顺序是无序
# - B端企业的签署方式是静默签署
# - B端企业是非首位签署
# 通过一码多扫二维码发起的合同,合同涉及到的回调消息可参考文档[合同发起及签署相关回调
# ]( https://qian.tencent.com/developers/partner/callback_types_contracts_sign)
# 用户通过签署二维码发起合同时,因企业额度不足导致失败 会触发签署二维码相关回调,具体参考文档[签署二维码相关回调](https://qian.tencent.com/developers/partner/callback_types_commons#%E7%AD%BE%E7%BD%B2%E4%BA%8C%E7%BB%B4%E7%A0%81%E7%9B%B8%E5%85%B3%E5%9B%9E%E8%B0%83)
# @param request: Request instance for ChannelCreateMultiFlowSignQRCode.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateMultiFlowSignQRCodeRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateMultiFlowSignQRCodeResponse`
def ChannelCreateMultiFlowSignQRCode(request)
body = send_request('ChannelCreateMultiFlowSignQRCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateMultiFlowSignQRCodeResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 通过此接口,创建小程序批量签署链接,可以创建企业批量签署链接,员工只需点击链接即可跳转至控制台进行批量签署。
# 注:
# - 员工必须在企业下完成实名认证,且需作为批量签署合同的签署方或者领取方。
# - 仅支持传入待签署或者待领取的合同,待填写暂不支持。
# - 员工批量签署,支持多种签名方式,包括手写签名、临摹签名、系统签名、个人印章,暂不支持签批控件
# @param request: Request instance for ChannelCreateOrganizationBatchSignUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateOrganizationBatchSignUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateOrganizationBatchSignUrlResponse`
def ChannelCreateOrganizationBatchSignUrl(request)
body = send_request('ChannelCreateOrganizationBatchSignUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateOrganizationBatchSignUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 生成渠道子客编辑企业信息二维码
# @param request: Request instance for ChannelCreateOrganizationModifyQrCode.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateOrganizationModifyQrCodeRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateOrganizationModifyQrCodeResponse`
def ChannelCreateOrganizationModifyQrCode(request)
body = send_request('ChannelCreateOrganizationModifyQrCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateOrganizationModifyQrCodeResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 创建预发起合同
# 通过此接口指定:合同,签署人,填写控件信息,生成预创建合同链接,点击后跳转到web页面完成合同创建并发起
# 可指定合同信息不可更改,签署人信息不可更改
# 合同发起后,填写及签署流程与现有操作流程一致
# 注意:目前仅支持模板发起
# @param request: Request instance for ChannelCreatePrepareFlow.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreatePrepareFlowRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreatePrepareFlowResponse`
def ChannelCreatePrepareFlow(request)
body = send_request('ChannelCreatePrepareFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreatePrepareFlowResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 本接口(ChannelCreatePreparedPersonalEsign)用于创建导入个人印章(处方单场景专用,使用此接口请与客户经理确认)。
# @param request: Request instance for ChannelCreatePreparedPersonalEsign.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreatePreparedPersonalEsignRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreatePreparedPersonalEsignResponse`
def ChannelCreatePreparedPersonalEsign(request)
body = send_request('ChannelCreatePreparedPersonalEsign', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreatePreparedPersonalEsignResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 发起解除协议,主要应用场景为:基于一份已经签署的合同,进行解除操作。
# 合同发起人必须在电子签已经进行实名。
# @param request: Request instance for ChannelCreateReleaseFlow.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateReleaseFlowRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateReleaseFlowResponse`
def ChannelCreateReleaseFlow(request)
body = send_request('ChannelCreateReleaseFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateReleaseFlowResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 此接口(ChannelCreateRole)用来创建企业自定义角色。
# 适用场景1:创建当前企业的自定义角色,并且创建时不进行权限的设置(PermissionGroups 参数不传),角色中的权限内容可通过接口 ChannelModifyRole 完成更新。
# 适用场景2:创建当前企业的自定义角色,并且创建时进行权限的设置(PermissionGroups 参数要传),权限树内容 PermissionGroups 可参考接口 ChannelDescribeRoles 的输出。此处注意权限树内容可能会更新,需尽量拉取最新的权限树内容,并且权限树内容 PermissionGroups 必须是一颗完整的权限树。
# @param request: Request instance for ChannelCreateRole.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateRoleRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateRoleResponse`
def ChannelCreateRole(request)
body = send_request('ChannelCreateRole', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateRoleResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 将指定印章授权给第三方平台子客企业下的某些员工
# @param request: Request instance for ChannelCreateSealPolicy.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateSealPolicyRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateSealPolicyResponse`
def ChannelCreateSealPolicy(request)
body = send_request('ChannelCreateSealPolicy', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateSealPolicyResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 企业方可以通过此接口获取个人用户开启自动签的跳转链接
# @param request: Request instance for ChannelCreateUserAutoSignEnableUrl.
# @type request: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateUserAutoSignEnableUrlRequest`
# @rtype: :class:`Tencentcloud::essbasic::V20210526::ChannelCreateUserAutoSignEnableUrlResponse`
def ChannelCreateUserAutoSignEnableUrl(request)
body = send_request('ChannelCreateUserAutoSignEnableUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ChannelCreateUserAutoSignEnableUrlResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取设置自动签印章小程序链接。
# 注意:
#
企业开通自动签
后使用。已经开通了自动签的个人
更换自动签印章。最多30天
。小程序
端。