public void Constructor_ConstructsRequest(ProviderLocationBulkDeleteModel data) { var request = new ProviderLocationBulkDeleteRequest(data); request.Ukprn.Should().Be(data.Ukprn); request.LarsCode.Should().Be(data.LarsCode); request.DeleteUrl.Should().Be($"/providers/{data.Ukprn}/locations/{data.LarsCode}/cleanup?userId={HttpUtility.UrlEncode(data.UserId)}"); }
private async Task CleanUpUnusedProviderLocations(UpdateStandardSubRegionsCommand command) { var providerLocationBulkDeleteModel = new ProviderLocationBulkDeleteModel { Ukprn = command.Ukprn, LarsCode = command.LarsCode, UserId = command.UserId, }; var providerLocationBulkDeleteRequest = new ProviderLocationBulkDeleteRequest(providerLocationBulkDeleteModel); await _innerApiClient.Delete(providerLocationBulkDeleteRequest); }