| GET,OPTIONS | /v1/rates |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ResourceRatesRequest
{
public String Type = null;
public String AsOf = null;
public String getType() { return Type; }
public ResourceRatesRequest setType(String value) { this.Type = value; return this; }
public String getAsOf() { return AsOf; }
public ResourceRatesRequest setAsOf(String value) { this.AsOf = value; return this; }
}
public static class ResourceRatesResponse
{
public ResponseStatus ResponseStatus = null;
public String Type = null;
public String AsOf = null;
public ArrayList<ResourceRateResource> Resources = new ArrayList<ResourceRateResource>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ResourceRatesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public String getType() { return Type; }
public ResourceRatesResponse setType(String value) { this.Type = value; return this; }
public String getAsOf() { return AsOf; }
public ResourceRatesResponse setAsOf(String value) { this.AsOf = value; return this; }
public ArrayList<ResourceRateResource> getResources() { return Resources; }
public ResourceRatesResponse setResources(ArrayList<ResourceRateResource> value) { this.Resources = value; return this; }
}
public static class ResourceRateResource
{
public UUID Id = null;
public String Name = null;
public String Meta = null;
public String Unit = null;
public BigDecimal CostRate = null;
public BigDecimal BillRate = null;
public String EffectiveFrom = null;
public Boolean HasCard = null;
public ArrayList<ResourceRateComponentDto> Composition = new ArrayList<ResourceRateComponentDto>();
public BigDecimal PrevailingFloor = null;
public ArrayList<ResourceRateHistoryRow> History = new ArrayList<ResourceRateHistoryRow>();
public UUID getId() { return Id; }
public ResourceRateResource setId(UUID value) { this.Id = value; return this; }
public String getName() { return Name; }
public ResourceRateResource setName(String value) { this.Name = value; return this; }
public String getMeta() { return Meta; }
public ResourceRateResource setMeta(String value) { this.Meta = value; return this; }
public String getUnit() { return Unit; }
public ResourceRateResource setUnit(String value) { this.Unit = value; return this; }
public BigDecimal getCostRate() { return CostRate; }
public ResourceRateResource setCostRate(BigDecimal value) { this.CostRate = value; return this; }
public BigDecimal getBillRate() { return BillRate; }
public ResourceRateResource setBillRate(BigDecimal value) { this.BillRate = value; return this; }
public String getEffectiveFrom() { return EffectiveFrom; }
public ResourceRateResource setEffectiveFrom(String value) { this.EffectiveFrom = value; return this; }
public Boolean isHasCard() { return HasCard; }
public ResourceRateResource setHasCard(Boolean value) { this.HasCard = value; return this; }
public ArrayList<ResourceRateComponentDto> getComposition() { return Composition; }
public ResourceRateResource setComposition(ArrayList<ResourceRateComponentDto> value) { this.Composition = value; return this; }
public BigDecimal getPrevailingFloor() { return PrevailingFloor; }
public ResourceRateResource setPrevailingFloor(BigDecimal value) { this.PrevailingFloor = value; return this; }
public ArrayList<ResourceRateHistoryRow> getHistory() { return History; }
public ResourceRateResource setHistory(ArrayList<ResourceRateHistoryRow> value) { this.History = value; return this; }
}
public static class ResourceRateComponentDto
{
public String Label = null;
public BigDecimal Amount = null;
public String getLabel() { return Label; }
public ResourceRateComponentDto setLabel(String value) { this.Label = value; return this; }
public BigDecimal getAmount() { return Amount; }
public ResourceRateComponentDto setAmount(BigDecimal value) { this.Amount = value; return this; }
}
public static class ResourceRateHistoryRow
{
public String From = null;
public BigDecimal Cost = null;
public BigDecimal Bill = null;
public String getFrom() { return From; }
public ResourceRateHistoryRow setFrom(String value) { this.From = value; return this; }
public BigDecimal getCost() { return Cost; }
public ResourceRateHistoryRow setCost(BigDecimal value) { this.Cost = value; return this; }
public BigDecimal getBill() { return Bill; }
public ResourceRateHistoryRow setBill(BigDecimal value) { this.Bill = value; return this; }
}
}
Java ResourceRatesRequest 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.
GET /v1/rates HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ResourceRatesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AsOf>String</AsOf>
<Resources>
<ResourceRateResource>
<BillRate>0</BillRate>
<Composition>
<ResourceRateComponentDto>
<Amount>0</Amount>
<Label>String</Label>
</ResourceRateComponentDto>
</Composition>
<CostRate>0</CostRate>
<EffectiveFrom>String</EffectiveFrom>
<HasCard>false</HasCard>
<History>
<ResourceRateHistoryRow>
<Bill>0</Bill>
<Cost>0</Cost>
<From>String</From>
</ResourceRateHistoryRow>
</History>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Meta>String</Meta>
<Name>String</Name>
<PrevailingFloor>0</PrevailingFloor>
<Unit>String</Unit>
</ResourceRateResource>
</Resources>
<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>
<Type>String</Type>
</ResourceRatesResponse>