Class ContactControllerApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public class ContactControllerApi : IContactControllerApi, IContactControllerApiSync, IContactControllerApiAsync, IApiAccessor
Constructors
View SourceContactControllerApi()
Initializes a new instance of the ContactControllerApi class.
Declaration
public ContactControllerApi()
ContactControllerApi(Configuration)
Initializes a new instance of the ContactControllerApi class using Configuration object
Declaration
public ContactControllerApi(Configuration configuration)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | An instance of Configuration |
ContactControllerApi(ISynchronousClient, IAsynchronousClient, IReadableConfiguration)
Initializes a new instance of the ContactControllerApi class using a Configuration object and client instance.
Declaration
public ContactControllerApi(ISynchronousClient client, IAsynchronousClient asyncClient, IReadableConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
ISynchronousClient | client | The client interface for synchronous API access. |
IAsynchronousClient | asyncClient | The client interface for asynchronous API access. |
IReadableConfiguration | configuration | The configuration object. |
ContactControllerApi(string)
Initializes a new instance of the ContactControllerApi class.
Declaration
public ContactControllerApi(string basePath)
Parameters
Type | Name | Description |
---|---|---|
string | basePath |
Properties
View SourceAsynchronousClient
The client for accessing this underlying API asynchronously.
Declaration
public IAsynchronousClient AsynchronousClient { get; set; }
Property Value
Type | Description |
---|---|
IAsynchronousClient |
Client
The client for accessing this underlying API synchronously.
Declaration
public ISynchronousClient Client { get; set; }
Property Value
Type | Description |
---|---|
ISynchronousClient |
Configuration
Gets or sets the configuration object
Declaration
public IReadableConfiguration Configuration { get; set; }
Property Value
Type | Description |
---|---|
IReadableConfiguration | An instance of the Configuration |
ExceptionFactory
Provides a factory method hook for the creation of exceptions.
Declaration
public ExceptionFactory ExceptionFactory { get; set; }
Property Value
Type | Description |
---|---|
ExceptionFactory |
Methods
View SourceCreateContact(CreateContactOptions, int)
Create a contact
Declaration
public ContactDto CreateContact(CreateContactOptions createContactOptions, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
CreateContactOptions | createContactOptions | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ContactDto | ContactDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateContactAsync(CreateContactOptions, int, CancellationToken)
Create a contact
Declaration
public Task<ContactDto> CreateContactAsync(CreateContactOptions createContactOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateContactOptions | createContactOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ContactDto> | Task of ContactDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateContactWithHttpInfo(CreateContactOptions, int)
Create a contact
Declaration
public ApiResponse<ContactDto> CreateContactWithHttpInfo(CreateContactOptions createContactOptions, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
CreateContactOptions | createContactOptions | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<ContactDto> | ApiResponse of ContactDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateContactWithHttpInfoAsync(CreateContactOptions, int, CancellationToken)
Create a contact
Declaration
public Task<ApiResponse<ContactDto>> CreateContactWithHttpInfoAsync(CreateContactOptions createContactOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateContactOptions | createContactOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<ContactDto>> | Task of ApiResponse (ContactDto) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteContact(Guid, int)
Delete contact
Declaration
public void DeleteContact(Guid contactId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteContactAsync(Guid, int, CancellationToken)
Delete contact
Declaration
public Task DeleteContactAsync(Guid contactId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteContactWithHttpInfo(Guid, int)
Delete contact
Declaration
public ApiResponse<object> DeleteContactWithHttpInfo(Guid contactId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<object> | ApiResponse of Object(void) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteContactWithHttpInfoAsync(Guid, int, CancellationToken)
Delete contact
Declaration
public Task<ApiResponse<object>> DeleteContactWithHttpInfoAsync(Guid contactId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllContacts(int?, int?, string, DateTime?, DateTime?, string, int)
Get all contacts
Declaration
public PageContactProjection GetAllContacts(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, string search = null, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in list pagination (optional, default to 0) |
int? | size | Optional page size in list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
string | search | Search terms (optional) |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
PageContactProjection | PageContactProjection |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllContactsAsync(int?, int?, string, DateTime?, DateTime?, string, int, CancellationToken)
Get all contacts
Declaration
public Task<PageContactProjection> GetAllContactsAsync(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, string search = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in list pagination (optional, default to 0) |
int? | size | Optional page size in list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
string | search | Search terms (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageContactProjection> | Task of PageContactProjection |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllContactsWithHttpInfo(int?, int?, string, DateTime?, DateTime?, string, int)
Get all contacts
Declaration
public ApiResponse<PageContactProjection> GetAllContactsWithHttpInfo(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, string search = null, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in list pagination (optional, default to 0) |
int? | size | Optional page size in list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
string | search | Search terms (optional) |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<PageContactProjection> | ApiResponse of PageContactProjection |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllContactsWithHttpInfoAsync(int?, int?, string, DateTime?, DateTime?, string, int, CancellationToken)
Get all contacts
Declaration
public Task<ApiResponse<PageContactProjection>> GetAllContactsWithHttpInfoAsync(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, string search = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in list pagination (optional, default to 0) |
int? | size | Optional page size in list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
string | search | Search terms (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageContactProjection>> | Task of ApiResponse (PageContactProjection) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetContact(Guid, int)
Get contact
Declaration
public ContactDto GetContact(Guid contactId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ContactDto | ContactDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactAsync(Guid, int, CancellationToken)
Get contact
Declaration
public Task<ContactDto> GetContactAsync(Guid contactId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ContactDto> | Task of ContactDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContacts(int)
Get all contacts
Declaration
public List<ContactProjection> GetContacts(int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T><ContactProjection> | List<ContactProjection> |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactsAsync(int, CancellationToken)
Get all contacts
Declaration
public Task<List<ContactProjection>> GetContactsAsync(int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<System.Collections.Generic.List<T><ContactProjection>> | Task of List<ContactProjection> |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactsWithHttpInfo(int)
Get all contacts
Declaration
public ApiResponse<List<ContactProjection>> GetContactsWithHttpInfo(int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<System.Collections.Generic.List<T><ContactProjection>> | ApiResponse of List<ContactProjection> |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactsWithHttpInfoAsync(int, CancellationToken)
Get all contacts
Declaration
public Task<ApiResponse<List<ContactProjection>>> GetContactsWithHttpInfoAsync(int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<System.Collections.Generic.List<T><ContactProjection>>> | Task of ApiResponse (List<ContactProjection>) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactVCard(Guid, int)
Get contact vCard vcf file
Declaration
[Obsolete]
public void GetContactVCard(Guid contactId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactVCardAsync(Guid, int, CancellationToken)
Get contact vCard vcf file
Declaration
[Obsolete]
public Task GetContactVCardAsync(Guid contactId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactVCardWithHttpInfo(Guid, int)
Get contact vCard vcf file
Declaration
[Obsolete]
public ApiResponse<object> GetContactVCardWithHttpInfo(Guid contactId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<object> | ApiResponse of Object(void) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactVCardWithHttpInfoAsync(Guid, int, CancellationToken)
Get contact vCard vcf file
Declaration
[Obsolete]
public Task<ApiResponse<object>> GetContactVCardWithHttpInfoAsync(Guid contactId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactWithHttpInfo(Guid, int)
Get contact
Declaration
public ApiResponse<ContactDto> GetContactWithHttpInfo(Guid contactId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<ContactDto> | ApiResponse of ContactDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetContactWithHttpInfoAsync(Guid, int, CancellationToken)
Get contact
Declaration
public Task<ApiResponse<ContactDto>> GetContactWithHttpInfoAsync(Guid contactId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | contactId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<ContactDto>> | Task of ApiResponse (ContactDto) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |