public async Task <IActionResult> Body(DeleteAccountCompositeViewModel model) { var customer = await GetCustomerDetails(); if (customer.CustomerId != model.CustomerId) { return(RedirectTo($"{CompositeViewModel.PageId.Home}")); } await _dssService.DeleteCustomer(customer.CustomerId); return(RedirectTo($"{CompositeViewModel.PageId.Home}/signOut?accountClosed=true")); }
public async Task When_DeleteCustomerSuccess_ReturnOk() { var mockHandler = DssHelpers.GetMockMessageHandler(DssHelpers.SuccessfulDssCustomerCreation(), statusToReturn: HttpStatusCode.OK); _restClient = new RestClient(mockHandler.Object); _dssService = new DssService(_restClient, Options.Create(new DssSettings() { ApiKey = "9238dfjsjdsidfs83fds", CustomerApiUrl = "https://this.is.anApi.org.uk", AccountsTouchpointId = "9000000001", CustomerApiVersion = "V1", DigitalIdentitiesPatchByCustomerIdApiVersion = "https://this.is.anApi.org.uk", DigitalIdentitiesPatchByCustomerIdApiUrl = "https://this.is.anApi.org.uk", }), _logger); await _dssService.DeleteCustomer(Guid.NewGuid()); }
public async Task When_DeleteCustomerSuccess_ReturnOk() { await _dssService.DeleteCustomer(Guid.NewGuid()); }