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

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

import java.util.Map;

public class PddTraceSourceQueryGoodsInfoRequest extends PopBaseHttpRequest {

    /**
     * 请求方法
     */
    @JsonProperty("httpMethod")
    private String httpMethod;

    /**
     * 请求参数
     */
    @JsonProperty("params")
    private Params params;

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

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

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

    @Override
    public String getType() {
        return "pdd.trace.source.query.goods.info";
    }

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

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

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

    public void setHttpMethod(String httpMethod) {
        this.httpMethod = httpMethod;
    }

    public void setParams(Params params) {
        this.params = params;
    }

    public static class Params {

        /**
         * 接口调用账号(由平台分配)
         */
        @JsonProperty("userid")
        private String userid;

        /**
         * 请求时间戳,10分钟有效,格式:yyyy-MM-dd HH:mm:ss
         */
        @JsonProperty("timestamp")
        private String timestamp;

        /**
         * 签名
         */
        @JsonProperty("sign")
        private String sign;

        /**
         * 防伪溯源码ID
         */
        @JsonProperty("id")
        private String id;

        public void setUserid(String userid) {
            this.userid = userid;
        }

        public void setTimestamp(String timestamp) {
            this.timestamp = timestamp;
        }

        public void setSign(String sign) {
            this.sign = sign;
        }

        public void setId(String id) {
            this.id = id;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy