public NaesbQuickResponse Invoke(Domain.ConfirmationResponse.ConfirmationResponse confirmationResponse)
        {
            NaesbQuickResponse nqr = new NaesbQuickResponse();

            nqr.Header = _naesbQuickResponseHeaderGetService.Invoke(confirmationResponse);
            nqr.PurchaseOrderNumber = confirmationResponse.PurchaseOrderNumber;
            nqr.PurposeCode         = "27";
            nqr.PartyIndentificaton = new PartyIndentificaton();
            nqr.PartyIndentificaton.ConfirmingPartyDuns = _naesbPipelineGetByPipelineService.Invoke(confirmationResponse.PartyIndentificaton.PipelineEntity)?.PipelineEntityId;
            nqr.PartyIndentificaton.UtilityDunsNumber   = _naesbUtilityGetByUtilityService.Invoke(confirmationResponse.PartyIndentificaton.UtilityEntity)?.UtilityEntityId;

            return(nqr);
        }
Example #2
0
        public NaesbRequestForConfirmation Invoke(Domain.RequestForConfirmation.RequestForConfirmation obj)
        {
            if (obj != null)
            {
                var header = _naesbRequestForConfirmationHeaderGetService.Invoke(obj);
                if (_settings.Environment == "prd")
                {
                    header.EnvironmentFlag = "P";
                }

                NaesbRequestForConfirmation nrfc = new Common.ModelFactory().Map(header, obj);

                nrfc.PartyIndentificaton.ConfirmingPartyDuns = _naesbPipelineGetByPipelineService.Invoke(nrfc.PartyIndentificaton.ConfirmingPartyDuns)?.PipelineEntityId;
                nrfc.PartyIndentificaton.UtilityDunsNumber   = _naesbUtilityGetByUtilityService.Invoke(nrfc.PartyIndentificaton.UtilityDunsNumber)?.UtilityEntityId;

                return(nrfc);
            }

            return(null);
        }