Class TemplateFragment
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
TemplateFragmentIdGuidThe unique identifier (UUID) of the template fragment.
ChannelVerificationChannelThe verification channel this fragment applies to (SMS or Voice).
LocaleLocaleThe IETF BCP 47 locale code this fragment applies to (e.g., "en-us").
TextstringThe message text with optional placeholders: ${code}, ${brand}, ${time-limit}, and ${time-limit-unit}.
CreatedOnDateTimeOffsetThe timestamp when this fragment was created.
UpdatedOnDateTimeOffsetThe 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
CreatedOn
The timestamp when this fragment was created.
[JsonPropertyName("date_created")]
public DateTimeOffset CreatedOn { get; init; }
Property Value
Locale
The IETF BCP 47 locale code this fragment applies to (e.g., "en-us").
[JsonPropertyName("locale")]
public Locale Locale { get; init; }
Property Value
TemplateFragmentId
The unique identifier (UUID) of the template fragment.
[JsonPropertyName("template_fragment_id")]
public Guid TemplateFragmentId { get; init; }
Property Value
Text
The message text with optional placeholders: ${code}, ${brand}, ${time-limit}, and ${time-limit-unit}.
[JsonPropertyName("text")]
public string Text { get; init; }
Property Value
UpdatedOn
The timestamp when this fragment was last modified.
[JsonPropertyName("date_updated")]
public DateTimeOffset UpdatedOn { get; init; }