Class AnybillAuthenticationOptionsBuilder
Builder for the IAnybillAuthenticationOptions.
Inheritance
System.Object
AnybillAuthenticationOptionsBuilder
Namespace: anybill.POS.Client.Options
Assembly: anybill.POS.Client.dll
Syntax
public sealed class AnybillAuthenticationOptionsBuilder
Remarks
Username, password and clientId are required!
Constructors
AnybillAuthenticationOptionsBuilder()
Creates a new instance.
Declaration
public AnybillAuthenticationOptionsBuilder()
Methods
Build()
Build the IAnybillAuthenticationOptions.
Declaration
public IAnybillAuthenticationOptions Build()
Returns
Type | Description |
---|---|
IAnybillAuthenticationOptions | The |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | If a required option is not set. |
WithClientId(String)
Defines the client id used for the authentication.
Declaration
public AnybillAuthenticationOptionsBuilder WithClientId(string clientId)
Parameters
Type | Name | Description |
---|---|---|
System.String | clientId | The client id. |
Returns
Type | Description |
---|---|
AnybillAuthenticationOptionsBuilder | The same AnybillAuthenticationOptionsBuilder instance for chaining. |
WithPassword(String)
Defines the password used for the authentication.
Declaration
public AnybillAuthenticationOptionsBuilder WithPassword(string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | password | The password. |
Returns
Type | Description |
---|---|
AnybillAuthenticationOptionsBuilder | The same AnybillAuthenticationOptionsBuilder instance for chaining. |
WithUsername(String)
Defines the username used for the authentication.
Declaration
public AnybillAuthenticationOptionsBuilder WithUsername(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username. |
Returns
Type | Description |
---|---|
AnybillAuthenticationOptionsBuilder | The same AnybillAuthenticationOptionsBuilder instance for chaining. |