Interface IBuilderForOptional
- Namespace
- Vonage.Users.CreateUser
- Assembly
- Vonage.dll
Represents a builder for configuring optional parameters when creating a new user.
public interface IBuilderForOptional : IVonageRequestBuilder<CreateUserRequest>
- Inherited Members
Methods
WithChannel(ChannelMessenger)
Adds a Facebook Messenger channel to the user.
IBuilderForOptional WithChannel(ChannelMessenger value)
Parameters
valueChannelMessengerThe Messenger channel configuration containing the user's Messenger ID.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelMessenger("messenger-user-id"))
WithChannel(ChannelMms)
Adds an MMS channel to the user for multimedia messaging.
IBuilderForOptional WithChannel(ChannelMms value)
Parameters
valueChannelMmsThe MMS channel configuration containing the phone number.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelMms("14155550100"))
WithChannel(ChannelPstn)
Adds a PSTN (landline/mobile) channel to the user for voice communication.
IBuilderForOptional WithChannel(ChannelPstn value)
Parameters
valueChannelPstnThe PSTN channel configuration containing the phone number.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelPstn(14155550100))
WithChannel(ChannelSip)
Adds a SIP channel to the user for VoIP communication.
IBuilderForOptional WithChannel(ChannelSip value)
Parameters
valueChannelSipThe SIP channel configuration containing the URI and authentication credentials.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelSip("sip:user@domain.com", "username", "password"))
WithChannel(ChannelSms)
Adds an SMS channel to the user for text messaging.
IBuilderForOptional WithChannel(ChannelSms value)
Parameters
valueChannelSmsThe SMS channel configuration containing the phone number.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelSms("14155550100"))
WithChannel(ChannelVbc)
Adds a VBC (Vonage Business Communications) channel to the user.
IBuilderForOptional WithChannel(ChannelVbc value)
Parameters
valueChannelVbcThe VBC channel configuration containing the extension number.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelVbc("1234"))
WithChannel(ChannelViber)
Adds a Viber channel to the user for messaging.
IBuilderForOptional WithChannel(ChannelViber value)
Parameters
valueChannelViberThe Viber channel configuration containing the phone number.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelViber("14155550100"))
WithChannel(ChannelWebSocket)
Adds a WebSocket channel to the user for real-time audio streaming.
IBuilderForOptional WithChannel(ChannelWebSocket value)
Parameters
valueChannelWebSocketThe WebSocket channel configuration containing the URI, content type, and optional headers.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelWebSocket("wss://example.com/socket", "audio/l16;rate=16000", new Dictionary<string, string>()))
WithChannel(ChannelWhatsApp)
Adds a WhatsApp channel to the user for messaging.
IBuilderForOptional WithChannel(ChannelWhatsApp value)
Parameters
valueChannelWhatsAppThe WhatsApp channel configuration containing the phone number.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithChannel(new ChannelWhatsApp("14155550100"))
WithDisplayName(string)
Sets a human-readable display name for the user. Unlike the unique name, this does not need to be unique.
IBuilderForOptional WithDisplayName(string value)
Parameters
valuestringThe display name to show for the user. Must not be empty if provided.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithDisplayName("John Doe")
WithImageUrl(Uri)
Sets a profile image URL for the user.
IBuilderForOptional WithImageUrl(Uri value)
Parameters
valueUriThe URL pointing to the user's profile image or avatar.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithImageUrl(new Uri("https://example.com/avatar.png"))
WithName(string)
Sets the unique name for the user within the Vonage platform.
IBuilderForOptional WithName(string value)
Parameters
valuestringThe unique name to identify the user. Must not be empty if provided.
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithName("my-user")
WithUserProperty(string, object)
Adds a custom property to the user for storing application-specific data.
IBuilderForOptional WithUserProperty(string key, object value)
Parameters
Returns
- IBuilderForOptional
The builder instance for method chaining.
Examples
.WithUserProperty("department", "Engineering")