LocationCategory

data class LocationCategory(val id: Int, val code: String?, val name: String?, val description: String?, val icon: String?, val color: String?, val parentCategoryId: Int?, val isActive: Boolean, val locationCount: Int)

A category a nomination can be filed under - for example fitness (gyms and clubs) or retail (stores). Returned by Locations.getLocationCategories.

The catalog is runtime data, so read it instead of hard-coding ids; match on code when an app needs one category (a gym-only app can preset FavoriteLocation.FITNESS_CATEGORY and skip the picker).

Constructors

Link copied to clipboard
constructor(id: Int, code: String?, name: String?, description: String?, icon: String?, color: String?, parentCategoryId: Int?, isActive: Boolean, locationCount: Int)

Properties

Link copied to clipboard
val code: String?

Stable category code, such as "FITNESS" or "RETAIL"; compare it ignoring case.

Link copied to clipboard

Optional display color.

Link copied to clipboard

Optional description.

Link copied to clipboard
val icon: String?

Optional icon reference.

Link copied to clipboard
val id: Int

Server id of the category - the value for LocationNomination.locationCategoryId and for getLocationTypes(categoryId = ...).

Link copied to clipboard

Whether the category is currently active.

Link copied to clipboard

Number of locations in the category. The server omits the key when the count is 0, so 0 here means "zero or not reported".

Link copied to clipboard
val name: String?

Display name.

Link copied to clipboard

Parent category id, or null for roots.