File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,6 +222,9 @@ List of supported endpoints
222222 # Flight Availabilities POST
223223 amadeus.shopping.availability.flight_availabilities.post(body)
224224
225+ # Branded Fares Upsell
226+ amadeus.shopping.flight_offers.upselling.post(body)
227+
225228 # Flight Choice Prediction
226229 body = amadeus.shopping.flight_offers_search.get(
227230 originLocationCode = ' MAD' ,
Original file line number Diff line number Diff line change 11from amadeus .client .decorator import Decorator
22from amadeus .shopping .flight_offers ._prediction import FlightChoicePrediction
33from amadeus .shopping .flight_offers ._pricing import FlightOffersPrice
4+ from amadeus .shopping .flight_offers ._upselling import Upselling
45
56
67class FlightOffers (Decorator , object ):
78 def __init__ (self , client ):
89 Decorator .__init__ (self , client )
910 self .prediction = FlightChoicePrediction (client )
1011 self .pricing = FlightOffersPrice (client )
12+ self .upselling = Upselling (client )
Original file line number Diff line number Diff line change 11from ._prediction import FlightChoicePrediction
22from ._pricing import FlightOffersPrice
3+ from ._upselling import Upselling
34
4- __all__ = ['FlightChoicePrediction' , 'FlightOffersPrice' ]
5+ __all__ = ['FlightChoicePrediction' , 'FlightOffersPrice' ,
6+ 'Upselling' ]
Original file line number Diff line number Diff line change 1+ from amadeus .client .decorator import Decorator
2+
3+
4+ class Upselling (Decorator , object ):
5+ def post (self , body ):
6+ '''
7+ Get flight offers with branded fares
8+
9+ .. code-block:: python
10+
11+ amadeus.shopping.flight_offers.upselling.post(body)
12+
13+ :param body: the parameters to send to the API
14+
15+ :rtype: amadeus.Response
16+ :raises amadeus.ResponseError: if the request could not be completed
17+ '''
18+ return self .client .post (
19+ '/v1/shopping/flight-offers/upselling' , body )
Original file line number Diff line number Diff line change @@ -65,7 +65,13 @@ Shopping/Hotels
6565Shopping/FlightOffers
6666===============
6767
68- .. autoclass :: amadeus.shopping.FlightOffersPrice
68+ .. autoclass :: amadeus.shopping.flight_offers.FlightChoicePrediction
69+ :members: post
70+
71+ .. autoclass :: amadeus.shopping.flight_offers.FlightChoicePrice
72+ :members: post
73+
74+ .. autoclass :: amadeus.shopping.flight_offers.Upselling
6975 :members: post
7076
7177Shopping/Activities
Original file line number Diff line number Diff line change 4141 expect (client .shopping .flight_offers ).not_to (be_none )
4242 expect (client .shopping .flight_offers_search ).not_to (be_none )
4343 expect (client .shopping .flight_offers .pricing ).not_to (be_none )
44+ expect (client .shopping .flight_offers .upselling ).not_to (be_none )
4445
4546 expect (client .shopping .seatmaps ).not_to (be_none )
4647
396397 '/v1/shopping/availability/flight-availabilities' , {'foo' : 'bar' }
397398 ))
398399
400+ with it ('.shopping.flight_offers.upselling.post' ):
401+ self .client .shopping .flight_offers .upselling .post (
402+ {'foo' : 'bar' })
403+ expect (self .client .post ).to (have_been_called_with (
404+ '/v1/shopping/flight-offers/upselling' , {'foo' : 'bar' }
405+ ))
406+
399407 with it ('.booking.flight_order().get' ):
400408 self .client .booking .flight_order ('123' ).get (a = 'b' )
401409 expect (self .client .get ).to (have_been_called_with (
You can’t perform that action at this time.
0 commit comments