NotificationContent Class

Details of the message to send.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: AudioNotificationContent, DocumentNotificationContent, ImageNotificationContent, MediaNotificationContent, TemplateNotificationContent, TextNotificationContent, VideoNotificationContent

All required parameters must be populated in order to send to server.

Constructor

NotificationContent(*args: Any, **kwargs: Any)

Variables

Name Description
channel_registration_id
str

The Channel Registration ID for the Business Identifier. Required.

to

The native external platform user identifiers of the recipient. Required.

kind

The type discriminator describing a notification type. Required. Known values are: "text", "image", "image_v0", "document", "video", "audio", and "template".

Methods

as_dict

Return a dict that can be JSONify using json.dump.

clear
copy
get
items
keys
pop
popitem
setdefault
update
values

as_dict

Return a dict that can be JSONify using json.dump.

as_dict(*, exclude_readonly: bool = False) -> Dict[str, Any]

Keyword-Only Parameters

Name Description
exclude_readonly

Whether to remove the readonly properties.

Returns

Type Description

A dict JSON compatible object

clear

clear() -> None

copy

copy() -> Model

get

get(key: str, default: Any = None) -> Any

Parameters

Name Description
key
Required
default
Required
Default value: None

items

items() -> ItemsView[str, Any]

keys

keys() -> KeysView[str]

pop

pop(key: str, default: ~typing.Any = <object object>) -> Any

Parameters

Name Description
key
Required
default
Required

popitem

popitem() -> Tuple[str, Any]

setdefault

setdefault(key: str, default: ~typing.Any = <object object>) -> Any

Parameters

Name Description
key
Required
default
Required

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> ValuesView[Any]

Attributes

channel_registration_id

The Channel Registration ID for the Business Identifier. Required.

channel_registration_id: str

kind

"text", "image", "image_v0", "document", "video", "audio", and "template".

kind: str

to

The native external platform user identifiers of the recipient. Required.

to: List[str]