com.notronix.etsy.impl.method.FindAllListingActiveMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JEtsy Show documentation
Show all versions of JEtsy Show documentation
A Java implementation of a Java version of the Etsy API
package com.notronix.etsy.impl.method;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.notronix.etsy.impl.model.EtsyListing;
import java.util.List;
import static com.notronix.etsy.impl.method.MethodUtils.addIfProvided;
public class FindAllListingActiveMethod extends AbstractEtsyMethod>>
{
private Integer limit;
private Integer offset;
@Override
public String getURI() {
String uri = "/listings/active";
uri = addIfProvided(uri, "limit", limit);
uri = addIfProvided(uri, "offset", offset);
return uri;
}
@Override
public EtsyResponse> getResponse(Gson gson, String jsonPayload) {
return gson.fromJson(jsonPayload, new TypeToken>>(){}.getType());
}
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public FindAllListingActiveMethod withLimit(Integer limit) {
this.limit = limit;
return this;
}
public Integer getOffset() {
return offset;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
public FindAllListingActiveMethod withOffset(Integer offset) {
this.offset = offset;
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy