Skip to content

Instantly share code, notes, and snippets.

@jfreyre
Last active November 26, 2019 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfreyre/2a78ad6a2718b9e53e06aa6b6eefa2a3 to your computer and use it in GitHub Desktop.
Save jfreyre/2a78ad6a2718b9e53e06aa6b6eefa2a3 to your computer and use it in GitHub Desktop.
Result of the auto-generated http client with nswag
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v13.1.6.0 (NJsonSchema v10.0.28.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------
#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?'
#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ...
#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..."
namespace MyNamespace
{
using System = global::System;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "13.1.6.0 (NJsonSchema v10.0.28.0 (Newtonsoft.Json v9.0.0.0))")]
public partial class MyClass
{
private string _baseUrl = "msvc-partenaire-dev.vaudoise.ch:35361/v5";
private System.Net.Http.HttpClient _httpClient;
private System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings;
public MyClass(System.Net.Http.HttpClient httpClient)
{
_httpClient = httpClient;
_settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(() =>
{
var settings = new Newtonsoft.Json.JsonSerializerSettings();
UpdateJsonSerializerSettings(settings);
return settings;
});
}
public string BaseUrl
{
get { return _baseUrl; }
set { _baseUrl = value; }
}
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings);
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url);
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder);
partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response);
/// <summary>getHealthStatus</summary>
/// <param name="accept_Language">Language</param>
/// <returns>OK</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<HealthDto> GetHealthStatusUsingGETAsync(AcceptLanguage? accept_Language)
{
return GetHealthStatusUsingGETAsync(accept_Language, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>getHealthStatus</summary>
/// <param name="accept_Language">Language</param>
/// <returns>OK</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<HealthDto> GetHealthStatusUsingGETAsync(AcceptLanguage? accept_Language, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/actuator/health");
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<HealthDto>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(HealthDto);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>getInfo</summary>
/// <param name="accept_Language">Language</param>
/// <returns>OK</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<InfoDto> GetInfoUsingGETAsync(AcceptLanguage2? accept_Language)
{
return GetInfoUsingGETAsync(accept_Language, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>getInfo</summary>
/// <param name="accept_Language">Language</param>
/// <returns>OK</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<InfoDto> GetInfoUsingGETAsync(AcceptLanguage2? accept_Language, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/actuator/info");
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json;charset=UTF-8"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<InfoDto>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(InfoDto);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>getMetrics</summary>
/// <param name="accept_Language">Language</param>
/// <returns>OK</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<MetricsDto> GetMetricsUsingGETAsync(AcceptLanguage3? accept_Language)
{
return GetMetricsUsingGETAsync(accept_Language, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>getMetrics</summary>
/// <param name="accept_Language">Language</param>
/// <returns>OK</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<MetricsDto> GetMetricsUsingGETAsync(AcceptLanguage3? accept_Language, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/actuator/metrics");
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json;charset=UTF-8"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<MetricsDto>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(MetricsDto);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of categories of leisures</summary>
/// <param name="accept_Language">Language</param>
/// <returns>The list of categories has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<LeisureCategory>> ListCategoriesUsingGETAsync(AcceptLanguage4? accept_Language)
{
return ListCategoriesUsingGETAsync(accept_Language, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of categories of leisures</summary>
/// <param name="accept_Language">Language</param>
/// <returns>The list of categories has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<LeisureCategory>> ListCategoriesUsingGETAsync(AcceptLanguage4? accept_Language, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/leisure-categories");
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<LeisureCategory>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<LeisureCategory>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of leisures</summary>
/// <param name="accept_Language">Language</param>
/// <returns>The list of leisures has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Leisure>> ListUsingGETAsync(AcceptLanguage5? accept_Language)
{
return ListUsingGETAsync(accept_Language, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of leisures</summary>
/// <param name="accept_Language">Language</param>
/// <returns>The list of leisures has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Leisure>> ListUsingGETAsync(AcceptLanguage5? accept_Language, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/leisures");
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<Leisure>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<Leisure>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of partners</summary>
/// <param name="page">Page number. Starting from 0</param>
/// <param name="size">Page size. By default 20</param>
/// <param name="accept_Language">Language</param>
/// <param name="birthDate">Birth date in format YYYY-MM-DD - Only for people. Beware that search by birth date only can result in bad response time. Example: 1980-02-20</param>
/// <param name="city">Swiss city (official city name in 20 characters, examples : 'Bern', 'Zürich', 'Genève', 'Villars-sur-Ollon', 'Aeugst am Albis') Tolerates fuzzy search like 'Zurich', 'Villars', 'Geneve', 'AEUGST'. - Searches on all addresses, not just the principal address</param>
/// <param name="email">E-mail</param>
/// <param name="firstName">First name of the partner. Use &amp;quot;\*&amp;quot; as wildcard. Example: Johann,\*o\*ann</param>
/// <param name="iban">Iban</param>
/// <param name="isnPers">IsnPers</param>
/// <param name="name">Last name, Company name or couple name. Use &amp;quot;\*&amp;quot; as wildcard. Example: Pache,Pa\*che</param>
/// <param name="partnerTypes">List of Partner types in camel case. Example: person</param>
/// <param name="petName">Name of the pet owned by the partner. Use &amp;quot;\*&amp;quot; as wildcard. Example: Can\*el\*e, , to search for a pet with name like 'Cannelle' or 'Canelle' or 'Canele' or 'Canelle'</param>
/// <param name="phoneNumber">phoneNumber</param>
/// <param name="policyHolderId">List of policy holder ids</param>
/// <param name="postCode">Swiss post code - Searches on all addresses, not just the principal address</param>
/// <param name="sort">Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported (on separate lines). Possible sort attributes are : policyHolderId | firstName | lastName | companyName | coupleName | birthDate | address.postCode | address.city</param>
/// <returns>The list of partners found</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Partner>> SearchPartnersUsingGETAsync(int? page, int? size, AcceptLanguage6? accept_Language, string birthDate, string city, string email, string firstName, string iban, long? isnPers, string name, System.Collections.Generic.IEnumerable<Anonymous> partnerTypes, string petName, string phoneNumber, System.Collections.Generic.IEnumerable<int> policyHolderId, string postCode, System.Collections.Generic.IEnumerable<string> sort)
{
return SearchPartnersUsingGETAsync(page, size, accept_Language, birthDate, city, email, firstName, iban, isnPers, name, partnerTypes, petName, phoneNumber, policyHolderId, postCode, sort, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of partners</summary>
/// <param name="page">Page number. Starting from 0</param>
/// <param name="size">Page size. By default 20</param>
/// <param name="accept_Language">Language</param>
/// <param name="birthDate">Birth date in format YYYY-MM-DD - Only for people. Beware that search by birth date only can result in bad response time. Example: 1980-02-20</param>
/// <param name="city">Swiss city (official city name in 20 characters, examples : 'Bern', 'Zürich', 'Genève', 'Villars-sur-Ollon', 'Aeugst am Albis') Tolerates fuzzy search like 'Zurich', 'Villars', 'Geneve', 'AEUGST'. - Searches on all addresses, not just the principal address</param>
/// <param name="email">E-mail</param>
/// <param name="firstName">First name of the partner. Use &amp;quot;\*&amp;quot; as wildcard. Example: Johann,\*o\*ann</param>
/// <param name="iban">Iban</param>
/// <param name="isnPers">IsnPers</param>
/// <param name="name">Last name, Company name or couple name. Use &amp;quot;\*&amp;quot; as wildcard. Example: Pache,Pa\*che</param>
/// <param name="partnerTypes">List of Partner types in camel case. Example: person</param>
/// <param name="petName">Name of the pet owned by the partner. Use &amp;quot;\*&amp;quot; as wildcard. Example: Can\*el\*e, , to search for a pet with name like 'Cannelle' or 'Canelle' or 'Canele' or 'Canelle'</param>
/// <param name="phoneNumber">phoneNumber</param>
/// <param name="policyHolderId">List of policy holder ids</param>
/// <param name="postCode">Swiss post code - Searches on all addresses, not just the principal address</param>
/// <param name="sort">Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported (on separate lines). Possible sort attributes are : policyHolderId | firstName | lastName | companyName | coupleName | birthDate | address.postCode | address.city</param>
/// <returns>The list of partners found</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Partner>> SearchPartnersUsingGETAsync(int? page, int? size, AcceptLanguage6? accept_Language, string birthDate, string city, string email, string firstName, string iban, long? isnPers, string name, System.Collections.Generic.IEnumerable<Anonymous> partnerTypes, string petName, string phoneNumber, System.Collections.Generic.IEnumerable<int> policyHolderId, string postCode, System.Collections.Generic.IEnumerable<string> sort, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners?");
if (page != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("$page") + "=").Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (size != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("$size") + "=").Append(System.Uri.EscapeDataString(ConvertToString(size, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (birthDate != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("birthDate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(birthDate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (city != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("city") + "=").Append(System.Uri.EscapeDataString(ConvertToString(city, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (email != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("email") + "=").Append(System.Uri.EscapeDataString(ConvertToString(email, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (firstName != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("firstName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(firstName, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (iban != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("iban") + "=").Append(System.Uri.EscapeDataString(ConvertToString(iban, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (isnPers != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("isnPers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(isnPers, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (name != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(name, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (partnerTypes != null)
{
foreach (var item_ in partnerTypes) { urlBuilder_.Append(System.Uri.EscapeDataString("partnerTypes") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); }
}
if (petName != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("petName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(petName, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (phoneNumber != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("phoneNumber") + "=").Append(System.Uri.EscapeDataString(ConvertToString(phoneNumber, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (policyHolderId != null)
{
foreach (var item_ in policyHolderId) { urlBuilder_.Append(System.Uri.EscapeDataString("policyHolderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); }
}
if (postCode != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("postCode") + "=").Append(System.Uri.EscapeDataString(ConvertToString(postCode, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (sort != null)
{
foreach (var item_ in sort) { urlBuilder_.Append(System.Uri.EscapeDataString("sort") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); }
}
urlBuilder_.Length--;
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<Partner>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "206")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<Partner>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "416")
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("Paginated Out of Range response", (int)response_.StatusCode, responseText_, headers_, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<Partner>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve a partner for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The partner has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<Partner> GetPartnerUsingGETAsync(AcceptLanguage7? accept_Language, int policyHolderId)
{
return GetPartnerUsingGETAsync(accept_Language, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve a partner for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The partner has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<Partner> GetPartnerUsingGETAsync(AcceptLanguage7? accept_Language, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<Partner>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The partner has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(Partner);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of addresses for a given partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The list of addresses has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<PartnerAddress>> GetPartnerAddressesUsingGETAsync(AcceptLanguage8? accept_Language, int policyHolderId)
{
return GetPartnerAddressesUsingGETAsync(accept_Language, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of addresses for a given partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The list of addresses has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<PartnerAddress>> GetPartnerAddressesUsingGETAsync(AcceptLanguage8? accept_Language, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/addresses");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<PartnerAddress>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The policy holder has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<PartnerAddress>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the bank accounts for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The bank accounts of the partner have been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<BankingInformationDto>> GetBankAccountsUsingGETAsync(AcceptLanguage9? accept_Language, int policyHolderId)
{
return GetBankAccountsUsingGETAsync(accept_Language, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the bank accounts for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The bank accounts of the partner have been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<BankingInformationDto>> GetBankAccountsUsingGETAsync(AcceptLanguage9? accept_Language, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/bank-accounts");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<BankingInformationDto>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The policy holder has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<BankingInformationDto>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the comment for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="effectiveDate">Effective date of the comment, in format = YYYY-MM-DD, example = 2018-03-16</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The comment for the partner has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<string> GetCommentUsingGETAsync(AcceptLanguage10? accept_Language, string effectiveDate, int policyHolderId)
{
return GetCommentUsingGETAsync(accept_Language, effectiveDate, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the comment for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="effectiveDate">Effective date of the comment, in format = YYYY-MM-DD, example = 2018-03-16</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The comment for the partner has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<string> GetCommentUsingGETAsync(AcceptLanguage10? accept_Language, string effectiveDate, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/comment?");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
if (effectiveDate != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("effectiveDate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(effectiveDate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<string>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "204")
{
var objectResponse_ = await ReadObjectResponseAsync<string>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The policy holder has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(string);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the comments for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="effectiveDate">Effective date of the comments, in format = YYYY-MM-DD</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The comments of the partner have been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
[System.Obsolete]
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<string>> GetCommentsUsingGETAsync(AcceptLanguage11? accept_Language, string effectiveDate, int policyHolderId)
{
return GetCommentsUsingGETAsync(accept_Language, effectiveDate, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the comments for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="effectiveDate">Effective date of the comments, in format = YYYY-MM-DD</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The comments of the partner have been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
[System.Obsolete]
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<string>> GetCommentsUsingGETAsync(AcceptLanguage11? accept_Language, string effectiveDate, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/comments?");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
if (effectiveDate != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("effectiveDate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(effectiveDate, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json;charset=UTF-8"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<string>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The policy holder has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<string>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of leisures of a partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="isActive">isActive</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The list of leisures has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<PartnerLeisure>> ListByPartnerUsingGETAsync(AcceptLanguage12? accept_Language, bool? isActive, int policyHolderId)
{
return ListByPartnerUsingGETAsync(accept_Language, isActive, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of leisures of a partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="isActive">isActive</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The list of leisures has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<PartnerLeisure>> ListByPartnerUsingGETAsync(AcceptLanguage12? accept_Language, bool? isActive, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/leisures?");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
if (isActive != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("isActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(isActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<PartnerLeisure>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("No partner has been found with this policyHolderId", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<PartnerLeisure>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Add new leisure to a partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="leisureCreationDto">leisureCreationDto</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>Leisure was added with success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task CreateLeisureUsingPOSTAsync(AcceptLanguage13? accept_Language, LeisureCreationDto leisureCreationDto, int policyHolderId)
{
return CreateLeisureUsingPOSTAsync(accept_Language, leisureCreationDto, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Add new leisure to a partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="leisureCreationDto">leisureCreationDto</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>Leisure was added with success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task CreateLeisureUsingPOSTAsync(AcceptLanguage13? accept_Language, LeisureCreationDto leisureCreationDto, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/leisures");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(leisureCreationDto, _settings.Value));
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "201")
{
return;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("Partner or leisure has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "409")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("Partner already has the leisure", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve a specific leisure of a partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="leisureId">leisureId</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>A partner leisure has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<PartnerLeisure> GetPartnerLeisureUsingGETAsync(AcceptLanguage14? accept_Language, string leisureId, int policyHolderId)
{
return GetPartnerLeisureUsingGETAsync(accept_Language, leisureId, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve a specific leisure of a partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="leisureId">leisureId</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>A partner leisure has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<PartnerLeisure> GetPartnerLeisureUsingGETAsync(AcceptLanguage14? accept_Language, string leisureId, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (leisureId == null)
throw new System.ArgumentNullException("leisureId");
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/leisures/{leisureId}");
urlBuilder_.Replace("{leisureId}", System.Uri.EscapeDataString(ConvertToString(leisureId, System.Globalization.CultureInfo.InvariantCulture)));
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<PartnerLeisure>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("No leisure has been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(PartnerLeisure);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Remove leisure from partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="leisureId">leisureId</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>Leisure was added with success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task DeleteLeisureUsingDELETEAsync(AcceptLanguage15? accept_Language, string leisureId, int policyHolderId)
{
return DeleteLeisureUsingDELETEAsync(accept_Language, leisureId, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Remove leisure from partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="leisureId">leisureId</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>Leisure was added with success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task DeleteLeisureUsingDELETEAsync(AcceptLanguage15? accept_Language, string leisureId, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (leisureId == null)
throw new System.ArgumentNullException("leisureId");
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/leisures/{leisureId}");
urlBuilder_.Replace("{leisureId}", System.Uri.EscapeDataString(ConvertToString(leisureId, System.Globalization.CultureInfo.InvariantCulture)));
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("DELETE");
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "204")
{
return;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("Leisure for partner has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of logs for a given partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The list of logs has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Log>> GetLogsUsingGETAsync(AcceptLanguage16? accept_Language, int policyHolderId)
{
return GetLogsUsingGETAsync(accept_Language, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of logs for a given partner</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The list of logs has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Log>> GetLogsUsingGETAsync(AcceptLanguage16? accept_Language, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/logs");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<Log>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<Log>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the medical restrictions for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The medical restrictions of the partner have been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<MedicalRestrictionDto>> GetMedicalRestrictionsUsingGETAsync(AcceptLanguage17? accept_Language, int policyHolderId)
{
return GetMedicalRestrictionsUsingGETAsync(accept_Language, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the medical restrictions for a given policy holder id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The medical restrictions of the partner have been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<MedicalRestrictionDto>> GetMedicalRestrictionsUsingGETAsync(AcceptLanguage17? accept_Language, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/partners/{policyHolderId}/medical-restrictions");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<MedicalRestrictionDto>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The policy holder has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<MedicalRestrictionDto>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve the list of relations for a given partner and type</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">Partner Policy Holder Id</param>
/// <param name="type">Type of the relation</param>
/// <returns>The list of relations for a given policy holder id has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<PartnerRelation>> ListRelationsUsingGETAsync(AcceptLanguage18? accept_Language, int? policyHolderId, Type? type)
{
return ListRelationsUsingGETAsync(accept_Language, policyHolderId, type, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve the list of relations for a given partner and type</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">Partner Policy Holder Id</param>
/// <param name="type">Type of the relation</param>
/// <returns>The list of relations for a given policy holder id has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<PartnerRelation>> ListRelationsUsingGETAsync(AcceptLanguage18? accept_Language, int? policyHolderId, Type? type, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/relations?");
if (policyHolderId != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("policyHolderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
if (type != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<PartnerRelation>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<PartnerRelation>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Create a new relation between 2 partners</summary>
/// <param name="accept_Language">Language</param>
/// <param name="relationDto">relationDto</param>
/// <returns>The relation between partners has been created</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<PartnerRelation> CreateRelationUsingPOSTAsync(AcceptLanguage19? accept_Language, BaseRelation relationDto)
{
return CreateRelationUsingPOSTAsync(accept_Language, relationDto, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Create a new relation between 2 partners</summary>
/// <param name="accept_Language">Language</param>
/// <param name="relationDto">relationDto</param>
/// <returns>The relation between partners has been created</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<PartnerRelation> CreateRelationUsingPOSTAsync(AcceptLanguage19? accept_Language, BaseRelation relationDto, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/relations");
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(relationDto, _settings.Value));
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "201")
{
var objectResponse_ = await ReadObjectResponseAsync<PartnerRelation>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("Invalid partner", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(PartnerRelation);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve a relation from a given Id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="id">id</param>
/// <returns>The relation has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<PartnerRelation> GetRelationUsingGETAsync(AcceptLanguage20? accept_Language, long id)
{
return GetRelationUsingGETAsync(accept_Language, id, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve a relation from a given Id</summary>
/// <param name="accept_Language">Language</param>
/// <param name="id">id</param>
/// <returns>The relation has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<PartnerRelation> GetRelationUsingGETAsync(AcceptLanguage20? accept_Language, long id, System.Threading.CancellationToken cancellationToken)
{
if (id == null)
throw new System.ArgumentNullException("id");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/relations/{id}");
urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<PartnerRelation>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The relation has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(PartnerRelation);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Update a relation between 2 partners</summary>
/// <param name="accept_Language">Language</param>
/// <param name="id">id</param>
/// <param name="relationDto">relationDto</param>
/// <returns>The relation between partners has been updated</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<PartnerRelation> UpdateRelationUsingPUTAsync(AcceptLanguage21? accept_Language, long id, BaseRelation relationDto)
{
return UpdateRelationUsingPUTAsync(accept_Language, id, relationDto, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Update a relation between 2 partners</summary>
/// <param name="accept_Language">Language</param>
/// <param name="id">id</param>
/// <param name="relationDto">relationDto</param>
/// <returns>The relation between partners has been updated</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<PartnerRelation> UpdateRelationUsingPUTAsync(AcceptLanguage21? accept_Language, long id, BaseRelation relationDto, System.Threading.CancellationToken cancellationToken)
{
if (id == null)
throw new System.ArgumentNullException("id");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/relations/{id}");
urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(relationDto, _settings.Value));
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("*/*"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<PartnerRelation>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("Invalid partner", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The relation has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "409")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The relation has already been modified", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(PartnerRelation);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Delete a relation between 2 partners</summary>
/// <param name="accept_Language">Language</param>
/// <param name="id">id</param>
/// <returns>The partner relation has been deleted</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task DeleteRelationUsingDELETEAsync(AcceptLanguage22? accept_Language, long id)
{
return DeleteRelationUsingDELETEAsync(accept_Language, id, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Delete a relation between 2 partners</summary>
/// <param name="accept_Language">Language</param>
/// <param name="id">id</param>
/// <returns>The partner relation has been deleted</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task DeleteRelationUsingDELETEAsync(AcceptLanguage22? accept_Language, long id, System.Threading.CancellationToken cancellationToken)
{
if (id == null)
throw new System.ArgumentNullException("id");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/relations/{id}");
urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("DELETE");
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "204")
{
return;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The relation has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
/// <summary>Retrieve a supplier's data</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The supplier's data has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<SupplierBusiness>> GetSupplierDataUsingGETAsync(AcceptLanguage23? accept_Language, int policyHolderId)
{
return GetSupplierDataUsingGETAsync(accept_Language, policyHolderId, System.Threading.CancellationToken.None);
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>Retrieve a supplier's data</summary>
/// <param name="accept_Language">Language</param>
/// <param name="policyHolderId">policyHolderId</param>
/// <returns>The supplier's data has been returned</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<SupplierBusiness>> GetSupplierDataUsingGETAsync(AcceptLanguage23? accept_Language, int policyHolderId, System.Threading.CancellationToken cancellationToken)
{
if (policyHolderId == null)
throw new System.ArgumentNullException("policyHolderId");
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/suppliers/{policyHolderId}");
urlBuilder_.Replace("{policyHolderId}", System.Uri.EscapeDataString(ConvertToString(policyHolderId, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
if (accept_Language != null)
request_.Headers.TryAddWithoutValidation("Accept-Language", ConvertToString(accept_Language, System.Globalization.CultureInfo.InvariantCulture));
request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
PrepareRequest(client_, request_, url_);
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}
ProcessResponse(client_, response_);
var status_ = ((int)response_.StatusCode).ToString();
if (status_ == "200")
{
var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<SupplierBusiness>>(response_, headers_).ConfigureAwait(false);
return objectResponse_.Object;
}
else
if (status_ == "400")
{
var objectResponse_ = await ReadObjectResponseAsync<ValidationResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ValidationResponse>("Invalid parameter", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ == "404")
{
var objectResponse_ = await ReadObjectResponseAsync<ErrorResponse>(response_, headers_).ConfigureAwait(false);
throw new ApiException<ErrorResponse>("The partner has not been found", (int)response_.StatusCode, objectResponse_.Text, headers_, objectResponse_.Object, null);
}
else
if (status_ != "200" && status_ != "204")
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null);
}
return default(System.Collections.Generic.ICollection<SupplierBusiness>);
}
finally
{
if (response_ != null)
response_.Dispose();
}
}
}
finally
{
}
}
protected struct ObjectResponseResult<T>
{
public ObjectResponseResult(T responseObject, string responseText)
{
this.Object = responseObject;
this.Text = responseText;
}
public T Object { get; }
public string Text { get; }
}
public bool ReadResponseAsString { get; set; }
protected virtual async System.Threading.Tasks.Task<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers)
{
if (response == null || response.Content == null)
{
return new ObjectResponseResult<T>(default(T), string.Empty);
}
if (ReadResponseAsString)
{
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings);
return new ObjectResponseResult<T>(typedBody, responseText);
}
catch (Newtonsoft.Json.JsonException exception)
{
var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception);
}
}
else
{
try
{
using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
using (var streamReader = new System.IO.StreamReader(responseStream))
using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
{
var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
var typedBody = serializer.Deserialize<T>(jsonTextReader);
return new ObjectResponseResult<T>(typedBody, string.Empty);
}
}
catch (Newtonsoft.Json.JsonException exception)
{
var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception);
}
}
}
private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo)
{
if (value is System.Enum)
{
string name = System.Enum.GetName(value.GetType(), value);
if (name != null)
{
var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
if (field != null)
{
var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute))
as System.Runtime.Serialization.EnumMemberAttribute;
if (attribute != null)
{
return attribute.Value != null ? attribute.Value : name;
}
}
}
}
else if (value is bool) {
return System.Convert.ToString(value, cultureInfo).ToLowerInvariant();
}
else if (value is byte[])
{
return System.Convert.ToBase64String((byte[]) value);
}
else if (value != null && value.GetType().IsArray)
{
var array = System.Linq.Enumerable.OfType<object>((System.Array) value);
return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo)));
}
return System.Convert.ToString(value, cultureInfo);
}
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class BankingInformationDto
{
/// <summary>Address of the bank</summary>
[Newtonsoft.Json.JsonProperty("bankAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PartnerAddress BankAddress { get; set; }
/// <summary>Bank name of the partner</summary>
[Newtonsoft.Json.JsonProperty("bankName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string BankName { get; set; }
/// <summary>The policy holder Id of the bank</summary>
[Newtonsoft.Json.JsonProperty("bankPolicyHolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? BankPolicyHolderId { get; set; }
/// <summary>IBAN of the partner without spaces</summary>
[Newtonsoft.Json.JsonProperty("iban", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Iban { get; set; }
/// <summary>Address of the partner</summary>
[Newtonsoft.Json.JsonProperty("partnerAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public PartnerAddress PartnerAddress { get; set; }
}
/// <summary>Create/Update PartnerRelation</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class BaseRelation
{
/// <summary>The date at which the relationship ended. If the relationship is ongoing, endDate is null</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string RelationType { get; set; }
/// <summary>The partner policy holder id the target partner is linked to</summary>
[Newtonsoft.Json.JsonProperty("sourcePartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int SourcePartner { get; set; }
/// <summary>The date at which the relationship started</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
/// <summary>Timestamp of the last update</summary>
[Newtonsoft.Json.JsonProperty("statusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StatusId { get; set; }
/// <summary>The partner policy holder id with whom the source partner is linked</summary>
[Newtonsoft.Json.JsonProperty("targetPartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int TargetPartner { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public BaseRelationType Type { get; set; }
/// <summary>ID of the user who created/updated the relationship</summary>
[Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)]
public int UserId { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Company : Partner
{
/// <summary>Annual revenue of the company</summary>
[Newtonsoft.Json.JsonProperty("annualRevenue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double? AnnualRevenue { get; set; }
/// <summary>Company business identification number</summary>
[Newtonsoft.Json.JsonProperty("businessIdentificationNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string BusinessIdentificationNumber { get; set; }
/// <summary>Company name</summary>
[Newtonsoft.Json.JsonProperty("companyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string CompanyName { get; set; }
/// <summary>Date of the partner entry creation</summary>
[Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? CreationDate { get; set; }
/// <summary>Company economic sector</summary>
[Newtonsoft.Json.JsonProperty("economicSector", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? EconomicSector { get; set; }
/// <summary>Partner personal email address</summary>
[Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Email { get; set; }
/// <summary>Partner fax number</summary>
[Newtonsoft.Json.JsonProperty("faxNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FaxNumber { get; set; }
/// <summary>Date of creation of the company</summary>
[Newtonsoft.Json.JsonProperty("foundationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FoundationDate { get; set; }
/// <summary>Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found.</summary>
[Newtonsoft.Json.JsonProperty("isCancelled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsCancelled { get; set; }
/// <summary>Indicates whether the partner is an injured party</summary>
[Newtonsoft.Json.JsonProperty("isInjuredParty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsInjuredParty { get; set; }
/// <summary>Indicates whether the partner is a Vaudoise policy holder</summary>
[Newtonsoft.Json.JsonProperty("isPolicyHolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsPolicyHolder { get; set; }
/// <summary>Indicates whether the partner gives a reason for concern (e.g. Payment delays)</summary>
[Newtonsoft.Json.JsonProperty("isUnderMonitoring", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsUnderMonitoring { get; set; }
/// <summary>Indicates whether the partner pays a flat rate in case this latter is liable to VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatFlatRate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatFlatRate { get; set; }
/// <summary>Indicates whether the partner is liable to pay VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatLiable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatLiable { get; set; }
/// <summary>Indicates whether the partner is VIP</summary>
[Newtonsoft.Json.JsonProperty("isVip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVip { get; set; }
/// <summary>Partner ISNPers</summary>
[Newtonsoft.Json.JsonProperty("isnPers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? IsnPers { get; set; }
/// <summary>Partner language</summary>
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Language { get; set; }
/// <summary>Type of company</summary>
[Newtonsoft.Json.JsonProperty("legalFormCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public CompanyLegalFormCode? LegalFormCode { get; set; }
/// <summary>Managing agency of the policy holder</summary>
[Newtonsoft.Json.JsonProperty("managingAgency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ManagingAgency { get; set; }
/// <summary>Partner mobile phone</summary>
[Newtonsoft.Json.JsonProperty("mobilePhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MobilePhone { get; set; }
/// <summary>Company Noga code</summary>
[Newtonsoft.Json.JsonProperty("nogaCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string NogaCode { get; set; }
/// <summary>Number of employees in the company</summary>
[Newtonsoft.Json.JsonProperty("numberOfEmployees", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? NumberOfEmployees { get; set; }
/// <summary>Company payroll</summary>
[Newtonsoft.Json.JsonProperty("payroll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double? Payroll { get; set; }
/// <summary>Partner phone</summary>
[Newtonsoft.Json.JsonProperty("phone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Phone { get; set; }
/// <summary>Partner Policy Holder Id</summary>
[Newtonsoft.Json.JsonProperty("policyHolderId", Required = Newtonsoft.Json.Required.Always)]
public int PolicyHolderId { get; set; }
/// <summary>Statistics related to the partner</summary>
[Newtonsoft.Json.JsonProperty("statistics", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public PartnerStatisticsDto Statistics { get; set; } = new PartnerStatisticsDto();
/// <summary>Partner type</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public CompanyType Type { get; set; }
/// <summary>Unique user id of the person who updated the partner entry</summary>
[Newtonsoft.Json.JsonProperty("updatedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? UpdatedBy { get; set; }
/// <summary>Date of the latest partner entry update</summary>
[Newtonsoft.Json.JsonProperty("updatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? UpdatedDate { get; set; }
/// <summary>Partner professional email address</summary>
[Newtonsoft.Json.JsonProperty("workEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkEmail { get; set; }
/// <summary>Partner work phone</summary>
[Newtonsoft.Json.JsonProperty("workPhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkPhone { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Couple : Partner
{
/// <summary>Couple name</summary>
[Newtonsoft.Json.JsonProperty("coupleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string CoupleName { get; set; }
/// <summary>Date of the partner entry creation</summary>
[Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? CreationDate { get; set; }
/// <summary>Partner personal email address</summary>
[Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Email { get; set; }
/// <summary>Partner fax number</summary>
[Newtonsoft.Json.JsonProperty("faxNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FaxNumber { get; set; }
/// <summary>Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found.</summary>
[Newtonsoft.Json.JsonProperty("isCancelled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsCancelled { get; set; }
/// <summary>Indicates whether the partner is an injured party</summary>
[Newtonsoft.Json.JsonProperty("isInjuredParty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsInjuredParty { get; set; }
/// <summary>Indicates whether the partner is a Vaudoise policy holder</summary>
[Newtonsoft.Json.JsonProperty("isPolicyHolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsPolicyHolder { get; set; }
/// <summary>Indicates whether the partner gives a reason for concern (e.g. Payment delays)</summary>
[Newtonsoft.Json.JsonProperty("isUnderMonitoring", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsUnderMonitoring { get; set; }
/// <summary>Indicates whether the partner pays a flat rate in case this latter is liable to VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatFlatRate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatFlatRate { get; set; }
/// <summary>Indicates whether the partner is liable to pay VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatLiable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatLiable { get; set; }
/// <summary>Indicates whether the partner is VIP</summary>
[Newtonsoft.Json.JsonProperty("isVip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVip { get; set; }
/// <summary>Partner ISNPers</summary>
[Newtonsoft.Json.JsonProperty("isnPers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? IsnPers { get; set; }
/// <summary>Partner language</summary>
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Language { get; set; }
/// <summary>Managing agency of the policy holder</summary>
[Newtonsoft.Json.JsonProperty("managingAgency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ManagingAgency { get; set; }
/// <summary>Partner mobile phone</summary>
[Newtonsoft.Json.JsonProperty("mobilePhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MobilePhone { get; set; }
/// <summary>Partner phone</summary>
[Newtonsoft.Json.JsonProperty("phone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Phone { get; set; }
/// <summary>Partner Policy Holder Id</summary>
[Newtonsoft.Json.JsonProperty("policyHolderId", Required = Newtonsoft.Json.Required.Always)]
public int PolicyHolderId { get; set; }
/// <summary>Statistics related to the partner</summary>
[Newtonsoft.Json.JsonProperty("statistics", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public PartnerStatisticsDto Statistics { get; set; } = new PartnerStatisticsDto();
/// <summary>Partner type</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public CoupleType Type { get; set; }
/// <summary>Unique user id of the person who updated the partner entry</summary>
[Newtonsoft.Json.JsonProperty("updatedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? UpdatedBy { get; set; }
/// <summary>Date of the latest partner entry update</summary>
[Newtonsoft.Json.JsonProperty("updatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? UpdatedDate { get; set; }
/// <summary>Partner professional email address</summary>
[Newtonsoft.Json.JsonProperty("workEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkEmail { get; set; }
/// <summary>Partner work phone</summary>
[Newtonsoft.Json.JsonProperty("workPhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkPhone { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class DependencyDto
{
[Newtonsoft.Json.JsonProperty("depth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? Depth { get; set; }
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Name { get; set; }
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public DependencyDtoStatus? Status { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class ErrorResponse
{
/// <summary>Code that can be used to implement a custom translation</summary>
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Code { get; set; }
/// <summary>Message in the language provided in the request</summary>
[Newtonsoft.Json.JsonProperty("display", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Display { get; set; }
/// <summary>Identifier</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Id { get; set; }
/// <summary>Message in system language (i.e. English)</summary>
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Message { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class FamilyRelation : BaseRelation
{
/// <summary>The partner policy holder id dependent of the source partner</summary>
[Newtonsoft.Json.JsonProperty("dependentPartner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? DependentPartner { get; set; }
/// <summary>The date at which the relationship ended. If the relationship is ongoing, endDate is null</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>ID of the partner relationship</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? Id { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string RelationType { get; set; }
/// <summary>The partner policy holder id the target partner is linked to</summary>
[Newtonsoft.Json.JsonProperty("sourcePartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int SourcePartner { get; set; }
/// <summary>The date at which the relationship started</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
/// <summary>Timestamp of the last update</summary>
[Newtonsoft.Json.JsonProperty("statusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StatusId { get; set; }
/// <summary>The partner policy holder id with whom the source partner is linked</summary>
[Newtonsoft.Json.JsonProperty("targetPartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int TargetPartner { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public FamilyRelationType Type { get; set; }
/// <summary>Type of union (Only used to describe a marriage/partnership union)</summary>
[Newtonsoft.Json.JsonProperty("unionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string UnionType { get; set; }
/// <summary>ID of the user who created/updated the relationship</summary>
[Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)]
public int UserId { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class HealthDto
{
[Newtonsoft.Json.JsonProperty("dependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<DependencyDto> Dependencies { get; set; }
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Name { get; set; }
[Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public HealthDtoStatus? Status { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class InfoDto
{
[Newtonsoft.Json.JsonProperty("product", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Product { get; set; }
[Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Version { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Leisure
{
/// <summary>The code of the category associated with this leisure</summary>
[Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Category { get; set; }
/// <summary>The unique id corresponding to the leisure</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Id { get; set; }
/// <summary>The translated value of the leisure</summary>
[Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Label { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class LeisureCategory
{
/// <summary>The code corresponding to the leisure category</summary>
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Code { get; set; }
/// <summary>The translated label of the category</summary>
[Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Label { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class LeisureCreationDto
{
[Newtonsoft.Json.JsonProperty("leisureId", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string LeisureId { get; set; }
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Log
{
/// <summary>User Id of the log author. Detailed information can be retrieved from the user endpoint in the Employee microservice</summary>
[Newtonsoft.Json.JsonProperty("authorUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? AuthorUserId { get; set; }
/// <summary>Creation date of the log</summary>
[Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string CreationDate { get; set; }
/// <summary>List of operation logs</summary>
[Newtonsoft.Json.JsonProperty("operations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<OperationLog> Operations { get; set; }
/// <summary>Log title</summary>
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Title { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class MedicalRestrictionDto
{
/// <summary>End date of the medical restriction</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>Start date of the medical restriction</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
/// <summary>Type of the medical restriction</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public MedicalRestrictionDtoType Type { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class MetricsDto
{
[Newtonsoft.Json.JsonProperty("environmentArchitecture", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EnvironmentArchitecture { get; set; }
[Newtonsoft.Json.JsonProperty("environmentName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EnvironmentName { get; set; }
[Newtonsoft.Json.JsonProperty("machineDomain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MachineDomain { get; set; }
[Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MachineName { get; set; }
[Newtonsoft.Json.JsonProperty("machineOS", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MachineOS { get; set; }
[Newtonsoft.Json.JsonProperty("machineProcessorCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? MachineProcessorCount { get; set; }
[Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ServiceName { get; set; }
[Newtonsoft.Json.JsonProperty("serviceProcessId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? ServiceProcessId { get; set; }
[Newtonsoft.Json.JsonProperty("serviceStartTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ServiceStartTime { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class OperationLog
{
/// <summary>User Id of the log author. Detailed information can be retrieved from the user endpoint in the Employee microservice</summary>
[Newtonsoft.Json.JsonProperty("authorUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? AuthorUserId { get; set; }
/// <summary>Creation date of the operation log</summary>
[Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string CreationDate { get; set; }
/// <summary>Detailed description of the operation log</summary>
[Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Description { get; set; }
/// <summary>Order of the operation</summary>
[Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? Order { get; set; }
/// <summary>Title of the operation log</summary>
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Title { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class OwnerRelation : BaseRelation
{
/// <summary>The date at which the relationship ended. If the relationship is ongoing, endDate is null</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>ID of the partner relationship</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? Id { get; set; }
/// <summary>Date at which the relationship details have been communicated for the last time</summary>
[Newtonsoft.Json.JsonProperty("lastInfoDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string LastInfoDate { get; set; }
/// <summary>Relationship subtype</summary>
[Newtonsoft.Json.JsonProperty("ownerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string OwnerType { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string RelationType { get; set; }
/// <summary>The partner policy holder id the target partner is linked to</summary>
[Newtonsoft.Json.JsonProperty("sourcePartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int SourcePartner { get; set; }
/// <summary>The date at which the relationship started</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
/// <summary>Status code indicating the relationship validity. Status code can be either 1 or 2</summary>
[Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? StatusCode { get; set; }
/// <summary>Timestamp of the last update</summary>
[Newtonsoft.Json.JsonProperty("statusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StatusId { get; set; }
/// <summary>The partner policy holder id with whom the source partner is linked</summary>
[Newtonsoft.Json.JsonProperty("targetPartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int TargetPartner { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public OwnerRelationType Type { get; set; }
/// <summary>ID of the user who created/updated the relationship</summary>
[Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)]
public int UserId { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Pageable
{
[Newtonsoft.Json.JsonProperty("offset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? Offset { get; set; }
[Newtonsoft.Json.JsonProperty("pageNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? PageNumber { get; set; }
[Newtonsoft.Json.JsonProperty("pageSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? PageSize { get; set; }
[Newtonsoft.Json.JsonProperty("paged", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Paged { get; set; }
[Newtonsoft.Json.JsonProperty("sort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Sort Sort { get; set; }
[Newtonsoft.Json.JsonProperty("unpaged", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Unpaged { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Page«Partner»
{
[Newtonsoft.Json.JsonProperty("content", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<Partner> Content { get; set; }
[Newtonsoft.Json.JsonProperty("empty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Empty { get; set; }
[Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? First { get; set; }
[Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Last { get; set; }
[Newtonsoft.Json.JsonProperty("number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? Number { get; set; }
[Newtonsoft.Json.JsonProperty("numberOfElements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? NumberOfElements { get; set; }
[Newtonsoft.Json.JsonProperty("pageable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Pageable Pageable { get; set; }
[Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? Size { get; set; }
[Newtonsoft.Json.JsonProperty("sort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Sort Sort { get; set; }
[Newtonsoft.Json.JsonProperty("totalElements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? TotalElements { get; set; }
[Newtonsoft.Json.JsonProperty("totalPages", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? TotalPages { get; set; }
}
[Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "type")]
[JsonInheritanceAttribute("Company", typeof(Company))]
[JsonInheritanceAttribute("Couple", typeof(Couple))]
[JsonInheritanceAttribute("Person", typeof(Person))]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Partner
{
/// <summary>Date of the partner entry creation</summary>
[Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? CreationDate { get; set; }
/// <summary>Partner personal email address</summary>
[Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Email { get; set; }
/// <summary>Partner fax number</summary>
[Newtonsoft.Json.JsonProperty("faxNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FaxNumber { get; set; }
/// <summary>Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found.</summary>
[Newtonsoft.Json.JsonProperty("isCancelled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsCancelled { get; set; }
/// <summary>Indicates whether the partner is an injured party</summary>
[Newtonsoft.Json.JsonProperty("isInjuredParty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsInjuredParty { get; set; }
/// <summary>Indicates whether the partner is a Vaudoise policy holder</summary>
[Newtonsoft.Json.JsonProperty("isPolicyHolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsPolicyHolder { get; set; }
/// <summary>Indicates whether the partner gives a reason for concern (e.g. Payment delays)</summary>
[Newtonsoft.Json.JsonProperty("isUnderMonitoring", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsUnderMonitoring { get; set; }
/// <summary>Indicates whether the partner pays a flat rate in case this latter is liable to VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatFlatRate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatFlatRate { get; set; }
/// <summary>Indicates whether the partner is liable to pay VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatLiable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatLiable { get; set; }
/// <summary>Indicates whether the partner is VIP</summary>
[Newtonsoft.Json.JsonProperty("isVip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVip { get; set; }
/// <summary>Partner ISNPers</summary>
[Newtonsoft.Json.JsonProperty("isnPers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? IsnPers { get; set; }
/// <summary>Partner language</summary>
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Language { get; set; }
/// <summary>Managing agency of the policy holder</summary>
[Newtonsoft.Json.JsonProperty("managingAgency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ManagingAgency { get; set; }
/// <summary>Partner mobile phone</summary>
[Newtonsoft.Json.JsonProperty("mobilePhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MobilePhone { get; set; }
/// <summary>Partner phone</summary>
[Newtonsoft.Json.JsonProperty("phone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Phone { get; set; }
/// <summary>Partner Policy Holder Id</summary>
[Newtonsoft.Json.JsonProperty("policyHolderId", Required = Newtonsoft.Json.Required.Always)]
public int PolicyHolderId { get; set; }
/// <summary>Statistics related to the partner</summary>
[Newtonsoft.Json.JsonProperty("statistics", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public PartnerStatisticsDto Statistics { get; set; } = new PartnerStatisticsDto();
/// <summary>Unique user id of the person who updated the partner entry</summary>
[Newtonsoft.Json.JsonProperty("updatedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? UpdatedBy { get; set; }
/// <summary>Date of the latest partner entry update</summary>
[Newtonsoft.Json.JsonProperty("updatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? UpdatedDate { get; set; }
/// <summary>Partner professional email address</summary>
[Newtonsoft.Json.JsonProperty("workEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkEmail { get; set; }
/// <summary>Partner work phone</summary>
[Newtonsoft.Json.JsonProperty("workPhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkPhone { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class PartnerAddress
{
/// <summary>2 character Canton Code</summary>
[Newtonsoft.Json.JsonProperty("canton", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Canton { get; set; }
/// <summary>City name</summary>
[Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string City { get; set; }
/// <summary>Address or recipient optional complement</summary>
[Newtonsoft.Json.JsonProperty("complement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Complement { get; set; }
/// <summary>2 character Country ISO Code</summary>
[Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string Country { get; set; }
/// <summary>ID of the address</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)]
public long Id { get; set; }
/// <summary>Order in the list of addresses</summary>
[Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Always)]
public int Order { get; set; }
/// <summary>City postcode</summary>
[Newtonsoft.Json.JsonProperty("postCode", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string PostCode { get; set; }
/// <summary>Recipient : if this information is present, it should be considered as the partner name in the address</summary>
[Newtonsoft.Json.JsonProperty("recipient", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Recipient { get; set; }
/// <summary>Street</summary>
[Newtonsoft.Json.JsonProperty("street", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string Street { get; set; }
/// <summary>Type of the address (Enum). Warning: An AIA address is not editable and must be used cautiously. This latter is a copy of the address used to create a tax certificate and may be out-of-date</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public PartnerAddressType Type { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class PartnerLeisure
{
/// <summary>The code of the category associated with this leisure</summary>
[Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Category { get; set; }
/// <summary>The end date of this leisure</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>The unique id corresponding to the leisure</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Id { get; set; }
/// <summary>The translated value of the leisure</summary>
[Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Label { get; set; }
/// <summary>The start date of this leisure</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class PartnerRelation
{
/// <summary>The date at which the relationship ended. If the relationship is ongoing, endDate is null</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>ID of the partner relationship</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? Id { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string RelationType { get; set; }
/// <summary>The partner policy holder id the target partner is linked to</summary>
[Newtonsoft.Json.JsonProperty("sourcePartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int SourcePartner { get; set; }
/// <summary>The date at which the relationship started</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
/// <summary>Timestamp of the last update</summary>
[Newtonsoft.Json.JsonProperty("statusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StatusId { get; set; }
/// <summary>The partner policy holder id with whom the source partner is linked</summary>
[Newtonsoft.Json.JsonProperty("targetPartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int TargetPartner { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public PartnerRelationType Type { get; set; }
/// <summary>ID of the user who created/updated the relationship</summary>
[Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)]
public int UserId { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class PartnerStatisticsDto
{
/// <summary>Partner net claim ratio</summary>
[Newtonsoft.Json.JsonProperty("netClaimRatio", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double? NetClaimRatio { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Person : Partner
{
/// <summary>Partner AVS Number</summary>
[Newtonsoft.Json.JsonProperty("avsNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? AvsNumber { get; set; }
/// <summary>Partner BirthDate</summary>
[Newtonsoft.Json.JsonProperty("birthDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string BirthDate { get; set; }
/// <summary>Partner civil status</summary>
[Newtonsoft.Json.JsonProperty("civilStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public PersonCivilStatus? CivilStatus { get; set; }
/// <summary>Date of the partner entry creation</summary>
[Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? CreationDate { get; set; }
/// <summary>Date of death if any</summary>
[Newtonsoft.Json.JsonProperty("deceasedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string DeceasedDate { get; set; }
/// <summary>Partner driver license issue date</summary>
[Newtonsoft.Json.JsonProperty("driverLicenseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string DriverLicenseDate { get; set; }
/// <summary>Partner personal email address</summary>
[Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Email { get; set; }
/// <summary>Partner fax number</summary>
[Newtonsoft.Json.JsonProperty("faxNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FaxNumber { get; set; }
/// <summary>Partner first name</summary>
[Newtonsoft.Json.JsonProperty("firstName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FirstName { get; set; }
/// <summary>Partner honorific title (Prof Dr, Prince...)</summary>
[Newtonsoft.Json.JsonProperty("honorificTitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string HonorificTitle { get; set; }
/// <summary>Indicates if the partner policy holder Id is cancelled. A partner is cancelled when a duplicate entry is found.</summary>
[Newtonsoft.Json.JsonProperty("isCancelled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsCancelled { get; set; }
/// <summary>Indicates whether the partner is deceased</summary>
[Newtonsoft.Json.JsonProperty("isDeceased", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsDeceased { get; set; }
/// <summary>Indicates whether the partner is a Vaudoise employee</summary>
[Newtonsoft.Json.JsonProperty("isEmployee", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsEmployee { get; set; }
/// <summary>Indicates whether the partner is an injured party</summary>
[Newtonsoft.Json.JsonProperty("isInjuredParty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsInjuredParty { get; set; }
/// <summary>Indicates whether the partner is a Vaudoise policy holder</summary>
[Newtonsoft.Json.JsonProperty("isPolicyHolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsPolicyHolder { get; set; }
/// <summary>Indicates whether the partner gives a reason for concern (e.g. Payment delays)</summary>
[Newtonsoft.Json.JsonProperty("isUnderMonitoring", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsUnderMonitoring { get; set; }
/// <summary>Indicates whether the partner pays a flat rate in case this latter is liable to VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatFlatRate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatFlatRate { get; set; }
/// <summary>Indicates whether the partner is liable to pay VAT</summary>
[Newtonsoft.Json.JsonProperty("isVatLiable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVatLiable { get; set; }
/// <summary>Indicates whether the partner is VIP</summary>
[Newtonsoft.Json.JsonProperty("isVip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsVip { get; set; }
/// <summary>Partner ISNPers</summary>
[Newtonsoft.Json.JsonProperty("isnPers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? IsnPers { get; set; }
/// <summary>Partner language</summary>
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Language { get; set; }
/// <summary>Partner last name</summary>
[Newtonsoft.Json.JsonProperty("lastName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string LastName { get; set; }
/// <summary>Partner maiden name</summary>
[Newtonsoft.Json.JsonProperty("maidenName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MaidenName { get; set; }
/// <summary>Managing agency of the policy holder</summary>
[Newtonsoft.Json.JsonProperty("managingAgency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ManagingAgency { get; set; }
/// <summary>Partner mobile phone</summary>
[Newtonsoft.Json.JsonProperty("mobilePhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string MobilePhone { get; set; }
/// <summary>Partner nationality</summary>
[Newtonsoft.Json.JsonProperty("nationality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Nationality { get; set; }
/// <summary>Partner occupation</summary>
[Newtonsoft.Json.JsonProperty("occupation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Occupation { get; set; }
/// <summary>Partner phone</summary>
[Newtonsoft.Json.JsonProperty("phone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Phone { get; set; }
/// <summary>Partner Policy Holder Id</summary>
[Newtonsoft.Json.JsonProperty("policyHolderId", Required = Newtonsoft.Json.Required.Always)]
public int PolicyHolderId { get; set; }
/// <summary>Statistics related to the partner</summary>
[Newtonsoft.Json.JsonProperty("statistics", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public PartnerStatisticsDto Statistics { get; set; } = new PartnerStatisticsDto();
/// <summary>Partner title</summary>
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public PersonTitle? Title { get; set; }
/// <summary>Partner type</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public PersonType Type { get; set; }
/// <summary>Unique user id of the person who updated the partner entry</summary>
[Newtonsoft.Json.JsonProperty("updatedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? UpdatedBy { get; set; }
/// <summary>Date of the latest partner entry update</summary>
[Newtonsoft.Json.JsonProperty("updatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.DateTimeOffset? UpdatedDate { get; set; }
/// <summary>Partner professional email address</summary>
[Newtonsoft.Json.JsonProperty("workEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkEmail { get; set; }
/// <summary>Partner work phone</summary>
[Newtonsoft.Json.JsonProperty("workPhone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string WorkPhone { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class ProxyRelation : BaseRelation
{
/// <summary>The date at which the relationship ended. If the relationship is ongoing, endDate is null</summary>
[Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string EndDate { get; set; }
/// <summary>ID of the partner relationship</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? Id { get; set; }
/// <summary>Date at which the relationship details have been communicated for the last time</summary>
[Newtonsoft.Json.JsonProperty("lastInfoDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string LastInfoDate { get; set; }
/// <summary>Relationship subtype</summary>
[Newtonsoft.Json.JsonProperty("proxyType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ProxyType { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
public string RelationType { get; set; }
/// <summary>The partner policy holder id the target partner is linked to</summary>
[Newtonsoft.Json.JsonProperty("sourcePartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int SourcePartner { get; set; }
/// <summary>The date at which the relationship started</summary>
[Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StartDate { get; set; }
/// <summary>Status code indicating the relationship validity. Status code can be either 1 or 2</summary>
[Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? StatusCode { get; set; }
/// <summary>Timestamp of the last update</summary>
[Newtonsoft.Json.JsonProperty("statusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string StatusId { get; set; }
/// <summary>The partner policy holder id with whom the source partner is linked</summary>
[Newtonsoft.Json.JsonProperty("targetPartner", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Range(int.MinValue, 99999999)]
public int TargetPartner { get; set; }
/// <summary>Type of relationship</summary>
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public ProxyRelationType Type { get; set; }
/// <summary>ID of the user who created/updated the relationship</summary>
[Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)]
public int UserId { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class Sort
{
[Newtonsoft.Json.JsonProperty("empty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Empty { get; set; }
[Newtonsoft.Json.JsonProperty("sorted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Sorted { get; set; }
[Newtonsoft.Json.JsonProperty("unsorted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Unsorted { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class SupplierBusiness
{
/// <summary>Value of the business with the supplier</summary>
[Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double? Amount { get; set; }
/// <summary>Number of invoices</summary>
[Newtonsoft.Json.JsonProperty("numberOfInvoices", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? NumberOfInvoices { get; set; }
/// <summary>Business year</summary>
[Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? Year { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class ValidationMessage
{
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Code { get; set; }
[Newtonsoft.Json.JsonProperty("display", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Display { get; set; }
[Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<string> Fields { get; set; }
[Newtonsoft.Json.JsonProperty("valParams", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.IDictionary<string, string> ValParams { get; set; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public partial class ValidationResponse
{
[Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<ValidationMessage> Validations { get; set; }
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage2
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage3
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage4
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage5
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage6
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum Anonymous
{
[System.Runtime.Serialization.EnumMember(Value = @"person")]
Person = 0,
[System.Runtime.Serialization.EnumMember(Value = @"company")]
Company = 1,
[System.Runtime.Serialization.EnumMember(Value = @"couple")]
Couple = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage7
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage8
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage9
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage10
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage11
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage12
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage13
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage14
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage15
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage16
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage17
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage18
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Type of the relation</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum Type
{
[System.Runtime.Serialization.EnumMember(Value = @"family")]
Family = 0,
[System.Runtime.Serialization.EnumMember(Value = @"ownership")]
Ownership = 1,
[System.Runtime.Serialization.EnumMember(Value = @"proxy")]
Proxy = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage19
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage20
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage21
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage22
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
/// <summary>Language</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum AcceptLanguage23
{
[System.Runtime.Serialization.EnumMember(Value = @"FR")]
FR = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DE")]
DE = 1,
[System.Runtime.Serialization.EnumMember(Value = @"IT")]
IT = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum BaseRelationType
{
[System.Runtime.Serialization.EnumMember(Value = @"family")]
Family = 0,
[System.Runtime.Serialization.EnumMember(Value = @"ownership")]
Ownership = 1,
[System.Runtime.Serialization.EnumMember(Value = @"proxy")]
Proxy = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum CompanyLegalFormCode
{
[System.Runtime.Serialization.EnumMember(Value = @"personalCompany")]
PersonalCompany = 0,
[System.Runtime.Serialization.EnumMember(Value = @"simpleCompany")]
SimpleCompany = 1,
[System.Runtime.Serialization.EnumMember(Value = @"generalPartnership")]
GeneralPartnership = 2,
[System.Runtime.Serialization.EnumMember(Value = @"limitedPartnership")]
LimitedPartnership = 3,
[System.Runtime.Serialization.EnumMember(Value = @"limitedSharesPartnership")]
LimitedSharesPartnership = 4,
[System.Runtime.Serialization.EnumMember(Value = @"anonymousPartnership")]
AnonymousPartnership = 5,
[System.Runtime.Serialization.EnumMember(Value = @"limitedLiabilityPartnership")]
LimitedLiabilityPartnership = 6,
[System.Runtime.Serialization.EnumMember(Value = @"cooperativePartnership")]
CooperativePartnership = 7,
[System.Runtime.Serialization.EnumMember(Value = @"other")]
Other = 8,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum CompanyType
{
[System.Runtime.Serialization.EnumMember(Value = @"person")]
Person = 0,
[System.Runtime.Serialization.EnumMember(Value = @"company")]
Company = 1,
[System.Runtime.Serialization.EnumMember(Value = @"couple")]
Couple = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum CoupleType
{
[System.Runtime.Serialization.EnumMember(Value = @"person")]
Person = 0,
[System.Runtime.Serialization.EnumMember(Value = @"company")]
Company = 1,
[System.Runtime.Serialization.EnumMember(Value = @"couple")]
Couple = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum DependencyDtoStatus
{
[System.Runtime.Serialization.EnumMember(Value = @"UP")]
UP = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DOWN")]
DOWN = 1,
[System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")]
UNKNOWN = 2,
[System.Runtime.Serialization.EnumMember(Value = @"OUT_OF_SERVICE")]
OUT_OF_SERVICE = 3,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum FamilyRelationType
{
[System.Runtime.Serialization.EnumMember(Value = @"family")]
Family = 0,
[System.Runtime.Serialization.EnumMember(Value = @"ownership")]
Ownership = 1,
[System.Runtime.Serialization.EnumMember(Value = @"proxy")]
Proxy = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum HealthDtoStatus
{
[System.Runtime.Serialization.EnumMember(Value = @"UP")]
UP = 0,
[System.Runtime.Serialization.EnumMember(Value = @"DOWN")]
DOWN = 1,
[System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")]
UNKNOWN = 2,
[System.Runtime.Serialization.EnumMember(Value = @"OUT_OF_SERVICE")]
OUT_OF_SERVICE = 3,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum MedicalRestrictionDtoType
{
[System.Runtime.Serialization.EnumMember(Value = @"injuredPersonExclusion")]
InjuredPersonExclusion = 0,
[System.Runtime.Serialization.EnumMember(Value = @"reserve")]
Reserve = 1,
[System.Runtime.Serialization.EnumMember(Value = @"other")]
Other = 2,
[System.Runtime.Serialization.EnumMember(Value = @"several")]
Several = 3,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum OwnerRelationType
{
[System.Runtime.Serialization.EnumMember(Value = @"family")]
Family = 0,
[System.Runtime.Serialization.EnumMember(Value = @"ownership")]
Ownership = 1,
[System.Runtime.Serialization.EnumMember(Value = @"proxy")]
Proxy = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum PartnerAddressType
{
[System.Runtime.Serialization.EnumMember(Value = @"UNDEFINED")]
UNDEFINED = 0,
[System.Runtime.Serialization.EnumMember(Value = @"MAIN")]
MAIN = 1,
[System.Runtime.Serialization.EnumMember(Value = @"PROFESSIONAL")]
PROFESSIONAL = 2,
[System.Runtime.Serialization.EnumMember(Value = @"SECONDARY")]
SECONDARY = 3,
[System.Runtime.Serialization.EnumMember(Value = @"POSTAL")]
POSTAL = 4,
[System.Runtime.Serialization.EnumMember(Value = @"POST_PAID")]
POST_PAID = 5,
[System.Runtime.Serialization.EnumMember(Value = @"SUMMONS")]
SUMMONS = 6,
[System.Runtime.Serialization.EnumMember(Value = @"AIA")]
AIA = 7,
[System.Runtime.Serialization.EnumMember(Value = @"CORRESPONDENCE")]
CORRESPONDENCE = 8,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum PartnerRelationType
{
[System.Runtime.Serialization.EnumMember(Value = @"family")]
Family = 0,
[System.Runtime.Serialization.EnumMember(Value = @"ownership")]
Ownership = 1,
[System.Runtime.Serialization.EnumMember(Value = @"proxy")]
Proxy = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum PersonCivilStatus
{
[System.Runtime.Serialization.EnumMember(Value = @"single")]
Single = 0,
[System.Runtime.Serialization.EnumMember(Value = @"married")]
Married = 1,
[System.Runtime.Serialization.EnumMember(Value = @"divorced")]
Divorced = 2,
[System.Runtime.Serialization.EnumMember(Value = @"widower")]
Widower = 3,
[System.Runtime.Serialization.EnumMember(Value = @"separate")]
Separate = 4,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum PersonTitle
{
[System.Runtime.Serialization.EnumMember(Value = @"mr")]
Mr = 0,
[System.Runtime.Serialization.EnumMember(Value = @"mrs")]
Mrs = 1,
[System.Runtime.Serialization.EnumMember(Value = @"ms")]
Ms = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum PersonType
{
[System.Runtime.Serialization.EnumMember(Value = @"person")]
Person = 0,
[System.Runtime.Serialization.EnumMember(Value = @"company")]
Company = 1,
[System.Runtime.Serialization.EnumMember(Value = @"couple")]
Couple = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
public enum ProxyRelationType
{
[System.Runtime.Serialization.EnumMember(Value = @"family")]
Family = 0,
[System.Runtime.Serialization.EnumMember(Value = @"ownership")]
Ownership = 1,
[System.Runtime.Serialization.EnumMember(Value = @"proxy")]
Proxy = 2,
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple = true)]
internal class JsonInheritanceAttribute : System.Attribute
{
public JsonInheritanceAttribute(string key, System.Type type)
{
Key = key;
Type = type;
}
public string Key { get; }
public System.Type Type { get; }
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.28.0 (Newtonsoft.Json v9.0.0.0)")]
internal class JsonInheritanceConverter : Newtonsoft.Json.JsonConverter
{
internal static readonly string DefaultDiscriminatorName = "discriminator";
private readonly string _discriminator;
[System.ThreadStatic]
private static bool _isReading;
[System.ThreadStatic]
private static bool _isWriting;
public JsonInheritanceConverter()
{
_discriminator = DefaultDiscriminatorName;
}
public JsonInheritanceConverter(string discriminator)
{
_discriminator = discriminator;
}
public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
{
try
{
_isWriting = true;
var jObject = Newtonsoft.Json.Linq.JObject.FromObject(value, serializer);
jObject.AddFirst(new Newtonsoft.Json.Linq.JProperty(_discriminator, GetSubtypeDiscriminator(value.GetType())));
writer.WriteToken(jObject.CreateReader());
}
finally
{
_isWriting = false;
}
}
public override bool CanWrite
{
get
{
if (_isWriting)
{
_isWriting = false;
return false;
}
return true;
}
}
public override bool CanRead
{
get
{
if (_isReading)
{
_isReading = false;
return false;
}
return true;
}
}
public override bool CanConvert(System.Type objectType)
{
return true;
}
public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
{
var jObject = serializer.Deserialize<Newtonsoft.Json.Linq.JObject>(reader);
if (jObject == null)
return null;
var discriminator = Newtonsoft.Json.Linq.Extensions.Value<string>(jObject.GetValue(_discriminator));
var subtype = GetObjectSubtype(objectType, discriminator);
var objectContract = serializer.ContractResolver.ResolveContract(subtype) as Newtonsoft.Json.Serialization.JsonObjectContract;
if (objectContract == null || System.Linq.Enumerable.All(objectContract.Properties, p => p.PropertyName != _discriminator))
{
jObject.Remove(_discriminator);
}
try
{
_isReading = true;
return serializer.Deserialize(jObject.CreateReader(), subtype);
}
finally
{
_isReading = false;
}
}
private System.Type GetObjectSubtype(System.Type objectType, string discriminator)
{
foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes<JsonInheritanceAttribute>(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true))
{
if (attribute.Key == discriminator)
return attribute.Type;
}
return objectType;
}
private string GetSubtypeDiscriminator(System.Type objectType)
{
foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes<JsonInheritanceAttribute>(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true))
{
if (attribute.Type == objectType)
return attribute.Key;
}
return objectType.Name;
}
}
[System.CodeDom.Compiler.GeneratedCode("NSwag", "13.1.6.0 (NJsonSchema v10.0.28.0 (Newtonsoft.Json v9.0.0.0))")]
public partial class ApiException : System.Exception
{
public int StatusCode { get; private set; }
public string Response { get; private set; }
public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; }
public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception innerException)
: base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + response.Substring(0, response.Length >= 512 ? 512 : response.Length), innerException)
{
StatusCode = statusCode;
Response = response;
Headers = headers;
}
public override string ToString()
{
return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString());
}
}
[System.CodeDom.Compiler.GeneratedCode("NSwag", "13.1.6.0 (NJsonSchema v10.0.28.0 (Newtonsoft.Json v9.0.0.0))")]
public partial class ApiException<TResult> : ApiException
{
public TResult Result { get; private set; }
public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception innerException)
: base(message, statusCode, response, headers, innerException)
{
Result = result;
}
}
}
#pragma warning restore 1591
#pragma warning restore 1573
#pragma warning restore 472
#pragma warning restore 114
#pragma warning restore 108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment