Skip to content
Snippets Groups Projects
Commit 56cb4ff3 authored by Abdelsamad, Mouaz R (UG - SISC)'s avatar Abdelsamad, Mouaz R (UG - SISC)
Browse files

unused parameter

parent 137c3f70
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ namespace BookingMicroservice.Services ...@@ -30,7 +30,7 @@ namespace BookingMicroservice.Services
return bookings; return bookings;
} }
public Booking CreateBooking(int flightId, int userId, BookingClass bookingClass, string paymentIntentId) public Booking CreateBooking(int flightId, int userId, BookingClass bookingClass)
{ {
Booking booking = new Booking(flightId, userId, bookingClass, null); Booking booking = new Booking(flightId, userId, bookingClass, null);
......
...@@ -4,7 +4,7 @@ namespace BookingMicroservice.Services ...@@ -4,7 +4,7 @@ namespace BookingMicroservice.Services
{ {
public interface IBookingService public interface IBookingService
{ {
Booking CreateBooking(int flightId, int userId, BookingClass bookingClass, string paymentIntentId); Booking CreateBooking(int flightId, int userId, BookingClass bookingClass);
List<Booking> GetBookings(int? flightId = null, int? userId = null, BookingClass? bookingClass = null); List<Booking> GetBookings(int? flightId = null, int? userId = null, BookingClass? bookingClass = null);
Booking? GetBooking(int bookingId); Booking? GetBooking(int bookingId);
void DeleteBooking(int bookingId); void DeleteBooking(int bookingId);
......
...@@ -4,7 +4,7 @@ namespace BookingMicroservice.Services ...@@ -4,7 +4,7 @@ namespace BookingMicroservice.Services
{ {
public interface IReservationComplianceService public interface IReservationComplianceService
{ {
Task<Booking?> TryCreateBookingAsync(int flightId, int userId, BookingClass bookingClass, int? seatId, string paymentIntentId); Task<Booking?> TryCreateBookingAsync(int flightId, int userId, BookingClass bookingClass, int? seatId);
Task TryBookSeatAsync(int bookingId, int seatId); Task TryBookSeatAsync(int bookingId, int seatId);
} }
......
...@@ -18,7 +18,7 @@ namespace BookingMicroservice.Services ...@@ -18,7 +18,7 @@ namespace BookingMicroservice.Services
this.flightServiceClient = flightServiceClient; this.flightServiceClient = flightServiceClient;
} }
public async Task<Booking?> TryCreateBookingAsync(int flightId, int userId, BookingClass bookingClass, int? seatId, string paymentIntentId) public async Task<Booking?> TryCreateBookingAsync(int flightId, int userId, BookingClass bookingClass, int? seatId)
{ {
HttpResponseMessage capacityResponse = await flightServiceClient.GetFlightCapacityAsync(flightId, (int)bookingClass); HttpResponseMessage capacityResponse = await flightServiceClient.GetFlightCapacityAsync(flightId, (int)bookingClass);
if (!capacityResponse.IsSuccessStatusCode) if (!capacityResponse.IsSuccessStatusCode)
...@@ -34,7 +34,7 @@ namespace BookingMicroservice.Services ...@@ -34,7 +34,7 @@ namespace BookingMicroservice.Services
if (currentBookings >= capacity) if (currentBookings >= capacity)
throw new BookingException(string.Format(NO_AVAILABLE_SEAT_MSG, bookingClass.ToString().ToLower())); throw new BookingException(string.Format(NO_AVAILABLE_SEAT_MSG, bookingClass.ToString().ToLower()));
Booking booking = bookingService.CreateBooking(flightId, userId, bookingClass, paymentIntentId); Booking booking = bookingService.CreateBooking(flightId, userId, bookingClass);
if(seatId.HasValue && booking?.Id != null) if(seatId.HasValue && booking?.Id != null)
{ {
try try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment