com.taobao.api.request.AreasGetRequest Maven / Gradle / Ivy
package com.taobao.api.request;
import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;
import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.AreasGetResponse;
/**
* TOP API: taobao.areas.get request
*
* @author top auto create
* @since 1.0, 2016.04.13
*/
public class AreasGetRequest extends BaseTaobaoRequest {
/**
* 需返回的字段列表.可选值:Area 结构中的所有字段;多个字段之间用","分隔.如:id,type,name,parent_id,zip.
*/
private String fields;
public void setFields(String fields) {
this.fields = fields;
}
public String getFields() {
return this.fields;
}
public String getApiMethodName() {
return "taobao.areas.get";
}
public Map getTextParams() {
TaobaoHashMap txtParams = new TaobaoHashMap();
txtParams.put("fields", this.fields);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public Class getResponseClass() {
return AreasGetResponse.class;
}
public void check() throws ApiRuleException {
RequestCheckUtils.checkNotEmpty(fields, "fields");
}
}