orderId = $order->getId(); $this->orderNumber = $order->getRealOrderId(); $this->statusPayment = $order->getStatus(); $this->orderDate = $order->getUpdatedAt(); $this->subTotal = $order->getSubtotal(); $this->total = $order->getGrandTotal(); $this->shippingPrice = $order->getShippingAmount(); $this->currency = $order->getOrderCurrencyCode(); } public function jsonSerialize(): mixed { return get_object_vars($this); } }