Skip to content

Commit decfe5e

Browse files
Merge pull request #169 from CyberSource/feb-2024-release
Feb 2024 release
2 parents add92d1 + 0deda03 commit decfe5e

File tree

43 files changed

+1041
-428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1041
-428
lines changed

Api/TokenApi.cs

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ public interface ITokenApi : IApiAccessor
3535
/// </remarks>
3636
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
3737
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
38+
/// <param name="postPaymentCredentialsRequest"></param>
3839
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
3940
/// <returns>string</returns>
40-
string PostTokenPaymentCredentials (string tokenId, string profileId = null);
41+
string PostTokenPaymentCredentials (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);
4142

4243
/// <summary>
4344
/// Generate Payment Credentials for a TMS Token
@@ -47,9 +48,10 @@ public interface ITokenApi : IApiAccessor
4748
/// </remarks>
4849
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
4950
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
51+
/// <param name="postPaymentCredentialsRequest"></param>
5052
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
5153
/// <returns>ApiResponse of string</returns>
52-
ApiResponse<string> PostTokenPaymentCredentialsWithHttpInfo (string tokenId, string profileId = null);
54+
ApiResponse<string> PostTokenPaymentCredentialsWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);
5355
#endregion Synchronous Operations
5456
#region Asynchronous Operations
5557
/// <summary>
@@ -60,9 +62,10 @@ public interface ITokenApi : IApiAccessor
6062
/// </remarks>
6163
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
6264
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
65+
/// <param name="postPaymentCredentialsRequest"></param>
6366
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
6467
/// <returns>Task of string</returns>
65-
System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, string profileId = null);
68+
System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null);
6669

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

