| GET,OPTIONS | /v1/pm/catalog |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PmCatalogRequest
{
}
public static class PmCatalogResponse
{
public ArrayList<PmCatalogItem> Statuses = new ArrayList<PmCatalogItem>();
public ArrayList<PmCatalogItem> Crew = new ArrayList<PmCatalogItem>();
public ArrayList<PmCatalogCrew> Crews = new ArrayList<PmCatalogCrew>();
public ArrayList<PmCatalogItem> Equipment = new ArrayList<PmCatalogItem>();
public ArrayList<PmCatalogItem> Materials = new ArrayList<PmCatalogItem>();
public ResponseStatus ResponseStatus = null;
public ArrayList<PmCatalogItem> getStatuses() { return Statuses; }
public PmCatalogResponse setStatuses(ArrayList<PmCatalogItem> value) { this.Statuses = value; return this; }
public ArrayList<PmCatalogItem> getCrew() { return Crew; }
public PmCatalogResponse setCrew(ArrayList<PmCatalogItem> value) { this.Crew = value; return this; }
public ArrayList<PmCatalogCrew> getCrews() { return Crews; }
public PmCatalogResponse setCrews(ArrayList<PmCatalogCrew> value) { this.Crews = value; return this; }
public ArrayList<PmCatalogItem> getEquipment() { return Equipment; }
public PmCatalogResponse setEquipment(ArrayList<PmCatalogItem> value) { this.Equipment = value; return this; }
public ArrayList<PmCatalogItem> getMaterials() { return Materials; }
public PmCatalogResponse setMaterials(ArrayList<PmCatalogItem> value) { this.Materials = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PmCatalogResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PmCatalogItem
{
public Integer Id = null;
public String Name = null;
public Double Amount = null;
public String Subtext = null;
public String Badge = null;
public String BadgeKind = null;
public Integer OnHand = null;
public String Unit = null;
public Integer getId() { return Id; }
public PmCatalogItem setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public PmCatalogItem setName(String value) { this.Name = value; return this; }
public Double getAmount() { return Amount; }
public PmCatalogItem setAmount(Double value) { this.Amount = value; return this; }
public String getSubtext() { return Subtext; }
public PmCatalogItem setSubtext(String value) { this.Subtext = value; return this; }
public String getBadge() { return Badge; }
public PmCatalogItem setBadge(String value) { this.Badge = value; return this; }
public String getBadgeKind() { return BadgeKind; }
public PmCatalogItem setBadgeKind(String value) { this.BadgeKind = value; return this; }
public Integer getOnHand() { return OnHand; }
public PmCatalogItem setOnHand(Integer value) { this.OnHand = value; return this; }
public String getUnit() { return Unit; }
public PmCatalogItem setUnit(String value) { this.Unit = value; return this; }
}
public static class PmCatalogCrew
{
public Integer Id = null;
public String Name = null;
public ArrayList<Integer> MemberIds = new ArrayList<Integer>();
public Integer getId() { return Id; }
public PmCatalogCrew setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public PmCatalogCrew setName(String value) { this.Name = value; return this; }
public ArrayList<Integer> getMemberIds() { return MemberIds; }
public PmCatalogCrew setMemberIds(ArrayList<Integer> value) { this.MemberIds = 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.
GET /v1/pm/catalog HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmCatalogResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Crew>
<PmCatalogItem>
<Amount>0</Amount>
<Badge>String</Badge>
<BadgeKind>String</BadgeKind>
<Id>0</Id>
<Name>String</Name>
<OnHand>0</OnHand>
<Subtext>String</Subtext>
<Unit>String</Unit>
</PmCatalogItem>
</Crew>
<Crews>
<PmCatalogCrew>
<Id>0</Id>
<MemberIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</MemberIds>
<Name>String</Name>
</PmCatalogCrew>
</Crews>
<Equipment>
<PmCatalogItem>
<Amount>0</Amount>
<Badge>String</Badge>
<BadgeKind>String</BadgeKind>
<Id>0</Id>
<Name>String</Name>
<OnHand>0</OnHand>
<Subtext>String</Subtext>
<Unit>String</Unit>
</PmCatalogItem>
</Equipment>
<Materials>
<PmCatalogItem>
<Amount>0</Amount>
<Badge>String</Badge>
<BadgeKind>String</BadgeKind>
<Id>0</Id>
<Name>String</Name>
<OnHand>0</OnHand>
<Subtext>String</Subtext>
<Unit>String</Unit>
</PmCatalogItem>
</Materials>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Statuses>
<PmCatalogItem>
<Amount>0</Amount>
<Badge>String</Badge>
<BadgeKind>String</BadgeKind>
<Id>0</Id>
<Name>String</Name>
<OnHand>0</OnHand>
<Subtext>String</Subtext>
<Unit>String</Unit>
</PmCatalogItem>
</Statuses>
</PmCatalogResponse>