Skip to content

Latest commit

 

History

History
278 lines (188 loc) · 8.52 KB

reservation-client.md

File metadata and controls

278 lines (188 loc) · 8.52 KB

Reservation Client

ReservationnClient gives you access to the reservations capabilities in lodging connectivity APIs.

API Endpoint

This client is connected with https://api.expediagroup.com/supply/lodging/graphql endpoint by default.

You can refer to the configuration document to explore the full configuration options.

Initialize the Client

ClientConfiguration config = ClientConfiguration
        .builder()
        .key("KEY")
        .secret("SECRET")
        .build();

ReservationClient reservationClient = new ReservationClient(config);

Set the Environment (Optional)

ReservationClient can be configured to work in different environments, below is a list of the supported environments by this client:

Environment Corresponding API Endpoint
ClientEnvironment.PROD https://api.expediagroup.com/supply/lodging/graphql
ClientEnvironment.TEST https://test-api.expediagroup.com/supply/lodging/graphql
ClientEnvironment.SANDBOX_PROD https://api.sandbox.expediagroup.com/supply/lodging/graphql
ClientEnvironment.SANDBOX_TEST https://test-api.sandbox.expediagroup.com/supply/lodging/graphql

Configuration with Environment Example

ClientConfiguration config = ClientConfiguration
        .builder()
        .key("KEY")
        .secret("SECRET")
        .environment(ClientEnvironement.SANDBOX_PROD)
        .build();

Initialize GraphQL Operation

PropertyReservationsQuery propertyReservationsQuery = PropertyReservationsQuery
        .builder()
        .propertyId("your_property_id")
        .pageSize(10)
        .build();

Execute the operation

try {
    PropertyReservationsQuery.Data reservationsData = reservationClient.execute(propertyReservationsQuery);
}
catch(ExpediaGroupServiceException e) {
    e.printStackTrace();
}

Available Operations

The SDK offers a set of queries & mutations you can execute using the ReservationClient. Below is an overview list of the available operations.


ReservationClient - Queries


PropertyReservations

Operation Class Name: PropertyReservationsQuery

Operation Inputs:

Name Type Required
propertyId String! Yes
idSource IdSource No (default: EXPEDIA)
pageSize Int! No (default: 10)
cursor String No
filter ReservationFilterInput No
checkOutDate CheckOutDateFilter No
includePaymentInstrumentToken Boolean No (default: false)
includeSupplierAmount Boolean No (default: false)

Resources


PropertyReservationsSummary

Operation Class Name: PropertyReservationsSummaryQuery

Operation Inputs:

Name Type Required
propertyId String! Yes
idSource IdSource No (default: EXPEDIA)
pageSize Int! No (default: 10)
cursor String No
filter ReservationFilterInput No
checkOutDate CheckOutDateFilter No

Resources




ReservationClient - Mutations


CancelReservation

Operation Class Name: CancelReservationMutation

Operation Inputs:

Name Type Required
input CancelReservationInput! Yes

Resources


CancelReservationReconciliation

Operation Class Name: CancelReservationReconciliationMutation

Operation Inputs:

Name Type Required
input CancelReservationReconciliationInput! Yes

Resources


CancelVrboReservation

Operation Class Name: CancelVrboReservationMutation

Operation Inputs:

Name Type Required
input CancelVrboReservationInput! Yes

Resources


ChangeReservationReconciliation

Operation Class Name: ChangeReservationReconciliationMutation

Operation Inputs:

Name Type Required
input ChangeReservationReconciliationInput! Yes

Resources


ConfirmReservationNotification

Operation Class Name: ConfirmReservationNotificationMutation

Operation Inputs:

Name Type Required
input ConfirmReservationNotificationInput! Yes

Resources


RefundReservation

Operation Class Name: RefundReservationMutation

Operation Inputs:

Name Type Required
input RefundReservationInput! Yes

Resources