Table of Contents

Class SuggestionBase

Namespace
Vonage.Messages.Rcs.Suggestions
Assembly
Vonage.dll

Base class for all RCS suggestion types. Suggestions are interactive elements that appear as chips below messages.

[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
[JsonDerivedType(typeof(DialSuggestion), "dial")]
[JsonDerivedType(typeof(ReplySuggestion), "reply")]
[JsonDerivedType(typeof(ViewLocationSuggestion), "view_location")]
[JsonDerivedType(typeof(ShareLocationSuggestion), "share_location")]
[JsonDerivedType(typeof(OpenUrlSuggestion), "open_url")]
[JsonDerivedType(typeof(OpenWebviewUrlSuggestion), "open_url_in_webview")]
[JsonDerivedType(typeof(CreateCalendarEventSuggestion), "create_calendar_event")]
public abstract record SuggestionBase : IEquatable<SuggestionBase>
Inheritance
SuggestionBase
Implements
Derived
Inherited Members

Properties

PostbackData

The data returned when the user taps the suggestion chip.

public abstract string PostbackData { get; init; }

Property Value

string

Text

The text to display on the suggestion chip.

public abstract string Text { get; init; }

Property Value

string

Type

The type for the suggestion object.

public abstract string Type { get; }

Property Value

string

Methods

GetErrors()

Returns any validation errors for this suggestion.

public virtual IEnumerable<string> GetErrors()

Returns

IEnumerable<string>