use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.
the class CreateFlow method main.
public static void main(String[] args) {
try {
EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
CreateFlowRequest request = new CreateFlowRequest();
UserInfo userInfo = new UserInfo();
// 管理员用户id或者员工用户id
userInfo.setUserId(OperatorId);
// 请求客户端在公网的ip地址
userInfo.setClientIp("************");
request.setOperator(userInfo);
// 企业方 静默签署时type为3/非静默签署type为0(仅支持处于第一位的签署方进行静默签,且合同为顺序签署,请于控制台调整好模板)
FlowCreateApprover enterpriseInfo = new FlowCreateApprover();
enterpriseInfo.setApproverType(3L);
enterpriseInfo.setOrganizationName("************");
enterpriseInfo.setApproverName("************");
enterpriseInfo.setApproverMobile("************");
// 请务必设置
enterpriseInfo.setRequired(true);
// 客户个人 type为1
FlowCreateApprover clientInfo = new FlowCreateApprover();
clientInfo.setApproverType(1L);
clientInfo.setApproverName("************");
clientInfo.setApproverMobile("************");
// 请务必设置
clientInfo.setRequired(true);
// 注:当进行B2B签署时,允许指向未注册的企业,此时签署人可以查看合同并按照指引注册企业
request.setApprovers(new FlowCreateApprover[] { enterpriseInfo, clientInfo });
// 请设置合理的时间(秒级时间戳),否则容易造成合同过期
request.setDeadLine(1682474522L);
request.setFlowName("************");
CreateFlowResponse resp = client.CreateFlow(request);
System.out.println(CreateFlowResponse.toJsonString(resp));
} catch (TencentCloudSDKException e) {
e.printStackTrace();
}
}
use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.
the class DescribeFileUrls method main.
public static void main(String[] args) {
try {
EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
DescribeFileUrlsRequest request = new DescribeFileUrlsRequest();
UserInfo userInfo = new UserInfo();
// 管理员用户id或者员工用户id
userInfo.setUserId(OperatorId);
// 请求客户端在公网的ip地址
userInfo.setClientIp("************");
request.setOperator(userInfo);
request.setBusinessType("FLOW");
// 传入flowId
request.setBusinessIds(new String[] { "************" });
DescribeFileUrlsResponse response = client.DescribeFileUrls(request);
// 请注意打印方式
System.out.println(new GsonBuilder().disableHtmlEscaping().create().toJson(response));
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.
the class StartFlow method main.
public static void main(String[] args) {
try {
EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
StartFlowRequest request = new StartFlowRequest();
UserInfo userInfo = new UserInfo();
// 管理员用户id或者员工用户id
userInfo.setUserId(OperatorId);
// 请求客户端在公网的ip地址
userInfo.setClientIp("************");
request.setOperator(userInfo);
// 由CreateFlow返回
request.setFlowId("************");
StartFlowResponse response = client.StartFlow(request);
System.out.println(client.gson.toJson(response));
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.
the class CreateDocument method main.
public static void main(String[] args) {
try {
EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
CreateDocumentRequest request = new CreateDocumentRequest();
UserInfo userInfo = new UserInfo();
// 管理员用户id或者员工用户id
userInfo.setUserId(OperatorId);
// 请求客户端在公网的ip地址
userInfo.setClientIp("************");
request.setOperator(userInfo);
// 由CreateFlow返回
request.setFlowId("************");
// 传入自定义文件名即可
request.setFileNames(new String[] { "************" });
// 后台配置后查询获取
request.setTemplateId("************");
// 普通控件
FormField formField = new FormField();
// 在模板配置拖入控件的界面可以查询到(ComponentName或者ComponentId选一填写,建议填写ComponentName)
formField.setComponentName("************");
formField.setComponentValue("************");
// 传入需要填写的控件
request.setFormFields(new FormField[] { formField });
CreateDocumentResponse response = client.CreateDocument(request);
System.out.println(client.gson.toJson(response));
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.tencentcloudapi.ess.v20201111.models.UserInfo in project tencentcloud-sdk-java by TencentCloud.
the class CreateFlowByFiles method main.
public static void main(String[] args) {
try {
EssClient client = ClientConfig.getClientByEndpoint(EndPoint);
CreateFlowByFilesRequest request = new CreateFlowByFilesRequest();
UserInfo userInfo = new UserInfo();
// 管理员用户id或者员工用户id
userInfo.setUserId(OperatorId);
// 请求客户端在公网的ip地址
userInfo.setClientIp("************");
request.setOperator(userInfo);
// 签署pdf文件的资源编号列表,目前只支持单文件签署
request.setFileIds(new String[] { "************" });
// 企业方 静默签署时type为3/非静默签署type为0(仅支持处于第一位的签署方进行静默签,且合同为顺序签署,请于控制台调整好模板)
ApproverInfo enterpriseInfo = new ApproverInfo();
// 静默签
enterpriseInfo.setApproverType(3L);
enterpriseInfo.setApproverName("************");
enterpriseInfo.setApproverMobile("************");
enterpriseInfo.setOrganizationName("************");
Component enterpriseComponent = new Component();
enterpriseInfo.setSignComponents(new Component[] { enterpriseComponent });
enterpriseComponent.setComponentValue("************");
enterpriseComponent.setComponentPosY(497.6718F);
enterpriseComponent.setComponentWidth(74F);
enterpriseComponent.setFileIndex(0L);
enterpriseComponent.setComponentType("SIGN_SEAL");
enterpriseComponent.setComponentPage(1L);
enterpriseComponent.setComponentPosX(417.155F);
enterpriseComponent.setComponentHeight(70F);
// 个人 type为1
ApproverInfo clientInfo = new ApproverInfo();
clientInfo.setApproverType(1L);
clientInfo.setApproverName("************");
clientInfo.setApproverMobile("************");
Component clientComponent = new Component();
clientInfo.setSignComponents(new Component[] { clientComponent });
clientComponent.setComponentPosY(472.78125F);
clientComponent.setComponentWidth(112F);
clientComponent.setFileIndex(0L);
clientComponent.setComponentType("SIGN_SIGNATURE");
clientComponent.setComponentPage(1L);
clientComponent.setComponentPosX(146.15625F);
clientComponent.setComponentHeight(40F);
request.setApprovers(new ApproverInfo[] { enterpriseInfo, clientInfo });
request.setFlowName("************");
CreateFlowByFilesResponse response = client.CreateFlowByFiles(request);
System.out.println(client.gson.toJson(response));
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations