Table of Contents

Class TemplateFragment

Namespace
Vonage.VerifyV2
Assembly
Vonage.dll

Represents a template fragment containing the message text for a specific channel and locale. Fragments define the actual content sent to users during verification.

public record TemplateFragment : IEquatable<TemplateFragment>
Inheritance
TemplateFragment
Implements
Inherited Members

Constructors

TemplateFragment(Guid, VerificationChannel, Locale, string, DateTimeOffset, DateTimeOffset)

Represents a template fragment containing the message text for a specific channel and locale. Fragments define the actual content sent to users during verification.

public TemplateFragment(Guid TemplateFragmentId, VerificationChannel Channel, Locale Locale, string Text, DateTimeOffset CreatedOn, DateTimeOffset UpdatedOn)

Parameters

TemplateFragmentId Guid

The unique identifier (UUID) of the template fragment.

Channel VerificationChannel

The verification channel this fragment applies to (SMS or Voice).

Locale Locale

The IETF BCP 47 locale code this fragment applies to (e.g., "en-us").

Text string

The message text with optional placeholders: ${code}, ${brand}, ${time-limit}, and ${time-limit-unit}.

CreatedOn DateTimeOffset

The timestamp when this fragment was created.

UpdatedOn DateTimeOffset

The timestamp when this fragment was last modified.

Properties

Channel

The verification channel this fragment applies to (SMS or Voice).

[JsonPropertyName("channel")]
[JsonConverter(typeof(EnumDescriptionJsonConverter<VerificationChannel>))]
public VerificationChannel Channel { get; init; }

Property Value

VerificationChannel

CreatedOn

The timestamp when this fragment was created.

[JsonPropertyName("date_created")]
public DateTimeOffset CreatedOn { get; init; }

Property Value

DateTimeOffset

Locale

The IETF BCP 47 locale code this fragment applies to (e.g., "en-us").

[JsonPropertyName("locale")]
public Locale Locale { get; init; }

Property Value

Locale

TemplateFragmentId

The unique identifier (UUID) of the template fragment.

[JsonPropertyName("template_fragment_id")]
public Guid TemplateFragmentId { get; init; }

Property Value

Guid

Text

The message text with optional placeholders: ${code}, ${brand}, ${time-limit}, and ${time-limit-unit}.

[JsonPropertyName("text")]
public string Text { get; init; }

Property Value

string

UpdatedOn

The timestamp when this fragment was last modified.

[JsonPropertyName("date_updated")]
public DateTimeOffset UpdatedOn { get; init; }

Property Value

DateTimeOffset