All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pdd.pop.sdk.http.api.ark.request.PddTrainConfirmChangeRequest 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.PddTrainConfirmChangeResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;

import java.util.List;
import java.util.Map;

public class PddTrainConfirmChangeRequest extends PopBaseHttpRequest {

    /**
     * 拼多多订单号
     */
    @JsonProperty("pdd_order_id")
    private String pddOrderId;

    /**
     * 商家订单号
     */
    @JsonProperty("order_id")
    private String orderId;

    /**
     * 改签新的子单信息
     */
    @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.confirm.change";
    }

    @Override
    public HttpMethod getHttpMethod() {
        return HttpMethod.POST;
    }

    @Override
    public Class getResponseClass() {
        return PddTrainConfirmChangeResponse.class;
    }

    @Override
    protected void setUserParams(Map params) {
        setUserParam(params, "pdd_order_id", pddOrderId);
        setUserParam(params, "order_id", orderId);
        setUserParam(params, "new_passenger_infos", newPassengerInfos);
    }

    public void setPddOrderId(String pddOrderId) {
        this.pddOrderId = pddOrderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public void setNewPassengerInfos(List newPassengerInfos) {
        this.newPassengerInfos = newPassengerInfos;
    }

    public static class NewPassengerInfosItem {

        /**
         * 商家订单号
         */
        @JsonProperty("order_id")
        private String orderId;

        /**
         * 改签后新的商家子单号
         */
        @JsonProperty("new_sub_order_id")
        private String newSubOrderId;

        /**
         * 老的商家子单号
         */
        @JsonProperty("old_sub_order_Id")
        private String oldSubOrderId;

        /**
         * c端订单号
         */
        @JsonProperty("order_sn")
        private String orderSn;

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public void setNewSubOrderId(String newSubOrderId) {
            this.newSubOrderId = newSubOrderId;
        }

        public void setOldSubOrderId(String oldSubOrderId) {
            this.oldSubOrderId = oldSubOrderId;
        }

        public void setOrderSn(String orderSn) {
            this.orderSn = orderSn;
        }

        @Override
        public String toString() {
            return JsonUtil.transferToJson(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy