public void Constructor_ConstructsRequest(ProviderCourseLocationBulkInsertModel data)
        {
            var request = new ProviderCourseLocationBulkInsertRequest(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}/courses/{data.LarsCode}/locations/bulk-insert-regions");
        }
Пример #2
0
        private async Task CreateProviderCourseLocationRegions(UpdateStandardSubRegionsCommand command)
        {
            var providerCourseLocationBulkInsertModel = new ProviderCourseLocationBulkInsertModel
            {
                Ukprn                = command.Ukprn,
                LarsCode             = command.LarsCode,
                UserId               = command.UserId,
                SelectedSubregionIds = command.SelectedSubRegions,
            };

            var providerCourseLocationBulkInsertRequest = new ProviderCourseLocationBulkInsertRequest(providerCourseLocationBulkInsertModel);
            await _innerApiClient.PostWithResponseCode <ProviderCourseLocationBulkInsertRequest>(providerCourseLocationBulkInsertRequest);
        }