ZoneInfo

class ZoneInfo(    val zoneId: String?,     val zoneName: String?,     val isCheckOut: Boolean?,     val destination: Destination? = null,     fences: HashSet<FenceInfo> = HashSet(),     enabled: Boolean = true,     customData: Map<String, String>? = null,     val description: String? = null) : Parcelable

ZoneInfo stores zone details for every zone downloaded by SDK from Rule Download.

All the details are set by user in Canvas while creating a zone

Example:

  ZoneInfo{
zoneId='23d2f4be-0228-4c89-93ce-4e30719eb8ac',
zoneName='TestSales123',
description='null',
destination='{
"name":"TestSales123",
"address":"1 ulip Pl, Point Cook VIC 3030, Australia",
"destinationId":"eta123",
"location":{ "latitude":-37.887793704819,
"longitude":144.72884061177632
}
}',
customData='{
Zone_key=Maccas Point Cook,
placekey=zzy-226@63t-sg2-wzf,
centroid=39.918723,-79.693573,
brand=Save-A-Lot,
includes_parking=FALSE
}',
fences=[
FenceInfo{
geometry=Circle{radius=70.05617546362394, center=-37.88779370424774,144.72884061177632},
id='aca84e47-b17a-4c64-a261-ff09cb963b69',
name='Fence 0',
description='',
applicationId='<PROJECT-ID>'
}
],
enabled=true,
checkout=false'
}

Constructors

Link copied to clipboard
fun ZoneInfo(    zoneId: String?,     zoneName: String?,     isCheckOut: Boolean?,     destination: Destination? = null,     fences: HashSet<FenceInfo> = HashSet(),     enabled: Boolean = true,     customData: Map<String, String>? = null,     description: String? = null)

Properties

Link copied to clipboard
val description: String? = null
Link copied to clipboard
val destination: Destination? = null

Store details associated with the zone created in canvas

Link copied to clipboard
val isCheckOut: Boolean?

Is set to true if zone is Exit enabled in canvas

Link copied to clipboard
val zoneId: String?

Unique Id assigned to zone while creation in canvas

Link copied to clipboard
val zoneName: String?

Name set by user while creating the zone in canvas

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getCustomData(): Map<String, String>?

To get Zone Custom Data assigned to the zone while creating it in canvas Zone Custom Data is a key-value pair based Map

Link copied to clipboard
fun getFences(): Set<FenceInfo>

Method to retrieve a set of Fences created for the zone as FenceInfo

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isZoneEnabled(): Boolean

To get the zone status, by default all the zones are enabled.

Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)