|
| 1 | +from typing import Optional |
| 2 | + |
| 3 | +from pydantic import BaseModel, Field |
| 4 | + |
| 5 | + |
| 6 | +class AnswerWebhook(BaseModel): |
| 7 | + """Model for the Voice API Answer webhook payload. |
| 8 | +
|
| 9 | + Args: |
| 10 | + to (str, Optional): The number or endpoint that answered the call. |
| 11 | + from_ (str, Optional): The number or endpoint that initiated the call. |
| 12 | + from_user (str, Optional): The Client SDK user that initiated the call. |
| 13 | + endpoint_type (str, Optional): The type of endpoint that answered the call. |
| 14 | + uuid (str, Optional): The unique identifier for this call. |
| 15 | + conversation_uuid (str, Optional): The unique identifier for this conversation. |
| 16 | + region_url (str, Optional): Regional API endpoint to control the call. |
| 17 | + custom_data (dict, Optional): Custom data object passed from the Client SDK. |
| 18 | + sipheader_user_to_user (str, Optional): Content of the SIP User-to-User header, |
| 19 | + received as the `SipHeader_User-to-User` parameter on the webhook. |
| 20 | + """ |
| 21 | + |
| 22 | + to: Optional[str] = None |
| 23 | + from_: Optional[str] = Field(None, alias='from') |
| 24 | + from_user: Optional[str] = None |
| 25 | + endpoint_type: Optional[str] = None |
| 26 | + uuid: Optional[str] = None |
| 27 | + conversation_uuid: Optional[str] = None |
| 28 | + region_url: Optional[str] = None |
| 29 | + custom_data: Optional[dict] = None |
| 30 | + sipheader_user_to_user: Optional[str] = Field( |
| 31 | + None, serialization_alias='SipHeader_User-to-User' |
| 32 | + ) |
| 33 | + |
0 commit comments