com.pdd.pop.sdk.http.api.ark.request.PddTrainChangeTicketRequest 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.PddTrainChangeTicketResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import java.util.List;
import java.util.Map;
public class PddTrainChangeTicketRequest extends PopBaseHttpRequest {
/**
* 拼多多订单号
*/
@JsonProperty("pdd_order_id")
private String pddOrderId;
/**
* 商家订单号
*/
@JsonProperty("order_id")
private String orderId;
/**
* 改签后新的出发站
*/
@JsonProperty("new_depart_station")
private String newDepartStation;
/**
* 改签后新的到达站
*/
@JsonProperty("new_arrive_station")
private String newArriveStation;
/**
* 改签后新的列车日期
*/
@JsonProperty("new_train_date")
private String newTrainDate;
/**
* 改签后新的车次
*/
@JsonProperty("new_train_no")
private String newTrainNo;
/**
* 改签后新的出发时间
*/
@JsonProperty("new_depart_time")
private String newDepartTime;
/**
* 改签后新的到达时间
*/
@JsonProperty("new_arrive_time")
private String newArriveTime;
/**
* 改签后新的座位类型
*/
@JsonProperty("new_seat_type")
private Integer newSeatType;
/**
* 改签后新的选座
*/
@JsonProperty("new_choose_seat")
private String newChooseSeat;
/**
* 改签的新的乘客信息
*/
@JsonProperty("new_passenger_infos")
private List newPassengerInfos;
@Override
public String getVersion() {
return "V1";
}
@Override
public String getDataType() {
return "JSON";
}
@Override
public Integer getPlatform() {
return 1;
}
@Override
public String getType() {
return "pdd.train.change.ticket";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class getResponseClass() {
return PddTrainChangeTicketResponse.class;
}
@Override
protected void setUserParams(Map params) {
setUserParam(params, "pdd_order_id", pddOrderId);
setUserParam(params, "order_id", orderId);
setUserParam(params, "new_depart_station", newDepartStation);
setUserParam(params, "new_arrive_station", newArriveStation);
setUserParam(params, "new_train_date", newTrainDate);
setUserParam(params, "new_train_no", newTrainNo);
setUserParam(params, "new_depart_time", newDepartTime);
setUserParam(params, "new_arrive_time", newArriveTime);
setUserParam(params, "new_seat_type", newSeatType);
setUserParam(params, "new_choose_seat", newChooseSeat);
setUserParam(params, "new_passenger_infos", newPassengerInfos);
}
public void setPddOrderId(String pddOrderId) {
this.pddOrderId = pddOrderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public void setNewDepartStation(String newDepartStation) {
this.newDepartStation = newDepartStation;
}
public void setNewArriveStation(String newArriveStation) {
this.newArriveStation = newArriveStation;
}
public void setNewTrainDate(String newTrainDate) {
this.newTrainDate = newTrainDate;
}
public void setNewTrainNo(String newTrainNo) {
this.newTrainNo = newTrainNo;
}
public void setNewDepartTime(String newDepartTime) {
this.newDepartTime = newDepartTime;
}
public void setNewArriveTime(String newArriveTime) {
this.newArriveTime = newArriveTime;
}
public void setNewSeatType(Integer newSeatType) {
this.newSeatType = newSeatType;
}
public void setNewChooseSeat(String newChooseSeat) {
this.newChooseSeat = newChooseSeat;
}
public void setNewPassengerInfos(List newPassengerInfos) {
this.newPassengerInfos = newPassengerInfos;
}
public static class NewPassengerInfosItem {
/**
* 身份类型
*/
@JsonProperty("card_type")
private String cardType;
/**
* 证件号
*/
@JsonProperty("card_no")
private String cardNo;
/**
* 姓名
*/
@JsonProperty("name")
private String name;
/**
* 票类型
*/
@JsonProperty("ticket_type")
private Integer ticketType;
/**
* 座位类型
*/
@JsonProperty("seat_type")
private Integer seatType;
/**
* 价格
*/
@JsonProperty("ticket_price")
private Long ticketPrice;
/**
* 供应商子单号
*/
@JsonProperty("sub_order_id")
private String subOrderId;
/**
* 新的拼多多子单号
*/
@JsonProperty("new_sub_pdd_order_id")
private String newSubPddOrderId;
/**
* 生日
*/
@JsonProperty("birthday")
private String birthday;
/**
* 证件类型
*/
@JsonProperty("effective_date")
private String effectiveDate;
/**
* 性别
*/
@JsonProperty("sex")
private String sex;
/**
* 国家
*/
@JsonProperty("country")
private String country;
/**
* 手机
*/
@JsonProperty("mobile")
private String mobile;
/**
* 邮箱
*/
@JsonProperty("email")
private String email;
public void setCardType(String cardType) {
this.cardType = cardType;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public void setName(String name) {
this.name = name;
}
public void setTicketType(Integer ticketType) {
this.ticketType = ticketType;
}
public void setSeatType(Integer seatType) {
this.seatType = seatType;
}
public void setTicketPrice(Long ticketPrice) {
this.ticketPrice = ticketPrice;
}
public void setSubOrderId(String subOrderId) {
this.subOrderId = subOrderId;
}
public void setNewSubPddOrderId(String newSubPddOrderId) {
this.newSubPddOrderId = newSubPddOrderId;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public void setEffectiveDate(String effectiveDate) {
this.effectiveDate = effectiveDate;
}
public void setSex(String sex) {
this.sex = sex;
}
public void setCountry(String country) {
this.country = country;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
}