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

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

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

public class PddTrainConfirmPayRequest extends PopBaseHttpRequest {

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

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

    /**
     * 订单号信息
     */
    @JsonProperty("order_infos")
    private List orderInfos;

    @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.pay";
    }

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

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

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

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

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

    public void setOrderInfos(List orderInfos) {
        this.orderInfos = orderInfos;
    }

    public static class OrderInfosItem {

        /**
         * 火车票子订单号
         */
        @JsonProperty("travel_sn")
        private String travelSn;

        /**
         * 商家子订单号
         */
        @JsonProperty("mall_order")
        private String mallOrder;

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

        public void setTravelSn(String travelSn) {
            this.travelSn = travelSn;
        }

        public void setMallOrder(String mallOrder) {
            this.mallOrder = mallOrder;
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy