From 0ce2786365d1203958b1dd38463479105872b4d1 Mon Sep 17 00:00:00 2001 From: Thiago Brasil Date: Mon, 2 Jun 2025 17:08:34 -0400 Subject: [PATCH 1/2] Fix incorrect price attribute --- src/GraphQL/Models/Price.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GraphQL/Models/Price.php b/src/GraphQL/Models/Price.php index b1984ae..b26aef5 100644 --- a/src/GraphQL/Models/Price.php +++ b/src/GraphQL/Models/Price.php @@ -24,14 +24,14 @@ public function setPublicationId(?string $publicationId): void $this->setData('publicationId', $publicationId); } - public function getCurrentCode(): ?string + public function getCurrencyCode(): ?string { - return $this->getData('currentCode'); + return $this->getData('currencyCode'); } - public function setCurrentCode(?string $currentCode): void + public function setCurrencyCode(?string $currencyCode): void { - $this->setData('currentCode', $currentCode); + $this->setData('currencyCode', $currencyCode); } public function getUnitPrice(): ?float From c01c054b7af4217a89337b27ca4236ebccb599a5 Mon Sep 17 00:00:00 2001 From: Thiago Brasil Date: Mon, 2 Jun 2025 17:10:40 -0400 Subject: [PATCH 2/2] Fix unit tests --- tests/GraphQL/Models/PriceTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/GraphQL/Models/PriceTest.php b/tests/GraphQL/Models/PriceTest.php index bc55472..54e4559 100644 --- a/tests/GraphQL/Models/PriceTest.php +++ b/tests/GraphQL/Models/PriceTest.php @@ -17,12 +17,12 @@ public function testGettersAndSetters(): void $price = new Price(); $price->setPriceId($priceId); $price->setPublicationId($publicationId); - $price->setCurrentCode($currentCode); + $price->setCurrencyCode($currentCode); $price->setUnitPrice($unitPrice); $this->assertSame($priceId, $price->getPriceId()); $this->assertSame($publicationId, $price->getPublicationId()); - $this->assertSame($currentCode, $price->getCurrentCode()); + $this->assertSame($currentCode, $price->getCurrencyCode()); $this->assertSame($unitPrice, $price->getUnitPrice()); } }