Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conversation status toggle #3

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions woot/actions.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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,
)
)

Expand Down
5 changes: 2 additions & 3 deletions woot/schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Schema for the action request body. Woot, woot. """
"""Schema for the action request body. Woot, woot."""

from __future__ import annotations

Expand Down Expand Up @@ -457,8 +457,7 @@ class Payload:

@dataclass
class ConversationStatusToggle:
meta: Optional[Dict[str, Any]] = None
payload: Optional[Payload] = None
status: Status


@dataclass
Expand Down