Constants

API_SERVICE

API_SERVICE

The API service used in this class.

PACKAGE_GROUP_ENDPOINT

PACKAGE_GROUP_ENDPOINT

PACKAGE_AVAILABILITY_ENDPOINT

PACKAGE_AVAILABILITY_ENDPOINT

PACKAGE_DISPLAY_ENDPOINT

PACKAGE_DISPLAY_ENDPOINT

PACKAGE_ADD_ENDPOINT

PACKAGE_ADD_ENDPOINT

PACKAGE_REMOVE_ENDPOINT

PACKAGE_REMOVE_ENDPOINT

Properties

$sessionId

$sessionId : string

Type

string

$shouldValidateSessionIds

$shouldValidateSessionIds : boolean

Type

boolean — This should only be used for testing.

Methods

__construct()

__construct(\AdventureRes\AdventureResApp  $app, \AdventureRes\HttpClients\AdventureResHttpClientInterface|null  $client = null, boolean  $shouldValidateSessionIds = true) 

AbstractAdventureResService constructor.

Parameters

\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.

getSessionId()

getSessionId() : string

Gets the session ID to be used in requests. Uses the AdventureResSession class to validate and/or generate a session ID.

Returns

string

setSessionId()

setSessionId(string  $sessionId) 

Sets the session ID.

Parameters

string $sessionId

getReservationId()

getReservationId() : mixed

Get the reservation ID for our current session

Returns

mixed

setReservationId()

setReservationId(  $reservationId) : mixed

Get the reservation ID for our current session

Parameters

$reservationId

Returns

mixed

__call()

__call(  $command,   $arguments) 

Parameters

$command
$arguments

getGroups()

getGroups(\AdventureRes\Models\Input\PackageGroupInputModel  $inputModel) : array

Provides the ability to display the Package Groups that are available for a certain date.

Parameters

\AdventureRes\Models\Input\PackageGroupInputModel $inputModel

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

array

getPackageAvailability()

getPackageAvailability(\AdventureRes\Models\Input\PackageAvailabilityInputModel  $inputModel) : array

Provides the ability to display the Package Availability for a certain date.

Parameters

\AdventureRes\Models\Input\PackageAvailabilityInputModel $inputModel

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

array

removePackageFromReservation()

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.

Parameters

\AdventureRes\Models\Input\PackageRemoveInputModel $inputModel

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

mixed

makeApiCall()

makeApiCall(  $method,   $endpoint,   $params) : \AdventureRes\Http\AdventureResResponse

Generates an AdventureResRequest and sends it via the client.

Parameters

$method
$endpoint
$params

Throws

\AdventureRes\Exceptions\AdventureResResponseException

Returns

\AdventureRes\Http\AdventureResResponse