Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated RestSharp dependency and logic #4

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/workflows/cybersource-rest-client-netstandard-publish2.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<ItemGroup>
<PackageReference Include="jose-jwt" Version="2.5.0" />
<PackageReference Include="NLog" Version="4.7.4" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
<PackageReference Include="System.Runtime.Caching" Version="4.7.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ private string SignatureForCategory1()
{
var signatureString = new StringBuilder();
var signatureHeaderValue = new StringBuilder();
const string getOrDeleteHeaders = "host date (request-target) v-c-merchant-id";
const string getOrDeleteHeaders = "host date request-target v-c-merchant-id";

signatureString.Append($"\nhost: {_httpToken.HostName}")
.Append($"\ndate: {_httpToken.GmtDateTime}")
.Append($"\n(request-target): {_httpToken.HttpSignRequestTarget}")
.Append($"\nrequest-target: {_httpToken.HttpSignRequestTarget}")
.Append($"\nv-c-merchant-id: ");

if (_httpToken.UseMetaKey == true)
Expand Down Expand Up @@ -81,11 +81,11 @@ private string SignatureForCategory2()
var signatureString = new StringBuilder();
var signatureHeaderValue = new StringBuilder();
_httpToken.Digest = GenerateDigest();
const string postOrPutHeaders = "host date (request-target) digest v-c-merchant-id";
const string postOrPutHeaders = "host date request-target digest v-c-merchant-id";

signatureString.Append($"\nhost: {_httpToken.HostName}")
.Append($"\ndate: {_httpToken.GmtDateTime}")
.Append($"\n(request-target): {_httpToken.HttpSignRequestTarget}")
.Append($"\nrequest-target: {_httpToken.HttpSignRequestTarget}")
.Append($"\ndigest: {_httpToken.Digest}")
.Append($"\nv-c-merchant-id: ");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="RestSharp" Version="106.12.0" />
<PackageReference Include="RestSharp" Version="110.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public AsymmetricKeyManagementApi(Configuration configuration = null)
/// <value>The base path</value>
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
return Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
}

/// <summary>
Expand Down Expand Up @@ -349,8 +349,8 @@ public ApiResponse< KmsV2KeysAsymPost201Response > CreateP12KeysWithHttpInfo (Cr


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

int localVarStatusCode = (int) localVarResponse.StatusCode;
Expand Down Expand Up @@ -446,8 +446,8 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymPost201Respons


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

int localVarStatusCode = (int)localVarResponse.StatusCode;
Expand Down Expand Up @@ -541,8 +541,8 @@ public ApiResponse< KmsV2KeysAsymDeletesPost200Response > DeleteBulkP12KeysWithH


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

int localVarStatusCode = (int) localVarResponse.StatusCode;
Expand Down Expand Up @@ -638,8 +638,8 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymDeletesPost200


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

int localVarStatusCode = (int)localVarResponse.StatusCode;
Expand Down Expand Up @@ -718,7 +718,7 @@ public ApiResponse< KmsV2KeysAsymGet200Response > GetP12KeyDetailsWithHttpInfo (
localVarPathParams.Add("keyId", Configuration.ApiClient.ParameterToString(keyId)); // path parameter
}
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
if (Method.GET == Method.POST)
if (Method.Get == Method.Post)
{
localVarPostBody = "{}";
}
Expand All @@ -729,8 +729,8 @@ public ApiResponse< KmsV2KeysAsymGet200Response > GetP12KeyDetailsWithHttpInfo (


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

int localVarStatusCode = (int) localVarResponse.StatusCode;
Expand Down Expand Up @@ -811,7 +811,7 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymGet200Response
localVarPathParams.Add("keyId", Configuration.ApiClient.ParameterToString(keyId)); // path parameter
}
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
if (Method.GET == Method.POST)
if (Method.Get == Method.Post)
{
localVarPostBody = "{}";
}
Expand All @@ -822,8 +822,8 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymGet200Response


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

int localVarStatusCode = (int)localVarResponse.StatusCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public CaptureApi(Configuration configuration = null)
/// <value>The base path</value>
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
return Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
}

/// <summary>
Expand Down Expand Up @@ -282,8 +282,8 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt


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

int localVarStatusCode = (int) localVarResponse.StatusCode;
Expand Down Expand Up @@ -392,8 +392,8 @@ public async System.Threading.Tasks.Task<ApiResponse<PtsV2PaymentsCapturesPost20


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

int localVarStatusCode = (int)localVarResponse.StatusCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public ChargebackDetailsApi(Configuration configuration = null)
/// <value>The base path</value>
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
return Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
}

/// <summary>
Expand Down Expand Up @@ -279,7 +279,7 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
if (Method.GET == Method.POST)
if (Method.Get == Method.Post)
{
localVarPostBody = "{}";
}
Expand All @@ -290,8 +290,8 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe


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

int localVarStatusCode = (int) localVarResponse.StatusCode;
Expand Down Expand Up @@ -393,7 +393,7 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackDetail
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
if (Method.GET == Method.POST)
if (Method.Get == Method.Post)
{
localVarPostBody = "{}";
}
Expand All @@ -404,8 +404,8 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackDetail


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

int localVarStatusCode = (int)localVarResponse.StatusCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public ChargebackSummariesApi(Configuration configuration = null)
/// <value>The base path</value>
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
return Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
}

/// <summary>
Expand Down Expand Up @@ -279,7 +279,7 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
if (Method.GET == Method.POST)
if (Method.Get == Method.Post)
{
localVarPostBody = "{}";
}
Expand All @@ -290,8 +290,8 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback


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

int localVarStatusCode = (int) localVarResponse.StatusCode;
Expand Down Expand Up @@ -393,7 +393,7 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackSummar
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
if (Method.GET == Method.POST)
if (Method.Get == Method.Post)
{
localVarPostBody = "{}";
}
Expand All @@ -404,8 +404,8 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackSummar


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

int localVarStatusCode = (int)localVarResponse.StatusCode;
Expand Down
Loading
Loading