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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Uid: 00000000000000000000000000000000,
	CostRate: 0,
	BillRate: 0,
	EffectiveFrom: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Resource: 
	{
		Id: 00000000000000000000000000000000,
		Name: String,
		Meta: String,
		Unit: String,
		CostRate: 0,
		BillRate: 0,
		EffectiveFrom: String,
		HasCard: False,
		Composition: 
		[
			{
				Label: String,
				Amount: 0
			}
		],
		PrevailingFloor: 0,
		History: 
		[
			{
				From: String,
				Cost: 0,
				Bill: 0
			}
		]
	}
}