Table of Contents

Class SurveysSamplingPointAddressesClient

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

Constructors

SurveysSamplingPointAddressesClient(string, HttpClient)

public SurveysSamplingPointAddressesClient(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, string, string, CancellationToken)

This method deletes a specific address.

public virtual Task DeleteAsync(string surveyId, string samplingPointId, string addressId, CancellationToken cancellationToken = default)

Parameters

surveyId string
samplingPointId string
addressId string
cancellationToken CancellationToken

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

Returns

Task

Address deleted

Exceptions

NfieldSdkException

A server side error occurred.

GetAllAsync(string, string, CancellationToken)

This method retrieves a list of Addresses. This list can be filtered and sorted
using standard OData syntax.

public virtual Task<ICollection<AddressModel>> GetAllAsync(string surveyId, string samplingPointId, CancellationToken cancellationToken = default)

Parameters

surveyId string
samplingPointId string
cancellationToken CancellationToken

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

Returns

Task<ICollection<AddressModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(string, string, string, CancellationToken)

Retrieve the details of a single address.

public virtual Task<AddressModel> GetAsync(string surveyId, string samplingPointId, string addressId, CancellationToken cancellationToken = default)

Parameters

surveyId string
samplingPointId string
addressId string
cancellationToken CancellationToken

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

Returns

Task<AddressModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(string, string, AddressModel, CancellationToken)

Add a new address to the specified sampling point.

public virtual Task<AddressModel> PostAsync(string surveyId, string samplingPointId, AddressModel address, CancellationToken cancellationToken = default)

Parameters

surveyId string
samplingPointId string
address AddressModel
cancellationToken CancellationToken

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

Returns

Task<AddressModel>

Address created

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T