Struct TransferAmountRequest
- Namespace
- Vonage.SubAccounts.TransferAmount
- Assembly
- Vonage.dll
Represents a request to transfer balance or credit between the primary account and a subaccount.
[Builder(new string[] { })]
public readonly struct TransferAmountRequest : IVonageRequest
- Implements
- Inherited Members
Properties
Amount
Sets the amount to be transferred. Must be a non-negative value.
[JsonPropertyOrder(2)]
[Mandatory(2)]
public decimal Amount { get; }
Property Value
Examples
.WithAmount(123.45m)
From
Sets the API key of the account to transfer from.
[JsonPropertyOrder(0)]
[Mandatory(0)]
public string From { get; }
Property Value
Examples
.WithFrom("7c9738e6")
Reference
Sets a reference for the transfer. This reference is added to the audit log.
[JsonPropertyOrder(2)]
[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public Maybe<string> Reference { get; }
Property Value
Examples
.WithReference("Monthly credit allocation")
To
Sets the API key of the account to transfer to.
[JsonPropertyOrder(1)]
[Mandatory(1)]
public string To { get; }
Property Value
Examples
.WithTo("ad6dc56f")
Methods
Build()
public static IBuilderForFrom Build()
Returns
BuildRequestMessage()
Converts the request to a HttpRequest.
public HttpRequestMessage BuildRequestMessage()
Returns
- HttpRequestMessage
The Http request.