using System;
using System.Runtime.Serialization;
using Com.Bocom.OpenApi.Response;

namespace Com.Bocom.OpenApi
{
    namespace Request
    {
        public class IntegralExchangeCreateUrlRequestV1 : BocomRequest<IntegralExchangeCreateUrlResponseV1>
        {
            /// <summary>
            /// 获取响应类
            /// </summary>
            /// <returns>返回IntegralExchangeCreateUrlRequestV1类对应的响应类类型</returns>
            public override Type GetResponseClass()
            {
                return typeof(IntegralExchangeCreateUrlResponseV1);
            }

            /// <summary>
            /// 是否支持加密（目前sdk只支持对字段进行AES加解密）
            /// </summary>
            /// <returns>一般返回false</returns>
            public override Boolean IsNeedEncrypt()
            {
                return false;
            }

            /// <summary>
            /// http发起请求方式（支持GET、POST两种方式）
            /// </summary>
            /// <returns>一般返回POST</returns>
            public override string GetMethod()
            {
                return "POST";
            }


            /// <summary>
            /// 获取业务类类型
            /// </summary>
            /// <returns>返回request类内部定义的BizContent类的类型</returns>
            public override Type GetBizContentClass()
            {
                return typeof(IntegralExchangeCreateUrlRequestV1Biz);
            }

            /// <summary>
            /// 内部业务类，封装需要发送给服务端的业务字段
            /// </summary>
            [DataContract]
            public class IntegralExchangeCreateUrlRequestV1Biz : BizContent
            {
                //回调地址url
                [DataMember]
                public string notify_url { get; set; }

                //页面UAL
                [DataMember]
                public string return_url { get; set; }

                //订单编号
                [DataMember]
                public string order_no { get; set; }

                //兑换规则
                [DataMember]
                public string exchange_rules { get; set; }

                //协议编号
                [DataMember]
                public string protocol_no { get; set; }
            }
        }
    }
}