Skip to content

Commit

Permalink
Merge pull request #169 from CyberSource/feb-2024-release
Browse files Browse the repository at this point in the history
Feb 2024 release
  • Loading branch information
monu-kumar-visa authored Feb 1, 2024
2 parents add92d1 + 0deda03 commit decfe5e
Show file tree
Hide file tree
Showing 43 changed files with 1,041 additions and 428 deletions.
74 changes: 58 additions & 16 deletions Api/TokenApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ public interface ITokenApi : IApiAccessor
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>string</returns>
string PostTokenPaymentCredentials (string tokenId, string profileId = null);
string PostTokenPaymentCredentials (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);

/// <summary>
/// Generate Payment Credentials for a TMS Token
Expand All @@ -47,9 +48,10 @@ public interface ITokenApi : IApiAccessor
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> PostTokenPaymentCredentialsWithHttpInfo (string tokenId, string profileId = null);
ApiResponse<string> PostTokenPaymentCredentialsWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
Expand All @@ -60,9 +62,10 @@ public interface ITokenApi : IApiAccessor
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, string profileId = null);
System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);

/// <summary>
/// Generate Payment Credentials for a TMS Token
Expand All @@ -72,9 +75,10 @@ public interface ITokenApi : IApiAccessor
/// </remarks>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCredentialsAsyncWithHttpInfo (string tokenId, string profileId = null);
System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCredentialsAsyncWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);
#endregion Asynchronous Operations
}

