refactor: split buspro ApiClient into domain clients
This commit is contained in:
1 parent
0a55544ca8
commit
b755a6f43e
52 files changed
+805
-695
No files matched your search
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Booking\Create;
|
||||
|
||||
use App\BusProNet\ApiClient;
|
||||
use App\BusProNet\Client\BookingClient;
|
||||
use App\BusProNet\Exception\TimeoutException;
|
||||
use App\BusProNet\Model\BookingResponse;
|
||||
use App\BusProNet\Model\Notification;
|
||||
@@ -40,7 +40,7 @@ class Step3Controller extends AbstractBookingCreateController
|
||||
private readonly BookingCreateContextFactory $createContextFactory,
|
||||
private readonly BookingPriceCalculator $priceCalculator,
|
||||
private readonly BookingPriceMismatchAnalyzer $priceMismatchDiagnostics,
|
||||
private readonly ApiClient $apiClient,
|
||||
private readonly BookingClient $bookingClient,
|
||||
private readonly ParticipantFormSupport $participantFormSupportService,
|
||||
private readonly LoggerInterface $logger,
|
||||
) {
|
||||
@@ -76,7 +76,7 @@ class Step3Controller extends AbstractBookingCreateController
|
||||
$this->bookingService->applyCreateBookingStatusRules($bookingCreateDto);
|
||||
|
||||
// Validate booking data with API by submitting an inquiry booking
|
||||
$inquiryResponse = $this->apiClient->createBookingInquiry($bookingCreateDto);
|
||||
$inquiryResponse = $this->bookingClient->createBookingInquiry($bookingCreateDto);
|
||||
|
||||
// Surface any insurance corrections made during payload building (e.g. a
|
||||
// stale price tier reassigned/cleared right before submission)
|
||||
|
||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Booking\Create;
|
||||
|
||||
use App\BusProNet\ApiClient;
|
||||
use App\BusProNet\Client\BookingClient;
|
||||
use App\BusProNet\Exception\TimeoutException;
|
||||
use App\BusProNet\Model\Notification;
|
||||
use App\Entity\User;
|
||||
@@ -37,7 +37,7 @@ class Step4Controller extends AbstractBookingCreateController
|
||||
private readonly BookingConfigurator $bookingService,
|
||||
private readonly BookingSessionManager $bookingSessionService,
|
||||
private readonly BookingCreateContextFactory $createContextFactory,
|
||||
private readonly ApiClient $apiClient,
|
||||
private readonly BookingClient $bookingClient,
|
||||
private readonly CacheInterface $cache,
|
||||
private readonly BookingNewsletterOptIn $bookingNewsletterOptIn,
|
||||
private readonly ParticipantFormSupport $participantFormSupportService,
|
||||
@@ -80,7 +80,7 @@ class Step4Controller extends AbstractBookingCreateController
|
||||
$this->bookingService->applyCreateBookingStatusRules($bookingCreateDto);
|
||||
|
||||
// Submit final booking (already validated in Step 3)
|
||||
$bookingResponse = $this->apiClient->createBooking($bookingCreateDto);
|
||||
$bookingResponse = $this->bookingClient->createBooking($bookingCreateDto);
|
||||
|
||||
// Surface any insurance corrections made during payload building (e.g. a
|
||||
// stale price tier reassigned/cleared right before submission)
|
||||
|
||||
Reference in new issue
Block a user