Skip to content

Commit

Permalink
Merge pull request #10 from Doskyft/fix/retrieve-checkout-intent
Browse files Browse the repository at this point in the history
fix(checkout-intent): response of retrieve is CheckoutIntentResponse
  • Loading branch information
Doskyft authored Mar 30, 2024
2 parents e527715 + 941222a commit 8f3ae7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Service/CheckoutIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(),
Expand All @@ -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;
}
Expand Down

0 comments on commit 8f3ae7c

Please sign in to comment.