Expand Down Expand Up @@ -220,13 +224,14 @@ public void SetStatusCode(int? statusCode)
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>string</returns>
public string PostTokenPaymentCredentials (string tokenId, string profileId = null)
public string PostTokenPaymentCredentials (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
{
logger.Debug("CALLING API \"PostTokenPaymentCredentials\" STARTED");
this.SetStatusCode(null);
ApiResponse<string> localVarResponse = PostTokenPaymentCredentialsWithHttpInfo(tokenId, profileId);
ApiResponse<string> localVarResponse = PostTokenPaymentCredentialsWithHttpInfo(tokenId, postPaymentCredentialsRequest, profileId);
logger.Debug("CALLING API \"PostTokenPaymentCredentials\" ENDED");
this.SetStatusCode(localVarResponse.StatusCode);
return localVarResponse.Data;
Expand All @@ -237,9 +242,10 @@ public string PostTokenPaymentCredentials (string tokenId, string profileId = nu
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tokenId, string profileId = null)
public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
{
LogUtility logUtility = new LogUtility();

Expand All @@ -249,6 +255,12 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok
logger.Error("ApiException : Missing required parameter 'tokenId' when calling TokenApi->PostTokenPaymentCredentials");
throw new ApiException(400, "Missing required parameter 'tokenId' when calling TokenApi->PostTokenPaymentCredentials");
}
// verify the required parameter 'postPaymentCredentialsRequest' is set
if (postPaymentCredentialsRequest == null)
{
logger.Error("ApiException : Missing required parameter 'postPaymentCredentialsRequest' when calling TokenApi->PostTokenPaymentCredentials");
throw new ApiException(400, "Missing required parameter 'postPaymentCredentialsRequest' when calling TokenApi->PostTokenPaymentCredentials");
}

var localVarPath = $"/tms/v2/tokens/{tokenId}/payment-credentials";
var localVarPathParams = new Dictionary<string, string>();
Expand Down Expand Up @@ -283,13 +295,24 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok
{
localVarHeaderParams.Add("profile-id", Configuration.ApiClient.ParameterToString(profileId)); // header parameter
}
if (Method.Post == Method.Post)
if (postPaymentCredentialsRequest != null && postPaymentCredentialsRequest.GetType() != typeof(byte[]))
{
SdkTracker sdkTracker = new SdkTracker();
postPaymentCredentialsRequest = (PostPaymentCredentialsRequest)sdkTracker.InsertDeveloperIdTracker(postPaymentCredentialsRequest, postPaymentCredentialsRequest.GetType().Name, Configuration.ApiClient.Configuration.MerchantConfigDictionaryObj["runEnvironment"]);
localVarPostBody = Configuration.ApiClient.Serialize(postPaymentCredentialsRequest); // http body (model) parameter
}
else
{
localVarPostBody = postPaymentCredentialsRequest; // byte array
}

if (logUtility.IsMaskingEnabled(logger))
{
localVarPostBody = "{}";
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
}
else
{
localVarPostBody = null;
logger.Debug($"HTTP Request Body :\n{localVarPostBody}");
}


Expand Down Expand Up @@ -320,13 +343,14 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, string profileId = null)
public async System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
{
logger.Debug("CALLING API \"PostTokenPaymentCredentialsAsync\" STARTED");
this.SetStatusCode(null);
ApiResponse<string> localVarResponse = await PostTokenPaymentCredentialsAsyncWithHttpInfo(tokenId, profileId);
ApiResponse<string> localVarResponse = await PostTokenPaymentCredentialsAsyncWithHttpInfo(tokenId, postPaymentCredentialsRequest, profileId);
logger.Debug("CALLING API \"PostTokenPaymentCredentialsAsync\" ENDED");
this.SetStatusCode(localVarResponse.StatusCode);
return localVarResponse.Data;
Expand All @@ -338,9 +362,10 @@ public async System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsyn
/// </summary>
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
/// <param name="postPaymentCredentialsRequest"></param>
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCredentialsAsyncWithHttpInfo (string tokenId, string profileId = null)
public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCredentialsAsyncWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
{
LogUtility logUtility = new LogUtility();

Expand All @@ -350,6 +375,12 @@ public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCr
logger.Error("ApiException : Missing required parameter 'tokenId' when calling TokenApi->PostTokenPaymentCredentials");
throw new ApiException(400, "Missing required parameter 'tokenId' when calling TokenApi->PostTokenPaymentCredentials");
}
// verify the required parameter 'postPaymentCredentialsRequest' is set
if (postPaymentCredentialsRequest == null)
{
logger.Error("ApiException : Missing required parameter 'postPaymentCredentialsRequest' when calling TokenApi->PostTokenPaymentCredentials");
throw new ApiException(400, "Missing required parameter 'postPaymentCredentialsRequest' when calling TokenApi->PostTokenPaymentCredentials");
}

var localVarPath = $"/tms/v2/tokens/{tokenId}/payment-credentials";
var localVarPathParams = new Dictionary<string, string>();
Expand Down Expand Up @@ -384,13 +415,24 @@ public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCr
{
localVarHeaderParams.Add("profile-id", Configuration.ApiClient.ParameterToString(profileId)); // header parameter
}
if (Method.Post == Method.Post)
if (postPaymentCredentialsRequest != null && postPaymentCredentialsRequest.GetType() != typeof(byte[]))
{
SdkTracker sdkTracker = new SdkTracker();
postPaymentCredentialsRequest = (PostPaymentCredentialsRequest)sdkTracker.InsertDeveloperIdTracker(postPaymentCredentialsRequest, postPaymentCredentialsRequest.GetType().Name, Configuration.ApiClient.Configuration.MerchantConfigDictionaryObj["runEnvironment"]);
localVarPostBody = Configuration.ApiClient.Serialize(postPaymentCredentialsRequest); // http body (model) parameter
}
else
{
localVarPostBody = postPaymentCredentialsRequest; // byte array
}

if (logUtility.IsMaskingEnabled(logger))
{
localVarPostBody = "{}";
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
}
else
{
localVarPostBody = null;
logger.Debug($"HTTP Request Body :\n{localVarPostBody}");
}


Expand Down
4 changes: 2 additions & 2 deletions Model/CheckPayerAuthEnrollmentRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public partial class CheckPayerAuthEnrollmentRequest : IEquatable<CheckPayerAut
/// <param name="RiskInformation">RiskInformation.</param>
/// <param name="TravelInformation">TravelInformation.</param>
/// <param name="MerchantDefinedInformation">MerchantDefinedInformation.</param>
public CheckPayerAuthEnrollmentRequest(Riskv1decisionsClientReferenceInformation ClientReferenceInformation = default(Riskv1decisionsClientReferenceInformation), Riskv1authenticationsOrderInformation OrderInformation = default(Riskv1authenticationsOrderInformation), Riskv1authenticationsPaymentInformation PaymentInformation = default(Riskv1authenticationsPaymentInformation), Riskv1authenticationsetupsProcessingInformation ProcessingInformation = default(Riskv1authenticationsetupsProcessingInformation), Riskv1authenticationsetupsTokenInformation TokenInformation = default(Riskv1authenticationsetupsTokenInformation), Riskv1authenticationsBuyerInformation BuyerInformation = default(Riskv1authenticationsBuyerInformation), Riskv1authenticationsDeviceInformation DeviceInformation = default(Riskv1authenticationsDeviceInformation), Riskv1decisionsMerchantInformation MerchantInformation = default(Riskv1decisionsMerchantInformation), Ptsv2paymentsAcquirerInformation AcquirerInformation = default(Ptsv2paymentsAcquirerInformation), Ptsv2paymentsRecurringPaymentInformation RecurringPaymentInformation = default(Ptsv2paymentsRecurringPaymentInformation), Riskv1decisionsConsumerAuthenticationInformation ConsumerAuthenticationInformation = default(Riskv1decisionsConsumerAuthenticationInformation), Riskv1authenticationsRiskInformation RiskInformation = default(Riskv1authenticationsRiskInformation), Riskv1authenticationsTravelInformation TravelInformation = default(Riskv1authenticationsTravelInformation), List<Riskv1decisionsMerchantDefinedInformation> MerchantDefinedInformation = default(List<Riskv1decisionsMerchantDefinedInformation>))
public CheckPayerAuthEnrollmentRequest(Riskv1decisionsClientReferenceInformation ClientReferenceInformation = default(Riskv1decisionsClientReferenceInformation), Riskv1authenticationsOrderInformation OrderInformation = default(Riskv1authenticationsOrderInformation), Riskv1authenticationsPaymentInformation PaymentInformation = default(Riskv1authenticationsPaymentInformation), Riskv1authenticationsetupsProcessingInformation ProcessingInformation = default(Riskv1authenticationsetupsProcessingInformation), Riskv1authenticationsetupsTokenInformation TokenInformation = default(Riskv1authenticationsetupsTokenInformation), Riskv1authenticationsBuyerInformation BuyerInformation = default(Riskv1authenticationsBuyerInformation), Riskv1authenticationsDeviceInformation DeviceInformation = default(Riskv1authenticationsDeviceInformation), Riskv1decisionsMerchantInformation MerchantInformation = default(Riskv1decisionsMerchantInformation), Riskv1decisionsAcquirerInformation AcquirerInformation = default(Riskv1decisionsAcquirerInformation), Ptsv2paymentsRecurringPaymentInformation RecurringPaymentInformation = default(Ptsv2paymentsRecurringPaymentInformation), Riskv1decisionsConsumerAuthenticationInformation ConsumerAuthenticationInformation = default(Riskv1decisionsConsumerAuthenticationInformation), Riskv1authenticationsRiskInformation RiskInformation = default(Riskv1authenticationsRiskInformation), Riskv1authenticationsTravelInformation TravelInformation = default(Riskv1authenticationsTravelInformation), List<Riskv1decisionsMerchantDefinedInformation> MerchantDefinedInformation = default(List<Riskv1decisionsMerchantDefinedInformation>))
{
this.ClientReferenceInformation = ClientReferenceInformation;
this.OrderInformation = OrderInformation;
Expand Down Expand Up @@ -117,7 +117,7 @@ public partial class CheckPayerAuthEnrollmentRequest : IEquatable<CheckPayerAut
/// Gets or Sets AcquirerInformation
/// </summary>
[DataMember(Name="acquirerInformation", EmitDefaultValue=false)]
public Ptsv2paymentsAcquirerInformation AcquirerInformation { get; set; }
public Riskv1decisionsAcquirerInformation AcquirerInformation { get; set; }

/// <summary>
/// Gets or Sets RecurringPaymentInformation
Expand Down
Loading

0 comments on commit decfe5e

Please sign in to comment.