.NET API
VoiceSessionCost
Tracon.Abstractions.dllWhat one voice conversation cost.
public sealed record VoiceSessionCost : IEquatable<VoiceSessionCost>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The total has two addends because the two voice paths bill differently: a provider-hosted live session bills by duration, while the conversation layer Tracon runs itself bills the synthesized characters.
The sum lives in VoiceSessionCost.Total and nowhere else. A bare
decimal? forces every caller to decide which addend it meant, and a sum
spelled out by hand in several places silently loses a term the day a third one
arrives.
This is the cost of the voice connection only. Each delegated task
also produces an ordinary runs row with its own token cost, which is
deliberately not repeated here. A display that shows only this number
under-reports; the honest figure is this cost plus the session’s
run costs.
Constructors
Section titled “Constructors”VoiceSessionCost()
Section titled “ VoiceSessionCost()”public VoiceSessionCost()Properties
Section titled “Properties”CharacterCost
Section titled “ CharacterCost”What the synthesized characters cost.
public decimal? CharacterCost { get; init; }Property Value
Section titled “Property Value”Currency
Section titled “ Currency”The currency the amounts are in.
public string? Currency { get; init; }Property Value
Section titled “Property Value”DurationCost
Section titled “ DurationCost”What the session’s duration cost.
public decimal? DurationCost { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(VoiceSessionCost?)
Section titled “ Equals(VoiceSessionCost?)”public bool Equals(VoiceSessionCost? other)Parameters
Section titled “Parameters”other VoiceSessionCost?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Total()
Section titled “ Total()”Adds every priced addend.
public decimal? Total()Returns
Section titled “Returns”The total, or null when nothing was priced — never
0, which would claim the conversation was free.
Operators
Section titled “Operators”operator ==(VoiceSessionCost?, VoiceSessionCost?)
Section titled “ operator ==(VoiceSessionCost?, VoiceSessionCost?)”public static bool operator ==(VoiceSessionCost? left, VoiceSessionCost? right)Parameters
Section titled “Parameters”left VoiceSessionCost?
right VoiceSessionCost?
Returns
Section titled “Returns”operator !=(VoiceSessionCost?, VoiceSessionCost?)
Section titled “ operator !=(VoiceSessionCost?, VoiceSessionCost?)”public static bool operator !=(VoiceSessionCost? left, VoiceSessionCost? right)Parameters
Section titled “Parameters”left VoiceSessionCost?
right VoiceSessionCost?