Package com.adyen.model.transfers
Class Leg
- java.lang.Object
-
- com.adyen.model.transfers.Leg
-
public class Leg extends Object
Leg
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ARRIVAL_AIRPORT_CODEstatic StringJSON_PROPERTY_BASIC_FARE_CODEstatic StringJSON_PROPERTY_CARRIER_CODEstatic StringJSON_PROPERTY_DEPARTURE_AIRPORT_CODEstatic StringJSON_PROPERTY_DEPARTURE_DATEstatic StringJSON_PROPERTY_FLIGHT_NUMBER
-
Constructor Summary
Constructors Constructor Description Leg()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LegarrivalAirportCode(String arrivalAirportCode)The IATA 3-letter airport code of the destination airport.LegbasicFareCode(String basicFareCode)The basic fare code for this leg.LegcarrierCode(String carrierCode)IATA code of the carrier operating the flight.LegdepartureAirportCode(String departureAirportCode)The IATA three-letter airport code of the departure airport.LegdepartureDate(String departureDate)The flight departure date.booleanequals(Object o)Return true if this Leg object is equal to o.LegflightNumber(String flightNumber)The flight identifier.static LegfromJson(String jsonString)Create an instance of Leg given an JSON stringStringgetArrivalAirportCode()The IATA 3-letter airport code of the destination airport.StringgetBasicFareCode()The basic fare code for this leg.StringgetCarrierCode()IATA code of the carrier operating the flight.StringgetDepartureAirportCode()The IATA three-letter airport code of the departure airport.StringgetDepartureDate()The flight departure date.StringgetFlightNumber()The flight identifier.inthashCode()voidsetArrivalAirportCode(String arrivalAirportCode)The IATA 3-letter airport code of the destination airport.voidsetBasicFareCode(String basicFareCode)The basic fare code for this leg.voidsetCarrierCode(String carrierCode)IATA code of the carrier operating the flight.voidsetDepartureAirportCode(String departureAirportCode)The IATA three-letter airport code of the departure airport.voidsetDepartureDate(String departureDate)The flight departure date.voidsetFlightNumber(String flightNumber)The flight identifier.StringtoJson()Convert an instance of Leg to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_ARRIVAL_AIRPORT_CODE
public static final String JSON_PROPERTY_ARRIVAL_AIRPORT_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BASIC_FARE_CODE
public static final String JSON_PROPERTY_BASIC_FARE_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CARRIER_CODE
public static final String JSON_PROPERTY_CARRIER_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DEPARTURE_AIRPORT_CODE
public static final String JSON_PROPERTY_DEPARTURE_AIRPORT_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DEPARTURE_DATE
public static final String JSON_PROPERTY_DEPARTURE_DATE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FLIGHT_NUMBER
public static final String JSON_PROPERTY_FLIGHT_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
arrivalAirportCode
public Leg arrivalAirportCode(String arrivalAirportCode)
The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.- Parameters:
arrivalAirportCode-- Returns:
- the current
Leginstance, allowing for method chaining
-
getArrivalAirportCode
public String getArrivalAirportCode()
The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.- Returns:
- arrivalAirportCode
-
setArrivalAirportCode
public void setArrivalAirportCode(String arrivalAirportCode)
The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.- Parameters:
arrivalAirportCode-
-
basicFareCode
public Leg basicFareCode(String basicFareCode)
The basic fare code for this leg.- Parameters:
basicFareCode-- Returns:
- the current
Leginstance, allowing for method chaining
-
getBasicFareCode
public String getBasicFareCode()
The basic fare code for this leg.- Returns:
- basicFareCode
-
setBasicFareCode
public void setBasicFareCode(String basicFareCode)
The basic fare code for this leg.- Parameters:
basicFareCode-
-
carrierCode
public Leg carrierCode(String carrierCode)
IATA code of the carrier operating the flight.- Parameters:
carrierCode-- Returns:
- the current
Leginstance, allowing for method chaining
-
getCarrierCode
public String getCarrierCode()
IATA code of the carrier operating the flight.- Returns:
- carrierCode
-
setCarrierCode
public void setCarrierCode(String carrierCode)
IATA code of the carrier operating the flight.- Parameters:
carrierCode-
-
departureAirportCode
public Leg departureAirportCode(String departureAirportCode)
The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details- Parameters:
departureAirportCode-- Returns:
- the current
Leginstance, allowing for method chaining
-
getDepartureAirportCode
public String getDepartureAirportCode()
The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details- Returns:
- departureAirportCode
-
setDepartureAirportCode
public void setDepartureAirportCode(String departureAirportCode)
The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details- Parameters:
departureAirportCode-
-
departureDate
public Leg departureDate(String departureDate)
The flight departure date.- Parameters:
departureDate-- Returns:
- the current
Leginstance, allowing for method chaining
-
getDepartureDate
public String getDepartureDate()
The flight departure date.- Returns:
- departureDate
-
setDepartureDate
public void setDepartureDate(String departureDate)
The flight departure date.- Parameters:
departureDate-
-
flightNumber
public Leg flightNumber(String flightNumber)
The flight identifier.- Parameters:
flightNumber-- Returns:
- the current
Leginstance, allowing for method chaining
-
getFlightNumber
public String getFlightNumber()
The flight identifier.- Returns:
- flightNumber
-
setFlightNumber
public void setFlightNumber(String flightNumber)
The flight identifier.- Parameters:
flightNumber-
-
equals
public boolean equals(Object o)
Return true if this Leg object is equal to o.
-
fromJson
public static Leg fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Leg given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Leg
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Leg
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Leg to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-