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.*


open class ResourceRateAppendRequest
{
    open var Uid:UUID? = null
    open var CostRate:BigDecimal? = null
    open var BillRate:BigDecimal? = null
    open var EffectiveFrom:String? = null
}

open class ResourceRateAppendResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var Resource:ResourceRateResource? = null
}

open class ResourceRateResource
{
    open var Id:UUID? = null
    open var Name:String? = null
    open var Meta:String? = null
    open var Unit:String? = null
    open var CostRate:BigDecimal? = null
    open var BillRate:BigDecimal? = null
    open var EffectiveFrom:String? = null
    open var HasCard:Boolean? = null
    open var Composition:ArrayList<ResourceRateComponentDto> = ArrayList<ResourceRateComponentDto>()
    open var PrevailingFloor:BigDecimal? = null
    open var History:ArrayList<ResourceRateHistoryRow> = ArrayList<ResourceRateHistoryRow>()
}

open class ResourceRateComponentDto
{
    open var Label:String? = null
    open var Amount:BigDecimal? = null
}

open class ResourceRateHistoryRow
{
    open var From:String? = null
    open var Cost:BigDecimal? = null
    open var Bill:BigDecimal? = null
}

Kotlin 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
			}
		]
	}
}