Table of Contents

Class DomainDeliverySurveysPropertiesClient

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

Constructors

DomainDeliverySurveysPropertiesClient(string, HttpClient)

public DomainDeliverySurveysPropertiesClient(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(string, long, CancellationToken)

Deletes the survey property by the given id.

public virtual Task DeleteAsync(string surveyId, long propertyId, CancellationToken cancellationToken = default)

Parameters

surveyId string

The Nfield Survey Id.

propertyId long

The identifier for the survey property.

cancellationToken CancellationToken

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

Returns

Task

The survey property was deleted.

Exceptions

NfieldSdkException

A server side error occurred.

GetAllAsync(string, CancellationToken)

Gets a list of the custom properties associated with the requested survey.
Returns the first 100. This list can be filtered, sorted and supports paging using standard OData syntax.

public virtual Task<ICollection<DomainSurveyPropertyModel>> GetAllAsync(string surveyId, CancellationToken cancellationToken = default)

Parameters

surveyId string

The Nfield Survey Id.

cancellationToken CancellationToken

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

Returns

Task<ICollection<DomainSurveyPropertyModel>>

Returns a list of custom properties for the requested survey.

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(string, long, CancellationToken)

Gets the survey property for the given id.

public virtual Task<DomainSurveyPropertyModel> GetAsync(string surveyId, long propertyId, CancellationToken cancellationToken = default)

Parameters

surveyId string

The Nfield Survey Id.

propertyId long

The identifier for the survey property.

cancellationToken CancellationToken

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

Returns

Task<DomainSurveyPropertyModel>

Returns the survey property for the requested identifier.

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(string, CreateDomainSurveyPropertyModel, CancellationToken)

Creates a new domain survey property based on the given data.

public virtual Task PostAsync(string surveyId, CreateDomainSurveyPropertyModel model, CancellationToken cancellationToken = default)

Parameters

surveyId string

The survey that will include the custom property.

model CreateDomainSurveyPropertyModel

The survey property info which will be used in the creation process.

cancellationToken CancellationToken

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

Returns

Task

Returns the survey property identifier.

Exceptions

NfieldSdkException

A server side error occurred.

PutAsync(string, long, UpdateDomainSurveyPropertyModel, CancellationToken)

Updates a domain survey property based on the given data.

public virtual Task PutAsync(string surveyId, long propertyId, UpdateDomainSurveyPropertyModel model, CancellationToken cancellationToken = default)

Parameters

surveyId string

The survey that includes the custom property.

propertyId long

The identifier for the survey property.

model UpdateDomainSurveyPropertyModel

The survey property info which will be used in the update process.

cancellationToken CancellationToken

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

Returns

Task

The survey property was updated.

Exceptions

NfieldSdkException

A server side error occurred.

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

protected virtual Task<DomainDeliverySurveysPropertiesClient.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<DomainDeliverySurveysPropertiesClient.ObjectResponseResult<T>>

Type Parameters

T