Table of Contents

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

Text string

The text to display on the suggestion chip.

PostbackData string

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.

Latitude string

The latitude of the location to view.

Longitude string

The longitude of the location to view.

PinLabel string

A 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

Uri

Latitude

The latitude of the location to view.

public string Latitude { get; init; }

Property Value

string

Longitude

The longitude of the location to view.

public string Longitude { get; init; }

Property Value

string

PinLabel

A label to display on the location pin.

public string PinLabel { get; init; }

Property Value

string

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

string

Text

The text to display on the suggestion chip.

public override string Text { get; init; }

Property Value

string

Type

The type for the suggestion object.

[JsonIgnore]
public override string Type { get; }

Property Value

string

Methods

GetErrors()

Returns any validation errors for this suggestion.

public override IEnumerable<string> GetErrors()

Returns

IEnumerable<string>

WithFallbackUrl(Uri)

Returns a suggestion with a fallback url.

public ViewLocationSuggestion WithFallbackUrl(Uri url)

Parameters

url Uri

A URL to open if the device is unable to display a map.

Returns

ViewLocationSuggestion

The suggestion.