Trendsic Platform Service

<back to all web services

ResourceRateAppendRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/rates/{Uid}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ResourceRateAppendRequest
    {
        public UUID Uid = null;
        public BigDecimal CostRate = null;
        public BigDecimal BillRate = null;
        public String EffectiveFrom = null;
        
        public UUID getUid() { return Uid; }
        public ResourceRateAppendRequest setUid(UUID value) { this.Uid = value; return this; }
        public BigDecimal getCostRate() { return CostRate; }
        public ResourceRateAppendRequest setCostRate(BigDecimal value) { this.CostRate = value; return this; }
        public BigDecimal getBillRate() { return BillRate; }
        public ResourceRateAppendRequest setBillRate(BigDecimal value) { this.BillRate = value; return this; }
        public String getEffectiveFrom() { return EffectiveFrom; }
        public ResourceRateAppendRequest setEffectiveFrom(String value) { this.EffectiveFrom = value; return this; }
    }

    public static class ResourceRateAppendResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ResourceRateResource Resource = null;
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ResourceRateAppendResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ResourceRateResource getResource() { return Resource; }
        public ResourceRateAppendResponse setResource(ResourceRateResource value) { this.Resource = 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 ResourceRateAppendRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/rates/{Uid} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ResourceRateAppendRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <BillRate>0</BillRate>
  <CostRate>0</CostRate>
  <EffectiveFrom>String</EffectiveFrom>
  <Uid>00000000-0000-0000-0000-000000000000</Uid>
</ResourceRateAppendRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResourceRateAppendResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Resource>
    <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>
  </Resource>
  <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>
</ResourceRateAppendResponse>