API_SERVICE
API_SERVICE
The API service used in this class.
Class AdventureResPackageService
$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 |
getGroups(\AdventureRes\Models\Input\PackageGroupInputModel $inputModel) : array
Provides the ability to display the Package Groups that are available for a certain date.
| \AdventureRes\Models\Input\PackageGroupInputModel | $inputModel |
getPackageAvailability(\AdventureRes\Models\Input\PackageAvailabilityInputModel $inputModel) : array
Provides the ability to display the Package Availability for a certain date.
| \AdventureRes\Models\Input\PackageAvailabilityInputModel | $inputModel |
getPackage(\AdventureRes\Models\Input\PackageDisplayInputModel $inputModel) : \AdventureRes\Models\AbstractAdventureResModel|mixed
Provides the ability to display the Package.
| \AdventureRes\Models\Input\PackageDisplayInputModel | $inputModel |
addPackageToReservation(\AdventureRes\Models\Input\PackageAddInputModel $inputModel) : \AdventureRes\Models\AbstractAdventureResModel
Adds a package to a customer's reservation. If the reservation hasn't been set, it creates a new reservation ID.
| \AdventureRes\Models\Input\PackageAddInputModel | $inputModel |
removePackageFromReservation(\AdventureRes\Models\Input\PackageRemoveInputModel $inputModel) : mixed
Removes a package from a reservation. If the result of the call leaves the reservation with zero services/packages, the reservation id in the session is set back to 0.
| \AdventureRes\Models\Input\PackageRemoveInputModel | $inputModel |
makeApiCall( $method, $endpoint, $params) : \AdventureRes\Http\AdventureResResponse
Generates an AdventureResRequest and sends it via the client.
| $method | ||
| $endpoint | ||
| $params |