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

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

package com.pdd.pop.sdk.http.api.pop.request;

import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonProperty;
import com.pdd.pop.sdk.http.api.pop.response.PddDdkMallUrlGenResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;

import java.util.Map;

public class PddDdkMallUrlGenRequest extends PopBaseHttpRequest {

    /**
     * 自定义参数,为链接打上自定义标签;自定义参数最长限制64个字节;格式为:  {"uid":"11111","sid":"22222"} ,其中 uid 用户唯一标识,可自行加密后传入,每个用户仅且对应一个标识,必填; sid 上下文信息标识,例如sessionId等,非必填。该json字符串中也可以加入其他自定义的key
     */
    @JsonProperty("custom_parameters")
    private String customParameters;

    /**
     * 是否生成店铺收藏券推广链接
     */
    @JsonProperty("generate_mall_collect_coupon")
    private Boolean generateMallCollectCoupon;

    /**
     * 是否生成qq小程序
     */
    @JsonProperty("generate_qq_app")
    private Boolean generateQqApp;

    /**
     * 是否返回 schema URL
     */
    @JsonProperty("generate_schema_url")
    private Boolean generateSchemaUrl;

    /**
     * 是否生成短链接,true-是,false-否
     */
    @JsonProperty("generate_short_url")
    private Boolean generateShortUrl;

    /**
     * 是否生成唤起微信客户端链接,true-是,false-否,默认false
     */
    @JsonProperty("generate_weapp_webview")
    private Boolean generateWeappWebview;

    /**
     * 店铺id
     */
    @JsonProperty("mall_id")
    private Long mallId;

    /**
     * true--生成多人团推广链接 false--生成单人团推广链接(默认false)1、单人团推广链接:用户访问单人团推广链接,可直接购买商品无需拼团。2、多人团推广链接:用户访问双人团推广链接开团,若用户分享给他人参团,则开团者和参团者的佣金均结算给推手
     */
    @JsonProperty("multi_group")
    private Boolean multiGroup;

    /**
     * 推广位
     */
    @JsonProperty("pid")
    private String pid;

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

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

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

    @Override
    public String getType() {
        return "pdd.ddk.mall.url.gen";
    }

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

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

    @Override
    protected void setUserParams(Map params) {
        setUserParam(params, "custom_parameters", customParameters);
        setUserParam(params, "generate_mall_collect_coupon", generateMallCollectCoupon);
        setUserParam(params, "generate_qq_app", generateQqApp);
        setUserParam(params, "generate_schema_url", generateSchemaUrl);
        setUserParam(params, "generate_short_url", generateShortUrl);
        setUserParam(params, "generate_weapp_webview", generateWeappWebview);
        setUserParam(params, "mall_id", mallId);
        setUserParam(params, "multi_group", multiGroup);
        setUserParam(params, "pid", pid);
    }

    public void setCustomParameters(String customParameters) {
        this.customParameters = customParameters;
    }

    public void setGenerateMallCollectCoupon(Boolean generateMallCollectCoupon) {
        this.generateMallCollectCoupon = generateMallCollectCoupon;
    }

    public void setGenerateQqApp(Boolean generateQqApp) {
        this.generateQqApp = generateQqApp;
    }

    public void setGenerateSchemaUrl(Boolean generateSchemaUrl) {
        this.generateSchemaUrl = generateSchemaUrl;
    }

    public void setGenerateShortUrl(Boolean generateShortUrl) {
        this.generateShortUrl = generateShortUrl;
    }

    public void setGenerateWeappWebview(Boolean generateWeappWebview) {
        this.generateWeappWebview = generateWeappWebview;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public void setMultiGroup(Boolean multiGroup) {
        this.multiGroup = multiGroup;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy