Parking ticket

State

Status

Declaration

getStatus()

Example

val state:ParkingTicket.State
assertTrue(state.status.value == ParkingTicket.Status.ENDED)
// Parking ticket has ended

Operator name

Declaration

getOperatorName()

Discussion

Operator name

Example

val state:ParkingTicket.State
assertTrue(state.operatorName.value == "Berlin Parking")
// Operator name is 'Berlin Parking'

Operator ticket id

Declaration

getOperatorTicketID()

Discussion

Operator ticket ID

Example

val state:ParkingTicket.State
assertTrue(state.operatorTicketID.value == "6489AB4233")
// Operator ticket ID is '6489AB4233'

Ticket start time

Declaration

getTicketStartTime()

Discussion

Parking ticket start time

Example

val state:ParkingTicket.State
assertTrue(dateIsSame(state.ticketStartTime.value, "2017-01-10T19:34:22.000Z"))
// Parking ticket started at 10 January 2017 at 19:34:22 GMT

Ticket end time

Declaration

getTicketEndTime()

Discussion

Parking ticket end time

Example

val state:ParkingTicket.State
assertTrue(dateIsSame(state.ticketEndTime.value, "2019-10-08T11:21:45.000Z"))
// Parking ticket ended at 8. October 2019 at 11:21:45 GMT

Setters

Start parking

Declaration

public StartParking(@Nullable String operatorName, String operatorTicketID, Calendar ticketStartTime, @Nullable Calendar ticketEndTime)

Example

val startParking = ParkingTicket.StartParking("Berlin Parking", "6489AB4233", getCalendar("2017-01-10T19:34:22.000Z"), getCalendar("2019-10-08T11:21:45.000Z"))    

End parking

Declaration

public EndParking()

Example

val endParking = ParkingTicket.EndParking()    

Getters

Get Parking Ticket property availability information

Declaration

public GetParkingTicketAvailability()
public GetParkingTicketAvailability(byte... propertyIdentifiers)

Example

// get all property availabilities
val getAvailability = GetParkingTicketAvailability()
// get status and operatorName property availabilities
val getAvailabilityProperties = GetParkingTicketAvailability(0x01, 0x02)

Get parking ticket

Declaration

public GetParkingTicket()
public GetParkingTicket(byte... propertyIdentifiers)            

Example

// get all properties
val getState = GetParkingTicket()
// get status and operatorName properties
val getStateProperties = GetParkingTicket(0x01, 0x02)