dial_sdk.types¶
Attributes¶
Classes¶
One activity-ledger item from GET /api/v1/billing/activity. type selects |
|
One page of activity, newest-first. has_more signals further pages. |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
|
Server-derived, client-facing call status (camelCase, as returned). |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
|
The status the call just entered — mirrors the call record's derived |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
|
Raw bytes to upload as a media attachment; the MIME type is required. |
|
A media attachment on a message, hosted by Dial. |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
|
Module Contents¶
- class dial_sdk.types.Billing¶
-
- balance_cents: int¶
- deposits: list[BillingDeposit]¶
- numbers: list[BillingNumber]¶
- numbers_release_at: str | None¶
- payment_methods: list[BillingPaymentMethod]¶
- pricing: BillingPricing¶
- subscription: BillingSubscription | None¶
- class dial_sdk.types.BillingActivityItem¶
One activity-ledger item from GET /api/v1/billing/activity. type selects which fields are populated: - ‘usage’ → fare_name, number, billed_quantity, total_cents, attribution, phone_number_id, call_id, message_id - ‘credit’ → amount_cents, kind, invoice_id - ‘payment’ → amount_cents, invoice_id, reason
- classmethod from_api(d: dict) BillingActivityItem¶
- amount_cents: int | None = None¶
- attribution: str | None = None¶
- billed_quantity: int | None = None¶
- call_id: str | None = None¶
- fare_name: str | None = None¶
- invoice_id: str | None = None¶
- kind: str | None = None¶
- message_id: str | None = None¶
- number: str | None = None¶
- occurred_at: str¶
- phone_number_id: str | None = None¶
- reason: str | None = None¶
- total_cents: int | None = None¶
- type: str¶
- class dial_sdk.types.BillingActivityPage¶
One page of activity, newest-first. has_more signals further pages.
- classmethod from_api(d: dict) BillingActivityPage¶
- data: list[BillingActivityItem]¶
- has_more: bool¶
- class dial_sdk.types.BillingDeposit¶
- classmethod from_api(d: dict) BillingDeposit¶
- amount_cents: int¶
- created_at: str¶
- invoice_id: str | None = None¶
- kind: str¶
- class dial_sdk.types.BillingNumber¶
- classmethod from_api(d: dict) BillingNumber¶
- id: str¶
- mode: str¶
- nickname: str | None = None¶
- number: str¶
- class dial_sdk.types.BillingPaymentMethod¶
- classmethod from_api(d: dict) BillingPaymentMethod¶
- brand: str¶
- email: str | None¶
- exp_month: int¶
- exp_year: int¶
- id: str¶
- is_default: bool¶
- last4: str¶
- type: str¶
- class dial_sdk.types.BillingPricing¶
- classmethod from_api(d: dict) BillingPricing¶
- annual_cents: int¶
- monthly_cents: int¶
- class dial_sdk.types.BillingSubscription¶
- classmethod from_api(d: dict) BillingSubscription¶
- cancel_at_period_end: bool¶
- interval: str¶
- period_end: str¶
- period_start: str¶
- quantity: int¶
- class dial_sdk.types.Call¶
-
- call_started_at: str | None¶
- cancel_requested_at: str | None¶
- created_at: str¶
- direction: str¶
- duration: int¶
- from_: str¶
- id: str¶
- instruction: str | None¶
- phone_number_id: str¶
- queued_at: str | None¶
- started_ringing_at: str | None¶
- status: CallStatus¶
- terminated_at: str | None¶
- termination_type: str | None¶
- to: str¶
- transcript: str | None¶
- transfer_to: str | None¶
- transferred_at: str | None¶
- class dial_sdk.types.CallEnded¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- createdAt: str¶
- data: CallEndedData¶
- id: str¶
- object: Literal['event']¶
- type: Literal['call.ended']¶
- version: int¶
- class dial_sdk.types.CallEndedData¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- callId: str¶
- canceled: bool¶
- direction: str¶
- durationSeconds: int | None¶
- from_: str¶
- status: str¶
- to: str¶
- transcriptAvailable: bool¶
- class dial_sdk.types.CallStatus¶
Bases:
TypedDictServer-derived, client-facing call status (camelCase, as returned).
Initialize self. See help(type(self)) for accurate signature.
- cancelPending: bool¶
- cancelRequested: bool¶
- label: str¶
- state: str¶
- terminationType: str | None¶
- class dial_sdk.types.CallStatusChanged¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- createdAt: str¶
- data: CallStatusChangedData¶
- id: str¶
- object: Literal['event']¶
- type: Literal['call.status_changed']¶
- version: int¶
- class dial_sdk.types.CallStatusChangedData¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- callId: str¶
- direction: str¶
- from_: str¶
- phoneNumberId: str¶
- previousState: str | None¶
- status: CallStatusChangedStatus¶
- terminationType: str | None¶
- to: str¶
- class dial_sdk.types.CallStatusChangedStatus¶
Bases:
TypedDictThe status the call just entered — mirrors the call record’s derived
status.Initialize self. See help(type(self)) for accurate signature.
- label: str¶
- state: str¶
- class dial_sdk.types.CallTranscribed¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- createdAt: str¶
- data: CallTranscribedData¶
- id: str¶
- object: Literal['event']¶
- type: Literal['call.transcribed']¶
- version: int¶
- class dial_sdk.types.CallTranscribedData¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- callId: str¶
- class dial_sdk.types.DialConfig¶
- api_key: str¶
- base_url: str | None = None¶
- user_agent: str | None = None¶
- class dial_sdk.types.MakeCallParams¶
- from_number: str | None = None¶
- from_number_id: str | None = None¶
- idempotency_key: str | None = None¶
- language: str | None = None¶
- max_call_duration_seconds: int | None = None¶
- outbound_instruction: str = ''¶
- to: str¶
- transfer_to: str | None = None¶
- voice_gender: str | None = None¶
- class dial_sdk.types.MediaItem¶
Raw bytes to upload as a media attachment; the MIME type is required.
- content_type: str¶
- data: bytes¶
- filename: str = 'media'¶
- class dial_sdk.types.Message¶
-
- body: str¶
- channel: str¶
- created_at: str¶
- direction: str¶
- from_: str¶
- id: str¶
- media: list[MessageMediaItem] = []¶
- phone_number_id: str¶
- reaction: str | None = None¶
- reply_to_id: str | None = None¶
- status: str¶
- status_error: str | None = None¶
- to: str¶
- class dial_sdk.types.MessageMediaItem¶
A media attachment on a message, hosted by Dial.
- classmethod from_api(d: dict) MessageMediaItem¶
- content_type: str¶
- id: str¶
- original_url: str | None¶
- url: str¶
- class dial_sdk.types.MessageReceived¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- createdAt: str¶
- data: MessageReceivedData¶
- id: str¶
- object: Literal['event']¶
- type: Literal['message.received']¶
- version: int¶
- class dial_sdk.types.MessageReceivedData¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- body: str¶
- channel: str¶
- from_: str¶
- media: list[MessageReceivedMediaItem]¶
- messageId: str¶
- source: str¶
- to: str¶
- class dial_sdk.types.MessageReceivedMediaItem¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- contentType: str¶
- id: str¶
- originalUrl: str | None¶
- url: str¶
- class dial_sdk.types.PhoneNumber¶
- classmethod from_api(d: dict) PhoneNumber¶
- account_id: str¶
- avatar_url: str | None = None¶
- capabilities: list[str]¶
- country: str¶
- created_at: str¶
- first_name: str | None = None¶
- id: str¶
- inbound_instruction: str | None¶
- inbound_language: str | None¶
- inbound_voice_gender: str | None¶
- last_name: str | None = None¶
- max_call_duration_seconds: int | None¶
- nickname: str | None¶
- number: str¶
- setup_error: str | None¶
- setup_status: str¶
- class dial_sdk.types.PurchaseNumberParams¶
- area_code: str | None = None¶
- explicit_programmatic_consent: str¶
- inbound_instruction: str¶
- inbound_language: str | None = None¶
- inbound_voice_gender: str | None = None¶
- include_imessage: bool = False¶
- class dial_sdk.types.RelatedObject¶
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
Initialize self. See help(type(self)) for accurate signature.
- id: str¶
- type: Literal['call', 'message']¶
- url: str | None¶
- class dial_sdk.types.SendMessageParams¶
- body: str = ''¶
- channel: str | None = None¶
- force_audio_file: bool = False¶
- from_number: str | None = None¶
- from_number_id: str | None = None¶
- media: list[SendMessageMedia] = []¶
- to: str¶
- dial_sdk.types.CallEvent¶
- dial_sdk.types.DialEvent¶
- dial_sdk.types.MessageEvent¶
- dial_sdk.types.SendMessageMedia¶