From f0f551681c1f5a87c478edbf530af36991ec47f9 Mon Sep 17 00:00:00 2001 From: Rodrigo Parra Date: Sun, 29 Sep 2024 21:44:45 -0400 Subject: [PATCH] Fix conversation status toggle --- woot/actions.py | 7 +++---- woot/schema.py | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/woot/actions.py b/woot/actions.py index 0113ce7..4a22ee8 100644 --- a/woot/actions.py +++ b/woot/actions.py @@ -1,9 +1,7 @@ -""" All actions for resources are defined here. """ +"""All actions for resources are defined here.""" -from typing import Any, Optional, Union, Type from dataclasses import dataclass, field -from typing import Callable - +from typing import Any, Callable, Optional, Type, Union import woot.schema as ws @@ -357,6 +355,7 @@ class ConversationsActions: default_factory=lambda: action_factory( method="POST", url="api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status", + schema_=ws.ConversationStatusToggle, ) ) diff --git a/woot/schema.py b/woot/schema.py index 2ef4fc8..f79e53e 100644 --- a/woot/schema.py +++ b/woot/schema.py @@ -1,4 +1,4 @@ -""" Schema for the action request body. Woot, woot. """ +"""Schema for the action request body. Woot, woot.""" from __future__ import annotations @@ -457,8 +457,7 @@ class Payload: @dataclass class ConversationStatusToggle: - meta: Optional[Dict[str, Any]] = None - payload: Optional[Payload] = None + status: Status @dataclass