public HttpResponseMessage GenerateTickets([FromBody] API.Payment payment) { T.Beneficiary beneficiary = TicketService.GetBeneficiary(payment.Beneficiary.Name); TicketService.GenerateTickets(payment.PaymentID, beneficiary.BeneficiaryID, payment.Amount, payment.Currency.ExchangeRate, payment.Name); return(Request.CreateResponse(HttpStatusCode.OK)); }
public HttpResponseMessage GenerateTickets([FromBody] IEnumerable <P.Payment> payments) { foreach (var payment in payments) { T.Beneficiary beneficiary = TicketService.GetBeneficiary(payment.Beneficiary.Name); TicketService.GenerateTickets(payment.PaymentID, beneficiary.BeneficiaryID, payment.Amount, payment.Currency.ExchangeRate, payment.Name); } return(Request.CreateResponse(HttpStatusCode.OK)); }