| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/invoice/workchanges/{ProjectUID}/decide |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class InvoiceWorkChangesDecideRequest
{
public UUID ProjectUID = null;
public Integer InvoiceID = null;
public String Decision = null;
public Boolean Remember = null;
public ArrayList<InvoiceWorkChangeKey> Sources = new ArrayList<InvoiceWorkChangeKey>();
public UUID getProjectUID() { return ProjectUID; }
public InvoiceWorkChangesDecideRequest setProjectUID(UUID value) { this.ProjectUID = value; return this; }
public Integer getInvoiceID() { return InvoiceID; }
public InvoiceWorkChangesDecideRequest setInvoiceID(Integer value) { this.InvoiceID = value; return this; }
public String getDecision() { return Decision; }
public InvoiceWorkChangesDecideRequest setDecision(String value) { this.Decision = value; return this; }
public Boolean isRemember() { return Remember; }
public InvoiceWorkChangesDecideRequest setRemember(Boolean value) { this.Remember = value; return this; }
public ArrayList<InvoiceWorkChangeKey> getSources() { return Sources; }
public InvoiceWorkChangesDecideRequest setSources(ArrayList<InvoiceWorkChangeKey> value) { this.Sources = value; return this; }
}
public static class InvoiceWorkChangeKey
{
public String SourceType = null;
public Integer SourceID = null;
public Integer JobID = null;
public String WorkDay = null;
public String getSourceType() { return SourceType; }
public InvoiceWorkChangeKey setSourceType(String value) { this.SourceType = value; return this; }
public Integer getSourceID() { return SourceID; }
public InvoiceWorkChangeKey setSourceID(Integer value) { this.SourceID = value; return this; }
public Integer getJobID() { return JobID; }
public InvoiceWorkChangeKey setJobID(Integer value) { this.JobID = value; return this; }
public String getWorkDay() { return WorkDay; }
public InvoiceWorkChangeKey setWorkDay(String value) { this.WorkDay = value; return this; }
}
public static class InvoiceWorkChangesResponse
{
public ResponseStatus ResponseStatus = null;
public Boolean Success = null;
public ArrayList<InvoiceWorkChange> Changes = new ArrayList<InvoiceWorkChange>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public InvoiceWorkChangesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public Boolean isSuccess() { return Success; }
public InvoiceWorkChangesResponse setSuccess(Boolean value) { this.Success = value; return this; }
public ArrayList<InvoiceWorkChange> getChanges() { return Changes; }
public InvoiceWorkChangesResponse setChanges(ArrayList<InvoiceWorkChange> value) { this.Changes = value; return this; }
}
public static class InvoiceWorkChange
{
public String SourceType = null;
public Integer SourceID = null;
public Integer JobID = null;
public Date WorkDate = null;
public String WorkDay = null;
public String DisplayDay = null;
public String Label = null;
public String JobName = null;
public Date DisplayDate = null;
public String Unit = null;
public BigDecimal Billed = null;
public BigDecimal NowQuantity = null;
public BigDecimal OverBilled = null;
public BigDecimal UnitFactor = null;
public BigDecimal Price = null;
public BigDecimal Amount = null;
public String LineType = null;
public Boolean IsTaxable = null;
public Integer InvoiceID = null;
public UUID InvoiceUID = null;
public String InvoiceNumber = null;
public BigDecimal InvoiceTotal = null;
public Boolean InvoiceIsLocked = null;
public Boolean InvoiceIsPaid = null;
public String State = null;
public String Remembered = null;
public String DecidedByName = null;
public Date DecidedAt = null;
public String getSourceType() { return SourceType; }
public InvoiceWorkChange setSourceType(String value) { this.SourceType = value; return this; }
public Integer getSourceID() { return SourceID; }
public InvoiceWorkChange setSourceID(Integer value) { this.SourceID = value; return this; }
public Integer getJobID() { return JobID; }
public InvoiceWorkChange setJobID(Integer value) { this.JobID = value; return this; }
public Date getWorkDate() { return WorkDate; }
public InvoiceWorkChange setWorkDate(Date value) { this.WorkDate = value; return this; }
public String getWorkDay() { return WorkDay; }
public InvoiceWorkChange setWorkDay(String value) { this.WorkDay = value; return this; }
public String getDisplayDay() { return DisplayDay; }
public InvoiceWorkChange setDisplayDay(String value) { this.DisplayDay = value; return this; }
public String getLabel() { return Label; }
public InvoiceWorkChange setLabel(String value) { this.Label = value; return this; }
public String getJobName() { return JobName; }
public InvoiceWorkChange setJobName(String value) { this.JobName = value; return this; }
public Date getDisplayDate() { return DisplayDate; }
public InvoiceWorkChange setDisplayDate(Date value) { this.DisplayDate = value; return this; }
public String getUnit() { return Unit; }
public InvoiceWorkChange setUnit(String value) { this.Unit = value; return this; }
public BigDecimal getBilled() { return Billed; }
public InvoiceWorkChange setBilled(BigDecimal value) { this.Billed = value; return this; }
public BigDecimal getNowQuantity() { return NowQuantity; }
public InvoiceWorkChange setNowQuantity(BigDecimal value) { this.NowQuantity = value; return this; }
public BigDecimal getOverBilled() { return OverBilled; }
public InvoiceWorkChange setOverBilled(BigDecimal value) { this.OverBilled = value; return this; }
public BigDecimal getUnitFactor() { return UnitFactor; }
public InvoiceWorkChange setUnitFactor(BigDecimal value) { this.UnitFactor = value; return this; }
public BigDecimal getPrice() { return Price; }
public InvoiceWorkChange setPrice(BigDecimal value) { this.Price = value; return this; }
public BigDecimal getAmount() { return Amount; }
public InvoiceWorkChange setAmount(BigDecimal value) { this.Amount = value; return this; }
public String getLineType() { return LineType; }
public InvoiceWorkChange setLineType(String value) { this.LineType = value; return this; }
public Boolean getIsTaxable() { return IsTaxable; }
public InvoiceWorkChange setIsTaxable(Boolean value) { this.IsTaxable = value; return this; }
public Integer getInvoiceID() { return InvoiceID; }
public InvoiceWorkChange setInvoiceID(Integer value) { this.InvoiceID = value; return this; }
public UUID getInvoiceUID() { return InvoiceUID; }
public InvoiceWorkChange setInvoiceUID(UUID value) { this.InvoiceUID = value; return this; }
public String getInvoiceNumber() { return InvoiceNumber; }
public InvoiceWorkChange setInvoiceNumber(String value) { this.InvoiceNumber = value; return this; }
public BigDecimal getInvoiceTotal() { return InvoiceTotal; }
public InvoiceWorkChange setInvoiceTotal(BigDecimal value) { this.InvoiceTotal = value; return this; }
public Boolean isInvoiceIsLocked() { return InvoiceIsLocked; }
public InvoiceWorkChange setInvoiceIsLocked(Boolean value) { this.InvoiceIsLocked = value; return this; }
public Boolean isInvoiceIsPaid() { return InvoiceIsPaid; }
public InvoiceWorkChange setInvoiceIsPaid(Boolean value) { this.InvoiceIsPaid = value; return this; }
public String getState() { return State; }
public InvoiceWorkChange setState(String value) { this.State = value; return this; }
public String getRemembered() { return Remembered; }
public InvoiceWorkChange setRemembered(String value) { this.Remembered = value; return this; }
public String getDecidedByName() { return DecidedByName; }
public InvoiceWorkChange setDecidedByName(String value) { this.DecidedByName = value; return this; }
public Date getDecidedAt() { return DecidedAt; }
public InvoiceWorkChange setDecidedAt(Date value) { this.DecidedAt = value; return this; }
}
}
Java 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
}
]
}