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

com.notronix.etsy.impl.shops.EtsyShopResource Maven / Gradle / Ivy

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

import com.notronix.etsy.api.EtsyException;
import com.notronix.etsy.api.PageableResponse;
import com.notronix.etsy.api.authentication.model.Credentials;
import com.notronix.etsy.api.shops.ShopResource;
import com.notronix.etsy.api.shops.model.ShippingProfile;
import com.notronix.etsy.api.shops.model.Shop;
import com.notronix.etsy.api.shops.model.ShopSection;
import com.notronix.etsy.impl.EtsyResource;
import com.notronix.etsy.impl.EtsyMethodExecutor;
import com.notronix.etsy.impl.shops.method.GetShopMethod;
import com.notronix.etsy.impl.shops.method.GetShopSectionsMethod;
import com.notronix.etsy.impl.shops.method.GetShopShippingProfilesMethod;

public class EtsyShopResource extends EtsyResource implements ShopResource
{
    public EtsyShopResource(EtsyMethodExecutor executor, Credentials clientCredentials) {
        super(executor, clientCredentials);
    }

    @Override
    public Shop getShop(Long shopId) throws EtsyException {
        return getExecutor().execute(new GetShopMethod(getClientCredentials()).withShopId(shopId));
    }

    @Override
    public PageableResponse getShopShippingProfiles(Credentials accessCredentials, Long shopId)
            throws EtsyException {
        return getExecutor().execute(new GetShopShippingProfilesMethod(getClientCredentials(), accessCredentials)
                .withShopId(shopId));
    }

    @Override
    public PageableResponse getShopSections(Long shopId) throws EtsyException {
        return getExecutor().execute(new GetShopSectionsMethod(getClientCredentials()).withShopId(shopId));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy