Skip to content

Commit

Permalink
Merge pull request #3 from rparrapy/fix-conversation-status-toggle
Browse files Browse the repository at this point in the history
Fix conversation status toggle
  • Loading branch information
dearkafka authored Sep 30, 2024
2 parents 3be2156 + f0f5516 commit b167bac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit b167bac

Please sign in to comment.