Table of Contents

Class DomainResponseCodesClient

Namespace
Nfield.SDK
Assembly
Nfield.Public.SDK.dll
public class DomainResponseCodesClient
Inheritance
DomainResponseCodesClient
Inherited Members

Constructors

DomainResponseCodesClient(string, HttpClient)

public DomainResponseCodesClient(string baseUrl, HttpClient httpClient)

Parameters

baseUrl string
httpClient HttpClient

Properties

BaseUrl

public string BaseUrl { get; set; }

Property Value

string

JsonSerializerSettings

protected JsonSerializerSettings JsonSerializerSettings { get; }

Property Value

JsonSerializerSettings

ReadResponseAsString

public bool ReadResponseAsString { get; set; }

Property Value

bool

Methods

DeleteAsync(int, CancellationToken)

Delete the domain response code by id.

public virtual Task DeleteAsync(int responseCodeId, CancellationToken cancellationToken = default)

Parameters

responseCodeId int

The id of the response code to delete

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

Code deleted

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(CancellationToken)

Gets all domain response codes for the domain.

public virtual Task<ICollection<DomainResponseCodeResponseModel>> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ICollection<DomainResponseCodeResponseModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PatchAsync(int, DomainResponseCodeUpdateModel, CancellationToken)

Patch the domain response codes.

public virtual Task<DomainResponseCodeResponseModel> PatchAsync(int responseCodeId, DomainResponseCodeUpdateModel domainResponseCode, CancellationToken cancellationToken = default)

Parameters

responseCodeId int

The id of the response code to update

domainResponseCode DomainResponseCodeUpdateModel

Url and description

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<DomainResponseCodeResponseModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(DomainResponseCodeCreateModel, CancellationToken)

Create a new domain response code

public virtual Task<DomainResponseCodeResponseModel> PostAsync(DomainResponseCodeCreateModel domainResponseCode, CancellationToken cancellationToken = default)

Parameters

domainResponseCode DomainResponseCodeCreateModel

domain response code URL and description

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<DomainResponseCodeResponseModel>

Code Created

Exceptions

NfieldSdkException

A server side error occurred.

ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)

protected virtual Task<DomainResponseCodesClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)

Parameters

response HttpResponseMessage
headers IReadOnlyDictionary<string, IEnumerable<string>>
cancellationToken CancellationToken

Returns

Task<DomainResponseCodesClient.ObjectResponseResult<T>>

Type Parameters

T