Skip to content

Commit

Permalink
Merge pull request #315 from smbc-digital/develop
Browse files Browse the repository at this point in the history
feat(BookingGateway): add endpoint for PurgeBookings
  • Loading branch information
JonathonWarwick authored Sep 16, 2024
2 parents 2814797 + 54c17fa commit 92f6430
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/BookingService/BookingServiceGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class BookingServiceGateway : Gateway, IBookingServiceGateway
private const string LocationEndpoint = "api/v1/Location";
private const string CancellationEndpoint = "api/v1/Cancellation";
private const string BookingEndpoint = "api/v1/Booking";
private const string PurgeBookingsEndpoint = "api/v1/PurgeBookings";
private const string RescheduleEndpoint = "api/v1/Reschedule";
private const string NextAvailabilityAction = "/next-availability";

Expand Down Expand Up @@ -66,6 +67,9 @@ public async Task<HttpResponseMessage> UpdateAdditionalInformationMetaDataValues
public async Task<HttpResponseMessage> RelateBookings(RelateBookingsRequest relateBookingsRequest) =>
await PatchAsync($"{BookingEndpoint}/relate-bookings", relateBookingsRequest);

public async Task<HttpResponseMessage> PurgeBookings() =>
await GetAsync($"{BookingEndpoint}");

public async Task<HttpResponse<string>> GetLocation(LocationRequest model) =>
await GetAsync<string>($"{LocationEndpoint}{LocationQueryString(model)}");

Expand Down
2 changes: 2 additions & 0 deletions src/BookingService/IBookingServiceGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ Task<HttpResponseMessage> UpdateAdditionalInformationMetaDataValues(
UpdateAdditionalInformationMetaDataValuesRequest updateAdditionalInformationMetaDataValuesRequest);

Task<HttpResponseMessage> RelateBookings(RelateBookingsRequest relateBookingsRequest);

Task<HttpResponseMessage> PurgeBookings();
}
}
2 changes: 1 addition & 1 deletion src/StockportGovUK.NetStandard.Gateways.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<Title>A package that provides base gateways using HttpClient</Title>
<VersionPrefix>14.2.0</VersionPrefix>
<VersionPrefix>14.3.0</VersionPrefix>
<LangVersion>10</LangVersion>
<Authors>Colin Lees, Jon Chiles, Jon Hadley</Authors>
<Company>Stockport Council</Company>
Expand Down

0 comments on commit 92f6430

Please sign in to comment.