diff --git a/webexteamssdk/models/cards/actions.py b/webexteamssdk/models/cards/actions.py index 88867cf..2ad33d6 100644 --- a/webexteamssdk/models/cards/actions.py +++ b/webexteamssdk/models/cards/actions.py @@ -49,8 +49,8 @@ def __init__(self, data=None, title=None, iconURL=None): self.iconURL = iconURL super().__init__( - serializable_properties=['data'], - simple_properties=['title', 'iconURL', 'type'], + serializable_properties=[], + simple_properties=['data', 'title', 'iconURL', 'type'], ) diff --git a/webexteamssdk/models/cards/adaptive_card_component.py b/webexteamssdk/models/cards/adaptive_card_component.py index d48b68c..3ef9e98 100644 --- a/webexteamssdk/models/cards/adaptive_card_component.py +++ b/webexteamssdk/models/cards/adaptive_card_component.py @@ -23,7 +23,7 @@ """ import json - +import enum class AdaptiveCardComponent: """Base class for all Adaptive Card components. @@ -63,7 +63,10 @@ def to_dict(self): property_value = getattr(self, property_name, None) if property_value is not None: - serialized_data[property_name] = str(property_value) + if isinstance(property_value, enum.Enum): + property_value = str(property_value) + + serialized_data[property_name] = property_value # Recursively serialize sub-components for property_name in self.serializable_properties: