You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 3a. Extract the priceCheck link from PropertyAvailability operation (Here, we select the first rate for the first room, then get the priceCheck link)
71
-
Link priceCheckLink = propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck();
68
+
// 3a. Extract the PriceCheckOperationLink from PropertyAvailability operation (Here, we select the first rate for the first room, then get the PriceCheckOperationLink)
// 3b. Create the needed context for the PriceCheckOperation
74
72
PriceCheckOperationContext priceCheckOperationContext =PriceCheckOperationContext.builder().customerIp("1.2.3.4").build(); // fill the context as needed
// 2b. Create the needed context for the PostItineraryOperation
93
91
PostItineraryOperationContext postItineraryOperationContext =PostItineraryOperationContext.builder().customerIp("1.2.3.4").build(); // fill the context as needed
Link propertyAvailabilityLink= propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck(); // selecting the first rate for the first room
42
+
PriceCheckOperationLink priceCheckOperationLink= propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck(); // selecting the first rate for the first room
43
43
PriceCheckOperationContext priceCheckOperationContext =PriceCheckOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
Link postItineraryLink= roomPriceCheck.getLinks().getBook(); // from the previous step
124
+
PostItineraryOperationLink postItineraryOperationLink= roomPriceCheck.getLinks().getBook(); // from the previous step
125
125
PostItineraryOperationContext postItineraryOperationContext =PostItineraryOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
Link resumeBookingLink= itineraryCreation.getLinks().getResume(); // from the previous step
133
+
PutResumeBookingOperationLink putResumeBookingOperationLink= itineraryCreation.getLinks().getResume(); // from the previous step
134
134
PutResumeBookingOperationContext putResumeBookingOperationContext =PutResumeBookingOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
Link propertyAvailabilityLink= propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck(); // selecting the first rate for the first room
45
+
PriceCheckOperationLink priceCheckOperationLink= propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck(); // selecting the first rate for the first room
46
46
PriceCheckOperationContext priceCheckOperationContext =PriceCheckOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
The primary itinerary method of the Booking API creates a reservation for the selected property, room, rate, and occupancy. Payment information, including billing/cardholder contact information, is provided directly within the request. See [here](products/rapid/lodging/booking) for more details.
131
131
132
132
```java
133
-
Link postItineraryLink= roomPriceCheck.getLinks().getBook(); // from the previous step
133
+
PostItineraryOperationLink postItineraryOperationLink= roomPriceCheck.getLinks().getBook(); // from the previous step
134
134
PostItineraryOperationContext postItineraryOperationContext =PostItineraryOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
Link propertyAvailabilityLink= propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck(); // selecting the first rate for the first room
PriceCheckOperationLink priceCheckOperationLink= propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck(); // selecting the first rate for the first room
PostPaymentSessionsOperationContext postPaymentSessionsOperationContext =PostPaymentSessionsOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
Link postItineraryLink= roomPriceCheck.getLinks().getBook(); // from the first step
201
+
PostItineraryOperationLink postItineraryOperationLink= roomPriceCheck.getLinks().getBook(); // from the first step
202
202
PostItineraryOperationContext postItineraryOperationContext =PostItineraryOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
PutCompletePaymentSessionOperationContext putCompletePaymentSessionOperationContext =PutCompletePaymentSessionOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
PutResumeBookingOperationContext putResumeBookingOperationContext =PutResumeBookingOperationContext.builder().customerIp("1.2.3.4").customerSessionId("12345").build(); // fill the context as needed
0 commit comments