| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/invoice/workchanges/{ProjectUID}/decide |
|---|
"use strict";
export class InvoiceWorkChange {
/** @param {{SourceType?:string,SourceID?:number,JobID?:number,WorkDate?:string,WorkDay?:string,DisplayDay?:string,Label?:string,JobName?:string,DisplayDate?:string,Unit?:string,Billed?:number,NowQuantity?:number,OverBilled?:number,UnitFactor?:number,Price?:number,Amount?:number,LineType?:string,IsTaxable?:boolean,InvoiceID?:number,InvoiceUID?:string,InvoiceNumber?:string,InvoiceTotal?:number,InvoiceIsLocked?:boolean,InvoiceIsPaid?:boolean,State?:string,Remembered?:string,DecidedByName?:string,DecidedAt?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
SourceType;
/** @type {number} */
SourceID;
/** @type {?number} */
JobID;
/** @type {?string} */
WorkDate;
/** @type {string} */
WorkDay;
/** @type {string} */
DisplayDay;
/** @type {string} */
Label;
/** @type {string} */
JobName;
/** @type {?string} */
DisplayDate;
/** @type {string} */
Unit;
/** @type {number} */
Billed;
/** @type {number} */
NowQuantity;
/** @type {number} */
OverBilled;
/** @type {number} */
UnitFactor;
/** @type {number} */
Price;
/** @type {number} */
Amount;
/** @type {string} */
LineType;
/** @type {boolean} */
IsTaxable;
/** @type {number} */
InvoiceID;
/** @type {string} */
InvoiceUID;
/** @type {string} */
InvoiceNumber;
/** @type {number} */
InvoiceTotal;
/** @type {boolean} */
InvoiceIsLocked;
/** @type {boolean} */
InvoiceIsPaid;
/** @type {string} */
State;
/** @type {string} */
Remembered;
/** @type {string} */
DecidedByName;
/** @type {?string} */
DecidedAt;
}
export class InvoiceWorkChangesResponse {
/** @param {{ResponseStatus?:ResponseStatus,Success?:boolean,Changes?:InvoiceWorkChange[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {boolean} */
Success;
/** @type {InvoiceWorkChange[]} */
Changes = [];
}
export class InvoiceWorkChangeKey {
/** @param {{SourceType?:string,SourceID?:number,JobID?:number,WorkDay?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
SourceType;
/** @type {number} */
SourceID;
/** @type {?number} */
JobID;
/** @type {string} */
WorkDay;
}
export class InvoiceWorkChangesDecideRequest {
/** @param {{ProjectUID?:string,InvoiceID?:number,Decision?:string,Remember?:boolean,Sources?:InvoiceWorkChangeKey[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ProjectUID;
/** @type {number} */
InvoiceID;
/** @type {string} */
Decision;
/** @type {boolean} */
Remember;
/** @type {InvoiceWorkChangeKey[]} */
Sources = [];
}
JavaScript InvoiceWorkChangesDecideRequest 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.
POST /v1/invoice/workchanges/{ProjectUID}/decide HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectUID: 00000000000000000000000000000000,
InvoiceID: 0,
Decision: String,
Remember: False,
Sources:
[
{
SourceType: String,
SourceID: 0,
JobID: 0,
WorkDay: 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
}
},
Success: False,
Changes:
[
{
SourceType: String,
SourceID: 0,
JobID: 0,
WorkDate: 0001-01-01,
WorkDay: String,
DisplayDay: String,
Label: String,
JobName: String,
DisplayDate: 0001-01-01,
Unit: String,
Billed: 0,
NowQuantity: 0,
OverBilled: 0,
UnitFactor: 0,
Price: 0,
Amount: 0,
LineType: String,
IsTaxable: False,
InvoiceID: 0,
InvoiceUID: 00000000000000000000000000000000,
InvoiceNumber: String,
InvoiceTotal: 0,
InvoiceIsLocked: False,
InvoiceIsPaid: False,
State: String,
Remembered: String,
DecidedByName: String,
DecidedAt: 0001-01-01
}
]
}