I am working with Hotelbeds APItude PHP API to find out the information of available hotel rooms.
Well, I am able to get all information of available hotels through the documentation
But, I am facing problem with getting daily rate of all available hotel rooms.
There is an option in documentation to send request attribute for getting daily rate of each room. Here is the request attribute -
availabilityRQ/@dailyRate -- Boolean -- Optional -- Display the rate day-by-day
dailyRate
is an boolean
value that confirms is the API ll send back daily rate info (I think so far).
So, in implementation, I send following request parameter -
$rqData = new \hotelbeds\hotel_api_sdk\helpers\Availability();
$rqData->stay = new Stay(DateTime::createFromFormat("Y-m-d", "2016-09-01"),
DateTime::createFromFormat("Y-m-d", "2016-09-10"));
$rqData->hotels = ["hotel" => [1067, 1070,]];
// $rqData->destination = new Destination("PMI");
$occupancy = new Occupancy();
$occupancy->adults = 2;
$occupancy->children = 1;
$occupancy->rooms = 1;
$occupancy->paxes = [new Pax(Pax::AD, 30, "Mike", "Doe"), new Pax(Pax::AD, 27, "Jane", "Doe"), new Pax(Pax::CH, 8, "Mack", "Doe")];
$rqData->occupancies = [$occupancy];
$rqData->dailyRate = TRUE;
$availRS = $apiClient->Availability($rqData);
I checked, everything work fine except the $rqData->dailyRate = TRUE;
parameter.
I get following error -
Bad Request: The request is not compliant with the specified version of the API. Error at property dailyRate: Can not construct instance of boolean from String value 'Y': only "true" or "false" recognized
I think, I am missing something like creating boolean
parameter for the dailyRate
attribute.
How can I solve the issue?