26
26
public class FlightOffersSearch {
27
27
private Amadeus client ;
28
28
public Pricing pricing ;
29
+ private final String flightOffersUrl = "/v2/shopping/flight-offers" ;
29
30
30
31
/**
31
32
* Constructor.
@@ -54,7 +55,7 @@ public FlightOffersSearch(Amadeus client) {
54
55
* @throws ResponseException when an exception occurs
55
56
*/
56
57
public FlightOfferSearch [] get (Params params ) throws ResponseException {
57
- Response response = client .get ("/v2/shopping/flight-offers" , params );
58
+ Response response = client .get (flightOffersUrl , params );
58
59
return (FlightOfferSearch []) Resource .fromArray (response , FlightOfferSearch [].class );
59
60
}
60
61
@@ -83,7 +84,7 @@ public FlightOfferSearch[] get() throws ResponseException {
83
84
* @throws ResponseException when an exception occurs
84
85
*/
85
86
public FlightOfferSearch [] post (JsonObject body ) throws ResponseException {
86
- Response response = client .post ("/v2/shopping/flight-offers" , body );
87
+ Response response = client .post (flightOffersUrl , body );
87
88
return (FlightOfferSearch []) Resource .fromArray (response , FlightOfferSearch [].class );
88
89
}
89
90
@@ -104,7 +105,7 @@ public FlightOfferSearch[] post(JsonObject body) throws ResponseException {
104
105
* @throws ResponseException when an exception occurs
105
106
*/
106
107
public FlightOfferSearch [] post (String body ) throws ResponseException {
107
- Response response = client .post ("/v2/shopping/flight-offers" , body );
108
+ Response response = client .post (flightOffersUrl , body );
108
109
return (FlightOfferSearch []) Resource .fromArray (response , FlightOfferSearch [].class );
109
110
}
110
111
0 commit comments