Skip to content

Commit c3e6861

Browse files
committed
update static var names
1 parent 1853e0e commit c3e6861

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

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

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

3131
/**
3232
* Constructor.
@@ -55,7 +55,7 @@ public FlightOffersSearch(Amadeus client) {
5555
* @throws ResponseException when an exception occurs
5656
*/
5757
public FlightOfferSearch[] get(Params params) throws ResponseException {
58-
Response response = client.get(flightOffersUrl, params);
58+
Response response = client.get(FLIGHT_OFFERS_URL, params);
5959
return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class);
6060
}
6161

@@ -84,7 +84,7 @@ public FlightOfferSearch[] get() throws ResponseException {
8484
* @throws ResponseException when an exception occurs
8585
*/
8686
public FlightOfferSearch[] post(JsonObject body) throws ResponseException {
87-
Response response = client.post(flightOffersUrl, body);
87+
Response response = client.post(FLIGHT_OFFERS_URL, body);
8888
return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class);
8989
}
9090

@@ -105,7 +105,7 @@ public FlightOfferSearch[] post(JsonObject body) throws ResponseException {
105105
* @throws ResponseException when an exception occurs
106106
*/
107107
public FlightOfferSearch[] post(String body) throws ResponseException {
108-
Response response = client.post(flightOffersUrl, body);
108+
Response response = client.post(FLIGHT_OFFERS_URL, body);
109109
return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class);
110110
}
111111

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public class SeatMaps {
2626
private Amadeus client;
27-
private static final String seatMapUrl = "/v1/shopping/seatmaps";
27+
private static final String SEATMAP_URL = "/v1/shopping/seatmaps";
2828

2929
/**
3030
* Constructor.
@@ -49,7 +49,7 @@ public SeatMaps(Amadeus client) {
4949
* @throws ResponseException when an exception occurs
5050
*/
5151
public SeatMap[] get(Params params) throws ResponseException {
52-
Response response = client.get(seatMapUrl, params);
52+
Response response = client.get(SEATMAP_URL, params);
5353
return (SeatMap[]) Resource.fromArray(response, SeatMap[].class);
5454
}
5555

@@ -76,7 +76,7 @@ public SeatMap[] get() throws ResponseException {
7676
* @throws ResponseException when an exception occurs
7777
*/
7878
public SeatMap[] post(JsonObject body) throws ResponseException {
79-
Response response = client.post(seatMapUrl, body);
79+
Response response = client.post(SEATMAP_URL, body);
8080
return (SeatMap[]) Resource.fromArray(response, SeatMap[].class);
8181
}
8282

@@ -95,7 +95,7 @@ public SeatMap[] post(JsonObject body) throws ResponseException {
9595
* @throws ResponseException when an exception occurs
9696
*/
9797
public SeatMap[] post(String body) throws ResponseException {
98-
Response response = client.post(seatMapUrl, body);
98+
Response response = client.post(SEATMAP_URL, body);
9999
return (SeatMap[]) Resource.fromArray(response, SeatMap[].class);
100100
}
101101

src/main/java/com/amadeus/shopping/flightOffers/Pricing.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
public class Pricing {
3232

3333
private Amadeus client;
34-
private static final String pricingUrl = "/v1/shopping/flight-offers/pricing";
34+
private static final String PRICING_URL = "/v1/shopping/flight-offers/pricing";
3535

3636
/**
3737
* Constructor.
@@ -90,7 +90,7 @@ private JsonArray buildPaymentJSON(FlightPayment flightPayment) {
9090
* @throws ResponseException when an exception occurs
9191
*/
9292
public FlightPrice post(JsonObject body, Params params) throws ResponseException {
93-
Response response = client.post(pricingUrl, params, body);
93+
Response response = client.post(PRICING_URL, params, body);
9494
return (FlightPrice) Resource.fromObject(response, FlightPrice.class);
9595
}
9696

@@ -111,7 +111,7 @@ public FlightPrice post(JsonObject body, Params params) throws ResponseException
111111
* @throws ResponseException when an exception occurs
112112
*/
113113
public FlightPrice post(String body, Params params) throws ResponseException {
114-
Response response = client.post(pricingUrl, params, body);
114+
Response response = client.post(PRICING_URL, params, body);
115115
return (FlightPrice) Resource.fromObject(response, FlightPrice.class);
116116
}
117117

@@ -131,7 +131,7 @@ public FlightPrice post(String body, Params params) throws ResponseException {
131131
* @throws ResponseException when an exception occurs
132132
*/
133133
public FlightPrice post(JsonObject body) throws ResponseException {
134-
Response response = client.post(pricingUrl, body);
134+
Response response = client.post(PRICING_URL, body);
135135
return (FlightPrice) Resource.fromObject(response, FlightPrice.class);
136136
}
137137

@@ -151,7 +151,7 @@ public FlightPrice post(JsonObject body) throws ResponseException {
151151
* @throws ResponseException when an exception occurs
152152
*/
153153
public FlightPrice post(String body) throws ResponseException {
154-
Response response = client.post(pricingUrl, body);
154+
Response response = client.post(PRICING_URL, body);
155155
return (FlightPrice) Resource.fromObject(response, FlightPrice.class);
156156
}
157157

@@ -228,9 +228,9 @@ public FlightPrice post(FlightOfferSearch[] flightOffersSearches,
228228
// Is it a call with param or without param?
229229
if (params != null) {
230230
response = client.post(
231-
pricingUrl, params, jsonObject);
231+
PRICING_URL, params, jsonObject);
232232
} else {
233-
response = client.post(pricingUrl, jsonObject);
233+
response = client.post(PRICING_URL, jsonObject);
234234
}
235235
return (FlightPrice) Resource.fromObject(response, FlightPrice.class);
236236
}
@@ -288,7 +288,7 @@ public FlightPrice post(FlightOfferSearch[] flightOffersSearches,
288288
JsonObject jsonObject = new JsonObject();
289289
jsonObject.add("data", typeObject);
290290

291-
Response response = client.post(pricingUrl, jsonObject);
291+
Response response = client.post(PRICING_URL, jsonObject);
292292
return (FlightPrice) Resource.fromObject(response, FlightPrice.class);
293293
}
294294

src/main/java/com/amadeus/travel/TripParser.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
public class TripParser {
2929
private Amadeus client;
30-
private static final String tripParserUrl = "/v3/travel/trip-parser";
30+
private static final String TRIP_PARSER_URL = "/v3/travel/trip-parser";
3131

3232
/**
3333
* Constructor.
@@ -52,7 +52,7 @@ public TripParser(Amadeus client) {
5252
* @throws ResponseException when an exception occurs
5353
*/
5454
public TripDetail post(JsonObject body) throws ResponseException {
55-
Response response = client.post(tripParserUrl, body);
55+
Response response = client.post(TRIP_PARSER_URL, body);
5656
return (TripDetail) Resource.fromObject(response, TripDetail.class);
5757
}
5858

@@ -70,7 +70,7 @@ public TripDetail post(JsonObject body) throws ResponseException {
7070
* @throws ResponseException when an exception occurs
7171
*/
7272
public TripDetail post(String body) throws ResponseException {
73-
Response response = client.post(tripParserUrl, body);
73+
Response response = client.post(TRIP_PARSER_URL, body);
7474
return (TripDetail) Resource.fromObject(response, TripDetail.class);
7575
}
7676

@@ -99,7 +99,7 @@ public TripDetail post(File file) throws ResponseException, IOException {
9999
body.addProperty("payload", encodedFile);
100100
count = count + fileInputStreamReader.read(bytes);
101101

102-
Response response = client.post(tripParserUrl, body);
102+
Response response = client.post(TRIP_PARSER_URL, body);
103103
return (TripDetail) Resource.fromObject(response, TripDetail.class);
104104
}
105105
}

0 commit comments

Comments
 (0)