@@ -220,13 +224,14 @@ public void SetStatusCode(int? statusCode)
220224
/// </summary>
221225
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
222226
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
227+
/// <param name="postPaymentCredentialsRequest"></param>
223228
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
224229
/// <returns>string</returns>
225-
public string PostTokenPaymentCredentials (string tokenId, string profileId = null)
230+
public string PostTokenPaymentCredentials (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
226231
{
227232
logger.Debug("CALLING API \"PostTokenPaymentCredentials\" STARTED");
228233
this.SetStatusCode(null);
229-
ApiResponse<string> localVarResponse = PostTokenPaymentCredentialsWithHttpInfo(tokenId, profileId);
234+
ApiResponse<string> localVarResponse = PostTokenPaymentCredentialsWithHttpInfo(tokenId, postPaymentCredentialsRequest, profileId);
230235
logger.Debug("CALLING API \"PostTokenPaymentCredentials\" ENDED");
231236
this.SetStatusCode(localVarResponse.StatusCode);
232237
return localVarResponse.Data;
@@ -237,9 +242,10 @@ public string PostTokenPaymentCredentials (string tokenId, string profileId = nu
237242
/// </summary>
238243
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
239244
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
245+
/// <param name="postPaymentCredentialsRequest"></param>
240246
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
241247
/// <returns>ApiResponse of string</returns>
242-
public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tokenId, string profileId = null)
248+
public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
243249
{
244250
LogUtility logUtility = new LogUtility();
245251

@@ -249,6 +255,12 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok
249255
logger.Error("ApiException : Missing required parameter 'tokenId' when calling TokenApi->PostTokenPaymentCredentials");
250256
throw new ApiException(400, "Missing required parameter 'tokenId' when calling TokenApi->PostTokenPaymentCredentials");
251257
}
258+
// verify the required parameter 'postPaymentCredentialsRequest' is set
259+
if (postPaymentCredentialsRequest == null)
260+
{
261+
logger.Error("ApiException : Missing required parameter 'postPaymentCredentialsRequest' when calling TokenApi->PostTokenPaymentCredentials");
262+
throw new ApiException(400, "Missing required parameter 'postPaymentCredentialsRequest' when calling TokenApi->PostTokenPaymentCredentials");
263+
}
252264

253265
var localVarPath = $"/tms/v2/tokens/{tokenId}/payment-credentials";
254266
var localVarPathParams = new Dictionary<string, string>();
@@ -283,13 +295,24 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok
283295
{
284296
localVarHeaderParams.Add("profile-id", Configuration.ApiClient.ParameterToString(profileId)); // header parameter
285297
}
286-
if (Method.Post == Method.Post)
298+
if (postPaymentCredentialsRequest != null && postPaymentCredentialsRequest.GetType() != typeof(byte[]))
299+
{
300+
SdkTracker sdkTracker = new SdkTracker();
301+
postPaymentCredentialsRequest = (PostPaymentCredentialsRequest)sdkTracker.InsertDeveloperIdTracker(postPaymentCredentialsRequest, postPaymentCredentialsRequest.GetType().Name, Configuration.ApiClient.Configuration.MerchantConfigDictionaryObj["runEnvironment"]);
302+
localVarPostBody = Configuration.ApiClient.Serialize(postPaymentCredentialsRequest); // http body (model) parameter
303+
}
304+
else
305+
{
306+
localVarPostBody = postPaymentCredentialsRequest; // byte array
307+
}
308+
309+
if (logUtility.IsMaskingEnabled(logger))
287310
{
288-
localVarPostBody = "{}";
311+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
289312
}
290313
else
291314
{
292-
localVarPostBody = null;
315+
logger.Debug($"HTTP Request Body :\n{localVarPostBody}");
293316
}
294317

295318

@@ -320,13 +343,14 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok
320343
/// </summary>
321344
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
322345
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
346+
/// <param name="postPaymentCredentialsRequest"></param>
323347
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
324348
/// <returns>Task of string</returns>
325-
public async System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, string profileId = null)
349+
public async System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsync (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
326350
{
327351
logger.Debug("CALLING API \"PostTokenPaymentCredentialsAsync\" STARTED");
328352
this.SetStatusCode(null);
329-
ApiResponse<string> localVarResponse = await PostTokenPaymentCredentialsAsyncWithHttpInfo(tokenId, profileId);
353+
ApiResponse<string> localVarResponse = await PostTokenPaymentCredentialsAsyncWithHttpInfo(tokenId, postPaymentCredentialsRequest, profileId);
330354
logger.Debug("CALLING API \"PostTokenPaymentCredentialsAsync\" ENDED");
331355
this.SetStatusCode(localVarResponse.StatusCode);
332356
return localVarResponse.Data;
@@ -338,9 +362,10 @@ public async System.Threading.Tasks.Task<string> PostTokenPaymentCredentialsAsyn
338362
/// </summary>
339363
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
340364
/// <param name="tokenId">The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.</param>
365+
/// <param name="postPaymentCredentialsRequest"></param>
341366
/// <param name="profileId">The Id of a profile containing user specific TMS configuration. (optional)</param>
342367
/// <returns>Task of ApiResponse (string)</returns>
343-
public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCredentialsAsyncWithHttpInfo (string tokenId, string profileId = null)
368+
public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCredentialsAsyncWithHttpInfo (string tokenId, PostPaymentCredentialsRequest postPaymentCredentialsRequest, string profileId = null)
344369
{
345370
LogUtility logUtility = new LogUtility();
346371

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

354385
var localVarPath = $"/tms/v2/tokens/{tokenId}/payment-credentials";
355386
var localVarPathParams = new Dictionary<string, string>();
@@ -384,13 +415,24 @@ public async System.Threading.Tasks.Task<ApiResponse<string>> PostTokenPaymentCr
384415
{
385416
localVarHeaderParams.Add("profile-id", Configuration.ApiClient.ParameterToString(profileId)); // header parameter
386417
}
387-
if (Method.Post == Method.Post)
418+
if (postPaymentCredentialsRequest != null && postPaymentCredentialsRequest.GetType() != typeof(byte[]))
419+
{
420+
SdkTracker sdkTracker = new SdkTracker();
421+
postPaymentCredentialsRequest = (PostPaymentCredentialsRequest)sdkTracker.InsertDeveloperIdTracker(postPaymentCredentialsRequest, postPaymentCredentialsRequest.GetType().Name, Configuration.ApiClient.Configuration.MerchantConfigDictionaryObj["runEnvironment"]);
422+
localVarPostBody = Configuration.ApiClient.Serialize(postPaymentCredentialsRequest); // http body (model) parameter
423+
}
424+
else
425+
{
426+
localVarPostBody = postPaymentCredentialsRequest; // byte array
427+
}
428+
429+
if (logUtility.IsMaskingEnabled(logger))
388430
{
389-
localVarPostBody = "{}";
431+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
390432
}
391433
else
392434
{
393-
localVarPostBody = null;
435+
logger.Debug($"HTTP Request Body :\n{localVarPostBody}");
394436
}
395437

396438

Model/CheckPayerAuthEnrollmentRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public partial class CheckPayerAuthEnrollmentRequest : IEquatable<CheckPayerAut
4747
/// <param name="RiskInformation">RiskInformation.</param>
4848
/// <param name="TravelInformation">TravelInformation.</param>
4949
/// <param name="MerchantDefinedInformation">MerchantDefinedInformation.</param>
50-
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>))
50+
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>))
5151
{
5252
this.ClientReferenceInformation = ClientReferenceInformation;
5353
this.OrderInformation = OrderInformation;
@@ -117,7 +117,7 @@ public partial class CheckPayerAuthEnrollmentRequest : IEquatable<CheckPayerAut
117117
/// Gets or Sets AcquirerInformation
118118
/// </summary>
119119
[DataMember(Name="acquirerInformation", EmitDefaultValue=false)]
120-
public Ptsv2paymentsAcquirerInformation AcquirerInformation { get; set; }
120+
public Riskv1decisionsAcquirerInformation AcquirerInformation { get; set; }
121121

122122
/// <summary>
123123
/// Gets or Sets RecurringPaymentInformation

0 commit comments

Comments
 (0)