updateWeightGoalStatus

abstract fun updateWeightGoalStatus(goal: HDWeightGoal, newStatus: GoalStatus? = null, changeStatusDate: Timestamp = currentTimestamp): Completable

Update weight goal status.

Status cannot be updated back to "in progress". If goal has not "in progress" status and new status is "in progress" IllegalArgumentException will be emitted.

changeStatusDate cannot be earlier than HDWeightGoal.startDate. If changeStatusDate is earlier than HDWeightGoal.startDate will be emitted.

Return

Completable that completes when goal is updated

Parameters

goal

updated goal

newStatus

new status. If it is null than goal status will be used

changeStatusDate

UNIX timestamp when goal changed status. Default: currentTimestamp