示例#1
0
        public static ApplyRefundResponse Unmarshall(UnmarshallerContext context)
        {
            ApplyRefundResponse applyRefundResponse = new ApplyRefundResponse();

            applyRefundResponse.HttpResponse = context.HttpResponse;
            applyRefundResponse.RequestId    = context.StringValue("ApplyRefund.RequestId");
            applyRefundResponse.Code         = context.StringValue("ApplyRefund.Code");
            applyRefundResponse.Message      = context.StringValue("ApplyRefund.Message");

            ApplyRefundResponse.ApplyRefund_RefundApplicationData refundApplicationData = new ApplyRefundResponse.ApplyRefund_RefundApplicationData();
            refundApplicationData.SubLmOrderId        = context.StringValue("ApplyRefund.RefundApplicationData.SubLmOrderId");
            refundApplicationData.DisputeStatus       = context.IntegerValue("ApplyRefund.RefundApplicationData.DisputeStatus");
            refundApplicationData.DisputeType         = context.IntegerValue("ApplyRefund.RefundApplicationData.DisputeType");
            applyRefundResponse.RefundApplicationData = refundApplicationData;

            return(applyRefundResponse);
        }
        /// <summary>
        /// 将平台返回的HTML转化成MpResponse对象
        /// </summary>
        /// <param name="body">返回的HTML</param>
        /// <returns></returns>
        public GetApplyRefundResponse ParseHtmlToResponse(string body)
        {
            GetApplyRefundResponse response = new GetApplyRefundResponse();

            response.Body = body;

            if (response.HasError())
            {
                response.ErrInfo = response.GetErrInfo();
            }
            else
            {
                ApplyRefundResponse mg = JsonConvert.DeserializeObject <ApplyRefundResponse>(response.Body);
                response.ApplyRefund = mg;
            }
            return(response);
        }