Created
May 1, 2024 10:37
-
-
Save MkhytarMkhoian/9c1677b0cf0a5ea7f04a6497ba815f67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BuyTicketUseCase( | |
private val ticketsRepository: TicketsRepository, | |
private val getFareByIdUseCase: GetFareByIdUseCase, | |
) { | |
suspend operator fun invoke(ryderId: String, totalCount: Int) { | |
val fare = getFareByIdUseCase(ryderId) | |
ticketsRepository.buyTicket(ryderId = ryderId, fare = fare, totalCount = totalCount) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment