com.pdd.pop.sdk.http.api.ark.request.PddFlightChangePayRequest 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.PddFlightChangePayResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import java.util.List;
import java.util.Map;
public class PddFlightChangePayRequest extends PopBaseHttpRequest {
/**
* 用于搜索到下单的请求日志关联
*/
@JsonProperty("trace_id")
private String traceId;
/**
* 用于一次请求的日志关联
*/
@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;
/**
* 要改签的日期(yyyy-MM-dd)
*/
@JsonProperty("change_date")
private String changeDate;
/**
* 总改签手续费, 精确到分
*/
@JsonProperty("total_pay_fee")
private Long totalPayFee;
/**
* 改签支付总金额
*/
@JsonProperty("total_pay")
private Long totalPay;
/**
* 变更乘客信息列表
*/
@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.pay";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class getResponseClass() {
return PddFlightChangePayResponse.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, "change_date", changeDate);
setUserParam(params, "total_pay_fee", totalPayFee);
setUserParam(params, "total_pay", totalPay);
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 setChangeDate(String changeDate) {
this.changeDate = changeDate;
}
public void setTotalPayFee(Long totalPayFee) {
this.totalPayFee = totalPayFee;
}
public void setTotalPay(Long totalPay) {
this.totalPay = totalPay;
}
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;
/**
* 票号
*/
@JsonProperty("ticket_no")
private String ticketNo;
/**
* 用户机票航班信息
*/
@JsonProperty("flight_list")
private List flightList;
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;
}
public void setTicketNo(String ticketNo) {
this.ticketNo = ticketNo;
}
public void setFlightList(List flightList) {
this.flightList = flightList;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
public static class PassengerInfoListItemFlightListItem {
/**
* 航班号
*/
@JsonProperty("flight_no")
private String flightNo;
/**
* 航程编号
*/
@JsonProperty("segment_no")
private Integer segmentNo;
/**
* 航段编号
*/
@JsonProperty("sequence_no")
private Integer sequenceNo;
/**
* 舱位
*/
@JsonProperty("sub_class")
private String subClass;
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 setSubClass(String subClass) {
this.subClass = subClass;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
}