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

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

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

public class PddFlightOrderPayConfirmRequest 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("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.order.pay.confirm";
    }

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

    @Override
    public Class getResponseClass() {
        return PddFlightOrderPayConfirmResponse.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, "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 setTotalPay(Long totalPay) {
        this.totalPay = totalPay;
    }

    public void setPassengerInfoList(List passengerInfoList) {
        this.passengerInfoList = passengerInfoList;
    }

    public static class PassengerInfoListItem {

        /**
         * 平台机票子订单号
         */
        @JsonProperty("travel_sn")
        private String travelSn;

        /**
         * 姓名
         */
        @JsonProperty("name")
        private String name;

        /**
         * 乘客类型
         */
        @JsonProperty("passenger_type")
        private String passengerType;

        /**
         * 证件类型
         */
        @JsonProperty("identity_type")
        private String identityType;

        /**
         * 证件号
         */
        @JsonProperty("identity_no")
        private String identityNo;

        /**
         * pnr编码
         */
        @JsonProperty("pnr")
        private String pnr;

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

        public void setName(String name) {
            this.name = name;
        }

        public void setPassengerType(String passengerType) {
            this.passengerType = passengerType;
        }

        public void setIdentityType(String identityType) {
            this.identityType = identityType;
        }

        public void setIdentityNo(String identityNo) {
            this.identityNo = identityNo;
        }

        public void setPnr(String pnr) {
            this.pnr = pnr;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy