$this->id, 'uuid' => $this->uuid, 'service_name' => $this->product?->name ?? $this->server_name, 'server_name' => $this->server_name, 'product_type' => $this->product?->product_type, 'billing_cycle' => $this->orderItem?->billing_cycle, 'status' => $this->status, 'status_text' => $this->status_label, 'auto_renew' => (bool) $this->auto_renew, 'started_at' => $this->started_at?->toISOString(), 'expires_at' => $this->expires_at?->toISOString(), 'invoice_id' => $this->invoice_id, 'invoice_number' => $this->invoice?->invoice_number, 'addons' => $this->whenLoaded('addons', fn () => $this->addons->map(fn ($a) => [ 'type' => $a->addon_type, 'value' => $a->addon_value, 'price' => $a->price, ])->all()), ]; } }