| POST | /v1/coverage/restriction |
|---|
"use strict";
export class ClientWorkerRestriction {
/** @param {{ClientWorkerRestrictionID?:number,BranchId?:string,ClientContactID?:number,WorkerContactID?:number,RestrictionLevel?:string,Reason?:string,SourceRatingID?:number,CreatedBy?:string,CreatedAt?:string,UpdatedAt?:string,ClientName?:string,WorkerName?:string,LevelLabel?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ClientWorkerRestrictionID;
/** @type {?string} */
BranchId;
/** @type {number} */
ClientContactID;
/** @type {number} */
WorkerContactID;
/** @type {string} */
RestrictionLevel;
/** @type {string} */
Reason;
/** @type {?number} */
SourceRatingID;
/** @type {string} */
CreatedBy;
/** @type {string} */
CreatedAt;
/** @type {?string} */
UpdatedAt;
/** @type {string} */
ClientName;
/** @type {string} */
WorkerName;
/** @type {string} */
LevelLabel;
}
export class RestrictionParty {
/** @param {{ContactId?:number,Name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ContactId;
/** @type {string} */
Name;
}
export class ClientWorkerRestrictionsResponse {
/** @param {{Restrictions?:ClientWorkerRestriction[],Clients?:RestrictionParty[],Workers?:RestrictionParty[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ClientWorkerRestriction[]} */
Restrictions = [];
/** @type {RestrictionParty[]} */
Clients = [];
/** @type {RestrictionParty[]} */
Workers = [];
/** @type {ResponseStatus} */
ResponseStatus;
}
export class ClientWorkerRestrictionSetRequest {
/** @param {{BranchId?:string,ClientContactID?:number,WorkerContactID?:number,RestrictionLevel?:string,Reason?:string,SourceRatingID?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
BranchId;
/** @type {number} */
ClientContactID;
/** @type {number} */
WorkerContactID;
/** @type {string} */
RestrictionLevel;
/** @type {string} */
Reason;
/** @type {?number} */
SourceRatingID;
}
JavaScript ClientWorkerRestrictionSetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/coverage/restriction HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"BranchId":"00000000000000000000000000000000","ClientContactID":0,"WorkerContactID":0,"RestrictionLevel":"String","Reason":"String","SourceRatingID":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Restrictions":[{"ClientWorkerRestrictionID":0,"BranchId":"00000000000000000000000000000000","ClientContactID":0,"WorkerContactID":0,"RestrictionLevel":"String","Reason":"String","SourceRatingID":0,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ClientName":"String","WorkerName":"String","LevelLabel":"String"}],"Clients":[{"ContactId":0,"Name":"String"}],"Workers":[{"ContactId":0,"Name":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}