fix: respect environment variable to toggle BPN debug mode
This commit is contained in:
@@ -121,7 +121,7 @@ class ApiClient
|
||||
'adressdaten' => $personalData->toPayload(),
|
||||
];
|
||||
|
||||
return $this->sendRequest(static::TYPE_CUSTOMER_DATA, $data, $debug);
|
||||
return $this->sendRequest(static::TYPE_CUSTOMER_DATA, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -184,7 +184,7 @@ class ApiClient
|
||||
/**
|
||||
* @throws ApiClientException
|
||||
*/
|
||||
public function updateBooking(BookingData $formData, bool $debug = false): Notification|BookingUpdate
|
||||
public function updateBooking(BookingData $formData): Notification|BookingUpdate
|
||||
{
|
||||
$payload = (new BookingDataProcessor())->createUpdateRequestPayload($formData);
|
||||
|
||||
@@ -196,7 +196,7 @@ class ApiClient
|
||||
...$payload,
|
||||
];
|
||||
|
||||
return $this->sendRequest(static::TYPE_BOOKING_UPDATE, $data, $debug);
|
||||
return $this->sendRequest(static::TYPE_BOOKING_UPDATE, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,9 +282,10 @@ class ApiClient
|
||||
/**
|
||||
* @throws ApiClientException
|
||||
*/
|
||||
private function sendRequest(string $type, array $data, bool $debug = false): mixed
|
||||
private function sendRequest(string $type, array $data): mixed
|
||||
{
|
||||
$requestId = date(DATE_ATOM).uniqid();
|
||||
$debug = $this->config['debug'];
|
||||
|
||||
$body = $this
|
||||
->serializer
|
||||
|
||||
@@ -146,6 +146,8 @@ class Booking
|
||||
|
||||
public function isEditable(): bool
|
||||
{
|
||||
return $this->travelDate > new \DateTimeImmutable() && false === in_array($this->status, ['S', 'U']);
|
||||
$now = new \DateTimeImmutable();
|
||||
|
||||
return $this->travelDate > $now && false === in_array($this->status, ['S', 'U']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user