Example #1
0
 public static function transformToArray(OrderObject $orderObject)
 {
     $order = ["Pagos" => self::transformPaymentsToArray($orderObject->getPayments()), "Tiquetes" => self::transformTicketsToArray($orderObject->getTickets()), "IdRodamiento" => $orderObject->getIdRoute(), "ValorPagado" => $orderObject->getTotal(), "Tarifa" => $orderObject->getIdTotal(), "Origen" => $orderObject->getFrom(), "Destino" => $orderObject->getTo(), "canaVent" => $orderObject->getChannelSell()];
     return $order;
 }
 public function create($from, $to, $idRoute, $idTotal, $totalValue, $channelSell = null)
 {
     $channelSell = $channelSell ?: Order::CHANNEL_DESKTOP;
     $this->order->setFrom($from)->setTo($to)->setIdRoute($idRoute)->setIdTotal($idTotal)->setTotal($totalValue)->setPayments($this->paymentsCollection)->setTickets($this->ticketsCollection)->setChannelSell($channelSell);
     return $this->order;
 }