-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from amadeus4dev/flight-availability-and-bran…
…ded-fares Add support for flight availability and Branded Fares
- Loading branch information
Showing
10 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from amadeus.client.decorator import Decorator | ||
from .availability import FlightAvailabilities | ||
|
||
|
||
class Availability(Decorator, object): | ||
def __init__(self, client): | ||
Decorator.__init__(self, client) | ||
self.flight_availabilities = FlightAvailabilities(client) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
from amadeus.client.decorator import Decorator | ||
from amadeus.shopping.flight_offers._prediction import FlightChoicePrediction | ||
from amadeus.shopping.flight_offers._pricing import FlightOffersPrice | ||
from amadeus.shopping.flight_offers._upselling import Upselling | ||
|
||
|
||
class FlightOffers(Decorator, object): | ||
def __init__(self, client): | ||
Decorator.__init__(self, client) | ||
self.prediction = FlightChoicePrediction(client) | ||
self.pricing = FlightOffersPrice(client) | ||
self.upselling = Upselling(client) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from ._flight_availabilities import FlightAvailabilities | ||
|
||
__all__ = ['FlightAvailabilities'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from amadeus.client.decorator import Decorator | ||
|
||
|
||
class FlightAvailabilities(Decorator, object): | ||
def post(self, body): | ||
''' | ||
Get available seats in different fare classes | ||
.. code-block:: python | ||
amadeus.shopping.availability.flight_availabilities.post(body) | ||
:param body: the parameters to send to the API | ||
:rtype: amadeus.Response | ||
:raises amadeus.ResponseError: if the request could not be completed | ||
''' | ||
return self.client.post( | ||
'/v1/shopping/availability/flight-availabilities', body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
from ._prediction import FlightChoicePrediction | ||
from ._pricing import FlightOffersPrice | ||
from ._upselling import Upselling | ||
|
||
__all__ = ['FlightChoicePrediction', 'FlightOffersPrice'] | ||
__all__ = ['FlightChoicePrediction', 'FlightOffersPrice', | ||
'Upselling'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from amadeus.client.decorator import Decorator | ||
|
||
|
||
class Upselling(Decorator, object): | ||
def post(self, body): | ||
''' | ||
Get flight offers with branded fares | ||
.. code-block:: python | ||
amadeus.shopping.flight_offers.upselling.post(body) | ||
:param body: the parameters to send to the API | ||
:rtype: amadeus.Response | ||
:raises amadeus.ResponseError: if the request could not be completed | ||
''' | ||
return self.client.post( | ||
'/v1/shopping/flight-offers/upselling', body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters