| GET,PUT,POST | /{Workspace}/InventoryItemType | ||
|---|---|---|---|
| GET,PUT,POST | /{Workspace}/InventoryItemType/{ObjectId} |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class InventoryItemType extends InventoryTreeNode
{
public String Type = null;
public String ObjectId = null;
public String Workspace = null;
public String ExternalId = null;
public String Created = null;
public String LastUpdated = null;
public String ItemType = null;
public String Desc = null;
public String VendorNum = null;
public String PurchasingUOM = null;
public String SalesUOM = null;
public Integer ReorderLevel = null;
public Integer ReorderQty = null;
public Double DefaultUnitCost = null;
public Double DefaultUnitPrice = null;
public String Barcode = null;
public Boolean UseSerialNumbers = null;
public String Template = null;
public HashMap<String,String> Data = null;
public Boolean Enabled = null;
public String ParentCategoryId = null;
public Boolean IncludeInactive = null;
public String getType() { return Type; }
public InventoryItemType setType(String value) { this.Type = value; return this; }
public String getObjectId() { return ObjectId; }
public InventoryItemType setObjectId(String value) { this.ObjectId = value; return this; }
public String getWorkspace() { return Workspace; }
public InventoryItemType setWorkspace(String value) { this.Workspace = value; return this; }
public String getExternalId() { return ExternalId; }
public InventoryItemType setExternalId(String value) { this.ExternalId = value; return this; }
public String getCreated() { return Created; }
public InventoryItemType setCreated(String value) { this.Created = value; return this; }
public String getLastUpdated() { return LastUpdated; }
public InventoryItemType setLastUpdated(String value) { this.LastUpdated = value; return this; }
public String getItemType() { return ItemType; }
public InventoryItemType setItemType(String value) { this.ItemType = value; return this; }
public String getDesc() { return Desc; }
public InventoryItemType setDesc(String value) { this.Desc = value; return this; }
public String getVendorNum() { return VendorNum; }
public InventoryItemType setVendorNum(String value) { this.VendorNum = value; return this; }
public String getPurchasingUOM() { return PurchasingUOM; }
public InventoryItemType setPurchasingUOM(String value) { this.PurchasingUOM = value; return this; }
public String getSalesUOM() { return SalesUOM; }
public InventoryItemType setSalesUOM(String value) { this.SalesUOM = value; return this; }
public Integer getReorderLevel() { return ReorderLevel; }
public InventoryItemType setReorderLevel(Integer value) { this.ReorderLevel = value; return this; }
public Integer getReorderQty() { return ReorderQty; }
public InventoryItemType setReorderQty(Integer value) { this.ReorderQty = value; return this; }
public Double getDefaultUnitCost() { return DefaultUnitCost; }
public InventoryItemType setDefaultUnitCost(Double value) { this.DefaultUnitCost = value; return this; }
public Double getDefaultUnitPrice() { return DefaultUnitPrice; }
public InventoryItemType setDefaultUnitPrice(Double value) { this.DefaultUnitPrice = value; return this; }
public String getBarcode() { return Barcode; }
public InventoryItemType setBarcode(String value) { this.Barcode = value; return this; }
public Boolean isUseSerialNumbers() { return UseSerialNumbers; }
public InventoryItemType setUseSerialNumbers(Boolean value) { this.UseSerialNumbers = value; return this; }
public String getTemplate() { return Template; }
public InventoryItemType setTemplate(String value) { this.Template = value; return this; }
public HashMap<String,String> getData() { return Data; }
public InventoryItemType setData(HashMap<String,String> value) { this.Data = value; return this; }
public Boolean isEnabled() { return Enabled; }
public InventoryItemType setEnabled(Boolean value) { this.Enabled = value; return this; }
public String getParentCategoryId() { return ParentCategoryId; }
public InventoryItemType setParentCategoryId(String value) { this.ParentCategoryId = value; return this; }
public Boolean isIncludeInactive() { return IncludeInactive; }
public InventoryItemType setIncludeInactive(Boolean value) { this.IncludeInactive = value; return this; }
}
public static class InventoryTreeNode
{
public String Type = null;
public Integer DescendantCount = null;
public String getType() { return Type; }
public InventoryTreeNode setType(String value) { this.Type = value; return this; }
public Integer getDescendantCount() { return DescendantCount; }
public InventoryTreeNode setDescendantCount(Integer value) { this.DescendantCount = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/InventoryItemType HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<InventoryItemType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Inventory">
<DescendantCount>0</DescendantCount>
<Barcode>String</Barcode>
<Created>String</Created>
<Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Data>
<DefaultUnitCost>0</DefaultUnitCost>
<DefaultUnitPrice>0</DefaultUnitPrice>
<Desc>String</Desc>
<Enabled>false</Enabled>
<ExternalId>String</ExternalId>
<IncludeInactive>false</IncludeInactive>
<ItemType>String</ItemType>
<LastUpdated>String</LastUpdated>
<ObjectId>String</ObjectId>
<ParentCategoryId>String</ParentCategoryId>
<PurchasingUOM>String</PurchasingUOM>
<ReorderLevel>0</ReorderLevel>
<ReorderQty>0</ReorderQty>
<SalesUOM>String</SalesUOM>
<Template>String</Template>
<UseSerialNumbers>false</UseSerialNumbers>
<VendorNum>String</VendorNum>
<Workspace>String</Workspace>
</InventoryItemType>