from_swagger/client.kt

154 lines
4.1 KiB
Kotlin

package client
import io.micronaut.http.HttpResponse
import io.micronaut.http.annotation.*
import io.micronaut.http.client.annotation.Client
@Client(value = "INPUT URL")
interface GDSClient {
@Get(value = "/sales/dispatch/places")
fun getDispatchPlaces(
@Header authorization: String?,
): HttpResponse<List<PlaceAVS>>
@Post(value = "/sales/order/{orderId}/passenger")
fun addPassenger(
@Header authorization: String?,
@PathVariable orderId: Int,
): HttpResponse<TicketAVS>
@Put(value = "/sales/session/open")
fun openSession(
@Header authorization: String?,
): HttpResponse<SessionAVS>
@Get(value = "/sales/trip/{tripId}/document/types")
fun getDocumentTypes(
@Header authorization: String?,
@PathVariable tripId: Int,
): HttpResponse<List<DocTypeAVS>>
@Get(value = "/sales/arrival/places")
fun getArrivalPlaces(
@Header authorization: String?,
): HttpResponse<List<PlaceAVS>>
@Put(value = "/sales/order/tickets/{ticketId}/passenger")
fun updateTickerPassenger(
@Header authorization: String?,
@PathVariable ticketId: Int,
): HttpResponse<>
@Get(value = "/sales/order/{orderId}")
fun getOrder(
@Header authorization: String?,
@PathVariable orderId: Int,
): HttpResponse<OrderAVS>
@Delete(value = "/sales/order/{orderId}")
fun cancelOrder(
@Header authorization: String?,
@PathVariable orderId: Int,
): HttpResponse<OrderAVS>
@Post(value = "/sales/order/{orderId}/confirm/payment/by/{payForm}")
fun confirmPayment(
@Header authorization: String?,
@PathVariable orderId: Int,
@PathVariable payForm: String,
): HttpResponse<OrderAVS>
@Get(value = "/sales/ticket/series/{series}/number/{number}/return/calculation")
fun getReturnInfo(
@Header authorization: String?,
@PathVariable series: String,
@PathVariable number: String,
): HttpResponse<TicketAVS>
@Get(value = "/sales/trip/{tripId}/from/station/{dispatchStationId}/to/station/{arrivalStationId}/book/{ticketCount}")
fun bookOrder(
@Header authorization: String?,
@PathVariable tripId: String,
@PathVariable dispatchStationId: String,
@PathVariable arrivalStationId: String,
@PathVariable ticketCount: Int,
@PathVariable baggageCount: Int?,
): HttpResponse<OrderAVS>
@Get(value = "/settings")
fun getSettings(
): HttpResponse<Settings>
@Post(value = "/auth/token")
fun login(
): HttpResponse<AuthDTO>
@Get(value = "/kassa")
fun index(
): HttpResponse<>
@Get(value = "/sales/dispatch/place/{placeId}/stations")
fun getDispatchStations(
@Header authorization: String?,
@PathVariable placeId: Int,
): HttpResponse<List<StationAVS>>
@Post(value = "/sales/order/{orderId}/baggage")
fun addBaggage(
@Header authorization: String?,
@PathVariable orderId: Int,
): HttpResponse<TicketAVS>
@Put(value = "/sales/session/close")
fun closeSession(
@Header authorization: String?,
): HttpResponse<SessionAVS>
@Get(value = "/sales/trip/{tripId}/from/{dispatchStationId}/to/{arrivalStationId}/seats/free")
fun getSeatsFree(
@Header authorization: String?,
@PathVariable tripId: Int,
@PathVariable dispatchStationId: Int,
@PathVariable arrivalStationId: Int,
): HttpResponse<List<>>
@Get(value = "/sales/trip/{tripId}/ticket/types")
fun getTicketTypes(
@Header authorization: String?,
@PathVariable tripId: String,
): HttpResponse<List<TicketTypeAVS>>
@Get(value = "/countries")
fun getCountries(
): HttpResponse<List<CountryCode>>
@Get(value = "/sales/arrival/place/{placeId}/stations")
fun getArrivalStations(
@Header authorization: String?,
@PathVariable placeId: Int,
): HttpResponse<List<StationAVS>>
@Get(value = "/sales/dispatch/station/{dispatchStationId}/arrival/place/{arrivalPlaceId}/{date}/trips")
fun getTrips(
@Header authorization: String?,
@PathVariable dispatchStationId: Int,
@PathVariable arrivalPlaceId: Int,
@PathVariable date: String,
): HttpResponse<List<TripKassa>>
@Delete(value = "/sales/order/tickets/{ticketId}")
fun cancelTicket(
@Header authorization: String?,
@PathVariable ticketId: Int,
): HttpResponse<TicketAVS>
@Post(value = "/sales/ticket/{ticketId}/return")
fun returnTicket(
@Header authorization: String?,
@PathVariable ticketId: Int,
): HttpResponse<TicketAVS>
}