FavoriteLocation

data class FavoriteLocation(val id: Long, val locationId: Long, val locationGlobalId: String?, val favoriteType: LocationFavoriteType, val favoriteTypeCode: Int, val isPrimary: Boolean, val notes: String?, val locationName: String?, val addressLine1: String?, val addressLine2: String?, val city: String?, val stateProvince: String?, val postalCode: String?, val phone: String?, val latitude: Double?, val longitude: Double?, val brandName: String?, val pinImageId: Long?, val pinImageUrl: String?, val geofenceRadiusMeters: Double?, val dwellThresholdMinutes: Int?, val supportsGuestPass: Boolean, val legacyClubId: Long?, val createdAt: String?, val modifiedAt: String?, val categoryCode: String? = null)

A location the member has a favorite relationship with, joined with the location's own data - the Locations API's replacement for the legacy VerifiedClubs list (Facility). Returned by Locations.getFavorites and by every favorite mutation.

Favorites mix gyms and retail stores: use isFitness wherever only gyms count. The list also holds excluded and muted locations - favoriteType is LocationFavoriteType.FAVORITE only for an active favorite.

Constructors

Link copied to clipboard
constructor(id: Long, locationId: Long, locationGlobalId: String?, favoriteType: LocationFavoriteType, favoriteTypeCode: Int, isPrimary: Boolean, notes: String?, locationName: String?, addressLine1: String?, addressLine2: String?, city: String?, stateProvince: String?, postalCode: String?, phone: String?, latitude: Double?, longitude: Double?, brandName: String?, pinImageId: Long?, pinImageUrl: String?, geofenceRadiusMeters: Double?, dwellThresholdMinutes: Int?, supportsGuestPass: Boolean, legacyClubId: Long?, createdAt: String?, modifiedAt: String?, categoryCode: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Address line 1.

Link copied to clipboard

Address line 2.

Link copied to clipboard

Brand the location belongs to, or null.

Link copied to clipboard

The location's category code - "FITNESS" for gyms and clubs, "RETAIL" for stores - or null when it has none. A member's favorites mix both; use isFitness where only gyms count.

Link copied to clipboard
val city: String?

City.

Link copied to clipboard

ISO-8601 creation timestamp of the favorite record.

Link copied to clipboard

Minimum dwell in minutes for a visit to count, or null when the location defines none.

Link copied to clipboard

Typed relationship; LocationFavoriteType.UNRECOGNIZED for codes this SDK version does not know.

Link copied to clipboard

The verbatim wire code, kept so no server state is lost when favoriteType is LocationFavoriteType.UNRECOGNIZED.

Link copied to clipboard

Geofence radius in meters, or null when the location defines none.

Link copied to clipboard
val id: Long

Primary key of the favorite record. Informational only - every mutation is addressed by locationId.

Link copied to clipboard

Whether this is a fitness location (a gym or club) - the only kind that earns gym visits, can be monitored for automatic visits and should be offered for self-reports. A location backed by a legacy club counts as fitness even when the server sent no category, because only fitness locations are enrolled as clubs.

Link copied to clipboard

Whether this is the member's primary location.

Link copied to clipboard

Latitude in decimal degrees, or null when unknown.

Link copied to clipboard

Id of the legacy VerifiedClubs record this location maps to, or null when there is none.

Link copied to clipboard

Global id of the location as a GUID string; the server sends the all-zeros GUID when upstream has none.

Link copied to clipboard

Canonical location id - the handle for removeFavorite, muteFavorite and unmuteFavorite.

Link copied to clipboard

Location display name (may be empty, never invented).

Link copied to clipboard

Longitude in decimal degrees, or null when unknown.

Link copied to clipboard

ISO-8601 last-modification timestamp.

Link copied to clipboard

Free-form member note, or null.

Link copied to clipboard

Location phone number.

Link copied to clipboard

Raw id of the map pin image, or null.

Link copied to clipboard

Resolved URL of the map pin image, or null when the location has no pin.

Link copied to clipboard

Postal code.

Link copied to clipboard

Two-letter state code, e.g. "NJ".

Link copied to clipboard

Whether the location supports guest passes.