Constants

API_SERVICE

API_SERVICE

The API service used in this class.

POLICIES_ENDPOINT

POLICIES_ENDPOINT

ITINERARY_DISPLAY_ENDPOINT

ITINERARY_DISPLAY_ENDPOINT

COST_SUMMARY_ENDPOINT

COST_SUMMARY_ENDPOINT

PAYMENT_METHODS_ENDPOINT

PAYMENT_METHODS_ENDPOINT

PAYMENT_ADD_ENDPOINT

PAYMENT_ADD_ENDPOINT

PAYMENT_DUE_ENDPOINT

PAYMENT_DUE_ENDPOINT

PROMO_CODE_ENDPOINT

PROMO_CODE_ENDPOINT

CONFIRMATION_ENDPOINT

CONFIRMATION_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

__call()

__call(  $command,   $arguments) 

Parameters

$command
$arguments

getReservationPolicies()

getReservationPolicies(\AdventureRes\Models\Input\ItineraryInputModel  $input) : array

Gets applicable policies for a reservations.

Parameters

\AdventureRes\Models\Input\ItineraryInputModel $input

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

array —

[\AdventureRes\Models\Output\ReservationPolicyModel]

getItinerary()

getItinerary(\AdventureRes\Models\Input\ItineraryInputModel  $inputModel) : array

Gets the items stored in the user's itinerary.

Parameters

\AdventureRes\Models\Input\ItineraryInputModel $inputModel

Throws

\AdventureRes\Exceptions\AdventureResSDKException

Returns

array —

[\AdventureRes\Models\Output\ReservationItemModel]

getPaymentMethods()

getPaymentMethods() : array

Gets the accepted payment methods for the configured location.

Returns

array —

[\AdventureRes\Models\Output\PaymentMethodModel]

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