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

com.notronix.etsy.impl.shops.method.GetShopMethod Maven / Gradle / Ivy

There is a newer version: 3.0.0014
Show newest version
package com.notronix.etsy.impl.shops.method;

import com.notronix.etsy.api.authentication.model.Credentials;
import com.notronix.etsy.api.Unmarshaller;
import com.notronix.etsy.impl.EtsyMethod;
import com.notronix.etsy.impl.shops.model.EtsyShop;

import static java.util.Objects.requireNonNull;

public class GetShopMethod extends EtsyMethod
{
    private Long shopId;

    public GetShopMethod(Credentials clientCredentials) {
        super(clientCredentials);
    }

    @Override
    public EtsyShop getResponse(Unmarshaller unmarshaller, String payload) {
        return unmarshaller.unmarshal(payload, EtsyShop.class);
    }

    @Override
    protected String getURI() {
        return "/application/shops/" + requireNonNull(shopId);
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public GetShopMethod withShopId(Long shopId) {
        this.shopId = shopId;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy