示例#1
0
        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)}");
        }
示例#2
0
        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);
        }