Ejemplo n.º 1
0
        internal async Task <StandardResponseBase> ExecuteAsync(StandardRequestBase standardRequest)
        {
            var response = await this.GetResponseAsync(standardRequest);

            response.RequestLogId  = standardRequest.LogId;
            response.ResponderName = this.GetType().Name;
            return(response);
        }
Ejemplo n.º 2
0
        protected override async Task <StandardResponseBase> GetResponseAsync(StandardRequestBase request)
        {
            // Convert StandardRequest to structure expected by this responder
            var standardRequest = (StandardRequest)request;

            //// Call the responder

            //// Convert response from this responder to StandardResponse

            return(await Task.FromResult(ToStandardResponse(standardRequest)));
        }
Ejemplo n.º 3
0
        protected override async Task <StandardResponseBase> GetResponseAsync(StandardRequestBase standardRequest)
        {
            var standardResponse = new StandardResponse
            {
                Premium         = 8394.00m,
                PremiumTRIA     = 755.00m,
                Limit           = 2000000.00m,
                SurplusLinesTax = 411.96m,
                StampingFee     = 12.74m,
                AgencyFee       = 100.00m,
                Details         = @"The tax calculation rates and percentages are for informational purposes only. 
                            We are not responsible for accurate and timely tax filings unless otherwise mutually agreed
                            to in writing between both parties. Certain ploicies may be subject to an additional $250 inspection fee.",
            };

            return(await Task.FromResult(standardResponse));
        }
Ejemplo n.º 4
0
        protected override async Task <StandardResponseBase> GetResponseAsync(StandardRequestBase standardRequest)
        {
            if (standardRequest is null)
            {
                return(null);
            }
            var standard = (StandardRequest)standardRequest;

            return(await Task.FromResult(new StandardResponse
            {
                Umr = standard.Umr,
                Type = standard.Type,
                Insured = standard.Insured,
                InsuredAddress = standard.InsuredAddress,
                Interest = standard.Interest,
                InsurersLiability = 0.1,
                Premium = Math.Round(standard.LimitsOfLiability *standard.Order * 0.1, 2),
            }));
        }
Ejemplo n.º 5
0
 private async Task <IEnumerable <StandardResponseBase> > GetResponsesAsync(StandardRequestBase standardRequest)
 {
     return(await Task.WhenAll(this.responders.Select(async r => await r.ExecuteAsync(standardRequest))));
 }
Ejemplo n.º 6
0
 protected override async Task <StandardResponseBase> GetResponseAsync(StandardRequestBase standardRequestBase)
 {
     this.GetResponseCalled = true;
     return(await Task.FromResult(this.standardResponse));
 }
Ejemplo n.º 7
0
        protected override StandardResponseBase GetResponse(StandardRequestBase standardRequest)
        {
            var request = (QuoteRequestStub)standardRequest;

            return(request.ForcedResponse);
        }
Ejemplo n.º 8
0
 protected abstract Task <StandardResponseBase> GetResponseAsync(StandardRequestBase standardRequest);