src/Entities/Orders/Order.php
public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'reference' => $this->getReference(),
            'shortReference' => $this->getShortReference(),
            'dateCreated' => $this->getDateCreated(),
            'lastUpdated' => $this->getLastUpdated(),
            'amount' => $this->getAmount(),
            'status' => $this->getStatus(),
            'items' => $this->getItems(),
            'user' => $this->getUser(),
            'userGeo' => $this->getUserAddress(),
            'organisation' => $this->getOrganisation(),
            'paymentStatus' => $this->getPaymentStatus(),
            'payments' => $this->getPayments(),
            'paymentMethod' => $this->getPaymentMethods(),
            'deliveryType' => $this->getDeliveryType(),
            'deliveryAgent' => $this->getDeliveryAgent(),
            'delivery' => $this->getDelivery(),
            'note' => $this->getNote(),
            'estimatedDeliveryTime' => $this->getEstimatedDeliveryTime(),
            'deliveryCost' => $this->getDeliveryCost(),
            'orderSourceChannel' => $this->getOrderSourceChannel(),
            'scheduledDate' => $this->getScheduledDate(),
            'tip' => $this->getTip(),
            'adminFee' => $this->getAdminFee(),
            'orderDiscount' => $this->getOrderDiscount(),
        ];
    }
public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'reference' => $this->getReference(),
            'shortReference' => $this->getShortReference(),
            'dateCreated' => $this->getDateCreated(),
            'lastUpdated' => $this->getLastUpdated(),
            'amount' => $this->getAmount(),
            'status' => $this->getStatus(),
            'items' => $this->getItems(),
            'user' => $this->getUser(),
            'userGeo' => $this->getUserAddress(),
            'organisation' => $this->getOrganisation(),
            'paymentStatus' => $this->getPaymentStatus(),
            'payments' => $this->getPayments(),
            'paymentMethod' => $this->getPaymentMethods(),
            'deliveryType' => $this->getDeliveryType(),
            'deliveryAgent' => $this->getDeliveryAgent(),
            'delivery' => $this->getDelivery(),
            'note' => $this->getNote(),
            'estimatedDeliveryTime' => $this->getEstimatedDeliveryTime(),
            'deliveryCost' => $this->getDeliveryCost(),
            'orderSourceChannel' => $this->getOrderSourceChannel(),
            'scheduledDate' => $this->getScheduledDate(),
            'tip' => $this->getTip(),
            'adminFee' => $this->getAdminFee(),
            'orderDiscount' => $this->getOrderDiscount(),
        ];
    }
Specify data which should be serialized to JSON