com.pdd.pop.sdk.http.api.ark.request.PddFlightChangeCancelRequest 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.PddFlightChangeCancelResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import java.util.List;
import java.util.Map;
public class PddFlightChangeCancelRequest 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;
/**
* 外部变更单号
*/
@JsonProperty("out_change_no")
private String outChangeNo;
/**
* 乘客信息
*/
@JsonProperty("passenger_info_list")
private List passengerInfoList;
@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.cancel";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class getResponseClass() {
return PddFlightChangeCancelResponse.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, "out_change_no", outChangeNo);
setUserParam(params, "passenger_info_list", passengerInfoList);
}
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 setOutChangeNo(String outChangeNo) {
this.outChangeNo = outChangeNo;
}
public void setPassengerInfoList(List passengerInfoList) {
this.passengerInfoList = passengerInfoList;
}
public static class PassengerInfoListItem {
/**
* 姓名
*/
@JsonProperty("name")
private String name;
/**
* 证件类型
*/
@JsonProperty("identity_type")
private String identityType;
/**
* 证件号
*/
@JsonProperty("identity_no")
private String identityNo;
/**
* 外部变更子单号,由供应商生成
*/
@JsonProperty("sub_out_change_no")
private String subOutChangeNo;
/**
* 平台机票子订单号
*/
@JsonProperty("travel_sn")
private String travelSn;
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 setSubOutChangeNo(String subOutChangeNo) {
this.subOutChangeNo = subOutChangeNo;
}
public void setTravelSn(String travelSn) {
this.travelSn = travelSn;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
}