# 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 Ess
module V20201111
class Client < TencentCloud::Common::AbstractClient
def initialize(credential, region, profile = nil)
api_version = '2020-11-11'
api_endpoint = 'ess.tencentcloudapi.com'
sdk_version = 'ESS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
super(credential, region, api_version, api_endpoint, sdk_version, profile)
end
# 将电子签系统员工userId与客户系统员工openId进行绑定
# @param request: Request instance for BindEmployeeUserIdWithClientOpenId.
# @type request: :class:`Tencentcloud::ess::V20201111::BindEmployeeUserIdWithClientOpenIdRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::BindEmployeeUserIdWithClientOpenIdResponse`
def BindEmployeeUserIdWithClientOpenId(request)
body = send_request('BindEmployeeUserIdWithClientOpenId', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = BindEmployeeUserIdWithClientOpenIdResponse.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 CancelFlow.
# @type request: :class:`Tencentcloud::ess::V20201111::CancelFlowRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CancelFlowResponse`
def CancelFlow(request)
body = send_request('CancelFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CancelFlowResponse.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
# 此接口(CancelMultiFlowSignQRCode)用于取消一码多扫二维码。该接口对传入的二维码ID,若还在有效期内,可以提前失效。
# @param request: Request instance for CancelMultiFlowSignQRCode.
# @type request: :class:`Tencentcloud::ess::V20201111::CancelMultiFlowSignQRCodeRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CancelMultiFlowSignQRCodeResponse`
def CancelMultiFlowSignQRCode(request)
body = send_request('CancelMultiFlowSignQRCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CancelMultiFlowSignQRCodeResponse.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
# 此接口(CancelUserAutoSignEnableUrl)用来撤销发送给个人用户的自动签开通链接,撤销后对应的个人用户开通链接失效。若个人用户已经完成开通,将无法撤销。(处方单场景专用,使用此接口请与客户经理确认)
# @param request: Request instance for CancelUserAutoSignEnableUrl.
# @type request: :class:`Tencentcloud::ess::V20201111::CancelUserAutoSignEnableUrlRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CancelUserAutoSignEnableUrlResponse`
def CancelUserAutoSignEnableUrl(request)
body = send_request('CancelUserAutoSignEnableUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CancelUserAutoSignEnableUrlResponse.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
# 注:此接口将会废弃,请使用撤销单个签署流程(CancelFlow)接口。
# 指定需要批量撤回的签署流程Id,获取批量撤销链接。
# 客户指定需要撤回的签署流程Id,最多100个,超过100不处理;接口调用成功返回批量撤回合同的链接,通过链接跳转到电子签小程序完成批量撤回。
# @param request: Request instance for CreateBatchCancelFlowUrl.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateBatchCancelFlowUrlRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateBatchCancelFlowUrlResponse`
def CreateBatchCancelFlowUrl(request)
body = send_request('CreateBatchCancelFlowUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateBatchCancelFlowUrlResponse.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 CreateChannelSubOrganizationModifyQrCode.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateChannelSubOrganizationModifyQrCodeRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateChannelSubOrganizationModifyQrCodeResponse`
def CreateChannelSubOrganizationModifyQrCode(request)
body = send_request('CreateChannelSubOrganizationModifyQrCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateChannelSubOrganizationModifyQrCodeResponse.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 CreateConvertTaskApi.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateConvertTaskApiRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateConvertTaskApiResponse`
def CreateConvertTaskApi(request)
body = send_request('CreateConvertTaskApi', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateConvertTaskApiResponse.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,并且填充该模板中需要补充的信息。是“发起流程”接口的前置接口。
# @param request: Request instance for CreateDocument.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateDocumentRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateDocumentResponse`
def CreateDocument(request)
body = send_request('CreateDocument', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDocumentResponse.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,补充合同内容信息及签署信息生成电子合同。
# 注:该接口是通过模板生成合同流程的前置接口,先创建一个不包含签署文件的流程。
# 配合“创建电子文档”接口和“发起流程”接口使用。
# @param request: Request instance for CreateFlow.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowResponse`
def CreateFlow(request)
body = send_request('CreateFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowResponse.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 CreateFlowApprovers.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowApproversRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowApproversResponse`
def CreateFlowApprovers(request)
body = send_request('CreateFlowApprovers', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowApproversResponse.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
# 此接口(CreateFlowByFiles)用来通过上传后的pdf资源编号来创建待签署的合同流程。
# 适用场景1:适用非制式的合同文件签署。一般开发者自己有完整的签署文件,可以通过该接口传入完整的PDF文件及流程信息生成待签署的合同流程。
# 适用场景2:可通过该接口传入制式合同文件,同时在指定位置添加签署控件。可以起到接口创建临时模板的效果。如果是标准的制式文件,建议使用模板功能生成模板ID进行合同流程的生成。
# 注意事项:该接口需要依赖“多文件上传”接口生成pdf资源编号(FileIds)进行使用。
# @param request: Request instance for CreateFlowByFiles.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowByFilesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowByFilesResponse`
def CreateFlowByFiles(request)
body = send_request('CreateFlowByFiles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowByFilesResponse.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。需要配合出证套餐才能调用。
# 出证需要一定时间,建议调用创建出证24小时之后再通过DescribeFlowEvidenceReport进行查询。
# @param request: Request instance for CreateFlowEvidenceReport.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowEvidenceReportRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowEvidenceReportResponse`
def CreateFlowEvidenceReport(request)
body = send_request('CreateFlowEvidenceReport', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowEvidenceReportResponse.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
# 此接口(CreateFlowGroupByFiles)通过多文件创建合同组签署流程。
# PDF资源Id 通过上传文件接口获取
# 此接口合同组中的子合同必须都是文件发起的合同
# @param request: Request instance for CreateFlowGroupByFiles.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowGroupByFilesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowGroupByFilesResponse`
def CreateFlowGroupByFiles(request)
body = send_request('CreateFlowGroupByFiles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowGroupByFilesResponse.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
# 此接口(CreateFlowGroupByTemplates)通过多模板创建合同组签署流程。
# 此接口合同组中的子合同必须都是模板发起的合同。
目前最大仅支持50个子合同
# @param request: Request instance for CreateFlowGroupByTemplates.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowGroupByTemplatesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowGroupByTemplatesResponse`
def CreateFlowGroupByTemplates(request)
body = send_request('CreateFlowGroupByTemplates', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowGroupByTemplatesResponse.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个; 接口失败后返回错误信息
# 注意:
# 该接口不可直接调用,请联系客户经理申请使用
# 仅能催办当前状态为“待签署”的签署人,且只能催办一次
# 发起合同时,签署人的NotifyType需设置为sms,否则无法催办
# @param request: Request instance for CreateFlowReminds.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowRemindsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowRemindsResponse`
def CreateFlowReminds(request)
body = send_request('CreateFlowReminds', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowRemindsResponse.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
# 提交企业签署流程审批结果
# 适用场景:
# 在通过接口(CreateFlow 或者CreateFlowByFiles)创建签署流程时,若指定了参数 NeedSignReview 为true,且发起方企业作为签署方参与了流程签署,则可以调用此接口提交企业内部签署审批结果。
# 若签署流程状态正常,且本企业存在签署方未签署,同一签署流程可以多次提交签署审批结果,签署时的最后一个“审批结果”有效。
# @param request: Request instance for CreateFlowSignReview.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowSignReviewRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowSignReviewResponse`
def CreateFlowSignReview(request)
body = send_request('CreateFlowSignReview', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowSignReviewResponse.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 CreateFlowSignUrl.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateFlowSignUrlRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateFlowSignUrlResponse`
def CreateFlowSignUrl(request)
body = send_request('CreateFlowSignUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateFlowSignUrlResponse.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。
# @param request: Request instance for CreateIntegrationDepartment.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateIntegrationDepartmentRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateIntegrationDepartmentResponse`
def CreateIntegrationDepartment(request)
body = send_request('CreateIntegrationDepartment', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateIntegrationDepartmentResponse.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 CreateIntegrationEmployees.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateIntegrationEmployeesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateIntegrationEmployeesResponse`
def CreateIntegrationEmployees(request)
body = send_request('CreateIntegrationEmployees', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateIntegrationEmployeesResponse.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 CreateIntegrationUserRoles.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateIntegrationUserRolesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateIntegrationUserRolesResponse`
def CreateIntegrationUserRoles(request)
body = send_request('CreateIntegrationUserRoles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateIntegrationUserRolesResponse.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
# 此接口(CreateMultiFlowSignQRCode)用于创建一码多扫流程签署二维码。
# 适用场景:无需填写签署人信息,可通过模板id生成签署二维码,签署人可通过扫描二维码补充签署信息进行实名签署。常用于提前不知道签署人的身份信息场景,例如:劳务工招工、大批量员工入职等场景。
# **本接口适用于发起方没有填写控件的 B2C或者单C模板**
# **若是B2C模板,还要满足以下任意一个条件**
# - 模板中配置的签署顺序是无序
# - B端企业的签署方式是静默签署
# - B端企业是非首位签署
# @param request: Request instance for CreateMultiFlowSignQRCode.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateMultiFlowSignQRCodeRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateMultiFlowSignQRCodeResponse`
def CreateMultiFlowSignQRCode(request)
body = send_request('CreateMultiFlowSignQRCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateMultiFlowSignQRCodeResponse.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
# 创建快速发起流程
# 适用场景:用户通过API 合同文件及签署信息,并可通过我们返回的URL在页面完成签署控件等信息的编辑与确认,快速发起合同.
# 注:该接口文件的resourceId 是通过上传文件之后获取的。
# @param request: Request instance for CreatePrepareFlow.
# @type request: :class:`Tencentcloud::ess::V20201111::CreatePrepareFlowRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreatePrepareFlowResponse`
def CreatePrepareFlow(request)
body = send_request('CreatePrepareFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreatePrepareFlowResponse.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
# 本接口(CreatePreparedPersonalEsign)用于创建导入个人印章(处方单场景专用,使用此接口请与客户经理确认)。
# @param request: Request instance for CreatePreparedPersonalEsign.
# @type request: :class:`Tencentcloud::ess::V20201111::CreatePreparedPersonalEsignRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreatePreparedPersonalEsignResponse`
def CreatePreparedPersonalEsign(request)
body = send_request('CreatePreparedPersonalEsign', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreatePreparedPersonalEsignResponse.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 CreateReleaseFlow.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateReleaseFlowRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateReleaseFlowResponse`
def CreateReleaseFlow(request)
body = send_request('CreateReleaseFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateReleaseFlowResponse.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
# 获取小程序签署链接
# 适用场景:如果需要签署人在自己的APP、小程序、H5应用中签署,可以通过此接口获取跳转腾讯电子签小程序的签署跳转链接。
# 注:如果签署人是在PC端扫码签署,可以通过生成跳转链接自主转换成二维码,让签署人在PC端扫码签署。
# 跳转到小程序的实现,参考官方文档(分为全屏、半屏两种方式)
# 如您需要自主配置小程序跳转链接,请参考: 跳转小程序链接配置说明
# @param request: Request instance for CreateSchemeUrl.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateSchemeUrlRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateSchemeUrlResponse`
def CreateSchemeUrl(request)
body = send_request('CreateSchemeUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateSchemeUrlResponse.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 CreateSeal.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateSealRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateSealResponse`
def CreateSeal(request)
body = send_request('CreateSeal', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateSealResponse.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 CreateSealPolicy.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateSealPolicyRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateSealPolicyResponse`
def CreateSealPolicy(request)
body = send_request('CreateSealPolicy', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateSealPolicyResponse.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 CreateUserAutoSignEnableUrl.
# @type request: :class:`Tencentcloud::ess::V20201111::CreateUserAutoSignEnableUrlRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::CreateUserAutoSignEnableUrlResponse`
def CreateUserAutoSignEnableUrl(request)
body = send_request('CreateUserAutoSignEnableUrl', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateUserAutoSignEnableUrlResponse.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 DeleteIntegrationDepartment.
# @type request: :class:`Tencentcloud::ess::V20201111::DeleteIntegrationDepartmentRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DeleteIntegrationDepartmentResponse`
def DeleteIntegrationDepartment(request)
body = send_request('DeleteIntegrationDepartment', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteIntegrationDepartmentResponse.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 DeleteIntegrationEmployees.
# @type request: :class:`Tencentcloud::ess::V20201111::DeleteIntegrationEmployeesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DeleteIntegrationEmployeesResponse`
def DeleteIntegrationEmployees(request)
body = send_request('DeleteIntegrationEmployees', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteIntegrationEmployeesResponse.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 DeleteIntegrationRoleUsers.
# @type request: :class:`Tencentcloud::ess::V20201111::DeleteIntegrationRoleUsersRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DeleteIntegrationRoleUsersResponse`
def DeleteIntegrationRoleUsers(request)
body = send_request('DeleteIntegrationRoleUsers', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteIntegrationRoleUsersResponse.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 DeleteSealPolicies.
# @type request: :class:`Tencentcloud::ess::V20201111::DeleteSealPoliciesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DeleteSealPoliciesResponse`
def DeleteSealPolicies(request)
body = send_request('DeleteSealPolicies', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteSealPoliciesResponse.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 DescribeExtendedServiceAuthInfos.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeExtendedServiceAuthInfosRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeExtendedServiceAuthInfosResponse`
def DescribeExtendedServiceAuthInfos(request)
body = send_request('DescribeExtendedServiceAuthInfos', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeExtendedServiceAuthInfosResponse.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
# 查询文件下载URL。
# 适用场景:通过传参合同流程编号,下载对应的合同PDF文件流到本地。
# @param request: Request instance for DescribeFileUrls.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeFileUrlsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeFileUrlsResponse`
def DescribeFileUrls(request)
body = send_request('DescribeFileUrls', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeFileUrlsResponse.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
# 查询流程摘要
# 适用场景:可用于主动查询某个合同流程的签署状态信息。可以配合回调通知使用。
# 日调用量限制:10W
# @param request: Request instance for DescribeFlowBriefs.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeFlowBriefsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeFlowBriefsResponse`
def DescribeFlowBriefs(request)
body = send_request('DescribeFlowBriefs', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeFlowBriefsResponse.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查询该流程相关联的填写控件信息
# @param request: Request instance for DescribeFlowComponents.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeFlowComponentsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeFlowComponentsResponse`
def DescribeFlowComponents(request)
body = send_request('DescribeFlowComponents', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeFlowComponentsResponse.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
# 查询出证报告,返回报告 URL。
# @param request: Request instance for DescribeFlowEvidenceReport.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeFlowEvidenceReportRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeFlowEvidenceReportResponse`
def DescribeFlowEvidenceReport(request)
body = send_request('DescribeFlowEvidenceReport', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeFlowEvidenceReportResponse.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 DescribeFlowInfo.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeFlowInfoRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeFlowInfoResponse`
def DescribeFlowInfo(request)
body = send_request('DescribeFlowInfo', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeFlowInfoResponse.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 DescribeFlowTemplates.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeFlowTemplatesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeFlowTemplatesResponse`
def DescribeFlowTemplates(request)
body = send_request('DescribeFlowTemplates', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeFlowTemplatesResponse.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 DescribeIntegrationDepartments.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationDepartmentsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationDepartmentsResponse`
def DescribeIntegrationDepartments(request)
body = send_request('DescribeIntegrationDepartments', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeIntegrationDepartmentsResponse.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
# 查询企业员工列表,每次返回的数据量最大为20
# @param request: Request instance for DescribeIntegrationEmployees.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationEmployeesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationEmployeesResponse`
def DescribeIntegrationEmployees(request)
body = send_request('DescribeIntegrationEmployees', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeIntegrationEmployeesResponse.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 DescribeIntegrationMainOrganizationUser.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationMainOrganizationUserRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationMainOrganizationUserResponse`
def DescribeIntegrationMainOrganizationUser(request)
body = send_request('DescribeIntegrationMainOrganizationUser', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeIntegrationMainOrganizationUserResponse.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 DescribeIntegrationRoles.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationRolesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeIntegrationRolesResponse`
def DescribeIntegrationRoles(request)
body = send_request('DescribeIntegrationRoles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeIntegrationRolesResponse.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
# 此API接口用户查询加入集团的成员企业
# @param request: Request instance for DescribeOrganizationGroupOrganizations.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeOrganizationGroupOrganizationsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeOrganizationGroupOrganizationsResponse`
def DescribeOrganizationGroupOrganizations(request)
body = send_request('DescribeOrganizationGroupOrganizations', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeOrganizationGroupOrganizationsResponse.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
# 查询企业印章的列表,需要操作者具有查询印章权限
# 客户指定需要获取的印章数量和偏移量,数量最多100,超过100按100处理;入参InfoType控制印章是否携带授权人信息,为1则携带,为0则返回的授权人信息为空数组。接口调用成功返回印章的信息列表还有企业印章的总数。
# @param request: Request instance for DescribeOrganizationSeals.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeOrganizationSealsRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeOrganizationSealsResponse`
def DescribeOrganizationSeals(request)
body = send_request('DescribeOrganizationSeals', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeOrganizationSealsResponse.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
# 通过AuthCode查询用户是否实名
# @param request: Request instance for DescribeThirdPartyAuthCode.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeThirdPartyAuthCodeRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeThirdPartyAuthCodeResponse`
def DescribeThirdPartyAuthCode(request)
body = send_request('DescribeThirdPartyAuthCode', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeThirdPartyAuthCodeResponse.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 DescribeUserAutoSignStatus.
# @type request: :class:`Tencentcloud::ess::V20201111::DescribeUserAutoSignStatusRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DescribeUserAutoSignStatusResponse`
def DescribeUserAutoSignStatus(request)
body = send_request('DescribeUserAutoSignStatus', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeUserAutoSignStatusResponse.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 DisableUserAutoSign.
# @type request: :class:`Tencentcloud::ess::V20201111::DisableUserAutoSignRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::DisableUserAutoSignResponse`
def DisableUserAutoSign(request)
body = send_request('DisableUserAutoSign', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DisableUserAutoSignResponse.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
# 通过发起转换任务接口(CreateConvertTaskApi)返回的任务Id查询转换任务状态,通过本接口确认转换任务是否完成。
# 大文件转换所需的时间可能会比较长。
# @param request: Request instance for GetTaskResultApi.
# @type request: :class:`Tencentcloud::ess::V20201111::GetTaskResultApiRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::GetTaskResultApiResponse`
def GetTaskResultApi(request)
body = send_request('GetTaskResultApi', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = GetTaskResultApiResponse.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
# 新增/删除应用callbackinfo
# callbackinfo包含: 回调地址和签名key
# 操作:新增/删除
# @param request: Request instance for ModifyApplicationCallbackInfo.
# @type request: :class:`Tencentcloud::ess::V20201111::ModifyApplicationCallbackInfoRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::ModifyApplicationCallbackInfoResponse`
def ModifyApplicationCallbackInfo(request)
body = send_request('ModifyApplicationCallbackInfo', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyApplicationCallbackInfoResponse.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、部门序列号。
# @param request: Request instance for ModifyIntegrationDepartment.
# @type request: :class:`Tencentcloud::ess::V20201111::ModifyIntegrationDepartmentRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::ModifyIntegrationDepartmentResponse`
def ModifyIntegrationDepartment(request)
body = send_request('ModifyIntegrationDepartment', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyIntegrationDepartmentResponse.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 StartFlow.
# @type request: :class:`Tencentcloud::ess::V20201111::StartFlowRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::StartFlowResponse`
def StartFlow(request)
body = send_request('StartFlow', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = StartFlowResponse.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
# 将存在绑定关系的电子签系统员工userId与客户系统员工openId进行解绑
# @param request: Request instance for UnbindEmployeeUserIdWithClientOpenId.
# @type request: :class:`Tencentcloud::ess::V20201111::UnbindEmployeeUserIdWithClientOpenIdRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::UnbindEmployeeUserIdWithClientOpenIdResponse`
def UnbindEmployeeUserIdWithClientOpenId(request)
body = send_request('UnbindEmployeeUserIdWithClientOpenId', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = UnbindEmployeeUserIdWithClientOpenIdResponse.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 UpdateIntegrationEmployees.
# @type request: :class:`Tencentcloud::ess::V20201111::UpdateIntegrationEmployeesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::UpdateIntegrationEmployeesResponse`
def UpdateIntegrationEmployees(request)
body = send_request('UpdateIntegrationEmployees', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = UpdateIntegrationEmployeesResponse.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
# 此接口(UploadFiles)用于文件上传。
# 适用场景:用于生成pdf资源编号(FileIds)来配合“用PDF创建流程”接口使用,使用场景可详见“用PDF创建流程”接口说明。
# 其中上传的文件,图片类型(png/jpg/jpeg)大小限制为5M,其他大小限制为60M。
# 调用时需要设置Domain/接口请求域名为 file.ess.tencent.cn,代码示例:
# HttpProfile httpProfile = new HttpProfile();
# httpProfile.setEndpoint("file.test.ess.tencent.cn");
# @param request: Request instance for UploadFiles.
# @type request: :class:`Tencentcloud::ess::V20201111::UploadFilesRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::UploadFilesResponse`
def UploadFiles(request)
body = send_request('UploadFiles', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = UploadFilesResponse.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 VerifyPdf.
# @type request: :class:`Tencentcloud::ess::V20201111::VerifyPdfRequest`
# @rtype: :class:`Tencentcloud::ess::V20201111::VerifyPdfResponse`
def VerifyPdf(request)
body = send_request('VerifyPdf', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = VerifyPdfResponse.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
end
end
end
end