Table of Contents

Class SurveysInvitationTemplatesClient

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

Constructors

SurveysInvitationTemplatesClient(string, HttpClient)

public SurveysInvitationTemplatesClient(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, int, CancellationToken)

Delete an invitation template.

public virtual Task<DeleteInvitationTemplateResponse> DeleteAsync(string surveyId, int templateId, CancellationToken cancellationToken = default)

Parameters

surveyId string
templateId int
cancellationToken CancellationToken

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

Returns

Task<DeleteInvitationTemplateResponse>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(string, CancellationToken)

Retrieves the invitation templates for the specified survey.

public virtual Task<ICollection<InvitationTemplateModel>> GetAsync(string surveyId, CancellationToken cancellationToken = default)

Parameters

surveyId string
cancellationToken CancellationToken

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

Returns

Task<ICollection<InvitationTemplateModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(string, InvitationTemplateModelUpdate, CancellationToken)

Create a new invitation template.

public virtual Task<InvitationTemplateModelValidated> PostAsync(string surveyId, InvitationTemplateModelUpdate template, CancellationToken cancellationToken = default)

Parameters

surveyId string
template InvitationTemplateModelUpdate
cancellationToken CancellationToken

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

Returns

Task<InvitationTemplateModelValidated>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PutAsync(string, int, InvitationTemplateModelUpdate, CancellationToken)

Update an invitation template.

public virtual Task<InvitationTemplateModelValidated> PutAsync(string surveyId, int templateId, InvitationTemplateModelUpdate template, CancellationToken cancellationToken = default)

Parameters

surveyId string
templateId int
template InvitationTemplateModelUpdate
cancellationToken CancellationToken

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

Returns

Task<InvitationTemplateModelValidated>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T