Skip to content

Commit

Permalink
Se agrega funcionalidad y test de la consulta del total de depositant…
Browse files Browse the repository at this point in the history
…es por suscripcion
  • Loading branch information
wire4 committed Nov 4, 2021
1 parent f873e3b commit 4ed638b
Show file tree
Hide file tree
Showing 5 changed files with 437 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Referencia de la API de Wire4
This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0.0
- SDK version: 1.1.0
- SDK version: 1.1.2
- Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen

<a name="frameworks-supported"></a>
Expand Down
79 changes: 79 additions & 0 deletions sdk-client/src/MX.Wire4.Test/Model/DepositantCountResponseTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Wire4RestAPI
*
* Referencia de la API de Wire4
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using NUnit.Framework;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using MX.Wire4.Api;
using MX.Wire4.Model;
using MX.Wire4.Client;
using System.Reflection;
using Newtonsoft.Json;

namespace MX.Wire4.Test
{
/// <summary>
/// Class for testing DepositantCountResponse
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the model.
/// </remarks>
[TestFixture]
public class DepositantCountResponseTests
{
// TODO uncomment below to declare an instance variable for DepositantCountResponse
//private DepositantCountResponse instance;

/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of DepositantCountResponse
//instance = new DepositantCountResponse();
}

/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{

}

/// <summary>
/// Test an instance of DepositantCountResponse
/// </summary>
[Test]
public void DepositantCountResponseInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" DepositantCountResponse
//Assert.IsInstanceOfType<DepositantCountResponse> (instance, "variable 'instance' is a DepositantCountResponse");
}


/// <summary>
/// Test the property 'Total'
/// </summary>
[Test]
public void TotalTest()
{
// TODO unit test for the property 'Total'
}

}

}
191 changes: 191 additions & 0 deletions sdk-client/src/MX.Wire4/Api/DepositantesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ namespace MX.Wire4.Api
public interface IDepositantesApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// Consulta cuantas cuentas de depositantes existen
/// </summary>
/// <remarks>
/// Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </remarks>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>DepositantCountResponse</returns>
DepositantCountResponse GetDepositantsTotalsUsingGET (string authorization, string subscription);

/// <summary>
/// Consulta cuantas cuentas de depositantes existen
/// </summary>
/// <remarks>
/// Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </remarks>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>ApiResponse of DepositantCountResponse</returns>
ApiResponse<DepositantCountResponse> GetDepositantsTotalsUsingGETWithHttpInfo (string authorization, string subscription);

/// <summary>
/// Consulta de cuentas de depositantes
/// </summary>
Expand Down Expand Up @@ -73,6 +97,30 @@ public interface IDepositantesApi : IApiAccessor
ApiResponse<DepositantsResponse> RegisterDepositantsUsingPOSTWithHttpInfo (DepositantsRegister body, string authorization, string subscription);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Consulta cuantas cuentas de depositantes existen
/// </summary>
/// <remarks>
/// Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </remarks>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>Task of DepositantCountResponse</returns>
System.Threading.Tasks.Task<DepositantCountResponse> GetDepositantsTotalsUsingGETAsync (string authorization, string subscription);

/// <summary>
/// Consulta cuantas cuentas de depositantes existen
/// </summary>
/// <remarks>
/// Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </remarks>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>Task of ApiResponse (DepositantCountResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<DepositantCountResponse>> GetDepositantsTotalsUsingGETAsyncWithHttpInfo (string authorization, string subscription);

/// <summary>
/// Consulta de cuentas de depositantes
/// </summary>
Expand Down Expand Up @@ -232,6 +280,149 @@ public void AddDefaultHeader(string key, string value)
this.Configuration.AddDefaultHeader(key, value);
}

/// <summary>
/// Consulta cuantas cuentas de depositantes existen Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </summary>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>DepositantCountResponse</returns>
public DepositantCountResponse GetDepositantsTotalsUsingGET (string authorization, string subscription)
{
ApiResponse<DepositantCountResponse> localVarResponse = GetDepositantsTotalsUsingGETWithHttpInfo(authorization, subscription);
return localVarResponse.Data;
}

/// <summary>
/// Consulta cuantas cuentas de depositantes existen Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </summary>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>ApiResponse of DepositantCountResponse</returns>
public ApiResponse< DepositantCountResponse > GetDepositantsTotalsUsingGETWithHttpInfo (string authorization, string subscription)
{
// verify the required parameter 'authorization' is set
if (authorization == null)
throw new ApiException(400, "Missing required parameter 'authorization' when calling DepositantesApi->GetDepositantsTotalsUsingGET");
// verify the required parameter 'subscription' is set
if (subscription == null)
throw new ApiException(400, "Missing required parameter 'subscription' when calling DepositantesApi->GetDepositantsTotalsUsingGET");

var localVarPath = "/subscriptions/{subscription}/depositants/count";
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 (subscription != null) localVarPathParams.Add("subscription", this.Configuration.ApiClient.ParameterToString(subscription)); // path parameter
if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header 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("GetDepositantsTotalsUsingGET", localVarResponse);
if (exception != null) throw exception;
}

return new ApiResponse<DepositantCountResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(DepositantCountResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DepositantCountResponse)));
}

/// <summary>
/// Consulta cuantas cuentas de depositantes existen Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </summary>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>Task of DepositantCountResponse</returns>
public async System.Threading.Tasks.Task<DepositantCountResponse> GetDepositantsTotalsUsingGETAsync (string authorization, string subscription)
{
ApiResponse<DepositantCountResponse> localVarResponse = await GetDepositantsTotalsUsingGETAsyncWithHttpInfo(authorization, subscription);
return localVarResponse.Data;

}

/// <summary>
/// Consulta cuantas cuentas de depositantes existen Obtiene la cantidad el total de depositantes asociados al contrato relacionado a la suscripción.
/// </summary>
/// <exception cref="MX.Wire4.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="authorization">Header para token</param>
/// <param name="subscription">Es el identificador de la suscripción a esta API.</param>
/// <returns>Task of ApiResponse (DepositantCountResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<DepositantCountResponse>> GetDepositantsTotalsUsingGETAsyncWithHttpInfo (string authorization, string subscription)
{
// verify the required parameter 'authorization' is set
if (authorization == null)
throw new ApiException(400, "Missing required parameter 'authorization' when calling DepositantesApi->GetDepositantsTotalsUsingGET");
// verify the required parameter 'subscription' is set
if (subscription == null)
throw new ApiException(400, "Missing required parameter 'subscription' when calling DepositantesApi->GetDepositantsTotalsUsingGET");

var localVarPath = "/subscriptions/{subscription}/depositants/count";
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 (subscription != null) localVarPathParams.Add("subscription", this.Configuration.ApiClient.ParameterToString(subscription)); // path parameter
if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header 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("GetDepositantsTotalsUsingGET", localVarResponse);
if (exception != null) throw exception;
}

return new ApiResponse<DepositantCountResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(DepositantCountResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DepositantCountResponse)));
}

/// <summary>
/// Consulta de cuentas de depositantes Obtiene una lista de depositantes asociados al contrato relacionado a la suscripción.
/// </summary>
Expand Down
Loading

0 comments on commit 4ed638b

Please sign in to comment.