public static PinConfirmationResult ResultFromSessionResumed(SessionResumedRequest request)
        {
            if (request.Cause.Result is JObject jo)
            {
                var task = new PinConfirmationResult();
                Serializer.Populate(jo.CreateReader(), task);
                return(task);
            }

            return(null);
        }
예제 #2
0
        public void SessionResumedSerializesProperly()
        {
            var task = new SessionResumedRequest
            {
                RequestId       = "string",
                Timestamp       = new DateTime(2019, 07, 03),
                Locale          = "en-GB",
                OriginIpAddress = "string",
                Cause           = new SessionResumedRequestCause
                {
                    Type   = "ConnectionCompleted",
                    Token  = "1234",
                    Status = new TaskStatus(200, "OK")
                }
            };

            Utility.CompareJson(task, "SessionResumedRequest.json");
        }