src/Requests/Orders/Handlers/CreateOrderRequestHandler.php
private function formatOrderItems(array $items)
    {
        $orderItems = [];

        foreach ($items as $item) {
            $orderItems[] = [
                'id'       => $item->getProductID(),
                'quantity' => $item->getQuantity(),
                'price'    => $item->getPrice(),
                'note'     => $item->getNote(),
                'detail'   => [
                    'options' => $this->formatOptions($item->getOptions()),
                    'extras'  => $this->formatExtras($item->getExtras())
                ],
            ];
        }

        return $orderItems;
    }
private function formatOrderItems(array $items)
    {
        $orderItems = [];

        foreach ($items as $item) {
            $orderItems[] = [
                'id'       => $item->getProductID(),
                'quantity' => $item->getQuantity(),
                'price'    => $item->getPrice(),
                'note'     => $item->getNote(),
                'detail'   => [
                    'options' => $this->formatOptions($item->getOptions()),
                    'extras'  => $this->formatExtras($item->getExtras())
                ],
            ];
        }

        return $orderItems;
    }
@param array|NewOrderItem[] $items

@return array