Class SurveysSamplingPointsQuotaTargetsClient
public class SurveysSamplingPointsQuotaTargetsClient
- Inheritance
-
SurveysSamplingPointsQuotaTargetsClient
- Inherited Members
Constructors
SurveysSamplingPointsQuotaTargetsClient(string, HttpClient)
public SurveysSamplingPointsQuotaTargetsClient(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
GetAllAsync(string, string, CancellationToken)
This method retrieves a list of quota level targets based on survey and sampling point.
public virtual Task<ICollection<SamplingPointQuotaTargetModel>> GetAllAsync(string surveyId, string samplingPointId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
samplingPointIdstringThe id of the sampling point
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<SamplingPointQuotaTargetModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(string, string, string, CancellationToken)
This method retrieves detail of quota level targets based on survey and sampling point.
public virtual Task<SamplingPointQuotaTargetModel> GetAsync(string surveyId, string samplingPointId, string quotaLevelId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
samplingPointIdstringThe id of the sampling point
quotaLevelIdstringThe id of the quota level
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SamplingPointQuotaTargetModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PatchAsync(string, string, string, SamplingPointQuotaLevelTargetModel, CancellationToken)
Update an sampling point's quota level with the specified fields.
public virtual Task<SamplingPointQuotaTargetModel> PatchAsync(string surveyId, string samplingPointId, string quotaLevelId, SamplingPointQuotaLevelTargetModel samplingPointQuotaLevel, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
samplingPointIdstringThe id of the sampling point
quotaLevelIdstringThe id of the quota level
samplingPointQuotaLevelSamplingPointQuotaLevelTargetModelSupply SamplingPointQuotaLevelTarget object with only the properties and values you would like to update. Only the Target property can be supplied.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SamplingPointQuotaTargetModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysSamplingPointsQuotaTargetsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T