com.cardpay.sdk.model.Flights Maven / Gradle / Ivy
The newest version!
/*
* CardPay REST API
* Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.
*
* OpenAPI spec version: 3.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.cardpay.sdk.model;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class Flights {
@SerializedName("computerized_res_system")
private String computerizedResSystem = null;
@SerializedName("credit_reason_indicator")
private String creditReasonIndicator = null;
@SerializedName("departure_date")
private String departureDate = null;
@SerializedName("flight")
private List flight = null;
@SerializedName("is_restricted")
private Boolean isRestricted = null;
@SerializedName("origination_code")
private String originationCode = null;
@SerializedName("passenger_name")
private String passengerName = null;
@SerializedName("ticket_change_indicator")
private String ticketChangeIndicator = null;
@SerializedName("ticket_number")
private String ticketNumber = null;
@SerializedName("travel_agency_code")
private String travelAgencyCode = null;
@SerializedName("travel_agency_name")
private String travelAgencyName = null;
public void setComputerizedResSystem(String computerizedResSystem) {
this.computerizedResSystem = computerizedResSystem;
}
/**
* @param computerizedResSystem Computerized reservation system code
* @return bean instance
**/
public Flights computerizedResSystem(String computerizedResSystem) {
this.computerizedResSystem = computerizedResSystem;
return this;
}
public void setCreditReasonIndicator(String creditReasonIndicator) {
this.creditReasonIndicator = creditReasonIndicator;
}
/**
* @param creditReasonIndicator Credit reason indicator
* @return bean instance
**/
public Flights creditReasonIndicator(String creditReasonIndicator) {
this.creditReasonIndicator = creditReasonIndicator;
return this;
}
public void setDepartureDate(String departureDate) {
this.departureDate = departureDate;
}
/**
* @param departureDate Date of departure in format 'DD.MM.YYYY'
* @return bean instance
**/
public Flights departureDate(String departureDate) {
this.departureDate = departureDate;
return this;
}
public void setFlight(List flight) {
this.flight = flight;
}
/**
* @param flight Information about particular flight legs, shouldn't have more than 4 flight subsections in one flights section.
* @return bean instance
**/
public Flights flight(List flight) {
this.flight = flight;
return this;
}
public Flights addFlightItem(Flight flightItem) {
if (this.flight == null) {
this.flight = new ArrayList<>();
}
this.flight.add(flightItem);
return this;
}
public void setIsRestricted(Boolean isRestricted) {
this.isRestricted = isRestricted;
}
/**
* @param isRestricted Restricted ticket indicator
* @return bean instance
**/
public Flights isRestricted(Boolean isRestricted) {
this.isRestricted = isRestricted;
return this;
}
public void setOriginationCode(String originationCode) {
this.originationCode = originationCode;
}
/**
* @param originationCode Code of airport of departure, IATA code
* @return bean instance
**/
public Flights originationCode(String originationCode) {
this.originationCode = originationCode;
return this;
}
public void setPassengerName(String passengerName) {
this.passengerName = passengerName;
}
/**
* @param passengerName First and last name of a passenger
* @return bean instance
**/
public Flights passengerName(String passengerName) {
this.passengerName = passengerName;
return this;
}
public void setTicketChangeIndicator(String ticketChangeIndicator) {
this.ticketChangeIndicator = ticketChangeIndicator;
}
/**
* @param ticketChangeIndicator Ticket change indicator
* @return bean instance
**/
public Flights ticketChangeIndicator(String ticketChangeIndicator) {
this.ticketChangeIndicator = ticketChangeIndicator;
return this;
}
public void setTicketNumber(String ticketNumber) {
this.ticketNumber = ticketNumber;
}
/**
* @param ticketNumber Ticket number
* @return bean instance
**/
public Flights ticketNumber(String ticketNumber) {
this.ticketNumber = ticketNumber;
return this;
}
public void setTravelAgencyCode(String travelAgencyCode) {
this.travelAgencyCode = travelAgencyCode;
}
/**
* @param travelAgencyCode Code of travel agency
* @return bean instance
**/
public Flights travelAgencyCode(String travelAgencyCode) {
this.travelAgencyCode = travelAgencyCode;
return this;
}
public void setTravelAgencyName(String travelAgencyName) {
this.travelAgencyName = travelAgencyName;
}
/**
* @param travelAgencyName Name of travel agency using only latin alphabet
* @return bean instance
**/
public Flights travelAgencyName(String travelAgencyName) {
this.travelAgencyName = travelAgencyName;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Flights( ");
if (computerizedResSystem != null) sb.append("computerizedResSystem=").append(computerizedResSystem.toString()).append("; ");
if (creditReasonIndicator != null) sb.append("creditReasonIndicator=").append(creditReasonIndicator.toString()).append("; ");
if (departureDate != null) sb.append("departureDate=").append(departureDate.toString()).append("; ");
if (flight != null) sb.append("flight=").append(flight.toString()).append("; ");
if (isRestricted != null) sb.append("isRestricted=").append(isRestricted.toString()).append("; ");
if (originationCode != null) sb.append("originationCode=").append(originationCode.toString()).append("; ");
if (passengerName != null) sb.append("passengerName=").append(passengerName.toString()).append("; ");
if (ticketChangeIndicator != null) sb.append("ticketChangeIndicator=").append(ticketChangeIndicator.toString()).append("; ");
if (ticketNumber != null) sb.append("ticketNumber=").append(ticketNumber.toString()).append("; ");
if (travelAgencyCode != null) sb.append("travelAgencyCode=").append(travelAgencyCode.toString()).append("; ");
if (travelAgencyName != null) sb.append("travelAgencyName=").append(travelAgencyName.toString()).append("; ");
sb.append(")");
return sb.toString();
}
}