From ff7b03f217d10216e1651a7378edce01fd588411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20L=C3=B8vgaard?= Date: Wed, 29 Jan 2025 13:24:31 +0100 Subject: [PATCH] Allow to get amount and currency --- src/Feed/Model/Google/Shopping/Price.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Feed/Model/Google/Shopping/Price.php b/src/Feed/Model/Google/Shopping/Price.php index 0ace5998..e4d982cf 100644 --- a/src/Feed/Model/Google/Shopping/Price.php +++ b/src/Feed/Model/Google/Shopping/Price.php @@ -29,6 +29,16 @@ public function __toString(): string return round($this->amount / 100, 2) . ' ' . $this->currency; } + public function getAmount(): int + { + return $this->amount; + } + + public function getCurrency(): string + { + return $this->currency; + } + public function jsonSerialize(): string { return (string) $this;