Table of Contents

Class SurveysQuotaFrameClient

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

Constructors

SurveysQuotaFrameClient(string, HttpClient)

public SurveysQuotaFrameClient(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

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

surveyId string

The id of the survey

cancellationToken CancellationToken

A 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

surveyId string

id of the survey

quotaFrame SurveyQuotaFrameRequestModel

The new quota frame

cancellationToken CancellationToken

A 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

surveyId string

The survey to set the quota targets for

eTag string

The quota frame version to set the targets for

targets SurveyQuotaFrameEtagRequestModel

The new quota frame targets

cancellationToken CancellationToken

A 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

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

Returns

Task<SurveysQuotaFrameClient.ObjectResponseResult<T>>

Type Parameters

T