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

            return(EFilingMapper.Map(list));
        }
        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);
        }
Exemple #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));
        }
Exemple #4
0
        public void DeleteEFilingRequest(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.Delete();

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

            await filingRequest.Submit();

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Exemple #6
0
        public EFilingRequestDto SendToSign(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.SendToSign();

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Exemple #7
0
        public EFilingRequestDto UpdateApplicationForm(string filingRequestUID, JsonObject json)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            filingRequest.SetApplicationForm(json);

            filingRequest.Save();

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

            await filingRequest.Synchronize();

            filingRequest.Save();

            return(EFilingMapper.Map(filingRequest));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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);
                }
            }
        }
        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);
        }
Exemple #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));
        }
 internal DocumentationDto(EFilingRequest request)
 {
     _documentation = request.Documentation;
 }
 internal TransactionDataDto(EFilingRequest request)
 {
     this.transaction = request.Transaction;
 }
Exemple #19
0
        public EFilingRequestDto GetEFilingRequest(string filingRequestUID)
        {
            EFilingRequest filingRequest = EFilingMapper.Map(filingRequestUID);

            return(EFilingMapper.Map(filingRequest));
        }
 internal EFilingRequestDto(EFilingRequest request)
 {
     this.request = request;
 }
 internal ESignDataDto(EFilingRequest request)
 {
     this.request = request;
 }
 internal ApplicationFormDto(EFilingRequest request)
 {
     this.request = request;
 }
 internal PaymentDataDto(EFilingRequest request)
 {
     this.request = request;
 }