Skip to content

Update cards.py #260

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

Merged
merged 1 commit into from
Aug 5, 2025
Merged
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
14 changes: 14 additions & 0 deletions src/webexpythonsdk/models/cards/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(
backgroundImage: object = None,
minHeight: str = None,
speak: str = None,
style: OPTIONS.ContainerStyle = None,
lang: str = None,
verticalContentAlignment: OPTIONS.VerticalContentAlignment = None,
):
Expand Down Expand Up @@ -94,6 +95,11 @@ def __init__(
speak (str, Optional): Specifies what should be spoken for this
entire card. This is simple text or SSML fragment. **_Defaults
to None._**
style (ContainerStyle, Optional): Style hint for Container.
**_Defaults to None._**Allowed value(s):
ContainerStyle.DEFAULT, ContainerStyle.EMPHASIS,
ContainerStyle.GOOD, ContainerStyle.ATTENTION,
ContainerStyle.WARNING, or ContainerStyle.ACCENT
lang (str, Optional): The 2-letter ISO-639-1 language used in the
card. Used to localize any date/time functions. **_Defaults to
None._**
Expand Down Expand Up @@ -184,6 +190,12 @@ def __init__(
optional=True,
)

validate_input(
style,
OPTIONS.ContainerStyle,
optional=True,
)

check_type(
lang,
str,
Expand All @@ -210,6 +222,7 @@ def __init__(
self.backgroundImage = backgroundImage
self.minHeight = minHeight
self.speak = speak
self.style = style
self.lang = lang
self.verticalContentAlignment = verticalContentAlignment

Expand All @@ -235,6 +248,7 @@ def __init__(
),
"minHeight",
"speak",
"style",
"lang",
"verticalContentAlignment",
],
Expand Down