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

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

import java.util.Map;

public class PddServiceMailServiceTimeQueryRequest extends PopBaseHttpRequest {

    /**
     * 请求参数
     */
    @JsonProperty("request")
    private Request request;

    @Override
    public String getVersion() {
        return "V1";
    }

    @Override
    public String getDataType() {
        return "JSON";
    }

    @Override
    public Integer getPlatform() {
        return 1;
    }

    @Override
    public String getType() {
        return "pdd.service.mail.service.time.query";
    }

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

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

    @Override
    protected void setUserParams(Map params) {
        setUserParam(params, "request", request);
    }

    public void setRequest(Request request) {
        this.request = request;
    }

    public static class Request {

        /**
         * 省名称
         */
        @JsonProperty("provName")
        private String provName;

        /**
         * 市名称
         */
        @JsonProperty("cityName")
        private String cityName;

        /**
         * 区名称
         */
        @JsonProperty("districtName")
        private String districtName;

        /**
         * 街道名称
         */
        @JsonProperty("streetName")
        private String streetName;

        /**
         * 寄件类型
         */
        @JsonProperty("postType")
        private String postType;

        public void setProvName(String provName) {
            this.provName = provName;
        }

        public void setCityName(String cityName) {
            this.cityName = cityName;
        }

        public void setDistrictName(String districtName) {
            this.districtName = districtName;
        }

        public void setStreetName(String streetName) {
            this.streetName = streetName;
        }

        public void setPostType(String postType) {
            this.postType = postType;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy