using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Top.Api.Util;
using Top.Api;
using Top.Api.DingTalk;
namespace DingTalk.Api.Request
{
///
/// TOP API: dingtalk.oapi.customerservice.session.close
///
public class OapiCustomerserviceSessionCloseRequest : BaseDingTalkRequest
{
///
/// 关闭会话
///
public string CloseSession { get; set; }
public CloseSessionDTODomain CloseSession_ { set { this.CloseSession = TopUtils.ObjectToJson(value); } }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.customerservice.session.close";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("close_session", this.CloseSession);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateRequired("close_session", this.CloseSession);
}
///
/// CloseSessionDTODomain Data Structure.
///
[Serializable]
public class CloseSessionDTODomain : TopObject
{
///
/// 客服所在bu
///
[XmlElement("bu_id")]
public string BuId { get; set; }
///
/// 钉钉的corpId
///
[XmlElement("ding_corp_id")]
public string DingCorpId { get; set; }
///
/// 实例id
///
[XmlElement("open_instance_id")]
public string OpenInstanceId { get; set; }
///
/// 操作者id
///
[XmlElement("operator_id")]
public string OperatorId { get; set; }
///
/// 4,小二;1,会员
///
[XmlElement("operator_type")]
public string OperatorType { get; set; }
///
/// 1,智能客服;1001,经济体版本
///
[XmlElement("production_type")]
public Nullable ProductionType { get; set; }
///
/// 关闭原因,memberIsSilent/heartBeatBreak/memberCloseTheSession
///
[XmlElement("reason")]
public string Reason { get; set; }
///
/// 客服的id
///
[XmlElement("service_id")]
public string ServiceId { get; set; }
///
/// 会话来源
///
[XmlElement("session_source")]
public string SessionSource { get; set; }
///
/// 会话id
///
[XmlElement("sid")]
public string Sid { get; set; }
}
#endregion
}
}