| GET | /attendance/sessioninfo |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class GetAttendanceSessionInfoRequest : ApiServiceRequest()
{
}
open class ApiServiceRequest : IServiceRequest, IHasApiKey, IHasDeviceInfo
{
/**
* The API Key required for authentication
*/
@ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
var apiKey:String? = null
/**
* Latitude of the user making this request
*/
@ApiMember(DataType="double", Description="Latitude of the user making this request")
var latitude:Double? = null
/**
* Longitude of the user making this request
*/
@ApiMember(DataType="double", Description="Longitude of the user making this request")
var longitude:Double? = null
}
open class GetAttendanceSessionInfoResponse : ApiServiceResponse()
{
var sessionInfo:AttendanceSessionInfo? = null
}
open class ApiServiceResponse : IServiceResponse
{
var description:String? = null
var heading:String? = null
var wasSuccessful:Boolean? = null
var modelState:Object? = null
}
open class AttendanceSessionInfo
{
var attendanceSessionId:Int? = null
var attendanceGoalTime:Double? = null
var attendanceGoalTimeValue:String? = null
var attendanceEvents:ArrayList<AttendanceEventData> = ArrayList<AttendanceEventData>()
var startDate:String? = null
var endDate:String? = null
var isClockedIn:Boolean? = null
var timeElapsed:Double? = null
var latestEventType:AttendanceEventType? = null
var totalBreakTime:Double? = null
var totalLunchTime:Double? = null
var isNew:Boolean? = null
}
open class AttendanceEventData
{
@SerializedName("type") var Type:AttendanceEventType? = null
var time:String? = null
var location:String? = null
}
enum class AttendanceEventType(val value:Int)
{
@SerializedName("0") ClockOut(0),
@SerializedName("1") ClockIn(1),
@SerializedName("2") StartLunch(2),
@SerializedName("3") EndLunch(3),
@SerializedName("4") StartBreak(4),
@SerializedName("5") EndBreak(5),
}
Kotlin GetAttendanceSessionInfoRequest 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.
GET /attendance/sessioninfo HTTP/1.1 Host: cochraneplus-api-dev.happen.zone Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"sessionInfo":{"attendanceSessionId":0,"attendanceGoalTime":0,"attendanceGoalTimeValue":"00:00:00","attendanceEvents":[{}],"startDate":"String","endDate":"String","isClockedIn":false,"timeElapsed":0,"latestEventType":0,"totalBreakTime":0,"totalLunchTime":0,"isNew":false},"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}