lib/v20201111/client.rb in tencentcloud-sdk-ess-3.0.587 vs lib/v20201111/client.rb in tencentcloud-sdk-ess-3.0.588

- old
+ new

@@ -391,10 +391,34 @@ 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 + # 创建员工,如需在此接口提醒员工实名,入参Employees的OpenId不传 # @param request: Request instance for CreateIntegrationEmployees. # @type request: :class:`Tencentcloud::ess::V20201111::CreateIntegrationEmployeesRequest` # @rtype: :class:`Tencentcloud::ess::V20201111::CreateIntegrationEmployeesResponse` @@ -627,10 +651,34 @@ 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` @@ -824,10 +872,34 @@ 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` @@ -1054,9 +1126,33 @@ 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'] \ No newline at end of file