public void Constructor_ConstructsRequest(ProviderLocationBulkInsertModel data) { var request = new ProviderLocationsBulkInsertRequest(data); request.Data.Should().Be(data); request.Ukprn.Should().Be(data.Ukprn); request.LarsCode.Should().Be(data.LarsCode); request.PostUrl.Should().Be($"providers/{data.Ukprn}/locations/bulk-insert-regions"); }
private async Task CreateProviderLocations(UpdateStandardSubRegionsCommand command, List <int> newSubregionIdsToAdd) { var providerLocationBulkInsertModel = new ProviderLocationBulkInsertModel { Ukprn = command.Ukprn, LarsCode = command.LarsCode, UserId = command.UserId, SelectedSubregionIds = newSubregionIdsToAdd, }; var providerLocationsBulkInsertRequest = new ProviderLocationsBulkInsertRequest(providerLocationBulkInsertModel); await _innerApiClient.PostWithResponseCode <ProviderLocationsBulkInsertRequest>(providerLocationsBulkInsertRequest); }