/** * @return Order */ private function getRobinOrder() { $createdAt = Carbon::createFromFormat("Y-m-d", "2013-04-21", new DateTimeZone("Europe/Amsterdam")); $listView = ListView::make("ORD123", $createdAt, "Shipped"); $detailsView = new DetailsView(); $orderDetails = OrderDetails::make($createdAt, "Shipped", "Paid", "Shipped"); $detailsView->addDetails($orderDetails); return Order::make("ORD1234", "*****@*****.**", $createdAt, 12.5, "https://seoshop.webshopapp.com/backoffice/sales-orders/edit?id=7846544", $listView, $detailsView); }
/** * @param Order $order * @return static */ private static function createDetailsView(order $order) { return OrderDetails::make($order->createdAt, $order->status, $order->paymentStatus, $order->shipmentStatus, $order->paymentId, $order->discountType, $order->discountPercentage, $order->discountAmount, $order->discountCouponCode); }