update method
Moves an item to state, one of InboxItemState. A snoozed item
resurfaces at snoozedUntil.
Implementation
Future<InboxItem> update(
String id, {
required String state,
DateTime? snoozedUntil,
}) async {
final body = pruned({
'state': state,
'snoozedUntil': snoozedUntil?.toUtc().toIso8601String(),
});
return InboxItem.fromJson(
await _http.object('PATCH', '/inbox/${segment(id)}', body: body));
}