Class ViewLocationSuggestion
- Namespace
- Vonage.Messages.Rcs.Suggestions
- Assembly
- Vonage.dll
A view location suggestion.
public record ViewLocationSuggestion : SuggestionBase, IEquatable<SuggestionBase>, IEquatable<ViewLocationSuggestion>
- Inheritance
-
ViewLocationSuggestion
- Implements
- Inherited Members
Constructors
ViewLocationSuggestion(string, string, string, string, string)
A view location suggestion.
public ViewLocationSuggestion(string Text, string PostbackData, string Latitude, string Longitude, string PinLabel)
Parameters
TextstringThe text to display on the suggestion chip.
PostbackDatastringThe data that will be sent back in the button.payload property of a button message via the inbound message webhook when the user taps the suggestion chip.
LatitudestringThe latitude of the location to view.
LongitudestringThe longitude of the location to view.
PinLabelstringA label to display on the location pin.
Properties
FallbackUrl
A URL to open if the device is unable to display a map.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Uri FallbackUrl { get; init; }
Property Value
Latitude
The latitude of the location to view.
public string Latitude { get; init; }
Property Value
Longitude
The longitude of the location to view.
public string Longitude { get; init; }
Property Value
PinLabel
A label to display on the location pin.
public string PinLabel { get; init; }
Property Value
PostbackData
The data that will be sent back in the button.payload property of a button message via the inbound message webhook when the user taps the suggestion chip.
public override string PostbackData { get; init; }
Property Value
Text
The text to display on the suggestion chip.
public override string Text { get; init; }
Property Value
Type
The type for the suggestion object.
[JsonIgnore]
public override string Type { get; }
Property Value
Methods
GetErrors()
Returns any validation errors for this suggestion.
public override IEnumerable<string> GetErrors()
Returns
WithFallbackUrl(Uri)
Returns a suggestion with a fallback url.
public ViewLocationSuggestion WithFallbackUrl(Uri url)
Parameters
urlUriA URL to open if the device is unable to display a map.
Returns
- ViewLocationSuggestion
The suggestion.