| PUT | /{Workspace}/v2/InventoryTransfer |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class InventoryTransferRequest
{
public String ObjectId = null;
public String Workspace = null;
public String Created = null;
public String FromAsset = null;
public String FromTask = null;
public String ToAsset = null;
public String ToTask = null;
public String SubmittedBy = null;
public String ApprovedBy = null;
public Boolean Approved = null;
public String Description = null;
public ArrayList<InventoryTransaction> Transactions = null;
public String getObjectId() { return ObjectId; }
public InventoryTransferRequest setObjectId(String value) { this.ObjectId = value; return this; }
public String getWorkspace() { return Workspace; }
public InventoryTransferRequest setWorkspace(String value) { this.Workspace = value; return this; }
public String getCreated() { return Created; }
public InventoryTransferRequest setCreated(String value) { this.Created = value; return this; }
public String getFromAsset() { return FromAsset; }
public InventoryTransferRequest setFromAsset(String value) { this.FromAsset = value; return this; }
public String getFromTask() { return FromTask; }
public InventoryTransferRequest setFromTask(String value) { this.FromTask = value; return this; }
public String getToAsset() { return ToAsset; }
public InventoryTransferRequest setToAsset(String value) { this.ToAsset = value; return this; }
public String getToTask() { return ToTask; }
public InventoryTransferRequest setToTask(String value) { this.ToTask = value; return this; }
public String getSubmittedBy() { return SubmittedBy; }
public InventoryTransferRequest setSubmittedBy(String value) { this.SubmittedBy = value; return this; }
public String getApprovedBy() { return ApprovedBy; }
public InventoryTransferRequest setApprovedBy(String value) { this.ApprovedBy = value; return this; }
public Boolean isApproved() { return Approved; }
public InventoryTransferRequest setApproved(Boolean value) { this.Approved = value; return this; }
public String getDescription() { return Description; }
public InventoryTransferRequest setDescription(String value) { this.Description = value; return this; }
public ArrayList<InventoryTransaction> getTransactions() { return Transactions; }
public InventoryTransferRequest setTransactions(ArrayList<InventoryTransaction> value) { this.Transactions = value; return this; }
}
public static class InventoryTransaction
{
public String ItemTypeId = null;
public Integer Qty = null;
public ArrayList<String> Items = null;
public ArrayList<String> SerialNumbers = null;
public Boolean UseSerialNumbers = null;
public String getItemTypeId() { return ItemTypeId; }
public InventoryTransaction setItemTypeId(String value) { this.ItemTypeId = value; return this; }
public Integer getQty() { return Qty; }
public InventoryTransaction setQty(Integer value) { this.Qty = value; return this; }
public ArrayList<String> getItems() { return Items; }
public InventoryTransaction setItems(ArrayList<String> value) { this.Items = value; return this; }
public ArrayList<String> getSerialNumbers() { return SerialNumbers; }
public InventoryTransaction setSerialNumbers(ArrayList<String> value) { this.SerialNumbers = value; return this; }
public Boolean isUseSerialNumbers() { return UseSerialNumbers; }
public InventoryTransaction setUseSerialNumbers(Boolean value) { this.UseSerialNumbers = value; return this; }
}
}
Java InventoryTransferRequest DTOs
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.
PUT /{Workspace}/v2/InventoryTransfer HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<InventoryTransferRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.V2.Model.Inventory">
<Approved>false</Approved>
<ApprovedBy>String</ApprovedBy>
<Created>String</Created>
<Description>String</Description>
<FromAsset>String</FromAsset>
<FromTask>String</FromTask>
<ObjectId>String</ObjectId>
<SubmittedBy>String</SubmittedBy>
<ToAsset>String</ToAsset>
<ToTask>String</ToTask>
<Transactions xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Mappers.Model.Inventory">
<d2p1:InventoryTransaction>
<d2p1:ItemTypeId>String</d2p1:ItemTypeId>
<d2p1:Items xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:Items>
<d2p1:Qty>0</d2p1:Qty>
<d2p1:SerialNumbers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:SerialNumbers>
<d2p1:UseSerialNumbers>false</d2p1:UseSerialNumbers>
</d2p1:InventoryTransaction>
</Transactions>
<Workspace>String</Workspace>
</InventoryTransferRequest>