You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1039 lines
50 KiB
1039 lines
50 KiB
/*
|
|
* Service Collaborateur API
|
|
*
|
|
* Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside
|
|
*
|
|
* OpenAPI spec version: 1.1.3
|
|
* Contact: lilian.gayet@apside-groupe.com
|
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
*/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using RestSharp;
|
|
using IO.Swagger.ClientCollaborateur;
|
|
using IO.Swagger.ModelCollaborateur;
|
|
|
|
namespace IO.Swagger.ApiCollaborateur
|
|
{
|
|
/// <summary>
|
|
/// Represents a collection of functions to interact with the API endpoints
|
|
/// </summary>
|
|
public interface IAgenceApi : IApiAccessor
|
|
{
|
|
#region Synchronous Operations
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns></returns>
|
|
void AjoutAgence (NouvelleAgence body = null);
|
|
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>ApiResponse of Object(void)</returns>
|
|
ApiResponse<Object> AjoutAgenceWithHttpInfo (NouvelleAgence body = null);
|
|
/// <summary>
|
|
/// rechercher une adresse
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// rechercher une agence à l'aide de son identifiant
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>Agence</returns>
|
|
Agence ChercherAgence (long? agenceId);
|
|
|
|
/// <summary>
|
|
/// rechercher une adresse
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// rechercher une agence à l'aide de son identifiant
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>ApiResponse of Agence</returns>
|
|
ApiResponse<Agence> ChercherAgenceWithHttpInfo (long? agenceId);
|
|
/// <summary>
|
|
/// rechercher toutes les agences
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Cette requette demande de récupérer toutes les agences existantes
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>List<Agence></returns>
|
|
List<Agence> ChercherAgences ();
|
|
|
|
/// <summary>
|
|
/// rechercher toutes les agences
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Cette requette demande de récupérer toutes les agences existantes
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>ApiResponse of List<Agence></returns>
|
|
ApiResponse<List<Agence>> ChercherAgencesWithHttpInfo ();
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns></returns>
|
|
void MajAgence (long? agenceId, NouvelleAgence body = null);
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>ApiResponse of Object(void)</returns>
|
|
ApiResponse<Object> MajAgenceWithHttpInfo (long? agenceId, NouvelleAgence body = null);
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns></returns>
|
|
void MajAgencepatch (long? agenceId, NouvelleAgence body = null);
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>ApiResponse of Object(void)</returns>
|
|
ApiResponse<Object> MajAgencepatchWithHttpInfo (long? agenceId, NouvelleAgence body = null);
|
|
#endregion Synchronous Operations
|
|
#region Asynchronous Operations
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of void</returns>
|
|
System.Threading.Tasks.Task AjoutAgenceAsync (NouvelleAgence body = null);
|
|
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of ApiResponse</returns>
|
|
System.Threading.Tasks.Task<ApiResponse<Object>> AjoutAgenceAsyncWithHttpInfo (NouvelleAgence body = null);
|
|
/// <summary>
|
|
/// rechercher une adresse
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// rechercher une agence à l'aide de son identifiant
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>Task of Agence</returns>
|
|
System.Threading.Tasks.Task<Agence> ChercherAgenceAsync (long? agenceId);
|
|
|
|
/// <summary>
|
|
/// rechercher une adresse
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// rechercher une agence à l'aide de son identifiant
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>Task of ApiResponse (Agence)</returns>
|
|
System.Threading.Tasks.Task<ApiResponse<Agence>> ChercherAgenceAsyncWithHttpInfo (long? agenceId);
|
|
/// <summary>
|
|
/// rechercher toutes les agences
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Cette requette demande de récupérer toutes les agences existantes
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>Task of List<Agence></returns>
|
|
System.Threading.Tasks.Task<List<Agence>> ChercherAgencesAsync ();
|
|
|
|
/// <summary>
|
|
/// rechercher toutes les agences
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Cette requette demande de récupérer toutes les agences existantes
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>Task of ApiResponse (List<Agence>)</returns>
|
|
System.Threading.Tasks.Task<ApiResponse<List<Agence>>> ChercherAgencesAsyncWithHttpInfo ();
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of void</returns>
|
|
System.Threading.Tasks.Task MajAgenceAsync (long? agenceId, NouvelleAgence body = null);
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of ApiResponse</returns>
|
|
System.Threading.Tasks.Task<ApiResponse<Object>> MajAgenceAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null);
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of void</returns>
|
|
System.Threading.Tasks.Task MajAgencepatchAsync (long? agenceId, NouvelleAgence body = null);
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of ApiResponse</returns>
|
|
System.Threading.Tasks.Task<ApiResponse<Object>> MajAgencepatchAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null);
|
|
#endregion Asynchronous Operations
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents a collection of functions to interact with the API endpoints
|
|
/// </summary>
|
|
public partial class AgenceApi : IAgenceApi
|
|
{
|
|
private IO.Swagger.ClientCollaborateur.ExceptionFactory _exceptionFactory = (name, response) => null;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="AgenceApi"/> class.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public AgenceApi(String basePath)
|
|
{
|
|
this.Configuration = new IO.Swagger.ClientCollaborateur.Configuration { BasePath = basePath };
|
|
|
|
ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="AgenceApi"/> class
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public AgenceApi()
|
|
{
|
|
this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default;
|
|
|
|
ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="AgenceApi"/> class
|
|
/// using Configuration object
|
|
/// </summary>
|
|
/// <param name="configuration">An instance of Configuration</param>
|
|
/// <returns></returns>
|
|
public AgenceApi(IO.Swagger.ClientCollaborateur.Configuration configuration = null)
|
|
{
|
|
if (configuration == null) // use the default one in Configuration
|
|
this.Configuration = IO.Swagger.ClientCollaborateur.Configuration.Default;
|
|
else
|
|
this.Configuration = configuration;
|
|
|
|
ExceptionFactory = IO.Swagger.ClientCollaborateur.Configuration.DefaultExceptionFactory;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the base path of the API client.
|
|
/// </summary>
|
|
/// <value>The base path</value>
|
|
public String GetBasePath()
|
|
{
|
|
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the base path of the API client.
|
|
/// </summary>
|
|
/// <value>The base path</value>
|
|
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
|
public void SetBasePath(String basePath)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the configuration object
|
|
/// </summary>
|
|
/// <value>An instance of the Configuration</value>
|
|
public IO.Swagger.ClientCollaborateur.Configuration Configuration {get; set;}
|
|
|
|
/// <summary>
|
|
/// Provides a factory method hook for the creation of exceptions.
|
|
/// </summary>
|
|
public IO.Swagger.ClientCollaborateur.ExceptionFactory ExceptionFactory
|
|
{
|
|
get
|
|
{
|
|
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
|
{
|
|
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
|
}
|
|
return _exceptionFactory;
|
|
}
|
|
set { _exceptionFactory = value; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the default header.
|
|
/// </summary>
|
|
/// <returns>Dictionary of HTTP header</returns>
|
|
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
|
public IDictionary<String, String> DefaultHeader()
|
|
{
|
|
return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Add default header.
|
|
/// </summary>
|
|
/// <param name="key">Header field name.</param>
|
|
/// <param name="value">Header field value.</param>
|
|
/// <returns></returns>
|
|
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
|
public void AddDefaultHeader(string key, string value)
|
|
{
|
|
this.Configuration.AddDefaultHeader(key, value);
|
|
}
|
|
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns></returns>
|
|
public void AjoutAgence (NouvelleAgence body = null)
|
|
{
|
|
AjoutAgenceWithHttpInfo(body);
|
|
}
|
|
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>ApiResponse of Object(void)</returns>
|
|
public ApiResponse<Object> AjoutAgenceWithHttpInfo (NouvelleAgence body = null)
|
|
{
|
|
|
|
var localVarPath = "/agences";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (body != null && body.GetType() != typeof(byte[]))
|
|
{
|
|
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
|
}
|
|
else
|
|
{
|
|
localVarPostBody = body; // byte array
|
|
}
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("AjoutAgence", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Object>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of void</returns>
|
|
public async System.Threading.Tasks.Task AjoutAgenceAsync (NouvelleAgence body = null)
|
|
{
|
|
await AjoutAgenceAsyncWithHttpInfo(body);
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// ajout d'une nouvelle agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of ApiResponse</returns>
|
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> AjoutAgenceAsyncWithHttpInfo (NouvelleAgence body = null)
|
|
{
|
|
|
|
var localVarPath = "/agences";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (body != null && body.GetType() != typeof(byte[]))
|
|
{
|
|
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
|
}
|
|
else
|
|
{
|
|
localVarPostBody = body; // byte array
|
|
}
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("AjoutAgence", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Object>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher une adresse rechercher une agence à l'aide de son identifiant
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>Agence</returns>
|
|
public Agence ChercherAgence (long? agenceId)
|
|
{
|
|
ApiResponse<Agence> localVarResponse = ChercherAgenceWithHttpInfo(agenceId);
|
|
return localVarResponse.Data;
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher une adresse rechercher une agence à l'aide de son identifiant
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>ApiResponse of Agence</returns>
|
|
public ApiResponse< Agence > ChercherAgenceWithHttpInfo (long? agenceId)
|
|
{
|
|
// verify the required parameter 'agenceId' is set
|
|
if (agenceId == null)
|
|
throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->ChercherAgence");
|
|
|
|
var localVarPath = "/agences/{agenceId}";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
|
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("ChercherAgence", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Agence>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
(Agence) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agence)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher une adresse rechercher une agence à l'aide de son identifiant
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>Task of Agence</returns>
|
|
public async System.Threading.Tasks.Task<Agence> ChercherAgenceAsync (long? agenceId)
|
|
{
|
|
ApiResponse<Agence> localVarResponse = await ChercherAgenceAsyncWithHttpInfo(agenceId);
|
|
return localVarResponse.Data;
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher une adresse rechercher une agence à l'aide de son identifiant
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <returns>Task of ApiResponse (Agence)</returns>
|
|
public async System.Threading.Tasks.Task<ApiResponse<Agence>> ChercherAgenceAsyncWithHttpInfo (long? agenceId)
|
|
{
|
|
// verify the required parameter 'agenceId' is set
|
|
if (agenceId == null)
|
|
throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->ChercherAgence");
|
|
|
|
var localVarPath = "/agences/{agenceId}";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("ChercherAgence", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Agence>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
(Agence) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Agence)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>List<Agence></returns>
|
|
public List<Agence> ChercherAgences ()
|
|
{
|
|
ApiResponse<List<Agence>> localVarResponse = ChercherAgencesWithHttpInfo();
|
|
return localVarResponse.Data;
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>ApiResponse of List<Agence></returns>
|
|
public ApiResponse< List<Agence> > ChercherAgencesWithHttpInfo ()
|
|
{
|
|
|
|
var localVarPath = "/agences";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
|
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("ChercherAgences", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<List<Agence>>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
(List<Agence>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Agence>)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>Task of List<Agence></returns>
|
|
public async System.Threading.Tasks.Task<List<Agence>> ChercherAgencesAsync ()
|
|
{
|
|
ApiResponse<List<Agence>> localVarResponse = await ChercherAgencesAsyncWithHttpInfo();
|
|
return localVarResponse.Data;
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// rechercher toutes les agences Cette requette demande de récupérer toutes les agences existantes
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <returns>Task of ApiResponse (List<Agence>)</returns>
|
|
public async System.Threading.Tasks.Task<ApiResponse<List<Agence>>> ChercherAgencesAsyncWithHttpInfo ()
|
|
{
|
|
|
|
var localVarPath = "/agences";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("ChercherAgences", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<List<Agence>>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
(List<Agence>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Agence>)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns></returns>
|
|
public void MajAgence (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
MajAgenceWithHttpInfo(agenceId, body);
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>ApiResponse of Object(void)</returns>
|
|
public ApiResponse<Object> MajAgenceWithHttpInfo (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
// verify the required parameter 'agenceId' is set
|
|
if (agenceId == null)
|
|
throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgence");
|
|
|
|
var localVarPath = "/agences/{agenceId}";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter
|
|
if (body != null && body.GetType() != typeof(byte[]))
|
|
{
|
|
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
|
}
|
|
else
|
|
{
|
|
localVarPostBody = body; // byte array
|
|
}
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
|
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("MajAgence", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Object>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of void</returns>
|
|
public async System.Threading.Tasks.Task MajAgenceAsync (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
await MajAgenceAsyncWithHttpInfo(agenceId, body);
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of ApiResponse</returns>
|
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> MajAgenceAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
// verify the required parameter 'agenceId' is set
|
|
if (agenceId == null)
|
|
throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgence");
|
|
|
|
var localVarPath = "/agences/{agenceId}";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter
|
|
if (body != null && body.GetType() != typeof(byte[]))
|
|
{
|
|
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
|
}
|
|
else
|
|
{
|
|
localVarPostBody = body; // byte array
|
|
}
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("MajAgence", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Object>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns></returns>
|
|
public void MajAgencepatch (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
MajAgencepatchWithHttpInfo(agenceId, body);
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>ApiResponse of Object(void)</returns>
|
|
public ApiResponse<Object> MajAgencepatchWithHttpInfo (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
// verify the required parameter 'agenceId' is set
|
|
if (agenceId == null)
|
|
throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgencepatch");
|
|
|
|
var localVarPath = "/agences/{agenceId}";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter
|
|
if (body != null && body.GetType() != typeof(byte[]))
|
|
{
|
|
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
|
}
|
|
else
|
|
{
|
|
localVarPostBody = body; // byte array
|
|
}
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
|
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("MajAgencepatch", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Object>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of void</returns>
|
|
public async System.Threading.Tasks.Task MajAgencepatchAsync (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
await MajAgencepatchAsyncWithHttpInfo(agenceId, body);
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// mettre à jour une agence
|
|
/// </summary>
|
|
/// <exception cref="IO.Swagger.ClientCollaborateur.ApiException">Thrown when fails to make API call</exception>
|
|
/// <param name="agenceId">Ce paramêtre permet de renseigner l'identifiant de l'agence recherchée</param>
|
|
/// <param name="body"> (optional)</param>
|
|
/// <returns>Task of ApiResponse</returns>
|
|
public async System.Threading.Tasks.Task<ApiResponse<Object>> MajAgencepatchAsyncWithHttpInfo (long? agenceId, NouvelleAgence body = null)
|
|
{
|
|
// verify the required parameter 'agenceId' is set
|
|
if (agenceId == null)
|
|
throw new ApiException(400, "Missing required parameter 'agenceId' when calling AgenceApi->MajAgencepatch");
|
|
|
|
var localVarPath = "/agences/{agenceId}";
|
|
var localVarPathParams = new Dictionary<String, String>();
|
|
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
|
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
|
var localVarFormParams = new Dictionary<String, String>();
|
|
var localVarFileParams = new Dictionary<String, FileParameter>();
|
|
Object localVarPostBody = null;
|
|
|
|
// to determine the Content-Type header
|
|
String[] localVarHttpContentTypes = new String[] {
|
|
"application/json"
|
|
};
|
|
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
|
|
|
// to determine the Accept header
|
|
String[] localVarHttpHeaderAccepts = new String[] {
|
|
};
|
|
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
|
if (localVarHttpHeaderAccept != null)
|
|
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
|
|
|
if (agenceId != null) localVarPathParams.Add("agenceId", this.Configuration.ApiClient.ParameterToString(agenceId)); // path parameter
|
|
if (body != null && body.GetType() != typeof(byte[]))
|
|
{
|
|
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
|
}
|
|
else
|
|
{
|
|
localVarPostBody = body; // byte array
|
|
}
|
|
|
|
// make the HTTP request
|
|
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
|
Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
|
localVarPathParams, localVarHttpContentType);
|
|
|
|
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
|
|
|
if (ExceptionFactory != null)
|
|
{
|
|
Exception exception = ExceptionFactory("MajAgencepatch", localVarResponse);
|
|
if (exception != null) throw exception;
|
|
}
|
|
|
|
return new ApiResponse<Object>(localVarStatusCode,
|
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
|
null);
|
|
}
|
|
|
|
}
|
|
}
|
|
|