예제 #1
0
        public virtual GenericReponse <bool> IsValidDeferralPayment(DeferPaymentType deferralPayment)
        {
            switch (deferralPayment)
            {
            case DeferPaymentType.OnePayment:
                break;

            case DeferPaymentType.ThreeMonths:
                break;

            case DeferPaymentType.SixMonths:
                break;

            case DeferPaymentType.NineMonths:
                break;

            case DeferPaymentType.TwelveMonths:
                return(new GenericReponse <bool> {
                    Data = false, Error = new Model.Error {
                        ValidationErrors = new List <string> {
                            "No puedes pagar a 12 meses con esta marca de tarjeta"
                        }
                    }
                });
            }

            return(new GenericReponse <bool> {
                Data = true
            });
        }
예제 #2
0
        public GenericReponse <bool> IsValidAmount(DeferPaymentType deferralPayment, decimal amount)
        {
            switch (deferralPayment)
            {
            case DeferPaymentType.OnePayment:
                break;

            case DeferPaymentType.ThreeMonths:
                return(new GenericReponse <bool> {
                    Data = false, Error = new Model.Error {
                        ValidationErrors = new List <string> {
                            "El Pago minimo es de $300.00 MXN."
                        }
                    }
                });

            case DeferPaymentType.SixMonths:
                return(new GenericReponse <bool> {
                    Data = false, Error = new Model.Error {
                        ValidationErrors = new List <string> {
                            "El Pago minimo es de $600.00 MXN."
                        }
                    }
                });

            case DeferPaymentType.NineMonths:
                return(new GenericReponse <bool> {
                    Data = false, Error = new Model.Error {
                        ValidationErrors = new List <string> {
                            "El Pago minimo es de $900.00 MXN."
                        }
                    }
                });

            case DeferPaymentType.TwelveMonths:
                break;

            default:
                return(new GenericReponse <bool> {
                    Data = false, Error = new Model.Error {
                        ValidationErrors = new List <string> {
                            "Valores permitidos 1, 3, 6 y 12.."
                        }
                    }
                });
            }
            return(new GenericReponse <bool> {
                Data = true
            });
        }
예제 #3
0
 public GenericReponse <bool> IsValidAmount(DeferPaymentType deferralPayment, decimal amount) => throw new Exception("BusinessValidation Unknown type");