com.pdd.pop.sdk.http.api.pop.request.PddPopAuthTokenRefreshRequest 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.PddPopAuthTokenRefreshResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import java.util.Map;
public class PddPopAuthTokenRefreshRequest extends PopBaseHttpRequest {
/**
* grantType==refresh_token 时需要
*/
@JsonProperty("refresh_token")
private String refreshToken;
@Override
public String getVersion() {
return "V1";
}
@Override
public String getDataType() {
return "JSON";
}
@Override
public Integer getPlatform() {
return 0;
}
@Override
public String getType() {
return "pdd.pop.auth.token.refresh";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class getResponseClass() {
return PddPopAuthTokenRefreshResponse.class;
}
@Override
protected void setUserParams(Map params) {
setUserParam(params, "refresh_token", refreshToken);
}
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
}