Exemplo n.º 1
0
        private async Task LogAmendDirectDebitCompleteSuccess(AmendDirectDebitVm paymentOptionsVm)
        {
            if (paymentOptionsVm.SelectedPlanSetupOption.HasValue)
            {
                switch (paymentOptionsVm.SelectedPlanSetupOption.Value)
                {
                case PlanSetupOptions.AverageSetupValue:
                {
                    await _webActivityService.LogAmendDirectDebitPaymentASVOptionCompleteSuccess(
                        paymentOptionsVm.LowellReference,
                        LoggedInUserId);

                    break;
                }

                case PlanSetupOptions.DisposableIncome:
                {
                    await _webActivityService.LogAmendDirectDebitDIOptionCompleteSuccess(
                        paymentOptionsVm.LowellReference,
                        LoggedInUserId);

                    break;
                }

                case PlanSetupOptions.OtherPaymentOffer:
                {
                    if (paymentOptionsVm.IandENotAvailable || !paymentOptionsVm.IandELessThanOrIs12MonthsOld)
                    {
                        await _webActivityService.LogAmendDirectDebitMyOfferOptionCompleteSuccessWithNoIandE(
                            paymentOptionsVm.LowellReference,
                            LoggedInUserId);
                    }
                    else if (paymentOptionsVm.MonthlyDisposableIncome > 0)
                    {
                        await _webActivityService.LogAmendDirectDebitMyOfferOptionCompleteSuccessWithPositiveIandE(
                            paymentOptionsVm.LowellReference,
                            LoggedInUserId);
                    }
                    else
                    {
                        await _webActivityService.LogAmendDirectDebitMyOfferOptionCompleteSuccessWithNegativeIandE(
                            paymentOptionsVm.LowellReference,
                            LoggedInUserId);
                    }

                    break;
                }
                }
            }
        }