API_SERVICE
API_SERVICE
The API service used in this class.
Class AdventureResServiceService
$httpClient : \AdventureRes\HttpClients\AdventureResHttpClientInterface
$client : \AdventureRes\AdventureResClient
$app : \AdventureRes\AdventureResApp
__construct(\AdventureRes\AdventureResApp $app, \AdventureRes\HttpClients\AdventureResHttpClientInterface|null $client = null, boolean $shouldValidateSessionIds = true)
AbstractAdventureResService constructor.
\AdventureRes\AdventureResApp | $app | The configuration app. |
\AdventureRes\HttpClients\AdventureResHttpClientInterface|null | $client | Optionally pass in a pre-configured HttpClient. |
boolean | $shouldValidateSessionIds | This should only be used for testing. |
setApp(\AdventureRes\AdventureResApp $app)
Sets the configuration app.
\AdventureRes\AdventureResApp | $app |
setHttpClient(\AdventureRes\HttpClients\AdventureResHttpClientInterface $httpClient)
Sets the HTTP client to be used in requests.
\AdventureRes\HttpClients\AdventureResHttpClientInterface | $httpClient |
getService(\AdventureRes\Models\Input\ServiceDisplayInputModel $inputModel) : \AdventureRes\Models\AbstractAdventureResModel
Gets information about a service.
\AdventureRes\Models\Input\ServiceDisplayInputModel | $inputModel |
getServiceAvailability(\AdventureRes\Models\Input\ServiceAvailabilityInputModel $inputModel) : array
Gets all availability options for a service by provided date.
\AdventureRes\Models\Input\ServiceAvailabilityInputModel | $inputModel |
[AdventureRes\Models\Output\ServiceModel]
addServiceToReservation(\AdventureRes\Models\Input\ServiceAddInputModel $inputModel) : \AdventureRes\Models\AbstractAdventureResModel
Adds a service to a customer's reservation. If the reservation hasn't been set, it creates a new reservation ID.
\AdventureRes\Models\Input\ServiceAddInputModel | $inputModel |
removeServiceFromReservation(\AdventureRes\Models\Input\ServiceRemoveInputModel $inputModel) : mixed
Removes a service from a reservation. If the result of the call leaves the reservation with zero services, the reservation id in the session is set back to 0.
\AdventureRes\Models\Input\ServiceRemoveInputModel | $inputModel |
makeApiCall( $method, $endpoint, $params) : \AdventureRes\Http\AdventureResResponse
Generates an AdventureResRequest and sends it via the client.
$method | ||
$endpoint | ||
$params |