com.pdd.pop.sdk.http.api.ark.request.PddTrainCancelChangeRequest 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.PddTrainCancelChangeResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import java.util.List;
import java.util.Map;
public class PddTrainCancelChangeRequest extends PopBaseHttpRequest {
/**
* 拼多多订单号
*/
@JsonProperty("pdd_order_id")
private String pddOrderId;
/**
* 商家订单号
*/
@JsonProperty("order_id")
private String orderId;
/**
* 取消改签子单信息
*/
@JsonProperty("passenger_infos")
private List passengerInfos;
@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.cancel.change";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class getResponseClass() {
return PddTrainCancelChangeResponse.class;
}
@Override
protected void setUserParams(Map params) {
setUserParam(params, "pdd_order_id", pddOrderId);
setUserParam(params, "order_id", orderId);
setUserParam(params, "passenger_infos", passengerInfos);
}
public void setPddOrderId(String pddOrderId) {
this.pddOrderId = pddOrderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public void setPassengerInfos(List passengerInfos) {
this.passengerInfos = passengerInfos;
}
public static class PassengerInfosItem {
/**
* 新的商家订单号
*/
@JsonProperty("new_sub_order_Id")
private String newSubOrderId;
/**
* 新的商家订单号
*/
@JsonProperty("old_sub_order_id")
private String oldSubOrderId;
public void setNewSubOrderId(String newSubOrderId) {
this.newSubOrderId = newSubOrderId;
}
public void setOldSubOrderId(String oldSubOrderId) {
this.oldSubOrderId = oldSubOrderId;
}
@Override
public String toString() {
return JsonUtil.transferToJson(this);
}
}
}