public Task <ApiResponse> Delete(string eventId, string clientId, string orderId, string id) { return(Respond.AsyncWith(async(response, fail) => { await _ticketsService.RemoveTicketAsync(eventId, clientId, orderId, id); })); }
public Task <ApiResponse> Pay() { return(Respond.AsyncWith(async(response, fail) => { await _service.PayOrdersAsync(); })); }
public Task <ApiResponse> Deliver() { return(Respond.AsyncWith(async(response, fail) => { await _service.DeliverOrderAsync(); })); }
public Task <ApiResponse <IList <PaymentTypeDto> > > Get() { return(Respond .AsyncWith <IList <PaymentTypeDto> >(async(response, fail) => { response.Result = await _payments.GetPaymentTypes(); })); }
public Task <ApiResponse <TicketOrderDto> > Post(string eventId, string clientId, string orderId, [FromBody] SeatPriceOptionDto option) { return(Respond .AsyncWith <TicketOrderDto>(async(response, fail) => { response.Result = await _ticketsService.ReserveTicketAsync(eventId, clientId, orderId, option); })); }
public Task <ApiResponse> Delete(string eventId, string clientId, string orderId, string seatId, string reseravationId) { return(Respond .AsyncWith(async(response, fail) => { await _reservationsService.DiscardReservationAsync(eventId, clientId, orderId, seatId, reseravationId); })); }
public Task <ApiResponse <UserClientDto> > Post(string identityId, [FromBody] UserDto user) { return(Respond .AsyncWith <UserClientDto>(async(response, fail) => { response.Result = await _clientCrud.CreateUserClientAsync(user); })); }
public Task <ApiResponse <ClientOrderDto> > Post(string clientId) { return(Respond .AsyncWith <ClientOrderDto>(async(response, fail) => { response.Result = await _ordersService.CreateOrderForClientAsync(clientId); })); }
public Task <ApiResponse> Post(string clientId, string orderId, [FromBody] string optionId) { return(Respond .AsyncWith(async(response, fail) => { await _deliveriesService.SelectDeliveryAsync(clientId, orderId, optionId); })); }
public Task <ApiResponse <EventListItemDto> > Get(int id) { return(Respond .AsyncWith <EventListItemDto>(async(response, fail) => { response.Result = await _listProvider.GetEventAsync(id); })); }
public Task <ApiResponse <IList <PriceZoneListItemDto> > > Get(int eventId) { return(Respond .AsyncWith <IList <PriceZoneListItemDto> >(async(response, fail) => { response.Result = await _eventDefinitionsClient.EventDefinitionsClient.ApiEventsPricezonesGetAsync(eventId); })); }
public Task <ApiResponse <IEnumerable <PaymentTypeDto> > > Get() { return(Respond .AsyncWith <IEnumerable <PaymentTypeDto> >(async(response, fail) => { response.Result = await _provider.GetPaymentTypesAsync(); })); }
public Task <ApiResponse> Delete(int eventId, int clientId, int orderId, int id) { return(Respond .AsyncWith(async(response, fail) => { await _reservationService.DiscardReservationAsync(eventId, clientId, orderId, id); })); }
public Task <ApiResponse <IList <DeliveryTypeDto> > > Get() { return(Respond .AsyncWith <IList <DeliveryTypeDto> >(async(response, fail) => { response.Result = await _provider.GetDeliveryTypesAsync(); })); }
public Task <ApiResponse <IList <PriceZoneListItemDto> > > Get(int eventId) { return(Respond .AsyncWith <IList <PriceZoneListItemDto> >(async(response, fail) => { response.Result = await _priceZones.GetEventPriceZonesAsync(eventId); })); }
public Task <ApiResponse <SeatReservationDto> > Post(int eventId, int clientId, int orderId, [FromBody] int sceneSeatId) { return(Respond .AsyncWith <SeatReservationDto>(async(response, fail) => { response.Result = await _reservationService.ReserveSeatAsync(eventId, clientId, orderId, sceneSeatId); })); }
public Task <ApiResponse> Post(int clientId, int orderId, [FromBody] int optionId) { return(Respond .AsyncWith(async(response, fail) => { await _paymentService.SelectPaymentAsync(clientId, orderId, optionId); })); }
public Task <ApiResponse> Commit(string clientId, string id) { return(Respond .AsyncWith(async(response, fail) => { await _ordersService.CommitOrderAsync(clientId, id); })); }
public Task <ApiResponse <EventListItemDto> > Get(int id) { return(Respond .AsyncWith <EventListItemDto>(async(response, fail) => { response.Result = await _eventDefinitionsClient.EventDefinitionsClient.ApiEventsGetAsync(id); })); }
public Task <ApiResponse> Deliver() { return(Respond.AsyncWith(async(response, fail) => { var result = await _service.GetWaitingDeliveriesAsync(); var awaiting = result.FirstOrDefault(); if (awaiting != null) { await _service.RegisterDeliverySuccessAsync(awaiting); } })); }
public Task <ApiResponse> Pay() { return(Respond.AsyncWith(async(response, fail) => { var unpaidPayments = await _paymentService.GetWaitingPaymentsAsync(); if (unpaidPayments.Any()) { var payment = unpaidPayments.First(); await _paymentService.RegisterPaymentSuccessAsync(payment); } })); }