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

com.notronix.lw.methods.inventory.GetInventoryItemByIdMethod Maven / Gradle / Ivy

package com.notronix.lw.methods.inventory;

import com.google.gson.Gson;
import com.notronix.lw.LinnworksAPIException;
import com.notronix.lw.model.StockItemInv;

public class GetInventoryItemByIdMethod extends InventoryMethod
{
    private String itemId;

    @Override
    public String getName()
    {
        return "GetInventoryItemById";
    }

    @Override
    public String getPayload()
    {
        return "id=" + itemId;
    }

    @Override
    public StockItemInv getResponse()
            throws LinnworksAPIException
    {
        return new Gson().fromJson(getJsonResult(), StockItemInv.class);
    }

    public String getItemId()
    {
        return itemId;
    }

    public void setItemId(String itemId)
    {
        this.itemId = itemId;
    }

    public GetInventoryItemByIdMethod withItemId(String itemId)
    {
        this.itemId = itemId;
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy