| | 1 | | /* |
| | 2 | | * WeShare API |
| | 3 | | * |
| | 4 | | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| | 5 | | * |
| | 6 | | * The version of the OpenAPI document: 1.0 |
| | 7 | | * Generated by: https://github.com/openapitools/openapi-generator.git |
| | 8 | | */ |
| | 9 | |
|
| | 10 | |
|
| | 11 | | using System; |
| | 12 | | using System.Collections.Generic; |
| | 13 | | using System.Collections.ObjectModel; |
| | 14 | | using System.Linq; |
| | 15 | | using System.Net; |
| | 16 | | using System.Net.Mime; |
| | 17 | | using Applications.WeShare.Swagger.Client; |
| | 18 | | using Applications.WeShare.Swagger.Model; |
| | 19 | |
|
| | 20 | | namespace Applications.WeShare.Swagger.Api |
| | 21 | | { |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// Represents a collection of functions to interact with the API endpoints |
| | 25 | | /// </summary> |
| | 26 | | public interface IExpensesApiSync : IApiAccessor |
| | 27 | | { |
| | 28 | | #region Synchronous Operations |
| | 29 | | /// <summary> |
| | 30 | | /// Create a new expense for a person |
| | 31 | | /// </summary> |
| | 32 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 33 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 34 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 35 | | /// <returns>ExpenseDTO</returns> |
| | 36 | | ExpenseDTO CreateExpense(NewExpenseDTO newExpenseDTO = default(NewExpenseDTO), int operationIndex = 0); |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// Create a new expense for a person |
| | 40 | | /// </summary> |
| | 41 | | /// <remarks> |
| | 42 | | /// |
| | 43 | | /// </remarks> |
| | 44 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 45 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 46 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 47 | | /// <returns>ApiResponse of ExpenseDTO</returns> |
| | 48 | | ApiResponse<ExpenseDTO> CreateExpenseWithHttpInfo(NewExpenseDTO newExpenseDTO = default(NewExpenseDTO), int oper |
| | 49 | | /// <summary> |
| | 50 | | /// Find all expenses |
| | 51 | | /// </summary> |
| | 52 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 53 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 54 | | /// <returns>List<ExpenseDTO></returns> |
| | 55 | | List<ExpenseDTO> FindAllExpenses(int operationIndex = 0); |
| | 56 | |
|
| | 57 | | /// <summary> |
| | 58 | | /// Find all expenses |
| | 59 | | /// </summary> |
| | 60 | | /// <remarks> |
| | 61 | | /// |
| | 62 | | /// </remarks> |
| | 63 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 64 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 65 | | /// <returns>ApiResponse of List<ExpenseDTO></returns> |
| | 66 | | ApiResponse<List<ExpenseDTO>> FindAllExpensesWithHttpInfo(int operationIndex = 0); |
| | 67 | | /// <summary> |
| | 68 | | /// Find an expense by ID |
| | 69 | | /// </summary> |
| | 70 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 71 | | /// <param name="expenseId">The expense ID</param> |
| | 72 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 73 | | /// <returns>ExpenseDTO</returns> |
| | 74 | | ExpenseDTO FindExpenseById(int expenseId, int operationIndex = 0); |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Find an expense by ID |
| | 78 | | /// </summary> |
| | 79 | | /// <remarks> |
| | 80 | | /// |
| | 81 | | /// </remarks> |
| | 82 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 83 | | /// <param name="expenseId">The expense ID</param> |
| | 84 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 85 | | /// <returns>ApiResponse of ExpenseDTO</returns> |
| | 86 | | ApiResponse<ExpenseDTO> FindExpenseByIdWithHttpInfo(int expenseId, int operationIndex = 0); |
| | 87 | | /// <summary> |
| | 88 | | /// Find expenses for a person |
| | 89 | | /// </summary> |
| | 90 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 91 | | /// <param name="personId">The ID of the person</param> |
| | 92 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 93 | | /// <returns>List<ExpenseDTO></returns> |
| | 94 | | List<ExpenseDTO> FindExpensesByPerson(int personId, int operationIndex = 0); |
| | 95 | |
|
| | 96 | | /// <summary> |
| | 97 | | /// Find expenses for a person |
| | 98 | | /// </summary> |
| | 99 | | /// <remarks> |
| | 100 | | /// |
| | 101 | | /// </remarks> |
| | 102 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 103 | | /// <param name="personId">The ID of the person</param> |
| | 104 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 105 | | /// <returns>ApiResponse of List<ExpenseDTO></returns> |
| | 106 | | ApiResponse<List<ExpenseDTO>> FindExpensesByPersonWithHttpInfo(int personId, int operationIndex = 0); |
| | 107 | | #endregion Synchronous Operations |
| | 108 | | } |
| | 109 | |
|
| | 110 | | /// <summary> |
| | 111 | | /// Represents a collection of functions to interact with the API endpoints |
| | 112 | | /// </summary> |
| | 113 | | public interface IExpensesApiAsync : IApiAccessor |
| | 114 | | { |
| | 115 | | #region Asynchronous Operations |
| | 116 | | /// <summary> |
| | 117 | | /// Create a new expense for a person |
| | 118 | | /// </summary> |
| | 119 | | /// <remarks> |
| | 120 | | /// |
| | 121 | | /// </remarks> |
| | 122 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 123 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 124 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 125 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 126 | | /// <returns>Task of ExpenseDTO</returns> |
| | 127 | | System.Threading.Tasks.Task<ExpenseDTO> CreateExpenseAsync(NewExpenseDTO newExpenseDTO = default(NewExpenseDTO), |
| | 128 | |
|
| | 129 | | /// <summary> |
| | 130 | | /// Create a new expense for a person |
| | 131 | | /// </summary> |
| | 132 | | /// <remarks> |
| | 133 | | /// |
| | 134 | | /// </remarks> |
| | 135 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 136 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 137 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 138 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 139 | | /// <returns>Task of ApiResponse (ExpenseDTO)</returns> |
| | 140 | | System.Threading.Tasks.Task<ApiResponse<ExpenseDTO>> CreateExpenseWithHttpInfoAsync(NewExpenseDTO newExpenseDTO |
| | 141 | | /// <summary> |
| | 142 | | /// Find all expenses |
| | 143 | | /// </summary> |
| | 144 | | /// <remarks> |
| | 145 | | /// |
| | 146 | | /// </remarks> |
| | 147 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 148 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 149 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 150 | | /// <returns>Task of List<ExpenseDTO></returns> |
| | 151 | | System.Threading.Tasks.Task<List<ExpenseDTO>> FindAllExpensesAsync(int operationIndex = 0, System.Threading.Canc |
| | 152 | |
|
| | 153 | | /// <summary> |
| | 154 | | /// Find all expenses |
| | 155 | | /// </summary> |
| | 156 | | /// <remarks> |
| | 157 | | /// |
| | 158 | | /// </remarks> |
| | 159 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 160 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 161 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 162 | | /// <returns>Task of ApiResponse (List<ExpenseDTO>)</returns> |
| | 163 | | System.Threading.Tasks.Task<ApiResponse<List<ExpenseDTO>>> FindAllExpensesWithHttpInfoAsync(int operationIndex = |
| | 164 | | /// <summary> |
| | 165 | | /// Find an expense by ID |
| | 166 | | /// </summary> |
| | 167 | | /// <remarks> |
| | 168 | | /// |
| | 169 | | /// </remarks> |
| | 170 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 171 | | /// <param name="expenseId">The expense ID</param> |
| | 172 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 173 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 174 | | /// <returns>Task of ExpenseDTO</returns> |
| | 175 | | System.Threading.Tasks.Task<ExpenseDTO> FindExpenseByIdAsync(int expenseId, int operationIndex = 0, System.Threa |
| | 176 | |
|
| | 177 | | /// <summary> |
| | 178 | | /// Find an expense by ID |
| | 179 | | /// </summary> |
| | 180 | | /// <remarks> |
| | 181 | | /// |
| | 182 | | /// </remarks> |
| | 183 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 184 | | /// <param name="expenseId">The expense ID</param> |
| | 185 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 186 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 187 | | /// <returns>Task of ApiResponse (ExpenseDTO)</returns> |
| | 188 | | System.Threading.Tasks.Task<ApiResponse<ExpenseDTO>> FindExpenseByIdWithHttpInfoAsync(int expenseId, int operati |
| | 189 | | /// <summary> |
| | 190 | | /// Find expenses for a person |
| | 191 | | /// </summary> |
| | 192 | | /// <remarks> |
| | 193 | | /// |
| | 194 | | /// </remarks> |
| | 195 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 196 | | /// <param name="personId">The ID of the person</param> |
| | 197 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 198 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 199 | | /// <returns>Task of List<ExpenseDTO></returns> |
| | 200 | | System.Threading.Tasks.Task<List<ExpenseDTO>> FindExpensesByPersonAsync(int personId, int operationIndex = 0, Sy |
| | 201 | |
|
| | 202 | | /// <summary> |
| | 203 | | /// Find expenses for a person |
| | 204 | | /// </summary> |
| | 205 | | /// <remarks> |
| | 206 | | /// |
| | 207 | | /// </remarks> |
| | 208 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 209 | | /// <param name="personId">The ID of the person</param> |
| | 210 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 211 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 212 | | /// <returns>Task of ApiResponse (List<ExpenseDTO>)</returns> |
| | 213 | | System.Threading.Tasks.Task<ApiResponse<List<ExpenseDTO>>> FindExpensesByPersonWithHttpInfoAsync(int personId, i |
| | 214 | | #endregion Asynchronous Operations |
| | 215 | | } |
| | 216 | |
|
| | 217 | | /// <summary> |
| | 218 | | /// Represents a collection of functions to interact with the API endpoints |
| | 219 | | /// </summary> |
| | 220 | | public interface IExpensesApi : IExpensesApiSync, IExpensesApiAsync |
| | 221 | | { |
| | 222 | |
|
| | 223 | | } |
| | 224 | |
|
| | 225 | | /// <summary> |
| | 226 | | /// Represents a collection of functions to interact with the API endpoints |
| | 227 | | /// </summary> |
| | 228 | | public partial class ExpensesApi : IExpensesApi |
| | 229 | | { |
| 2 | 230 | | private Applications.WeShare.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null; |
| | 231 | |
|
| | 232 | | /// <summary> |
| | 233 | | /// Initializes a new instance of the <see cref="ExpensesApi"/> class. |
| | 234 | | /// </summary> |
| | 235 | | /// <returns></returns> |
| 0 | 236 | | public ExpensesApi() : this((string)null) |
| 0 | 237 | | { |
| 0 | 238 | | } |
| | 239 | |
|
| | 240 | | /// <summary> |
| | 241 | | /// Initializes a new instance of the <see cref="ExpensesApi"/> class. |
| | 242 | | /// </summary> |
| | 243 | | /// <returns></returns> |
| 2 | 244 | | public ExpensesApi(string basePath) |
| 2 | 245 | | { |
| 2 | 246 | | this.Configuration = Applications.WeShare.Swagger.Client.Configuration.MergeConfigurations( |
| 2 | 247 | | Applications.WeShare.Swagger.Client.GlobalConfiguration.Instance, |
| 2 | 248 | | new Applications.WeShare.Swagger.Client.Configuration { BasePath = basePath } |
| 2 | 249 | | ); |
| 2 | 250 | | this.Client = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath); |
| 2 | 251 | | this.AsynchronousClient = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath); |
| 2 | 252 | | this.ExceptionFactory = Applications.WeShare.Swagger.Client.Configuration.DefaultExceptionFactory; |
| 2 | 253 | | } |
| | 254 | |
|
| | 255 | | /// <summary> |
| | 256 | | /// Initializes a new instance of the <see cref="ExpensesApi"/> class |
| | 257 | | /// using Configuration object |
| | 258 | | /// </summary> |
| | 259 | | /// <param name="configuration">An instance of Configuration</param> |
| | 260 | | /// <returns></returns> |
| 0 | 261 | | public ExpensesApi(Applications.WeShare.Swagger.Client.Configuration configuration) |
| 0 | 262 | | { |
| 0 | 263 | | if (configuration == null) throw new ArgumentNullException("configuration"); |
| | 264 | |
|
| 0 | 265 | | this.Configuration = Applications.WeShare.Swagger.Client.Configuration.MergeConfigurations( |
| 0 | 266 | | Applications.WeShare.Swagger.Client.GlobalConfiguration.Instance, |
| 0 | 267 | | configuration |
| 0 | 268 | | ); |
| 0 | 269 | | this.Client = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath); |
| 0 | 270 | | this.AsynchronousClient = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath); |
| 0 | 271 | | ExceptionFactory = Applications.WeShare.Swagger.Client.Configuration.DefaultExceptionFactory; |
| 0 | 272 | | } |
| | 273 | |
|
| | 274 | | /// <summary> |
| | 275 | | /// Initializes a new instance of the <see cref="ExpensesApi"/> class |
| | 276 | | /// using a Configuration object and client instance. |
| | 277 | | /// </summary> |
| | 278 | | /// <param name="client">The client interface for synchronous API access.</param> |
| | 279 | | /// <param name="asyncClient">The client interface for asynchronous API access.</param> |
| | 280 | | /// <param name="configuration">The configuration object.</param> |
| 0 | 281 | | public ExpensesApi(Applications.WeShare.Swagger.Client.ISynchronousClient client, Applications.WeShare.Swagger.C |
| 0 | 282 | | { |
| 0 | 283 | | if (client == null) throw new ArgumentNullException("client"); |
| 0 | 284 | | if (asyncClient == null) throw new ArgumentNullException("asyncClient"); |
| 0 | 285 | | if (configuration == null) throw new ArgumentNullException("configuration"); |
| | 286 | |
|
| 0 | 287 | | this.Client = client; |
| 0 | 288 | | this.AsynchronousClient = asyncClient; |
| 0 | 289 | | this.Configuration = configuration; |
| 0 | 290 | | this.ExceptionFactory = Applications.WeShare.Swagger.Client.Configuration.DefaultExceptionFactory; |
| 0 | 291 | | } |
| | 292 | |
|
| | 293 | | /// <summary> |
| | 294 | | /// The client for accessing this underlying API asynchronously. |
| | 295 | | /// </summary> |
| 2 | 296 | | public Applications.WeShare.Swagger.Client.IAsynchronousClient AsynchronousClient { get; set; } |
| | 297 | |
|
| | 298 | | /// <summary> |
| | 299 | | /// The client for accessing this underlying API synchronously. |
| | 300 | | /// </summary> |
| 11 | 301 | | public Applications.WeShare.Swagger.Client.ISynchronousClient Client { get; set; } |
| | 302 | |
|
| | 303 | | /// <summary> |
| | 304 | | /// Gets the base path of the API client. |
| | 305 | | /// </summary> |
| | 306 | | /// <value>The base path</value> |
| | 307 | | public string GetBasePath() |
| 0 | 308 | | { |
| 0 | 309 | | return this.Configuration.BasePath; |
| 0 | 310 | | } |
| | 311 | |
|
| | 312 | | /// <summary> |
| | 313 | | /// Gets or sets the configuration object |
| | 314 | | /// </summary> |
| | 315 | | /// <value>An instance of the Configuration</value> |
| 15 | 316 | | public Applications.WeShare.Swagger.Client.IReadableConfiguration Configuration { get; set; } |
| | 317 | |
|
| | 318 | | /// <summary> |
| | 319 | | /// Provides a factory method hook for the creation of exceptions. |
| | 320 | | /// </summary> |
| | 321 | | public Applications.WeShare.Swagger.Client.ExceptionFactory ExceptionFactory |
| | 322 | | { |
| | 323 | | get |
| 18 | 324 | | { |
| 18 | 325 | | if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) |
| 0 | 326 | | { |
| 0 | 327 | | throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); |
| | 328 | | } |
| 18 | 329 | | return _exceptionFactory; |
| 18 | 330 | | } |
| 6 | 331 | | set { _exceptionFactory = value; } |
| | 332 | | } |
| | 333 | |
|
| | 334 | | /// <summary> |
| | 335 | | /// Create a new expense for a person |
| | 336 | | /// </summary> |
| | 337 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 338 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 339 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 340 | | /// <returns>ExpenseDTO</returns> |
| | 341 | | public ExpenseDTO CreateExpense(NewExpenseDTO newExpenseDTO = default(NewExpenseDTO), int operationIndex = 0) |
| 2 | 342 | | { |
| 2 | 343 | | Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO> localVarResponse = CreateExpenseWithHttpInfo(new |
| 1 | 344 | | return localVarResponse.Data; |
| 1 | 345 | | } |
| | 346 | |
|
| | 347 | | /// <summary> |
| | 348 | | /// Create a new expense for a person |
| | 349 | | /// </summary> |
| | 350 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 351 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 352 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 353 | | /// <returns>ApiResponse of ExpenseDTO</returns> |
| | 354 | | public Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO> CreateExpenseWithHttpInfo(NewExpenseDTO newEx |
| 2 | 355 | | { |
| 2 | 356 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 357 | |
|
| 2 | 358 | | string[] _contentTypes = new string[] { |
| 2 | 359 | | "application/json" |
| 2 | 360 | | }; |
| | 361 | |
|
| | 362 | | // to determine the Accept header |
| 2 | 363 | | string[] _accepts = new string[] { |
| 2 | 364 | | "application/json" |
| 2 | 365 | | }; |
| | 366 | |
|
| 2 | 367 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 2 | 368 | | if (localVarContentType != null) |
| 2 | 369 | | { |
| 2 | 370 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 2 | 371 | | } |
| | 372 | |
|
| 2 | 373 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 2 | 374 | | if (localVarAccept != null) |
| 2 | 375 | | { |
| 2 | 376 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 2 | 377 | | } |
| | 378 | |
|
| 2 | 379 | | localVarRequestOptions.Data = newExpenseDTO; |
| | 380 | |
|
| 2 | 381 | | localVarRequestOptions.Operation = "ExpensesApi.CreateExpense"; |
| 2 | 382 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 383 | |
|
| | 384 | |
|
| | 385 | | // make the HTTP request |
| 2 | 386 | | var localVarResponse = this.Client.Post<ExpenseDTO>("/api/expenses", localVarRequestOptions, this.Configurat |
| 2 | 387 | | if (this.ExceptionFactory != null) |
| 2 | 388 | | { |
| 2 | 389 | | Exception _exception = this.ExceptionFactory("CreateExpense", localVarResponse); |
| 2 | 390 | | if (_exception != null) |
| 1 | 391 | | { |
| 1 | 392 | | throw _exception; |
| | 393 | | } |
| 1 | 394 | | } |
| | 395 | |
|
| 1 | 396 | | return localVarResponse; |
| 1 | 397 | | } |
| | 398 | |
|
| | 399 | | /// <summary> |
| | 400 | | /// Create a new expense for a person |
| | 401 | | /// </summary> |
| | 402 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 403 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 404 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 405 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 406 | | /// <returns>Task of ExpenseDTO</returns> |
| | 407 | | public async System.Threading.Tasks.Task<ExpenseDTO> CreateExpenseAsync(NewExpenseDTO newExpenseDTO = default(Ne |
| 0 | 408 | | { |
| 0 | 409 | | Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO> localVarResponse = await CreateExpenseWithHttpIn |
| 0 | 410 | | return localVarResponse.Data; |
| 0 | 411 | | } |
| | 412 | |
|
| | 413 | | /// <summary> |
| | 414 | | /// Create a new expense for a person |
| | 415 | | /// </summary> |
| | 416 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 417 | | /// <param name="newExpenseDTO"> (optional)</param> |
| | 418 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 419 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 420 | | /// <returns>Task of ApiResponse (ExpenseDTO)</returns> |
| | 421 | | public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO>> CreateExpe |
| 0 | 422 | | { |
| | 423 | |
|
| 0 | 424 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 425 | |
|
| 0 | 426 | | string[] _contentTypes = new string[] { |
| 0 | 427 | | "application/json" |
| 0 | 428 | | }; |
| | 429 | |
|
| | 430 | | // to determine the Accept header |
| 0 | 431 | | string[] _accepts = new string[] { |
| 0 | 432 | | "application/json" |
| 0 | 433 | | }; |
| | 434 | |
|
| 0 | 435 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 0 | 436 | | if (localVarContentType != null) |
| 0 | 437 | | { |
| 0 | 438 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 439 | | } |
| | 440 | |
|
| 0 | 441 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 0 | 442 | | if (localVarAccept != null) |
| 0 | 443 | | { |
| 0 | 444 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 0 | 445 | | } |
| | 446 | |
|
| 0 | 447 | | localVarRequestOptions.Data = newExpenseDTO; |
| | 448 | |
|
| 0 | 449 | | localVarRequestOptions.Operation = "ExpensesApi.CreateExpense"; |
| 0 | 450 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 451 | |
|
| | 452 | |
|
| | 453 | | // make the HTTP request |
| 0 | 454 | | var localVarResponse = await this.AsynchronousClient.PostAsync<ExpenseDTO>("/api/expenses", localVarRequestO |
| | 455 | |
|
| 0 | 456 | | if (this.ExceptionFactory != null) |
| 0 | 457 | | { |
| 0 | 458 | | Exception _exception = this.ExceptionFactory("CreateExpense", localVarResponse); |
| 0 | 459 | | if (_exception != null) |
| 0 | 460 | | { |
| 0 | 461 | | throw _exception; |
| | 462 | | } |
| 0 | 463 | | } |
| | 464 | |
|
| 0 | 465 | | return localVarResponse; |
| 0 | 466 | | } |
| | 467 | |
|
| | 468 | | /// <summary> |
| | 469 | | /// Find all expenses |
| | 470 | | /// </summary> |
| | 471 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 472 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 473 | | /// <returns>List<ExpenseDTO></returns> |
| | 474 | | public List<ExpenseDTO> FindAllExpenses(int operationIndex = 0) |
| 1 | 475 | | { |
| 1 | 476 | | Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>> localVarResponse = FindAllExpensesWithHttp |
| 1 | 477 | | return localVarResponse.Data; |
| 1 | 478 | | } |
| | 479 | |
|
| | 480 | | /// <summary> |
| | 481 | | /// Find all expenses |
| | 482 | | /// </summary> |
| | 483 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 484 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 485 | | /// <returns>ApiResponse of List<ExpenseDTO></returns> |
| | 486 | | public Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>> FindAllExpensesWithHttpInfo(int operati |
| 1 | 487 | | { |
| 1 | 488 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 489 | |
|
| 1 | 490 | | string[] _contentTypes = new string[] { |
| 1 | 491 | | }; |
| | 492 | |
|
| | 493 | | // to determine the Accept header |
| 1 | 494 | | string[] _accepts = new string[] { |
| 1 | 495 | | "application/json" |
| 1 | 496 | | }; |
| | 497 | |
|
| 1 | 498 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 1 | 499 | | if (localVarContentType != null) |
| 0 | 500 | | { |
| 0 | 501 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 502 | | } |
| | 503 | |
|
| 1 | 504 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 1 | 505 | | if (localVarAccept != null) |
| 1 | 506 | | { |
| 1 | 507 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 1 | 508 | | } |
| | 509 | |
|
| | 510 | |
|
| 1 | 511 | | localVarRequestOptions.Operation = "ExpensesApi.FindAllExpenses"; |
| 1 | 512 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 513 | |
|
| | 514 | |
|
| | 515 | | // make the HTTP request |
| 1 | 516 | | var localVarResponse = this.Client.Get<List<ExpenseDTO>>("/api/expenses", localVarRequestOptions, this.Confi |
| 1 | 517 | | if (this.ExceptionFactory != null) |
| 1 | 518 | | { |
| 1 | 519 | | Exception _exception = this.ExceptionFactory("FindAllExpenses", localVarResponse); |
| 1 | 520 | | if (_exception != null) |
| 0 | 521 | | { |
| 0 | 522 | | throw _exception; |
| | 523 | | } |
| 1 | 524 | | } |
| | 525 | |
|
| 1 | 526 | | return localVarResponse; |
| 1 | 527 | | } |
| | 528 | |
|
| | 529 | | /// <summary> |
| | 530 | | /// Find all expenses |
| | 531 | | /// </summary> |
| | 532 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 533 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 534 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 535 | | /// <returns>Task of List<ExpenseDTO></returns> |
| | 536 | | public async System.Threading.Tasks.Task<List<ExpenseDTO>> FindAllExpensesAsync(int operationIndex = 0, System.T |
| 0 | 537 | | { |
| 0 | 538 | | Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>> localVarResponse = await FindAllExpensesWi |
| 0 | 539 | | return localVarResponse.Data; |
| 0 | 540 | | } |
| | 541 | |
|
| | 542 | | /// <summary> |
| | 543 | | /// Find all expenses |
| | 544 | | /// </summary> |
| | 545 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 546 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 547 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 548 | | /// <returns>Task of ApiResponse (List<ExpenseDTO>)</returns> |
| | 549 | | public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>>> Find |
| 0 | 550 | | { |
| | 551 | |
|
| 0 | 552 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 553 | |
|
| 0 | 554 | | string[] _contentTypes = new string[] { |
| 0 | 555 | | }; |
| | 556 | |
|
| | 557 | | // to determine the Accept header |
| 0 | 558 | | string[] _accepts = new string[] { |
| 0 | 559 | | "application/json" |
| 0 | 560 | | }; |
| | 561 | |
|
| 0 | 562 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 0 | 563 | | if (localVarContentType != null) |
| 0 | 564 | | { |
| 0 | 565 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 566 | | } |
| | 567 | |
|
| 0 | 568 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 0 | 569 | | if (localVarAccept != null) |
| 0 | 570 | | { |
| 0 | 571 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 0 | 572 | | } |
| | 573 | |
|
| | 574 | |
|
| 0 | 575 | | localVarRequestOptions.Operation = "ExpensesApi.FindAllExpenses"; |
| 0 | 576 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 577 | |
|
| | 578 | |
|
| | 579 | | // make the HTTP request |
| 0 | 580 | | var localVarResponse = await this.AsynchronousClient.GetAsync<List<ExpenseDTO>>("/api/expenses", localVarReq |
| | 581 | |
|
| 0 | 582 | | if (this.ExceptionFactory != null) |
| 0 | 583 | | { |
| 0 | 584 | | Exception _exception = this.ExceptionFactory("FindAllExpenses", localVarResponse); |
| 0 | 585 | | if (_exception != null) |
| 0 | 586 | | { |
| 0 | 587 | | throw _exception; |
| | 588 | | } |
| 0 | 589 | | } |
| | 590 | |
|
| 0 | 591 | | return localVarResponse; |
| 0 | 592 | | } |
| | 593 | |
|
| | 594 | | /// <summary> |
| | 595 | | /// Find an expense by ID |
| | 596 | | /// </summary> |
| | 597 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 598 | | /// <param name="expenseId">The expense ID</param> |
| | 599 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 600 | | /// <returns>ExpenseDTO</returns> |
| | 601 | | public ExpenseDTO FindExpenseById(int expenseId, int operationIndex = 0) |
| 3 | 602 | | { |
| 3 | 603 | | Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO> localVarResponse = FindExpenseByIdWithHttpInfo(e |
| 1 | 604 | | return localVarResponse.Data; |
| 1 | 605 | | } |
| | 606 | |
|
| | 607 | | /// <summary> |
| | 608 | | /// Find an expense by ID |
| | 609 | | /// </summary> |
| | 610 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 611 | | /// <param name="expenseId">The expense ID</param> |
| | 612 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 613 | | /// <returns>ApiResponse of ExpenseDTO</returns> |
| | 614 | | public Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO> FindExpenseByIdWithHttpInfo(int expenseId, in |
| 3 | 615 | | { |
| 3 | 616 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 617 | |
|
| 3 | 618 | | string[] _contentTypes = new string[] { |
| 3 | 619 | | }; |
| | 620 | |
|
| | 621 | | // to determine the Accept header |
| 3 | 622 | | string[] _accepts = new string[] { |
| 3 | 623 | | "application/json" |
| 3 | 624 | | }; |
| | 625 | |
|
| 3 | 626 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 3 | 627 | | if (localVarContentType != null) |
| 0 | 628 | | { |
| 0 | 629 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 630 | | } |
| | 631 | |
|
| 3 | 632 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 3 | 633 | | if (localVarAccept != null) |
| 3 | 634 | | { |
| 3 | 635 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 3 | 636 | | } |
| | 637 | |
|
| 3 | 638 | | localVarRequestOptions.PathParameters.Add("expenseId", Applications.WeShare.Swagger.Client.ClientUtils.Param |
| | 639 | |
|
| 3 | 640 | | localVarRequestOptions.Operation = "ExpensesApi.FindExpenseById"; |
| 3 | 641 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 642 | |
|
| | 643 | |
|
| | 644 | | // make the HTTP request |
| 3 | 645 | | var localVarResponse = this.Client.Get<ExpenseDTO>("/api/expenses/{expenseId}", localVarRequestOptions, this |
| 3 | 646 | | if (this.ExceptionFactory != null) |
| 3 | 647 | | { |
| 3 | 648 | | Exception _exception = this.ExceptionFactory("FindExpenseById", localVarResponse); |
| 3 | 649 | | if (_exception != null) |
| 2 | 650 | | { |
| 2 | 651 | | throw _exception; |
| | 652 | | } |
| 1 | 653 | | } |
| | 654 | |
|
| 1 | 655 | | return localVarResponse; |
| 1 | 656 | | } |
| | 657 | |
|
| | 658 | | /// <summary> |
| | 659 | | /// Find an expense by ID |
| | 660 | | /// </summary> |
| | 661 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 662 | | /// <param name="expenseId">The expense ID</param> |
| | 663 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 664 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 665 | | /// <returns>Task of ExpenseDTO</returns> |
| | 666 | | public async System.Threading.Tasks.Task<ExpenseDTO> FindExpenseByIdAsync(int expenseId, int operationIndex = 0, |
| 0 | 667 | | { |
| 0 | 668 | | Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO> localVarResponse = await FindExpenseByIdWithHttp |
| 0 | 669 | | return localVarResponse.Data; |
| 0 | 670 | | } |
| | 671 | |
|
| | 672 | | /// <summary> |
| | 673 | | /// Find an expense by ID |
| | 674 | | /// </summary> |
| | 675 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 676 | | /// <param name="expenseId">The expense ID</param> |
| | 677 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 678 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 679 | | /// <returns>Task of ApiResponse (ExpenseDTO)</returns> |
| | 680 | | public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<ExpenseDTO>> FindExpens |
| 0 | 681 | | { |
| | 682 | |
|
| 0 | 683 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 684 | |
|
| 0 | 685 | | string[] _contentTypes = new string[] { |
| 0 | 686 | | }; |
| | 687 | |
|
| | 688 | | // to determine the Accept header |
| 0 | 689 | | string[] _accepts = new string[] { |
| 0 | 690 | | "application/json" |
| 0 | 691 | | }; |
| | 692 | |
|
| 0 | 693 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 0 | 694 | | if (localVarContentType != null) |
| 0 | 695 | | { |
| 0 | 696 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 697 | | } |
| | 698 | |
|
| 0 | 699 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 0 | 700 | | if (localVarAccept != null) |
| 0 | 701 | | { |
| 0 | 702 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 0 | 703 | | } |
| | 704 | |
|
| 0 | 705 | | localVarRequestOptions.PathParameters.Add("expenseId", Applications.WeShare.Swagger.Client.ClientUtils.Param |
| | 706 | |
|
| 0 | 707 | | localVarRequestOptions.Operation = "ExpensesApi.FindExpenseById"; |
| 0 | 708 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 709 | |
|
| | 710 | |
|
| | 711 | | // make the HTTP request |
| 0 | 712 | | var localVarResponse = await this.AsynchronousClient.GetAsync<ExpenseDTO>("/api/expenses/{expenseId}", local |
| | 713 | |
|
| 0 | 714 | | if (this.ExceptionFactory != null) |
| 0 | 715 | | { |
| 0 | 716 | | Exception _exception = this.ExceptionFactory("FindExpenseById", localVarResponse); |
| 0 | 717 | | if (_exception != null) |
| 0 | 718 | | { |
| 0 | 719 | | throw _exception; |
| | 720 | | } |
| 0 | 721 | | } |
| | 722 | |
|
| 0 | 723 | | return localVarResponse; |
| 0 | 724 | | } |
| | 725 | |
|
| | 726 | | /// <summary> |
| | 727 | | /// Find expenses for a person |
| | 728 | | /// </summary> |
| | 729 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 730 | | /// <param name="personId">The ID of the person</param> |
| | 731 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 732 | | /// <returns>List<ExpenseDTO></returns> |
| | 733 | | public List<ExpenseDTO> FindExpensesByPerson(int personId, int operationIndex = 0) |
| 3 | 734 | | { |
| 3 | 735 | | Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>> localVarResponse = FindExpensesByPersonWit |
| 1 | 736 | | return localVarResponse.Data; |
| 1 | 737 | | } |
| | 738 | |
|
| | 739 | | /// <summary> |
| | 740 | | /// Find expenses for a person |
| | 741 | | /// </summary> |
| | 742 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 743 | | /// <param name="personId">The ID of the person</param> |
| | 744 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 745 | | /// <returns>ApiResponse of List<ExpenseDTO></returns> |
| | 746 | | public Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>> FindExpensesByPersonWithHttpInfo(int pe |
| 3 | 747 | | { |
| 3 | 748 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 749 | |
|
| 3 | 750 | | string[] _contentTypes = new string[] { |
| 3 | 751 | | }; |
| | 752 | |
|
| | 753 | | // to determine the Accept header |
| 3 | 754 | | string[] _accepts = new string[] { |
| 3 | 755 | | "application/json" |
| 3 | 756 | | }; |
| | 757 | |
|
| 3 | 758 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 3 | 759 | | if (localVarContentType != null) |
| 0 | 760 | | { |
| 0 | 761 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 762 | | } |
| | 763 | |
|
| 3 | 764 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 3 | 765 | | if (localVarAccept != null) |
| 3 | 766 | | { |
| 3 | 767 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 3 | 768 | | } |
| | 769 | |
|
| 3 | 770 | | localVarRequestOptions.PathParameters.Add("personId", Applications.WeShare.Swagger.Client.ClientUtils.Parame |
| | 771 | |
|
| 3 | 772 | | localVarRequestOptions.Operation = "ExpensesApi.FindExpensesByPerson"; |
| 3 | 773 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 774 | |
|
| | 775 | |
|
| | 776 | | // make the HTTP request |
| 3 | 777 | | var localVarResponse = this.Client.Get<List<ExpenseDTO>>("/api/expenses/person/{personId}", localVarRequestO |
| 3 | 778 | | if (this.ExceptionFactory != null) |
| 3 | 779 | | { |
| 3 | 780 | | Exception _exception = this.ExceptionFactory("FindExpensesByPerson", localVarResponse); |
| 3 | 781 | | if (_exception != null) |
| 2 | 782 | | { |
| 2 | 783 | | throw _exception; |
| | 784 | | } |
| 1 | 785 | | } |
| | 786 | |
|
| 1 | 787 | | return localVarResponse; |
| 1 | 788 | | } |
| | 789 | |
|
| | 790 | | /// <summary> |
| | 791 | | /// Find expenses for a person |
| | 792 | | /// </summary> |
| | 793 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 794 | | /// <param name="personId">The ID of the person</param> |
| | 795 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 796 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 797 | | /// <returns>Task of List<ExpenseDTO></returns> |
| | 798 | | public async System.Threading.Tasks.Task<List<ExpenseDTO>> FindExpensesByPersonAsync(int personId, int operation |
| 0 | 799 | | { |
| 0 | 800 | | Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>> localVarResponse = await FindExpensesByPer |
| 0 | 801 | | return localVarResponse.Data; |
| 0 | 802 | | } |
| | 803 | |
|
| | 804 | | /// <summary> |
| | 805 | | /// Find expenses for a person |
| | 806 | | /// </summary> |
| | 807 | | /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep |
| | 808 | | /// <param name="personId">The ID of the person</param> |
| | 809 | | /// <param name="operationIndex">Index associated with the operation.</param> |
| | 810 | | /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> |
| | 811 | | /// <returns>Task of ApiResponse (List<ExpenseDTO>)</returns> |
| | 812 | | public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<List<ExpenseDTO>>> Find |
| 0 | 813 | | { |
| | 814 | |
|
| 0 | 815 | | Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger |
| | 816 | |
|
| 0 | 817 | | string[] _contentTypes = new string[] { |
| 0 | 818 | | }; |
| | 819 | |
|
| | 820 | | // to determine the Accept header |
| 0 | 821 | | string[] _accepts = new string[] { |
| 0 | 822 | | "application/json" |
| 0 | 823 | | }; |
| | 824 | |
|
| 0 | 825 | | var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy |
| 0 | 826 | | if (localVarContentType != null) |
| 0 | 827 | | { |
| 0 | 828 | | localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); |
| 0 | 829 | | } |
| | 830 | |
|
| 0 | 831 | | var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts); |
| 0 | 832 | | if (localVarAccept != null) |
| 0 | 833 | | { |
| 0 | 834 | | localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); |
| 0 | 835 | | } |
| | 836 | |
|
| 0 | 837 | | localVarRequestOptions.PathParameters.Add("personId", Applications.WeShare.Swagger.Client.ClientUtils.Parame |
| | 838 | |
|
| 0 | 839 | | localVarRequestOptions.Operation = "ExpensesApi.FindExpensesByPerson"; |
| 0 | 840 | | localVarRequestOptions.OperationIndex = operationIndex; |
| | 841 | |
|
| | 842 | |
|
| | 843 | | // make the HTTP request |
| 0 | 844 | | var localVarResponse = await this.AsynchronousClient.GetAsync<List<ExpenseDTO>>("/api/expenses/person/{perso |
| | 845 | |
|
| 0 | 846 | | if (this.ExceptionFactory != null) |
| 0 | 847 | | { |
| 0 | 848 | | Exception _exception = this.ExceptionFactory("FindExpensesByPerson", localVarResponse); |
| 0 | 849 | | if (_exception != null) |
| 0 | 850 | | { |
| 0 | 851 | | throw _exception; |
| | 852 | | } |
| 0 | 853 | | } |
| | 854 | |
|
| 0 | 855 | | return localVarResponse; |
| 0 | 856 | | } |
| | 857 | |
|
| | 858 | | } |
| | 859 | | } |