Trendsic Platform Service

<back to all web services

TimetrackerHistoryRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/TimeTracker/History/{AgentId}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class TimetrackerHistoryRequest
    {
        public Integer AgentId = null;
        public Date MinDate = null;
        public Date MaxDate = null;
        
        public Integer getAgentId() { return AgentId; }
        public TimetrackerHistoryRequest setAgentId(Integer value) { this.AgentId = value; return this; }
        public Date getMinDate() { return MinDate; }
        public TimetrackerHistoryRequest setMinDate(Date value) { this.MinDate = value; return this; }
        public Date getMaxDate() { return MaxDate; }
        public TimetrackerHistoryRequest setMaxDate(Date value) { this.MaxDate = value; return this; }
    }

    public static class TimetrackerHistoryResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<TimeCard> TimeTrackerHistory = new ArrayList<TimeCard>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public TimetrackerHistoryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<TimeCard> getTimeTrackerHistory() { return TimeTrackerHistory; }
        public TimetrackerHistoryResponse setTimeTrackerHistory(ArrayList<TimeCard> value) { this.TimeTrackerHistory = value; return this; }
    }

    public static class TimeCard
    {
        public Integer AgentId = null;
        public Integer CheckInId = null;
        public Date DateLogged = null;
        public TimeSpan TimeIn = null;
        public Date TimeInDate = null;
        public TimeSpan TimeOut = null;
        public Date TimeOutDate = null;
        public BigDecimal TimeLogged = null;
        public Integer PaymentType = null;
        public Integer ServiceCodeId = null;
        public String ServiceCode = null;
        public BigDecimal ServiceRate = null;
        public String ServiceDescription = null;
        public String WorkDescription = null;
        public TimeSpan AdjustedTimeIn = null;
        public Date AdjustedTimeInDate = null;
        public TimeSpan AdjustedTimeOut = null;
        public Date AdjustedTimeOutDate = null;
        public Boolean IsValid = null;
        public Boolean Adjusted = null;
        public Integer ProjectID = null;
        public String ProjectName = null;
        public Integer ClientID = null;
        public String ClientName = null;
        public Integer CategoryID = null;
        public String CategoryName = null;
        public Integer JobID = null;
        public String JobName = null;
        
        public Integer getAgentId() { return AgentId; }
        public TimeCard setAgentId(Integer value) { this.AgentId = value; return this; }
        public Integer getCheckInId() { return CheckInId; }
        public TimeCard setCheckInId(Integer value) { this.CheckInId = value; return this; }
        public Date getDateLogged() { return DateLogged; }
        public TimeCard setDateLogged(Date value) { this.DateLogged = value; return this; }
        public TimeSpan getTimeIn() { return TimeIn; }
        public TimeCard setTimeIn(TimeSpan value) { this.TimeIn = value; return this; }
        public Date getTimeInDate() { return TimeInDate; }
        public TimeCard setTimeInDate(Date value) { this.TimeInDate = value; return this; }
        public TimeSpan getTimeOut() { return TimeOut; }
        public TimeCard setTimeOut(TimeSpan value) { this.TimeOut = value; return this; }
        public Date getTimeOutDate() { return TimeOutDate; }
        public TimeCard setTimeOutDate(Date value) { this.TimeOutDate = value; return this; }
        public BigDecimal getTimeLogged() { return TimeLogged; }
        public TimeCard setTimeLogged(BigDecimal value) { this.TimeLogged = value; return this; }
        public Integer getPaymentType() { return PaymentType; }
        public TimeCard setPaymentType(Integer value) { this.PaymentType = value; return this; }
        public Integer getServiceCodeId() { return ServiceCodeId; }
        public TimeCard setServiceCodeId(Integer value) { this.ServiceCodeId = value; return this; }
        public String getServiceCode() { return ServiceCode; }
        public TimeCard setServiceCode(String value) { this.ServiceCode = value; return this; }
        public BigDecimal getServiceRate() { return ServiceRate; }
        public TimeCard setServiceRate(BigDecimal value) { this.ServiceRate = value; return this; }
        public String getServiceDescription() { return ServiceDescription; }
        public TimeCard setServiceDescription(String value) { this.ServiceDescription = value; return this; }
        public String getWorkDescription() { return WorkDescription; }
        public TimeCard setWorkDescription(String value) { this.WorkDescription = value; return this; }
        public TimeSpan getAdjustedTimeIn() { return AdjustedTimeIn; }
        public TimeCard setAdjustedTimeIn(TimeSpan value) { this.AdjustedTimeIn = value; return this; }
        public Date getAdjustedTimeInDate() { return AdjustedTimeInDate; }
        public TimeCard setAdjustedTimeInDate(Date value) { this.AdjustedTimeInDate = value; return this; }
        public TimeSpan getAdjustedTimeOut() { return AdjustedTimeOut; }
        public TimeCard setAdjustedTimeOut(TimeSpan value) { this.AdjustedTimeOut = value; return this; }
        public Date getAdjustedTimeOutDate() { return AdjustedTimeOutDate; }
        public TimeCard setAdjustedTimeOutDate(Date value) { this.AdjustedTimeOutDate = value; return this; }
        public Boolean getIsValid() { return IsValid; }
        public TimeCard setIsValid(Boolean value) { this.IsValid = value; return this; }
        public Boolean isAdjusted() { return Adjusted; }
        public TimeCard setAdjusted(Boolean value) { this.Adjusted = value; return this; }
        public Integer getProjectID() { return ProjectID; }
        public TimeCard setProjectID(Integer value) { this.ProjectID = value; return this; }
        public String getProjectName() { return ProjectName; }
        public TimeCard setProjectName(String value) { this.ProjectName = value; return this; }
        public Integer getClientID() { return ClientID; }
        public TimeCard setClientID(Integer value) { this.ClientID = value; return this; }
        public String getClientName() { return ClientName; }
        public TimeCard setClientName(String value) { this.ClientName = value; return this; }
        public Integer getCategoryID() { return CategoryID; }
        public TimeCard setCategoryID(Integer value) { this.CategoryID = value; return this; }
        public String getCategoryName() { return CategoryName; }
        public TimeCard setCategoryName(String value) { this.CategoryName = value; return this; }
        public Integer getJobID() { return JobID; }
        public TimeCard setJobID(Integer value) { this.JobID = value; return this; }
        public String getJobName() { return JobName; }
        public TimeCard setJobName(String value) { this.JobName = value; return this; }
    }

}

