com.pdd.pop.sdk.http.api.ark.request.PddFlightChangeApplyRequest Maven / Gradle / Ivy
package com.pdd.pop.sdk.http.api.ark.request;
import com.pdd.pop.sdk.common.util.JsonUtil;
import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonProperty;
import com.pdd.pop.sdk.http.api.ark.response.PddFlightChangeApplyResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import java.util.List;
import java.util.Map;
public class PddFlightChangeApplyRequest extends PopBaseHttpRequest {
/**
* 日志追踪id (用于日志关联)
*/
@JsonProperty("trace_id")
private String traceId;
/**
* 唯一关联当前请求日志追踪id
*/
@JsonProperty("sub_trace_id")
private String subTraceId;
/**
* 外部主订单号
*/
@JsonProperty("out_order_no")
private String outOrderNo;
/**
* 平台机票订单号
*/
@JsonProperty("parent_travel_sn")
private String parentTravelSn;
/**
* 要改签的日期(yyyy-MM-dd)
*/
@JsonProperty("change_date")
private String changeDate;
/**
* 非自愿改期凭证路径
*/
@JsonProperty("attachment_path")
private String attachmentPath;
/**
* 变更乘客信息列表,当婴儿改签时,必须将关联的成人信息
*/
@JsonProperty("passenger_info_list")
private List passengerInfoList;
/**
* 变更的航班数据,改签必填
*/
@JsonProperty("flight_info_list")
private List flightInfoList;
@Override
public String getVersion() {
return "V1";
}
@Override
public String getDataType() {
return "JSON";
}
@Override
public Integer getPlatform() {
return 1;
}
@Override
public String getType() {
return "pdd.flight.change.apply";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class getResponseClass() {
return PddFlightChangeApplyResponse.class;
}
@Override
protected void setUserParams(Map params) {
setUserParam(params, "trace_id", traceId);
setUserParam(params, "sub_trace_id", subTraceId);
setUserParam(params, "out_order_no", outOrderNo);
setUserParam(params, "parent_travel_sn", parentTravelSn);
setUserParam(params, "change_date", changeDate);
setUserParam(params, "attachment_path", attachmentPath);
setUserParam(params, "passenger_info_list", passengerInfoList);
setUserParam(params, "flight_info_list", flightInfoList);
}
public void setTraceId(String traceId) {
this.traceId = traceId;
}
public void setSubTraceId(String subTraceId) {
this.subTraceId = subTraceId;
}
public void setOutOrderNo(String outOrderNo) {
this.outOrderNo = outOrderNo;
}
public void setParentTravelSn(String parentTravelSn) {
this.parentTravelSn = parentTravelSn;
}
public void setChangeDate(String changeDate) {
this.changeDate = changeDate;
}
public void setAttachmentPath(String attachmentPath) {
this.attachmentPath = attachmentPath;
}
public void setPassengerInfoList(List passengerInfoList) {
this.passengerInfoList = passengerInfoList;
}
public void setFlightInfoList(List flightInfoList) {
this.flightInfoList = flightInfoList;
}
public static class PassengerInfoListItem {
/**
* 乘客类型
*/
@JsonProperty("passenger_type")
private String passengerType;
/**
* 姓名
*/
@JsonProperty("name")
private String name;
/**
* 证件类型
*/
@JsonProperty("identity_type")
private String identityType;
/**
* 证件号
*/
@JsonProperty("identity_no")
private String identityNo;
/**
* 新平台机票子订单号
*/
@JsonProperty("travel_sn")
private String travelSn;
/**
* 票号
*/
@JsonProperty("ticket_no")
private String ticketNo;
/**
* 原平台机票子订单号
*/
@JsonProperty("old_travel_sn")
private String oldTravelSn;
public void setPassengerType(String passengerType) {
this.passengerType = passengerType;
}
public void setName(String name) {
this.name = name;
}
public void setIdentityType(String identityType) {
this.identityType = identityType;
}
public void setIdentityNo(String identityNo) {
this.identityNo = identityNo;
}
public void setTravelSn(String travelSn) {
this.travelSn = travelSn;
}
public void setTicketNo(String ticketNo) {
this.ticketNo = ticketNo;
}
public void setOldTravelSn(String oldTravelSn) {
this.oldTravelSn = oldTravelSn;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
public static class FlightInfoListItem {
/**
* 航班号
*/
@JsonProperty("flight_no")
private String flightNo;
/**
* 航程编号
*/
@JsonProperty("segment_no")
private Integer segmentNo;
/**
* 航段编号
*/
@JsonProperty("sequence_no")
private Integer sequenceNo;
/**
* 舱位信息列表
*/
@JsonProperty("cabin_info_list")
private List cabinInfoList;
public void setFlightNo(String flightNo) {
this.flightNo = flightNo;
}
public void setSegmentNo(Integer segmentNo) {
this.segmentNo = segmentNo;
}
public void setSequenceNo(Integer sequenceNo) {
this.sequenceNo = sequenceNo;
}
public void setCabinInfoList(List cabinInfoList) {
this.cabinInfoList = cabinInfoList;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
public static class FlightInfoListItemCabinInfoListItem {
/**
* 乘客类型
*/
@JsonProperty("passenger_type")
private String passengerType;
/**
* 舱位,不同的航司舱位定义不同
*/
@JsonProperty("sub_class")
private String subClass;
public void setPassengerType(String passengerType) {
this.passengerType = passengerType;
}
public void setSubClass(String subClass) {
this.subClass = subClass;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
}