Table of Contents

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

decimal

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

string

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

Maybe<string>

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

string

Examples

.WithTo("ad6dc56f")

Methods

Build()

public static IBuilderForFrom Build()

Returns

IBuilderForFrom

BuildRequestMessage()

Converts the request to a HttpRequest.

public HttpRequestMessage BuildRequestMessage()

Returns

HttpRequestMessage

The Http request.