public async Task <SOAPEnvelope <EHealthBoxGetMessagesListResponseBody> > GetMessagesList(EHealthBoxGetMessagesListRequest request, SAMLAssertion assertion)
        {
            var issueInstant   = DateTime.UtcNow;
            var orgCertificate = _keyStoreManager.GetOrgAuthCertificate();
            var soapRequest    = SOAPRequestBuilder <EHealthBoxGetMessagesListRequestBody> .New(new EHealthBoxGetMessagesListRequestBody
            {
                Id      = $"id-{Guid.NewGuid().ToString()}",
                Request = request
            })
                                 .AddTimestamp(issueInstant, issueInstant.AddHours(1))
                                 .AddSAMLAssertion(assertion)
                                 .AddReferenceToSAMLAssertion()
                                 .SignWithCertificate(orgCertificate)
                                 .Build();

            var httpResult = await _soapClient.Send(soapRequest, new Uri(_options.EHealthboxConsultation), "urn:be:fgov:ehealth:ehbox:consultation:protocol:v3:getMessagesList");

            var xml = await httpResult.Content.ReadAsStringAsync();

            httpResult.EnsureSuccessStatusCode();
            var result = SOAPEnvelope <EHealthBoxGetMessagesListResponseBody> .Deserialize(xml);

            return(result);
        }
        public Task <SOAPEnvelope <EHealthBoxGetMessagesListResponseBody> > GetMessagesList(EHealthBoxGetMessagesListRequest request)
        {
            var assertion = _sessionService.GetSession().Body.Response.Assertion;

            return(GetMessagesList(request, assertion));
        }