UserSnoozePeriodSetRequest constructor
UserSnoozePeriodSetRequest({})
Implementation
UserSnoozePeriodSetRequest({
required bool enable,
DateTime? startDate,
DateTime? endDate,
String? userId,
}) : super(userId: userId) {
url = 'users/${userId ?? state.userId}/push_preference';
body = {
'snooze_enabled': enable,
if (startDate != null)
'snooze_start_ts': startDate.millisecondsSinceEpoch,
if (endDate != null) 'snooze_end_ts': endDate.millisecondsSinceEpoch
};
}