Initial commit

This commit is contained in:
Piet Nijbacker committed 2026-10-10 21:32:00 +02:00
commit 2b9e58beee
822 files changed
+62544

No files matched your search

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace Mollie\Api\Exceptions;
use Mollie\Api\Http\Response;
use Mollie\Api\Http\ResponseStatusCode;
class ForbiddenException extends ApiException
{
public static function fromResponse(Response $response): self
{
$body = $response->json();
return new self(
$response,
'Your request was understood but not allowed. '.
sprintf('Error executing API call (%d: %s): %s', ResponseStatusCode::HTTP_FORBIDDEN, $body->title, $body->detail),
ResponseStatusCode::HTTP_FORBIDDEN
);
}
}