Skip to content

Commit

Permalink
Merge pull request #59 from CyberSource/aug2019
Browse files Browse the repository at this point in the history
Update to v0.0.0.11
  • Loading branch information
gnongsie authored Sep 3, 2019
2 parents 22f7ef9 + 8bbecd3 commit 210c3e2
Show file tree
Hide file tree
Showing 204 changed files with 19,882 additions and 15,789 deletions.
6 changes: 4 additions & 2 deletions Api/ConversionDetailsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/hal+json"
"application/hal+json",
"application/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
Expand Down Expand Up @@ -312,7 +313,8 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ConversionDetail

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/hal+json"
"application/hal+json",
"application/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
Expand Down
312 changes: 312 additions & 0 deletions Api/DownloadDTDApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,312 @@
/*
* CyberSource Merged Spec
*
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
* 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 CyberSource.Client;

namespace CyberSource.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IDownloadDTDApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// Used to download DTDs for reports
/// </summary>
/// <remarks>
/// Downloads DTDs for reports on no-auth.
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns></returns>
void GetDTDV2 (string reportDefinitionNameVersion);

/// <summary>
/// Used to download DTDs for reports
/// </summary>
/// <remarks>
/// Downloads DTDs for reports on no-auth.
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> GetDTDV2WithHttpInfo (string reportDefinitionNameVersion);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Used to download DTDs for reports
/// </summary>
/// <remarks>
/// Downloads DTDs for reports on no-auth.
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task GetDTDV2Async (string reportDefinitionNameVersion);

/// <summary>
/// Used to download DTDs for reports
/// </summary>
/// <remarks>
/// Downloads DTDs for reports on no-auth.
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> GetDTDV2AsyncWithHttpInfo (string reportDefinitionNameVersion);
#endregion Asynchronous Operations
}

/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class DownloadDTDApi : IDownloadDTDApi
{
private CyberSource.Client.ExceptionFactory _exceptionFactory = (name, response) => null;

/// <summary>
/// Initializes a new instance of the <see cref="DownloadDTDApi"/> class.
/// </summary>
/// <returns></returns>
public DownloadDTDApi(String basePath)
{
this.Configuration = new Configuration(new ApiClient(basePath));

ExceptionFactory = CyberSource.Client.Configuration.DefaultExceptionFactory;

// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}

/// <summary>
/// Initializes a new instance of the <see cref="DownloadDTDApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public DownloadDTDApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
this.Configuration = Configuration.Default;
else
this.Configuration = configuration;

ExceptionFactory = CyberSource.Client.Configuration.DefaultExceptionFactory;

this.Configuration.ApiClient.Configuration = this.Configuration;
}

/// <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 Configuration Configuration {get; set;}

/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
public CyberSource.Client.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 Dictionary<String, String> DefaultHeader()
{
return 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>
/// Used to download DTDs for reports Downloads DTDs for reports on no-auth.
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns></returns>
public void GetDTDV2 (string reportDefinitionNameVersion)
{
GetDTDV2WithHttpInfo(reportDefinitionNameVersion);
}

/// <summary>
/// Used to download DTDs for reports Downloads DTDs for reports on no-auth.
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> GetDTDV2WithHttpInfo (string reportDefinitionNameVersion)
{
// verify the required parameter 'reportDefinitionNameVersion' is set
if (reportDefinitionNameVersion == null)
throw new ApiException(400, "Missing required parameter 'reportDefinitionNameVersion' when calling DownloadDTDApi->GetDTDV2");

var localVarPath = $"/dtds/{reportDefinitionNameVersion}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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;charset=utf-8"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml-dtd"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

if (reportDefinitionNameVersion != null) localVarPathParams.Add("reportDefinitionNameVersion", Configuration.ApiClient.ParameterToString(reportDefinitionNameVersion)); // path parameter


// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);

int localVarStatusCode = (int) localVarResponse.StatusCode;

if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetDTDV2", localVarResponse);
if (exception != null) throw exception;
}

return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}

/// <summary>
/// Used to download DTDs for reports Downloads DTDs for reports on no-auth.
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task GetDTDV2Async (string reportDefinitionNameVersion)
{
await GetDTDV2AsyncWithHttpInfo(reportDefinitionNameVersion);

}

/// <summary>
/// Used to download DTDs for reports Downloads DTDs for reports on no-auth.
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="reportDefinitionNameVersion">Name and version of DTD file to download. Some DTDs only have one version. In that case version name is not needed. Some example values are ctdr-1.0, tdr, pbdr-1.1</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> GetDTDV2AsyncWithHttpInfo (string reportDefinitionNameVersion)
{
// verify the required parameter 'reportDefinitionNameVersion' is set
if (reportDefinitionNameVersion == null)
throw new ApiException(400, "Missing required parameter 'reportDefinitionNameVersion' when calling DownloadDTDApi->GetDTDV2");

var localVarPath = $"/dtds/{reportDefinitionNameVersion}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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;charset=utf-8"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/xml-dtd"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

if (reportDefinitionNameVersion != null) localVarPathParams.Add("reportDefinitionNameVersion", Configuration.ApiClient.ParameterToString(reportDefinitionNameVersion)); // path parameter


// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);

int localVarStatusCode = (int) localVarResponse.StatusCode;

if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetDTDV2", localVarResponse);
if (exception != null) throw exception;
}

return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}

}
}
Loading

0 comments on commit 210c3e2

Please sign in to comment.