File tree Expand file tree Collapse file tree 4 files changed +65
-0
lines changed
Expand file tree Collapse file tree 4 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ amadeus.shopping.seatmaps.get({
257257 ' flight-orderId' : ' XXX'
258258});
259259
260+ // Flight Availabilities Search
261+ amadeus .shopping .seatmaps .post (body);
262+
260263// Flight Choice Prediction
261264amadeus .shopping .flightOffersSearch .get ({
262265 originLocationCode: ' SYD' ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import HotelOffersByHotel from './shopping/hotel_offers_by_hotel';
88import HotelOffer from './shopping/hotel_offer' ;
99import Activities from './shopping/activities' ;
1010import Activity from './shopping/activity' ;
11+ import Availability from './shopping/availability' ;
1112
1213
1314/**
@@ -30,6 +31,7 @@ import Activity from './shopping/activity';
3031 * @property {HotelOffers } hotelOffers
3132 * @property {HotelOffer } hotelOffer
3233 * @property {HotelOffersByHotel } hotelOffersByHotel
34+ * @property {Availability } availability
3335 */
3436class Shopping {
3537 constructor ( client ) {
@@ -42,6 +44,7 @@ class Shopping {
4244 this . hotelOffers = new HotelOffers ( client ) ;
4345 this . hotelOffersByHotel = new HotelOffersByHotel ( client ) ;
4446 this . activities = new Activities ( client ) ;
47+ this . availability = new Availability ( client ) ;
4548 }
4649
4750
Original file line number Diff line number Diff line change 1+ import FlightAvailabilities from './availability/flight_availabilities' ;
2+
3+ /**
4+ * A namespaced client for the
5+ * `/v1/shopping/availability` endpoints
6+ *
7+ * Access via the {@link Amadeus} object
8+ *
9+ * ```js
10+ * let amadeus = new Amadeus();
11+ * amadeus.shopping.availability;
12+ * ```
13+ *
14+ * @param {Client } client
15+ * @property {Availability } availability
16+ * @protected
17+ */
18+ class Availability {
19+ constructor ( client ) {
20+ this . client = client ;
21+ this . flight_availabilities = new FlightAvailabilities ( client ) ;
22+ }
23+ }
24+
25+ export default Availability ;
Original file line number Diff line number Diff line change 1+ /**
2+ * A namespaced client for the
3+ * `/v1/shopping/availability/flight-availabilities` endpoints
4+ *
5+ * Access via the {@link Amadeus} object
6+ *
7+ * ```js
8+ * let amadeus = new Amadeus();
9+ * amadeus.availability.FlightAvailabilities;
10+ * ```
11+ *
12+ * @param {Client } client
13+ */
14+ class FlightAvailabilities {
15+ constructor ( client ) {
16+ this . client = client ;
17+ }
18+
19+ /**
20+ * Get available seats in different fare classes
21+ *
22+ * @param {Object } params
23+ * @return {Promise.<Response,ResponseError> } a Promise
24+ *
25+ * ```js
26+ * amadeus.shopping.availability.flight_availabilities.post(body);
27+ * ```
28+ */
29+ post ( params = { } ) {
30+ return this . client . post ( '/v1/shopping/availability/flight-availabilities' , params ) ;
31+ }
32+ }
33+
34+ export default FlightAvailabilities ;
You can’t perform that action at this time.
0 commit comments