customerSession->isLoggedIn(); } public function getBalance(): int { $quote = $this->checkoutSession->getQuote(); return $this->isLoggedIn() ? (int)$this->balances->getAccount((int)$this->customerSession->getCustomerId(), (int)$quote->getStore()->getWebsiteId())['balance'] : 0; } public function getAppliedPoints(): int { return (int)$this->checkoutSession->getQuote()->getData('reward_points_used'); } public function getMaximum(): int { return $this->config->maxCheckoutPoints((int)$this->checkoutSession->getQuote()->getStoreId()); } public function getRate(): int { return $this->config->redemptionRate((int)$this->checkoutSession->getQuote()->getStoreId()); } public function getApplyUrl(): string { return $this->getUrl('reward/cart/apply'); } }