Class CommunicatorBuilder
Builder for a Communicator object.
Inherited Members
Namespace: Worldline.Acquiring.Sdk
Assembly: Worldline.Acquiring.Sdk.dll
Syntax
public class CommunicatorBuilder
Methods
Build()
Creates a fully initialized Communicator object.
Declaration
public Communicator Build()
Returns
| Type | Description |
|---|---|
| Communicator |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | if not all required components are set |
WithApiEndpoint(Uri)
Sets the Worldline Acquiring platform API endpoint URI to use.
Declaration
public CommunicatorBuilder WithApiEndpoint(Uri apiEndpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | apiEndpoint | The API endpoint. |
Returns
| Type | Description |
|---|---|
| CommunicatorBuilder | This. |
WithAuthenticator(IAuthenticator)
Sets the IAuthenticator to use.
Declaration
public CommunicatorBuilder WithAuthenticator(IAuthenticator authenticator)
Parameters
| Type | Name | Description |
|---|---|---|
| IAuthenticator | authenticator | The authenticator. |
Returns
| Type | Description |
|---|---|
| CommunicatorBuilder | This. |
WithConnection(IConnection)
Sets the IConnection to use.
Declaration
public CommunicatorBuilder WithConnection(IConnection connection)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnection | connection | The connection. |
Returns
| Type | Description |
|---|---|
| CommunicatorBuilder | This. |
WithMarshaller(IMarshaller)
Sets the IMarshaller to use.
Declaration
public CommunicatorBuilder WithMarshaller(IMarshaller marshaller)
Parameters
| Type | Name | Description |
|---|---|---|
| IMarshaller | marshaller | The marshaller. |
Returns
| Type | Description |
|---|---|
| CommunicatorBuilder | This. |
WithMetadataProvider(MetadataProvider)
Sets the MetadataProvider to use.
Declaration
public CommunicatorBuilder WithMetadataProvider(MetadataProvider metadataProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| MetadataProvider | metadataProvider | The meta data provider. |
Returns
| Type | Description |
|---|---|
| CommunicatorBuilder | This. |