We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ff14d0 commit 7dd2b72Copy full SHA for 7dd2b72
oura-library/src/main/kotlin/org/radarbase/oura/user/OuraUser.kt
@@ -18,8 +18,10 @@ data class OuraUser(
18
@JsonProperty("startDate") override val startDate: Instant,
19
@JsonProperty("endDate") override val endDate: Instant,
20
@JsonProperty("version") override val version: String? = null,
21
- @JsonProperty("serviceUserId") override val serviceUserId: String? = null,
+ @JsonProperty("serviceUserId") override val serviceUserId: String,
22
) : User {
23
override val observationKey: ObservationKey = ObservationKey(projectId, userId, sourceId)
24
override val versionedId: String = "$id${version?.let { "#$it" } ?: ""}"
25
+
26
+ fun isComplete() = isAuthorized && startDate.isBefore(endDate)
27
}
0 commit comments