Пример #1
0
        public FixedList <EFilingRequestDto> GetEFilingRequestListByStatus(RequestStatus status,
                                                                           string keywords, int count)
        {
            var list = EFilingRequest.GetList(status, keywords, count);

            return(EFilingMapper.Map(list));
        }
Пример #2
0
        static internal EFilingRequestDto Map(EFilingRequest request)
        {
            var r = new EFilingRequestDto(request);

            if (request.ApplicationForm.HasItems)
            {
                r.Form = new ApplicationFormDto(request);
            }

            r.Documentation = new DocumentationDto(request);

            if (request.IsSigned)
            {
                r.Esign = new ESignDataDto(request);
            }

            if (request.HasTransaction)
            {
                r.Transaction = new TransactionDataDto(request);
            }

            if (request.HasPaymentOrder)
            {
                r.PaymentOrder = new PaymentDataDto(request);
            }

            if (request.IsClosed)
            {
                r.OutputDocuments = request.Transaction.OutputDocuments;
            }

            return(r);
        }
Пример #3
0
        public FixedList <EFilingDocument> GetOutputDocuments(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            var provider = ExternalProviders.GetFilingTransactionProvider(filingRequest.Procedure);

            return(provider.GetOutputDocuments(filingRequest.Transaction.UID));
        }
Пример #4
0
        public void DeleteEFilingRequest(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.Delete();

            filingRequest.Save();
        }
Пример #5
0
        public async Task <EFilingRequestDto> SubmitEFilingRequest(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            await filingRequest.Submit();

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #6
0
        public EFilingRequestDto SendToSign(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.SendToSign();

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #7
0
        public EFilingRequestDto UpdateApplicationForm(string filingRequestUID, JsonObject json)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.SetApplicationForm(json);

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #8
0
        public async Task <EFilingRequestDto> SynchronizeExternalData(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            await filingRequest.Synchronize();

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #9
0
        public EFilingRequestDto RevokeSign(string filingRequestUID, JsonObject revokeSignData)
        {
            Assertion.AssertObject(revokeSignData, "revokeSignData");

            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.RevokeSign(revokeSignData);

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #10
0
        public EFilingRequestDto UpdateEFilingRequest(string filingRequestUID, RequesterDto requestedBy)
        {
            Assertion.AssertObject(requestedBy, "requestedBy");

            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.SetRequesterData(requestedBy);

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #11
0
        public EFilingRequestDto CreateEFilingRequest(CreateEFilingRequestDto requestDTO)
        {
            Assertion.AssertObject(requestDTO, "requestDTO");

            var procedure = Procedure.Parse(requestDTO.ProcedureType);

            var filingRequest = new EFilingRequest(procedure, requestDTO.RequestedBy);

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #12
0
        public EFilingRequestDto Sign(string filingRequestUID, JsonObject signInputData)
        {
            Assertion.AssertObject(signInputData, "signInputData");

            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.Sign(signInputData);

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #13
0
        public EFilingRequestDto SetPaymentReceipt(string filingRequestUID, string receiptNo)
        {
            Assertion.AssertObject(receiptNo, "receiptNo");

            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.SetPaymentReceipt(receiptNo);

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #14
0
        public async Task SynchronizeAllExternalData()
        {
            var list = EFilingRequest.GetList <EFilingRequest>();

            foreach (var request in list)
            {
                if (request.HasTransaction && request.Transaction.LastUpdate == ExecutionServer.DateMinValue)
                {
                    await SynchronizeExternalData(request.UID).ConfigureAwait(false);
                }
            }
        }
Пример #15
0
        static internal EFilingRequest Map(string filingRequestUID)
        {
            Assertion.AssertObject(filingRequestUID, "filingRequestUID");

            var request = EFilingRequest.TryParse(filingRequestUID);

            if (request == null)
            {
                throw new ResourceNotFoundException("ElectronicFilingRequest.UID.NotFound",
                                                    $"No tenemos registrada ninguna solicitud con identificador {filingRequestUID}.");
            }

            return(request);
        }
Пример #16
0
        public async Task <EFilingRequestDto> GeneratePaymentOrder(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            if (!filingRequest.HasTransaction)
            {
                await filingRequest.CreateTransaction();
            }
            else
            {
                await filingRequest.Synchronize();
            }

            if (!filingRequest.HasPaymentOrder)
            {
                await filingRequest.CreatePaymentOrder();
            }

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Пример #17
0
 internal DocumentationDto(EFilingRequest request)
 {
     _documentation = request.Documentation;
 }
Пример #18
0
 internal TransactionDataDto(EFilingRequest request)
 {
     this.transaction = request.Transaction;
 }
Пример #19
0
        public EFilingRequestDto GetEFilingRequest(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            return(EFilingMapper.Map(filingRequest));
        }
Пример #20
0
 internal EFilingRequestDto(EFilingRequest request)
 {
     this.request = request;
 }
Пример #21
0
 internal ESignDataDto(EFilingRequest request)
 {
     this.request = request;
 }
Пример #22
0
 internal ApplicationFormDto(EFilingRequest request)
 {
     this.request = request;
 }
Пример #23
0
 internal PaymentDataDto(EFilingRequest request)
 {
     this.request = request;
 }