Class SurveysQuotaFrameClient
public class SurveysQuotaFrameClient
- Inheritance
-
SurveysQuotaFrameClient
- Inherited Members
Constructors
SurveysQuotaFrameClient(string, HttpClient)
public SurveysQuotaFrameClient(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
GetAsync(string, CancellationToken)
Retrieve the quota definition.
NB: Make sure all the Id's are valid GUID's.
public virtual Task<SurveyQuotaFrameResponseModel> GetAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyQuotaFrameResponseModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PutAsync(string, SurveyQuotaFrameRequestModel, CancellationToken)
This method creates or updates the survey quota frame
NB: Make sure all the Id's are valid GUID's.
NB: All the strings will be trimmed during the upload.
public virtual Task<SurveyQuotaFrameResponseModel> PutAsync(string surveyId, SurveyQuotaFrameRequestModel quotaFrame, CancellationToken cancellationToken = default)
Parameters
surveyIdstringid of the survey
quotaFrameSurveyQuotaFrameRequestModelThe new quota frame
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyQuotaFrameResponseModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PutEtagAsync(string, string, SurveyQuotaFrameEtagRequestModel, CancellationToken)
Updates the survey quota targets for the specified quota frame version
public virtual Task<SurveyQuotaFrameEtagResponseModel> PutEtagAsync(string surveyId, string eTag, SurveyQuotaFrameEtagRequestModel targets, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey to set the quota targets for
eTagstringThe quota frame version to set the targets for
targetsSurveyQuotaFrameEtagRequestModelThe new quota frame targets
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyQuotaFrameEtagResponseModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysQuotaFrameClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T