Skip to content

Commit f8df1da

Browse files
committed
add literal for flight offers search url
1 parent be174cb commit f8df1da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/amadeus/shopping/FlightOffersSearch.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
public class FlightOffersSearch {
2727
private Amadeus client;
2828
public Pricing pricing;
29+
private final String flightOffersUrl = "/v2/shopping/flight-offers";
2930

3031
/**
3132
* Constructor.
@@ -54,7 +55,7 @@ public FlightOffersSearch(Amadeus client) {
5455
* @throws ResponseException when an exception occurs
5556
*/
5657
public FlightOfferSearch[] get(Params params) throws ResponseException {
57-
Response response = client.get("/v2/shopping/flight-offers", params);
58+
Response response = client.get(flightOffersUrl, params);
5859
return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class);
5960
}
6061

@@ -83,7 +84,7 @@ public FlightOfferSearch[] get() throws ResponseException {
8384
* @throws ResponseException when an exception occurs
8485
*/
8586
public FlightOfferSearch[] post(JsonObject body) throws ResponseException {
86-
Response response = client.post("/v2/shopping/flight-offers", body);
87+
Response response = client.post(flightOffersUrl, body);
8788
return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class);
8889
}
8990

@@ -104,7 +105,7 @@ public FlightOfferSearch[] post(JsonObject body) throws ResponseException {
104105
* @throws ResponseException when an exception occurs
105106
*/
106107
public FlightOfferSearch[] post(String body) throws ResponseException {
107-
Response response = client.post("/v2/shopping/flight-offers", body);
108+
Response response = client.post(flightOffersUrl, body);
108109
return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class);
109110
}
110111

0 commit comments

Comments
 (0)