Java TimetrackerHistoryRequest 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/TimeTracker/History/{AgentId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	AgentId: 0,
	MinDate: 0001-01-01,
	MaxDate: 0001-01-01
}
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
		}
	},
	TimeTrackerHistory: 
	[
		{
			AgentId: 0,
			CheckInId: 0,
			DateLogged: 0001-01-01,
			TimeIn: PT0S,
			TimeInDate: 0001-01-01T00:00:00.0000000+00:00,
			TimeOut: PT0S,
			TimeOutDate: 0001-01-01T00:00:00.0000000+00:00,
			TimeLogged: 0,
			PaymentType: 0,
			ServiceCodeId: 0,
			ServiceCode: String,
			ServiceRate: 0,
			ServiceDescription: String,
			WorkDescription: String,
			AdjustedTimeIn: PT0S,
			AdjustedTimeInDate: 0001-01-01T00:00:00.0000000+00:00,
			AdjustedTimeOut: PT0S,
			AdjustedTimeOutDate: 0001-01-01T00:00:00.0000000+00:00,
			IsValid: False,
			Adjusted: False,
			ProjectID: 0,
			ProjectName: String,
			ClientID: 0,
			ClientName: String,
			CategoryID: 0,
			CategoryName: String,
			JobID: 0,
			JobName: String
		}
	]
}