Skip to content

Commit abcae50

Browse files
authored
Merge pull request #125 from CyberSource/log-utility-fix
Log utility fix
2 parents aeb0c5a + b8692e7 commit abcae50

File tree

160 files changed

+3102
-650
lines changed

Some content is hidden

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

160 files changed

+3102
-650
lines changed

Api/AsymmetricKeyManagementApi.cs

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ public KmsV2KeysAsymPost201Response CreateP12Keys (CreateP12KeysRequest createP1
296296
/// <returns>ApiResponse of KmsV2KeysAsymPost201Response</returns>
297297
public ApiResponse< KmsV2KeysAsymPost201Response > CreateP12KeysWithHttpInfo (CreateP12KeysRequest createP12KeysRequest)
298298
{
299+
LogUtility logUtility = new LogUtility();
300+
299301
// verify the required parameter 'createP12KeysRequest' is set
300302
if (createP12KeysRequest == null)
301303
{
@@ -336,9 +338,9 @@ public ApiResponse< KmsV2KeysAsymPost201Response > CreateP12KeysWithHttpInfo (Cr
336338
localVarPostBody = createP12KeysRequest; // byte array
337339
}
338340

339-
if (LogUtility.IsMaskingEnabled(logger))
341+
if (logUtility.IsMaskingEnabled(logger))
340342
{
341-
logger.Debug($"HTTP Request Body :\n{LogUtility.MaskSensitiveData(localVarPostBody.ToString())}");
343+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
342344
}
343345
else
344346
{
@@ -391,6 +393,8 @@ public async System.Threading.Tasks.Task<KmsV2KeysAsymPost201Response> CreateP12
391393
/// <returns>Task of ApiResponse (KmsV2KeysAsymPost201Response)</returns>
392394
public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymPost201Response>> CreateP12KeysAsyncWithHttpInfo (CreateP12KeysRequest createP12KeysRequest)
393395
{
396+
LogUtility logUtility = new LogUtility();
397+
394398
// verify the required parameter 'createP12KeysRequest' is set
395399
if (createP12KeysRequest == null)
396400
{
@@ -431,9 +435,9 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymPost201Respons
431435
localVarPostBody = createP12KeysRequest; // byte array
432436
}
433437

434-
if (LogUtility.IsMaskingEnabled(logger))
438+
if (logUtility.IsMaskingEnabled(logger))
435439
{
436-
logger.Debug($"HTTP Request Body :\n{LogUtility.MaskSensitiveData(localVarPostBody.ToString())}");
440+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
437441
}
438442
else
439443
{
@@ -484,6 +488,8 @@ public KmsV2KeysAsymDeletesPost200Response DeleteBulkP12Keys (DeleteBulkP12KeysR
484488
/// <returns>ApiResponse of KmsV2KeysAsymDeletesPost200Response</returns>
485489
public ApiResponse< KmsV2KeysAsymDeletesPost200Response > DeleteBulkP12KeysWithHttpInfo (DeleteBulkP12KeysRequest deleteBulkP12KeysRequest)
486490
{
491+
LogUtility logUtility = new LogUtility();
492+
487493
// verify the required parameter 'deleteBulkP12KeysRequest' is set
488494
if (deleteBulkP12KeysRequest == null)
489495
{
@@ -524,9 +530,9 @@ public ApiResponse< KmsV2KeysAsymDeletesPost200Response > DeleteBulkP12KeysWithH
524530
localVarPostBody = deleteBulkP12KeysRequest; // byte array
525531
}
526532

527-
if (LogUtility.IsMaskingEnabled(logger))
533+
if (logUtility.IsMaskingEnabled(logger))
528534
{
529-
logger.Debug($"HTTP Request Body :\n{LogUtility.MaskSensitiveData(localVarPostBody.ToString())}");
535+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
530536
}
531537
else
532538
{
@@ -579,6 +585,8 @@ public async System.Threading.Tasks.Task<KmsV2KeysAsymDeletesPost200Response> De
579585
/// <returns>Task of ApiResponse (KmsV2KeysAsymDeletesPost200Response)</returns>
580586
public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymDeletesPost200Response>> DeleteBulkP12KeysAsyncWithHttpInfo (DeleteBulkP12KeysRequest deleteBulkP12KeysRequest)
581587
{
588+
LogUtility logUtility = new LogUtility();
589+
582590
// verify the required parameter 'deleteBulkP12KeysRequest' is set
583591
if (deleteBulkP12KeysRequest == null)
584592
{
@@ -619,9 +627,9 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymDeletesPost200
619627
localVarPostBody = deleteBulkP12KeysRequest; // byte array
620628
}
621629

622-
if (LogUtility.IsMaskingEnabled(logger))
630+
if (logUtility.IsMaskingEnabled(logger))
623631
{
624-
logger.Debug($"HTTP Request Body :\n{LogUtility.MaskSensitiveData(localVarPostBody.ToString())}");
632+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
625633
}
626634
else
627635
{
@@ -672,6 +680,8 @@ public KmsV2KeysAsymGet200Response GetP12KeyDetails (string keyId)
672680
/// <returns>ApiResponse of KmsV2KeysAsymGet200Response</returns>
673681
public ApiResponse< KmsV2KeysAsymGet200Response > GetP12KeyDetailsWithHttpInfo (string keyId)
674682
{
683+
LogUtility logUtility = new LogUtility();
684+
675685
// verify the required parameter 'keyId' is set
676686
if (keyId == null)
677687
{
@@ -707,7 +717,7 @@ public ApiResponse< KmsV2KeysAsymGet200Response > GetP12KeyDetailsWithHttpInfo (
707717
{
708718
localVarPathParams.Add("keyId", Configuration.ApiClient.ParameterToString(keyId)); // path parameter
709719
}
710-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarPathParams)}");
720+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
711721

712722

713723
// make the HTTP request
@@ -755,6 +765,8 @@ public async System.Threading.Tasks.Task<KmsV2KeysAsymGet200Response> GetP12KeyD
755765
/// <returns>Task of ApiResponse (KmsV2KeysAsymGet200Response)</returns>
756766
public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymGet200Response>> GetP12KeyDetailsAsyncWithHttpInfo (string keyId)
757767
{
768+
LogUtility logUtility = new LogUtility();
769+
758770
// verify the required parameter 'keyId' is set
759771
if (keyId == null)
760772
{
@@ -790,7 +802,7 @@ public async System.Threading.Tasks.Task<ApiResponse<KmsV2KeysAsymGet200Response
790802
{
791803
localVarPathParams.Add("keyId", Configuration.ApiClient.ParameterToString(keyId)); // path parameter
792804
}
793-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarPathParams)}");
805+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
794806

795807

796808
// make the HTTP request

Api/CaptureApi.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ public PtsV2PaymentsCapturesPost201Response CapturePayment (CapturePaymentReques
218218
/// <returns>ApiResponse of PtsV2PaymentsCapturesPost201Response</returns>
219219
public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHttpInfo (CapturePaymentRequest capturePaymentRequest, string id)
220220
{
221+
LogUtility logUtility = new LogUtility();
222+
221223
// verify the required parameter 'capturePaymentRequest' is set
222224
if (capturePaymentRequest == null)
223225
{
@@ -259,7 +261,7 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt
259261
{
260262
localVarPathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter
261263
}
262-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarPathParams)}");
264+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
263265
if (capturePaymentRequest != null && capturePaymentRequest.GetType() != typeof(byte[]))
264266
{
265267
localVarPostBody = Configuration.ApiClient.Serialize(capturePaymentRequest); // http body (model) parameter
@@ -269,9 +271,9 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt
269271
localVarPostBody = capturePaymentRequest; // byte array
270272
}
271273

272-
if (LogUtility.IsMaskingEnabled(logger))
274+
if (logUtility.IsMaskingEnabled(logger))
273275
{
274-
logger.Debug($"HTTP Request Body :\n{LogUtility.MaskSensitiveData(localVarPostBody.ToString())}");
276+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
275277
}
276278
else
277279
{
@@ -326,6 +328,8 @@ public async System.Threading.Tasks.Task<PtsV2PaymentsCapturesPost201Response> C
326328
/// <returns>Task of ApiResponse (PtsV2PaymentsCapturesPost201Response)</returns>
327329
public async System.Threading.Tasks.Task<ApiResponse<PtsV2PaymentsCapturesPost201Response>> CapturePaymentAsyncWithHttpInfo (CapturePaymentRequest capturePaymentRequest, string id)
328330
{
331+
LogUtility logUtility = new LogUtility();
332+
329333
// verify the required parameter 'capturePaymentRequest' is set
330334
if (capturePaymentRequest == null)
331335
{
@@ -367,7 +371,7 @@ public async System.Threading.Tasks.Task<ApiResponse<PtsV2PaymentsCapturesPost20
367371
{
368372
localVarPathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter
369373
}
370-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarPathParams)}");
374+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarPathParams)}");
371375
if (capturePaymentRequest != null && capturePaymentRequest.GetType() != typeof(byte[]))
372376
{
373377
localVarPostBody = Configuration.ApiClient.Serialize(capturePaymentRequest); // http body (model) parameter
@@ -377,9 +381,9 @@ public async System.Threading.Tasks.Task<ApiResponse<PtsV2PaymentsCapturesPost20
377381
localVarPostBody = capturePaymentRequest; // byte array
378382
}
379383

380-
if (LogUtility.IsMaskingEnabled(logger))
384+
if (logUtility.IsMaskingEnabled(logger))
381385
{
382-
logger.Debug($"HTTP Request Body :\n{LogUtility.MaskSensitiveData(localVarPostBody.ToString())}");
386+
logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}");
383387
}
384388
else
385389
{

Api/ChargebackDetailsApi.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ public ReportingV3ChargebackDetailsGet200Response GetChargebackDetails (DateTime
224224
/// <returns>ApiResponse of ReportingV3ChargebackDetailsGet200Response</returns>
225225
public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDetailsWithHttpInfo (DateTime? startTime, DateTime? endTime, string organizationId = null)
226226
{
227+
LogUtility logUtility = new LogUtility();
228+
227229
// verify the required parameter 'startTime' is set
228230
if (startTime == null)
229231
{
@@ -274,9 +276,9 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe
274276
{
275277
localVarQueryParams.Add("organizationId", Configuration.ApiClient.ParameterToString(organizationId)); // query parameter
276278
}
277-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
278-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
279-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
279+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
280+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
281+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
280282

281283

282284
// make the HTTP request
@@ -328,6 +330,8 @@ public async System.Threading.Tasks.Task<ReportingV3ChargebackDetailsGet200Respo
328330
/// <returns>Task of ApiResponse (ReportingV3ChargebackDetailsGet200Response)</returns>
329331
public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackDetailsGet200Response>> GetChargebackDetailsAsyncWithHttpInfo (DateTime? startTime, DateTime? endTime, string organizationId = null)
330332
{
333+
LogUtility logUtility = new LogUtility();
334+
331335
// verify the required parameter 'startTime' is set
332336
if (startTime == null)
333337
{
@@ -378,9 +382,9 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackDetail
378382
{
379383
localVarQueryParams.Add("organizationId", Configuration.ApiClient.ParameterToString(organizationId)); // query parameter
380384
}
381-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
382-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
383-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
385+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
386+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
387+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
384388

385389

386390
// make the HTTP request

Api/ChargebackSummariesApi.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ public ReportingV3ChargebackSummariesGet200Response GetChargebackSummaries (Date
224224
/// <returns>ApiResponse of ReportingV3ChargebackSummariesGet200Response</returns>
225225
public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargebackSummariesWithHttpInfo (DateTime? startTime, DateTime? endTime, string organizationId = null)
226226
{
227+
LogUtility logUtility = new LogUtility();
228+
227229
// verify the required parameter 'startTime' is set
228230
if (startTime == null)
229231
{
@@ -274,9 +276,9 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback
274276
{
275277
localVarQueryParams.Add("organizationId", Configuration.ApiClient.ParameterToString(organizationId)); // query parameter
276278
}
277-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
278-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
279-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
279+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
280+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
281+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
280282

281283

282284
// make the HTTP request
@@ -328,6 +330,8 @@ public async System.Threading.Tasks.Task<ReportingV3ChargebackSummariesGet200Res
328330
/// <returns>Task of ApiResponse (ReportingV3ChargebackSummariesGet200Response)</returns>
329331
public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackSummariesGet200Response>> GetChargebackSummariesAsyncWithHttpInfo (DateTime? startTime, DateTime? endTime, string organizationId = null)
330332
{
333+
LogUtility logUtility = new LogUtility();
334+
331335
// verify the required parameter 'startTime' is set
332336
if (startTime == null)
333337
{
@@ -378,9 +382,9 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackSummar
378382
{
379383
localVarQueryParams.Add("organizationId", Configuration.ApiClient.ParameterToString(organizationId)); // query parameter
380384
}
381-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
382-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
383-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
385+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
386+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
387+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
384388

385389

386390
// make the HTTP request

Api/ConversionDetailsApi.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ public ReportingV3ConversionDetailsGet200Response GetConversionDetail (DateTime?
224224
/// <returns>ApiResponse of ReportingV3ConversionDetailsGet200Response</returns>
225225
public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDetailWithHttpInfo (DateTime? startTime, DateTime? endTime, string organizationId = null)
226226
{
227+
LogUtility logUtility = new LogUtility();
228+
227229
// verify the required parameter 'startTime' is set
228230
if (startTime == null)
229231
{
@@ -274,9 +276,9 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe
274276
{
275277
localVarQueryParams.Add("organizationId", Configuration.ApiClient.ParameterToString(organizationId)); // query parameter
276278
}
277-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
278-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
279-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
279+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
280+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
281+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
280282

281283

282284
// make the HTTP request
@@ -328,6 +330,8 @@ public async System.Threading.Tasks.Task<ReportingV3ConversionDetailsGet200Respo
328330
/// <returns>Task of ApiResponse (ReportingV3ConversionDetailsGet200Response)</returns>
329331
public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ConversionDetailsGet200Response>> GetConversionDetailAsyncWithHttpInfo (DateTime? startTime, DateTime? endTime, string organizationId = null)
330332
{
333+
LogUtility logUtility = new LogUtility();
334+
331335
// verify the required parameter 'startTime' is set
332336
if (startTime == null)
333337
{
@@ -378,9 +382,9 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ConversionDetail
378382
{
379383
localVarQueryParams.Add("organizationId", Configuration.ApiClient.ParameterToString(organizationId)); // query parameter
380384
}
381-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
382-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
383-
logger.Debug($"HTTP Request Body :\n{LogUtility.ConvertDictionaryToString(localVarQueryParams)}");
385+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
386+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
387+
logger.Debug($"HTTP Request Body :\n{logUtility.ConvertDictionaryToString(localVarQueryParams)}");
384388

385389

386390
// make the HTTP request

0 commit comments

Comments
 (0)