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

com.pdd.pop.sdk.http.api.ark.request.PddFlightOrderCheckSeatPriceRequest Maven / Gradle / Ivy

There is a newer version: 1.10.85
Show newest version
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.PddFlightOrderCheckSeatPriceResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;

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

public class PddFlightOrderCheckSeatPriceRequest extends PopBaseHttpRequest {

    /**
     * 用于搜索到下单的请求日志关联
     */
    @JsonProperty("trace_id")
    private String traceId;

    /**
     * 用于一次请求的日志关联
     */
    @JsonProperty("sub_trace_id")
    private String subTraceId;

    /**
     * 航程类型
     */
    @JsonProperty("trip_type")
    private String tripType;

    /**
     * 产品类型
     */
    @JsonProperty("product_type")
    private Integer productType;

    /**
     * 同舱同产品类型价格的唯一标识
     */
    @JsonProperty("product_id")
    private String productId;

    /**
     * 同舱同产品类型价格的唯一标识
     */
    @JsonProperty("flight_info_list")
    private List flightInfoList;

    /**
     * 价格信息列表(按乘客类型划分)
     */
    @JsonProperty("price_info_list")
    private List priceInfoList;

    @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.check.seat.price";
    }

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

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

    @Override
    protected void setUserParams(Map params) {
        setUserParam(params, "trace_id", traceId);
        setUserParam(params, "sub_trace_id", subTraceId);
        setUserParam(params, "trip_type", tripType);
        setUserParam(params, "product_type", productType);
        setUserParam(params, "product_id", productId);
        setUserParam(params, "flight_info_list", flightInfoList);
        setUserParam(params, "price_info_list", priceInfoList);
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public void setSubTraceId(String subTraceId) {
        this.subTraceId = subTraceId;
    }

    public void setTripType(String tripType) {
        this.tripType = tripType;
    }

    public void setProductType(Integer productType) {
        this.productType = productType;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public void setFlightInfoList(List flightInfoList) {
        this.flightInfoList = flightInfoList;
    }

    public void setPriceInfoList(List priceInfoList) {
        this.priceInfoList = priceInfoList;
    }

    public static class FlightInfoListItem {

        /**
         * 航班号
         */
        @JsonProperty("flight_no")
        private String flightNo;

        /**
         * 出票航司二字码
         */
        @JsonProperty("carrier_code")
        private String carrierCode;

        /**
         * 是否共享航班
         */
        @JsonProperty("shared")
        private Boolean shared;

        /**
         * 共享航司二字码,shared为true时必传,否则非必传
         */
        @JsonProperty("shared_carrier_code")
        private String sharedCarrierCode;

        /**
         * 共享航班号,shared为true时必传,否则非必传
         */
        @JsonProperty("shared_flight_no")
        private String sharedFlightNo;

        /**
         * 起飞时间(yyyy-MM-dd HH:mm)
         */
        @JsonProperty("departure_date_time")
        private String departureDateTime;

        /**
         * 起飞机场三字码
         */
        @JsonProperty("departure_airport_code")
        private String departureAirportCode;

        /**
         * 起飞航站楼
         */
        @JsonProperty("departure_terminal")
        private String departureTerminal;

        /**
         * 到达时间(yyyy-MM-dd HH:mm)
         */
        @JsonProperty("arrival_date_time")
        private String arrivalDateTime;

        /**
         * 到达机场三字码
         */
        @JsonProperty("arrival_airport_code")
        private String arrivalAirportCode;

        /**
         * 到达航站楼
         */
        @JsonProperty("arrival_terminal")
        private String arrivalTerminal;

        /**
         * 航程编号
         */
        @JsonProperty("segment_no")
        private Integer segmentNo;

        /**
         * 航段编号
         */
        @JsonProperty("sequence_no")
        private Integer sequenceNo;

        /**
         * 舱位信息列表(区分不同的乘客类型)
         */
        @JsonProperty("cabin_info_list")
        private List cabinInfoList;

        public void setFlightNo(String flightNo) {
            this.flightNo = flightNo;
        }

        public void setCarrierCode(String carrierCode) {
            this.carrierCode = carrierCode;
        }

        public void setShared(Boolean shared) {
            this.shared = shared;
        }

        public void setSharedCarrierCode(String sharedCarrierCode) {
            this.sharedCarrierCode = sharedCarrierCode;
        }

        public void setSharedFlightNo(String sharedFlightNo) {
            this.sharedFlightNo = sharedFlightNo;
        }

        public void setDepartureDateTime(String departureDateTime) {
            this.departureDateTime = departureDateTime;
        }

        public void setDepartureAirportCode(String departureAirportCode) {
            this.departureAirportCode = departureAirportCode;
        }

        public void setDepartureTerminal(String departureTerminal) {
            this.departureTerminal = departureTerminal;
        }

        public void setArrivalDateTime(String arrivalDateTime) {
            this.arrivalDateTime = arrivalDateTime;
        }

        public void setArrivalAirportCode(String arrivalAirportCode) {
            this.arrivalAirportCode = arrivalAirportCode;
        }

        public void setArrivalTerminal(String arrivalTerminal) {
            this.arrivalTerminal = arrivalTerminal;
        }

        public void setSegmentNo(Integer segmentNo) {
            this.segmentNo = segmentNo;
        }

        public void setSequenceNo(Integer sequenceNo) {
            this.sequenceNo = sequenceNo;
        }

        public void setCabinInfoList(List cabinInfoList) {
            this.cabinInfoList = cabinInfoList;
        }

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

    public static class FlightInfoListItemCabinInfoListItem {

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

        /**
         * 舱位,不同的航司舱位定义不同
         */
        @JsonProperty("sub_class")
        private String subClass;

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

        public void setSubClass(String subClass) {
            this.subClass = subClass;
        }

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

    public static class PriceInfoListItem {

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

        /**
         * 公布价, 精确到分
         */
        @JsonProperty("base_price")
        private Long basePrice;

        /**
         * 结算价, 精确到分
         */
        @JsonProperty("settle_price")
        private Long settlePrice;

        /**
         * 基建费, 精确到分
         */
        @JsonProperty("airport_tax")
        private Long airportTax;

        /**
         * 燃油费, 精确到分
         */
        @JsonProperty("fuel_tax")
        private Long fuelTax;

        /**
         * 返点,单位为%,保留两位小数,eg:1.23
         */
        @JsonProperty("commission_point")
        private Double commissionPoint;

        /**
         * 定额, 精确到分
         */
        @JsonProperty("commission_money")
        private Long commissionMoney;

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

        public void setBasePrice(Long basePrice) {
            this.basePrice = basePrice;
        }

        public void setSettlePrice(Long settlePrice) {
            this.settlePrice = settlePrice;
        }

        public void setAirportTax(Long airportTax) {
            this.airportTax = airportTax;
        }

        public void setFuelTax(Long fuelTax) {
            this.fuelTax = fuelTax;
        }

        public void setCommissionPoint(Double commissionPoint) {
            this.commissionPoint = commissionPoint;
        }

        public void setCommissionMoney(Long commissionMoney) {
            this.commissionMoney = commissionMoney;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy