| GET,OPTIONS | /v1/rates |
|---|
"use strict";
export class ResourceRateComponentDto {
/** @param {{Label?:string,Amount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Label;
/** @type {number} */
Amount;
}
export class ResourceRateHistoryRow {
/** @param {{From?:string,Cost?:number,Bill?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
From;
/** @type {number} */
Cost;
/** @type {number} */
Bill;
}
export class ResourceRateResource {
/** @param {{Id?:string,Name?:string,Meta?:string,Unit?:string,CostRate?:number,BillRate?:number,EffectiveFrom?:string,HasCard?:boolean,Composition?:ResourceRateComponentDto[],PrevailingFloor?:number,History?:ResourceRateHistoryRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Name;
/** @type {string} */
Meta;
/** @type {string} */
Unit;
/** @type {number} */
CostRate;
/** @type {number} */
BillRate;
/** @type {string} */
EffectiveFrom;
/** @type {boolean} */
HasCard;
/** @type {ResourceRateComponentDto[]} */
Composition = [];
/** @type {?number} */
PrevailingFloor;
/** @type {ResourceRateHistoryRow[]} */
History = [];
}
export class ResourceRatesResponse {
/** @param {{ResponseStatus?:ResponseStatus,Type?:string,AsOf?:string,Resources?:ResourceRateResource[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {string} */
Type;
/** @type {string} */
AsOf;
/** @type {ResourceRateResource[]} */
Resources = [];
}
export class ResourceRatesRequest {
/** @param {{Type?:string,AsOf?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Type;
/** @type {string} */
AsOf;
}
JavaScript ResourceRatesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
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
}
},
Type: String,
AsOf: String,
Resources:
[
{
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
}
]
}
]
}