Class SurveysInvitationTemplatesClient
public class SurveysInvitationTemplatesClient
- Inheritance
-
SurveysInvitationTemplatesClient
- Inherited Members
Constructors
SurveysInvitationTemplatesClient(string, HttpClient)
public SurveysInvitationTemplatesClient(string baseUrl, HttpClient httpClient)
Parameters
baseUrlstringhttpClientHttpClient
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
DeleteAsync(string, int, CancellationToken)
Delete an invitation template.
public virtual Task<DeleteInvitationTemplateResponse> DeleteAsync(string surveyId, int templateId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringtemplateIdintcancellationTokenCancellationTokenA 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
surveyIdstringcancellationTokenCancellationTokenA 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
surveyIdstringtemplateInvitationTemplateModelUpdatecancellationTokenCancellationTokenA 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
surveyIdstringtemplateIdinttemplateInvitationTemplateModelUpdatecancellationTokenCancellationTokenA 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
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T