From 941222ab8fd7f94385684e31794cd02a0f286e4b Mon Sep 17 00:00:00 2001 From: Damien Hebert Date: Sat, 30 Mar 2024 23:55:20 +0100 Subject: [PATCH] fix(checkout-intent): response of retrieve is CheckoutIntentResponse --- src/Service/CheckoutIntentService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Service/CheckoutIntentService.php b/src/Service/CheckoutIntentService.php index 81dc5c2..878be54 100644 --- a/src/Service/CheckoutIntentService.php +++ b/src/Service/CheckoutIntentService.php @@ -5,6 +5,7 @@ namespace Helloasso\Service; use Helloasso\Exception\HelloassoApiException; +use Helloasso\Models\Carts\CheckoutIntentResponse; use Helloasso\Models\Carts\InitCheckoutBody; use Helloasso\Models\Carts\InitCheckoutResponse; use Symfony\Component\HttpFoundation\Request; @@ -42,7 +43,7 @@ public function create(InitCheckoutBody $checkoutIntent): InitCheckoutResponse /** * @throws HelloassoApiException */ - public function retrieve(int $checkoutIntentId): InitCheckoutResponse + public function retrieve(int $checkoutIntentId): CheckoutIntentResponse { $params = [ 'auth_bearer' => $this->oauth()->getAccessToken(), @@ -54,8 +55,8 @@ public function retrieve(int $checkoutIntentId): InitCheckoutResponse $params ); - /** @var InitCheckoutResponse $content */ - $content = $this->deserialize($this->getContent($request), InitCheckoutResponse::class); + /** @var CheckoutIntentResponse $content */ + $content = $this->deserialize($this->getContent($request), CheckoutIntentResponse::class); return $content; }