File tree Expand file tree Collapse file tree 6 files changed +40
-2
lines changed
Expand file tree Collapse file tree 6 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,10 @@ List of supported endpoints
352352 amadeus.analytics.itinerary_price_metrics.get(originIataCode = ' MAD' , destinationIataCode = ' CDG' ,
353353 departureDate = ' 2021-03-21' )
354354
355- # Covid-19 Area Report
355+ # Travel Restrictions v1
356356 amadeus.duty_of_care.diseases.covid19_area_report.get(countryCode = " US" )
357+ # Travel Restrictions v2
358+ amadeus.duty_of_care.diseases.covid19_report.get(countryCode = ' US' )
357359
358360 # Airline Routes
359361 amadeus.airline.destinations.get(airlineCode = ' BA' )
Original file line number Diff line number Diff line change 11from amadeus .client .decorator import Decorator
22from amadeus .duty_of_care .diseases import Covid19AreaReport
3+ from amadeus .duty_of_care .diseases import Covid19Report
34
45
56class Diseases (Decorator , object ):
67 def __init__ (self , client ):
78 Decorator .__init__ (self , client )
89 self .covid19_area_report = Covid19AreaReport (client )
10+ self .covid19_report = Covid19Report (client )
Original file line number Diff line number Diff line change 11from ._covid19_area_report import Covid19AreaReport
2+ from ._covid19_report import Covid19Report
23
3- __all__ = ['Covid19AreaReport' ]
4+ __all__ = ['Covid19AreaReport' , 'Covid19Report' ]
Original file line number Diff line number Diff line change 1+ from amadeus .client .decorator import Decorator
2+
3+
4+ class Covid19Report (Decorator , object ):
5+ def get (self , ** params ):
6+ '''
7+ Returns the Covid-19 restrictions on targeted area.
8+
9+ .. code-block:: python
10+
11+ amadeus.duty_of_care.diseases.covid19_report.get(
12+ countryCode='US'
13+ )
14+
15+ :param countryCode: Country code following ISO 3166 Alpha-2
16+ standard, for example ``"US"`` for United States of America
17+
18+ :rtype: amadeus.Response
19+ :raises amadeus.ResponseError: if the request could not be completed
20+ '''
21+ return self .client .get (
22+ '/v2/duty-of-care/diseases/covid19-area-report' , ** params )
Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ DutyOfCare/Diseases
257257.. autoclass :: amadeus.duty_of_care.diseases.Covid19AreaReport
258258 :members: get
259259
260+ .. autoclass :: amadeus.duty_of_care.diseases.Covid19Report
261+ :members: get
262+
260263Airline/Destinations
261264================
262265
Original file line number Diff line number Diff line change 9292
9393 expect (client .duty_of_care ).not_to (be_none )
9494 expect (client .duty_of_care .diseases .covid19_area_report ).not_to (be_none )
95+ expect (client .duty_of_care .diseases .covid19_report ).not_to (be_none )
9596
9697 expect (client .airline .destinations ).not_to (be_none )
9798
159160
160161 expect (client .duty_of_care .diseases .covid19_area_report .get ).not_to (
161162 be_none )
163+ expect (client .duty_of_care .diseases .covid19_report .get ).not_to (be_none )
162164
163165 expect (client .airline .destinations .get ).not_to (be_none )
164166
525527 '/v1/duty-of-care/diseases/covid19-area-report' , a = 'b'
526528 ))
527529
530+ with it ('.duty_of_care.diseases.covid19_report.get' ):
531+ self .client .duty_of_care .diseases .covid19_report .get (a = 'b' )
532+ expect (self .client .get ).to (have_been_called_with (
533+ '/v2/duty-of-care/diseases/covid19-area-report' , a = 'b'
534+ ))
535+
528536 with it ('.reference_data.locations.hotels.by_hotels.get' ):
529537 self .client .reference_data .locations .hotels .by_hotels .get (
530538 a = 'b' )
You can’t perform that action at this time.
0 commit comments