diff --git a/Api/BatchesApi.cs b/Api/BatchesApi.cs index f7348003..9602193a 100644 --- a/Api/BatchesApi.cs +++ b/Api/BatchesApi.cs @@ -429,7 +429,7 @@ public ApiResponse< InlineResponse20012 > GetBatchReportWithHttpInfo (string bat } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo")) { try @@ -443,12 +443,14 @@ public ApiResponse< InlineResponse20012 > GetBatchReportWithHttpInfo (string bat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -546,7 +548,7 @@ public async System.Threading.Tasks.Task> GetBa } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo")) { try @@ -560,12 +562,14 @@ public async System.Threading.Tasks.Task> GetBa } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -661,7 +665,7 @@ public ApiResponse< InlineResponse20011 > GetBatchStatusWithHttpInfo (string bat } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo")) { try @@ -675,12 +679,14 @@ public ApiResponse< InlineResponse20011 > GetBatchStatusWithHttpInfo (string bat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -778,7 +784,7 @@ public async System.Threading.Tasks.Task> GetBa } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo")) { try @@ -792,12 +798,14 @@ public async System.Threading.Tasks.Task> GetBa } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -908,7 +916,7 @@ public ApiResponse< InlineResponse20010 > GetBatchesListWithHttpInfo (long? offs } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo")) { try @@ -922,12 +930,14 @@ public ApiResponse< InlineResponse20010 > GetBatchesListWithHttpInfo (long? offs } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1040,7 +1050,7 @@ public async System.Threading.Tasks.Task> GetBa } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo")) { try @@ -1054,12 +1064,14 @@ public async System.Threading.Tasks.Task> GetBa } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1146,7 +1158,7 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body) } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo")) { try @@ -1160,13 +1172,15 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body) } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1182,7 +1196,7 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body) return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202))); // Return statement + (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202), merchantConfig)); // Return statement } /// @@ -1255,7 +1269,7 @@ public async System.Threading.Tasks.Task> PostBat } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo")) { try @@ -1269,13 +1283,15 @@ public async System.Threading.Tasks.Task> PostBat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1291,7 +1307,7 @@ public async System.Threading.Tasks.Task> PostBat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202))); // Return statement + (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202), merchantConfig)); // Return statement } } } diff --git a/Api/BillingAgreementsApi.cs b/Api/BillingAgreementsApi.cs index 349c7fdf..e843f96f 100644 --- a/Api/BillingAgreementsApi.cs +++ b/Api/BillingAgreementsApi.cs @@ -387,7 +387,7 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BillingAgreementsDeRegistration,BillingAgreementsDeRegistrationAsync,BillingAgreementsDeRegistrationWithHttpInfo,BillingAgreementsDeRegistrationAsyncWithHttpInfo")) { try @@ -401,13 +401,15 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BillingAgreementsDeRegistration,BillingAgreementsDeRegistrationAsync,BillingAgreementsDeRegistrationWithHttpInfo,BillingAgreementsDeRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -423,7 +425,7 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response))); // Return statement + (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response), merchantConfig)); // Return statement } /// @@ -509,7 +511,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response))); // Return statement + (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response), merchantConfig)); // Return statement } /// /// Standing Instruction intimation Standing Instruction with or without Token. @@ -629,7 +633,7 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BillingAgreementsIntimation,BillingAgreementsIntimationAsync,BillingAgreementsIntimationWithHttpInfo,BillingAgreementsIntimationAsyncWithHttpInfo")) { try @@ -643,13 +647,15 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BillingAgreementsIntimation,BillingAgreementsIntimationAsync,BillingAgreementsIntimationWithHttpInfo,BillingAgreementsIntimationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -665,7 +671,7 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1))); // Return statement + (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1), merchantConfig)); // Return statement } /// @@ -751,7 +757,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1))); // Return statement + (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1), merchantConfig)); // Return statement } /// /// Create a Billing Agreement #### Standing Instruction: Standing Instruction with or without Token. Transaction amount in case First payment is coming along with registration. Only 2 decimal places allowed #### Create Mandate: You can create a mandate through the direct debit mandate flow. Possible create mandate status values: - Pending—the create mandate request was successfully processed. - Failed—the create mandate request was not accepted. #### Import Mandate: In the Bacs scheme, a mandate is created with a status of active. Direct debit collections can be made against it immediately. You can import a mandate to the CyberSource database when: - You have existing customers with signed, active mandates - You manage mandates outside of CyberSource. When you import an existing mandate to the CyberSource database, provide a unique value for the mandate ID or the request results in an error. If an import mandate request is not accepted, the import mandate status value is failed. @@ -858,7 +866,7 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BillingAgreementsRegistration,BillingAgreementsRegistrationAsync,BillingAgreementsRegistrationWithHttpInfo,BillingAgreementsRegistrationAsyncWithHttpInfo")) { try @@ -872,13 +880,15 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BillingAgreementsRegistration,BillingAgreementsRegistrationAsync,BillingAgreementsRegistrationWithHttpInfo,BillingAgreementsRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -894,7 +904,7 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response))); // Return statement + (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response), merchantConfig)); // Return statement } /// @@ -967,7 +977,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response))); // Return statement + (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/BinLookupApi.cs b/Api/BinLookupApi.cs index e0d8e90b..f6610336 100644 --- a/Api/BinLookupApi.cs +++ b/Api/BinLookupApi.cs @@ -283,7 +283,7 @@ public ApiResponse< InlineResponse2012 > GetAccountInfoWithHttpInfo (CreateBinLo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo")) { try @@ -297,13 +297,15 @@ public ApiResponse< InlineResponse2012 > GetAccountInfoWithHttpInfo (CreateBinLo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -319,7 +321,7 @@ public ApiResponse< InlineResponse2012 > GetAccountInfoWithHttpInfo (CreateBinLo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012))); // Return statement + (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012), merchantConfig)); // Return statement } /// @@ -392,7 +394,7 @@ public async System.Threading.Tasks.Task> GetAcc } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo")) { try @@ -406,13 +408,15 @@ public async System.Threading.Tasks.Task> GetAcc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -428,7 +432,7 @@ public async System.Threading.Tasks.Task> GetAcc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012))); // Return statement + (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012), merchantConfig)); // Return statement } } } diff --git a/Api/CaptureApi.cs b/Api/CaptureApi.cs index 84262405..f812cc87 100644 --- a/Api/CaptureApi.cs +++ b/Api/CaptureApi.cs @@ -299,7 +299,7 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CapturePayment,CapturePaymentAsync,CapturePaymentWithHttpInfo,CapturePaymentAsyncWithHttpInfo")) { try @@ -313,13 +313,15 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CapturePayment,CapturePaymentAsync,CapturePaymentWithHttpInfo,CapturePaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -335,7 +337,7 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response))); // Return statement + (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response), merchantConfig)); // Return statement } /// @@ -421,7 +423,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response))); // Return statement + (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/ChargebackDetailsApi.cs b/Api/ChargebackDetailsApi.cs index f4e0d7cc..8b94cc28 100644 --- a/Api/ChargebackDetailsApi.cs +++ b/Api/ChargebackDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetChargebackDetails,GetChargebackDetailsAsync,GetChargebackDetailsWithHttpInfo,GetChargebackDetailsAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetChargebackDetails,GetChargebackDetailsAsync,GetChargebackDetailsWithHttpInfo,GetChargebackDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response))); // Return statement + (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response), merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response))); // Return statement + (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/ChargebackSummariesApi.cs b/Api/ChargebackSummariesApi.cs index efda55ba..8169b5e8 100644 --- a/Api/ChargebackSummariesApi.cs +++ b/Api/ChargebackSummariesApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetChargebackSummaries,GetChargebackSummariesAsync,GetChargebackSummariesWithHttpInfo,GetChargebackSummariesAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetChargebackSummaries,GetChargebackSummariesAsync,GetChargebackSummariesWithHttpInfo,GetChargebackSummariesAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response))); // Return statement + (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response), merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response))); // Return statement + (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/ConversionDetailsApi.cs b/Api/ConversionDetailsApi.cs index ebc7cdff..ee9209bd 100644 --- a/Api/ConversionDetailsApi.cs +++ b/Api/ConversionDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetConversionDetail,GetConversionDetailAsync,GetConversionDetailWithHttpInfo,GetConversionDetailAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetConversionDetail,GetConversionDetailAsync,GetConversionDetailWithHttpInfo,GetConversionDetailAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response))); // Return statement + (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response), merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response))); // Return statement + (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/CreateNewWebhooksApi.cs b/Api/CreateNewWebhooksApi.cs index c06a4ebf..d9293036 100644 --- a/Api/CreateNewWebhooksApi.cs +++ b/Api/CreateNewWebhooksApi.cs @@ -387,7 +387,7 @@ public ApiResponse< List > FindProductsToSubscribeWithHttpIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo")) { try @@ -401,12 +401,14 @@ public ApiResponse< List > FindProductsToSubscribeWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -504,7 +506,7 @@ public async System.Threading.Tasks.Task>> } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo")) { try @@ -518,12 +520,14 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -604,7 +608,7 @@ public ApiResponse< InlineResponse2015 > NotificationSubscriptionsV2WebhooksPost } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo")) { try @@ -618,13 +622,15 @@ public ApiResponse< InlineResponse2015 > NotificationSubscriptionsV2WebhooksPost } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -640,7 +646,7 @@ public ApiResponse< InlineResponse2015 > NotificationSubscriptionsV2WebhooksPost return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015), merchantConfig)); // Return statement } /// @@ -707,7 +713,7 @@ public async System.Threading.Tasks.Task> Notifi } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo")) { try @@ -721,13 +727,15 @@ public async System.Threading.Tasks.Task> Notifi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -743,7 +751,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015), merchantConfig)); // Return statement } /// /// Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later. @@ -838,7 +846,7 @@ public ApiResponse< InlineResponse2014 > SaveSymEgressKeyWithHttpInfo (string vC } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo")) { try @@ -852,13 +860,15 @@ public ApiResponse< InlineResponse2014 > SaveSymEgressKeyWithHttpInfo (string vC } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -874,7 +884,7 @@ public ApiResponse< InlineResponse2014 > SaveSymEgressKeyWithHttpInfo (string vC return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014))); // Return statement + (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014), merchantConfig)); // Return statement } /// @@ -971,7 +981,7 @@ public async System.Threading.Tasks.Task> SaveSy } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo")) { try @@ -985,13 +995,15 @@ public async System.Threading.Tasks.Task> SaveSy } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1007,7 +1019,7 @@ public async System.Threading.Tasks.Task> SaveSy return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014))); // Return statement + (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014), merchantConfig)); // Return statement } } } diff --git a/Api/CreditApi.cs b/Api/CreditApi.cs index fa6472a1..aa561f62 100644 --- a/Api/CreditApi.cs +++ b/Api/CreditApi.cs @@ -282,7 +282,7 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateCredit,CreateCreditAsync,CreateCreditWithHttpInfo,CreateCreditAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateCredit,CreateCreditAsync,CreateCreditWithHttpInfo,CreateCreditAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response))); // Return statement + (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response))); // Return statement + (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/CustomerApi.cs b/Api/CustomerApi.cs index 595ec95d..5d710ca3 100644 --- a/Api/CustomerApi.cs +++ b/Api/CustomerApi.cs @@ -444,7 +444,7 @@ public ApiResponse DeleteCustomerWithHttpInfo (string customerId, string } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo")) { try @@ -458,12 +458,14 @@ public ApiResponse DeleteCustomerWithHttpInfo (string customerId, string } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -565,7 +567,7 @@ public async System.Threading.Tasks.Task> DeleteCustomerAsyn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo")) { try @@ -579,12 +581,14 @@ public async System.Threading.Tasks.Task> DeleteCustomerAsyn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -687,7 +691,7 @@ public ApiResponse< PostCustomerRequest > GetCustomerWithHttpInfo (string custom } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo")) { try @@ -701,12 +705,14 @@ public ApiResponse< PostCustomerRequest > GetCustomerWithHttpInfo (string custom } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -722,7 +728,7 @@ public ApiResponse< PostCustomerRequest > GetCustomerWithHttpInfo (string custom return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest), merchantConfig)); // Return statement } /// @@ -810,7 +816,7 @@ public async System.Threading.Tasks.Task> GetCu } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo")) { try @@ -824,12 +830,14 @@ public async System.Threading.Tasks.Task> GetCu } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -845,7 +853,7 @@ public async System.Threading.Tasks.Task> GetCu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest), merchantConfig)); // Return statement } /// /// Update a Customer | | | | | - -- | - -- | - -- | |**Customers**<br>A Customer represents your tokenized customer information.<br>You should associate the Customer Id with the customer account on your systems.<br>A Customer can have one or more [Payment Instruments](#token-management_customer-payment-instrument_create-a-customer-payment-instrumentl) or [Shipping Addresses](#token-management_customer-shipping-address_create-a-customer-shipping-address) with one allocated as the Customers default.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customer**<br>Your system can use this API to update a Customers details including selecting a [default Payment Instrument](#token-management_customer_update-a-customer_samplerequests-dropdown_update-customers-default-payment-instrument_liveconsole-tab-request-body) or [default Shipping Address](#token-management_customer_update-a-customer_samplerequests-dropdown_update-customers-default-shipping-address_liveconsole-tab-request-body) for use in payments.<br>Note: Updating a Customers [Payment Instrument](#token-management_customer-payment-instrument_update-a-customer-payment-instrument) or [Shipping Address](#token-management_customer-shipping-address_update-a-customer-shipping-address) details is performed using their own dedicated API resources. @@ -941,7 +949,7 @@ public ApiResponse< PatchCustomerRequest > PatchCustomerWithHttpInfo (string cus } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo")) { try @@ -955,13 +963,15 @@ public ApiResponse< PatchCustomerRequest > PatchCustomerWithHttpInfo (string cus } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -977,7 +987,7 @@ public ApiResponse< PatchCustomerRequest > PatchCustomerWithHttpInfo (string cus return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest))); // Return statement + (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest), merchantConfig)); // Return statement } /// @@ -1075,7 +1085,7 @@ public async System.Threading.Tasks.Task> Patc } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo")) { try @@ -1089,13 +1099,15 @@ public async System.Threading.Tasks.Task> Patc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1111,7 +1123,7 @@ public async System.Threading.Tasks.Task> Patc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest))); // Return statement + (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest), merchantConfig)); // Return statement } /// /// Create a Customer | | | | | - -- | - -- | - -- | |**Customers**<br>A Customer represents your tokenized customer information.<br>You should associate the Customer Id with the customer account on your systems.<br>A Customer can have one or more [Payment Instruments](#token-management_customer-payment-instrument_create-a-customer-payment-instrumentl) or [Shipping Addresses](#token-management_customer-shipping-address_create-a-customer-shipping-address) with one allocated as the Customers default.<br><br>**Creating a Customer**<br>It is recommended you [create a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>The Customer will be created with a Payment Instrument and Shipping Address.<br>You can also [add additional Payment Instruments to a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body).<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Customers**<br>To perform a payment with the Customers default details specify the [Customer Id in the payments request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-token-id_liveconsole-tab-request-body).<br>To perform a payment with a particular Payment Instrument or Shipping Address <br>specify the [Payment Instrument or Shipping Address Ids in the payments request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -1188,7 +1200,7 @@ public ApiResponse< PostCustomerRequest > PostCustomerWithHttpInfo (PostCustomer } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo")) { try @@ -1202,13 +1214,15 @@ public ApiResponse< PostCustomerRequest > PostCustomerWithHttpInfo (PostCustomer } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1224,7 +1238,7 @@ public ApiResponse< PostCustomerRequest > PostCustomerWithHttpInfo (PostCustomer return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest), merchantConfig)); // Return statement } /// @@ -1303,7 +1317,7 @@ public async System.Threading.Tasks.Task> PostC } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo")) { try @@ -1317,13 +1331,15 @@ public async System.Threading.Tasks.Task> PostC } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1339,7 +1355,7 @@ public async System.Threading.Tasks.Task> PostC return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest), merchantConfig)); // Return statement } } } diff --git a/Api/CustomerPaymentInstrumentApi.cs b/Api/CustomerPaymentInstrumentApi.cs index 284f82ab..f13d8cf0 100644 --- a/Api/CustomerPaymentInstrumentApi.cs +++ b/Api/CustomerPaymentInstrumentApi.cs @@ -527,7 +527,7 @@ public ApiResponse DeleteCustomerPaymentInstrumentWithHttpInfo (string c } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -541,12 +541,14 @@ public ApiResponse DeleteCustomerPaymentInstrumentWithHttpInfo (string c } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -661,7 +663,7 @@ public async System.Threading.Tasks.Task> DeleteCustomerPaym } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -675,12 +677,14 @@ public async System.Threading.Tasks.Task> DeleteCustomerPaym } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -796,7 +800,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > GetCustomerPaymentIns } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerPaymentInstrument,GetCustomerPaymentInstrumentAsync,GetCustomerPaymentInstrumentWithHttpInfo,GetCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -810,12 +814,14 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > GetCustomerPaymentIns } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerPaymentInstrument,GetCustomerPaymentInstrumentAsync,GetCustomerPaymentInstrumentWithHttpInfo,GetCustomerPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -831,7 +837,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > GetCustomerPaymentIns return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// @@ -932,7 +938,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// List Payment Instruments for a Customer | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Customer Payment Instruments**<br>Your system can use this API to retrieve all existing Payment Instruments for a Customer. @@ -1067,7 +1075,7 @@ public ApiResponse< PaymentInstrumentList > GetCustomerPaymentInstrumentsListWit } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1081,12 +1089,14 @@ public ApiResponse< PaymentInstrumentList > GetCustomerPaymentInstrumentsListWit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1102,7 +1112,7 @@ public ApiResponse< PaymentInstrumentList > GetCustomerPaymentInstrumentsListWit return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList))); // Return statement + (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList), merchantConfig)); // Return statement } /// @@ -1204,7 +1214,7 @@ public async System.Threading.Tasks.Task> Get } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1218,12 +1228,14 @@ public async System.Threading.Tasks.Task> Get } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1239,7 +1251,7 @@ public async System.Threading.Tasks.Task> Get return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList))); // Return statement + (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList), merchantConfig)); // Return statement } /// /// Update a Customer Payment Instrument | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customers Payment Instrument**<br>Your system can use this API to update an existing Payment Instrument for a Customer, including selecting a [default Payment Instrument](#token-management_customer-payment-instrument_update-a-customer-payment-instrument_samplerequests-dropdown_make-customer-payment-instrument-the-default_liveconsole-tab-request-body) for use in payments. @@ -1348,7 +1360,7 @@ public ApiResponse< PatchCustomerPaymentInstrumentRequest > PatchCustomersPaymen } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomersPaymentInstrument,PatchCustomersPaymentInstrumentAsync,PatchCustomersPaymentInstrumentWithHttpInfo,PatchCustomersPaymentInstrumentAsyncWithHttpInfo")) { try @@ -1362,13 +1374,15 @@ public ApiResponse< PatchCustomerPaymentInstrumentRequest > PatchCustomersPaymen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomersPaymentInstrument,PatchCustomersPaymentInstrumentAsync,PatchCustomersPaymentInstrumentWithHttpInfo,PatchCustomersPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1384,7 +1398,7 @@ public ApiResponse< PatchCustomerPaymentInstrumentRequest > PatchCustomersPaymen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest))); // Return statement + (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// @@ -1495,7 +1509,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest))); // Return statement + (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// Create a Customer Payment Instrument | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br><br>**Creating a Customer Payment Instrument**<br>It is recommended you [create a Customer Payment Instrument via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body), this can be for a zero amount.<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Customers Payment Instrument**<br>To perform a payment with a particular Payment Instrument or Shipping Address specify the [Payment Instrument in the payment request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). @@ -1621,7 +1637,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > PostCustomerPaymentIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomerPaymentInstrument,PostCustomerPaymentInstrumentAsync,PostCustomerPaymentInstrumentWithHttpInfo,PostCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -1635,13 +1651,15 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > PostCustomerPaymentIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomerPaymentInstrument,PostCustomerPaymentInstrumentAsync,PostCustomerPaymentInstrumentWithHttpInfo,PostCustomerPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1657,7 +1675,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > PostCustomerPaymentIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// @@ -1749,7 +1767,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } } } diff --git a/Api/CustomerShippingAddressApi.cs b/Api/CustomerShippingAddressApi.cs index 2e30b51c..9d342e3f 100644 --- a/Api/CustomerShippingAddressApi.cs +++ b/Api/CustomerShippingAddressApi.cs @@ -527,7 +527,7 @@ public ApiResponse DeleteCustomerShippingAddressWithHttpInfo (string cus } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -541,12 +541,14 @@ public ApiResponse DeleteCustomerShippingAddressWithHttpInfo (string cus } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -661,7 +663,7 @@ public async System.Threading.Tasks.Task> DeleteCustomerShip } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -675,12 +677,14 @@ public async System.Threading.Tasks.Task> DeleteCustomerShip } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -796,7 +800,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > GetCustomerShippingAddr } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerShippingAddress,GetCustomerShippingAddressAsync,GetCustomerShippingAddressWithHttpInfo,GetCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -810,12 +814,14 @@ public ApiResponse< PostCustomerShippingAddressRequest > GetCustomerShippingAddr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerShippingAddress,GetCustomerShippingAddressAsync,GetCustomerShippingAddressWithHttpInfo,GetCustomerShippingAddressAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -831,7 +837,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > GetCustomerShippingAddr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// @@ -932,7 +938,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// /// List Shipping Addresses for a Customer | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Customer Shipping Addresses**<br>Your system can use this API to retrieve all existing Shipping Addresses for a Customer. @@ -1067,7 +1075,7 @@ public ApiResponse< ShippingAddressListForCustomer > GetCustomerShippingAddresse } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerShippingAddressesList,GetCustomerShippingAddressesListAsync,GetCustomerShippingAddressesListWithHttpInfo,GetCustomerShippingAddressesListAsyncWithHttpInfo")) { try @@ -1081,12 +1089,14 @@ public ApiResponse< ShippingAddressListForCustomer > GetCustomerShippingAddresse } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerShippingAddressesList,GetCustomerShippingAddressesListAsync,GetCustomerShippingAddressesListWithHttpInfo,GetCustomerShippingAddressesListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1102,7 +1112,7 @@ public ApiResponse< ShippingAddressListForCustomer > GetCustomerShippingAddresse return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer))); // Return statement + (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer), merchantConfig)); // Return statement } /// @@ -1204,7 +1214,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer))); // Return statement + (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer), merchantConfig)); // Return statement } /// /// Update a Customer Shipping Address | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customers Shipping Address**<br>Your system can use this API to update an existing Shipping Addresses for a Customer, including selecting a [default Shipping Address](#token-management_customer-shipping-address_update-a-customer-shipping-address_samplerequests-dropdown_make-customer-shipping-address-the-default_liveconsole-tab-request-body) for use in payments. @@ -1348,7 +1360,7 @@ public ApiResponse< PatchCustomerShippingAddressRequest > PatchCustomersShipping } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomersShippingAddress,PatchCustomersShippingAddressAsync,PatchCustomersShippingAddressWithHttpInfo,PatchCustomersShippingAddressAsyncWithHttpInfo")) { try @@ -1362,13 +1374,15 @@ public ApiResponse< PatchCustomerShippingAddressRequest > PatchCustomersShipping } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomersShippingAddress,PatchCustomersShippingAddressAsync,PatchCustomersShippingAddressWithHttpInfo,PatchCustomersShippingAddressAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1384,7 +1398,7 @@ public ApiResponse< PatchCustomerShippingAddressRequest > PatchCustomersShipping return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest))); // Return statement + (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// @@ -1495,7 +1509,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest))); // Return statement + (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// /// Create a Customer Shipping Address | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Creating a Customer Shipping Address**<br>Your system can use this API to create an existing Customers default or non default Shipping Address.<br>You can also create additional Customer Shipping Addresses via the [Payments API](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body). @@ -1621,7 +1637,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > PostCustomerShippingAdd } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomerShippingAddress,PostCustomerShippingAddressAsync,PostCustomerShippingAddressWithHttpInfo,PostCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -1635,13 +1651,15 @@ public ApiResponse< PostCustomerShippingAddressRequest > PostCustomerShippingAdd } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomerShippingAddress,PostCustomerShippingAddressAsync,PostCustomerShippingAddressWithHttpInfo,PostCustomerShippingAddressAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1657,7 +1675,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > PostCustomerShippingAdd return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// @@ -1749,7 +1767,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest), merchantConfig)); // Return statement } } } diff --git a/Api/DecisionManagerApi.cs b/Api/DecisionManagerApi.cs index 242ba2fc..1dd3e714 100644 --- a/Api/DecisionManagerApi.cs +++ b/Api/DecisionManagerApi.cs @@ -479,7 +479,7 @@ public ApiResponse< InlineResponse2001 > ActionDecisionManagerCaseWithHttpInfo ( } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -493,13 +493,15 @@ public ApiResponse< InlineResponse2001 > ActionDecisionManagerCaseWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -515,7 +517,7 @@ public ApiResponse< InlineResponse2001 > ActionDecisionManagerCaseWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001))); // Return statement + (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001), merchantConfig)); // Return statement } /// @@ -601,7 +603,7 @@ public async System.Threading.Tasks.Task> Action } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -615,13 +617,15 @@ public async System.Threading.Tasks.Task> Action } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -637,7 +641,7 @@ public async System.Threading.Tasks.Task> Action return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001))); // Return statement + (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001), merchantConfig)); // Return statement } /// /// List Management This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'. @@ -721,7 +725,7 @@ public ApiResponse< RiskV1UpdatePost201Response > AddNegativeWithHttpInfo (strin } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "AddNegative,AddNegativeAsync,AddNegativeWithHttpInfo,AddNegativeAsyncWithHttpInfo")) { try @@ -735,13 +739,15 @@ public ApiResponse< RiskV1UpdatePost201Response > AddNegativeWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "AddNegative,AddNegativeAsync,AddNegativeWithHttpInfo,AddNegativeAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -757,7 +763,7 @@ public ApiResponse< RiskV1UpdatePost201Response > AddNegativeWithHttpInfo (strin return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response), merchantConfig)); // Return statement } /// @@ -843,7 +849,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response), merchantConfig)); // Return statement } /// /// Add a comment to a DM post-transactional case Add a comment to a DM post-transactional case @@ -963,7 +971,7 @@ public ApiResponse< InlineResponse2011 > CommentDecisionManagerCaseWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -977,13 +985,15 @@ public ApiResponse< InlineResponse2011 > CommentDecisionManagerCaseWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -999,7 +1009,7 @@ public ApiResponse< InlineResponse2011 > CommentDecisionManagerCaseWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011))); // Return statement + (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011), merchantConfig)); // Return statement } /// @@ -1085,7 +1095,7 @@ public async System.Threading.Tasks.Task> Commen } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -1099,13 +1109,15 @@ public async System.Threading.Tasks.Task> Commen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1121,7 +1133,7 @@ public async System.Threading.Tasks.Task> Commen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011))); // Return statement + (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011), merchantConfig)); // Return statement } /// /// Create Decision Manager Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values. @@ -1192,7 +1204,7 @@ public ApiResponse< RiskV1DecisionsPost201Response > CreateBundledDecisionManage } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateBundledDecisionManagerCase,CreateBundledDecisionManagerCaseAsync,CreateBundledDecisionManagerCaseWithHttpInfo,CreateBundledDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -1206,13 +1218,15 @@ public ApiResponse< RiskV1DecisionsPost201Response > CreateBundledDecisionManage } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateBundledDecisionManagerCase,CreateBundledDecisionManagerCaseAsync,CreateBundledDecisionManagerCaseWithHttpInfo,CreateBundledDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1228,7 +1242,7 @@ public ApiResponse< RiskV1DecisionsPost201Response > CreateBundledDecisionManage return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response))); // Return statement + (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response), merchantConfig)); // Return statement } /// @@ -1301,7 +1315,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response))); // Return statement + (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response), merchantConfig)); // Return statement } /// /// Fraud Marking This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request. @@ -1421,7 +1437,7 @@ public ApiResponse< RiskV1UpdatePost201Response > FraudUpdateWithHttpInfo (strin } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "FraudUpdate,FraudUpdateAsync,FraudUpdateWithHttpInfo,FraudUpdateAsyncWithHttpInfo")) { try @@ -1435,13 +1451,15 @@ public ApiResponse< RiskV1UpdatePost201Response > FraudUpdateWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "FraudUpdate,FraudUpdateAsync,FraudUpdateWithHttpInfo,FraudUpdateAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1457,7 +1475,7 @@ public ApiResponse< RiskV1UpdatePost201Response > FraudUpdateWithHttpInfo (strin return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response), merchantConfig)); // Return statement } /// @@ -1543,7 +1561,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/DeviceDeAssociationApi.cs b/Api/DeviceDeAssociationApi.cs index 2bdc2445..2ce37897 100644 --- a/Api/DeviceDeAssociationApi.cs +++ b/Api/DeviceDeAssociationApi.cs @@ -321,7 +321,7 @@ public ApiResponse DeleteTerminalAssociationWithHttpInfo (DeAssociationR } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo")) { try @@ -335,13 +335,15 @@ public ApiResponse DeleteTerminalAssociationWithHttpInfo (DeAssociationR } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -428,7 +430,7 @@ public async System.Threading.Tasks.Task> DeleteTerminalAsso } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo")) { try @@ -442,13 +444,15 @@ public async System.Threading.Tasks.Task> DeleteTerminalAsso } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -536,7 +540,7 @@ public ApiResponse< List > PostDeAssociateV3TerminalWithHttp } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo")) { try @@ -550,13 +554,15 @@ public ApiResponse< List > PostDeAssociateV3TerminalWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -645,7 +651,7 @@ public async System.Threading.Tasks.Task>> } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo")) { try @@ -659,13 +665,15 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/DeviceSearchApi.cs b/Api/DeviceSearchApi.cs index 462487e5..9bc440ef 100644 --- a/Api/DeviceSearchApi.cs +++ b/Api/DeviceSearchApi.cs @@ -324,7 +324,7 @@ public ApiResponse< InlineResponse2007 > PostSearchQueryWithHttpInfo (PostDevice } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo")) { try @@ -338,13 +338,15 @@ public ApiResponse< InlineResponse2007 > PostSearchQueryWithHttpInfo (PostDevice } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -433,7 +435,7 @@ public async System.Threading.Tasks.Task> PostSe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo")) { try @@ -447,13 +449,15 @@ public async System.Threading.Tasks.Task> PostSe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -540,7 +544,7 @@ public ApiResponse< InlineResponse2009 > PostSearchQueryV3WithHttpInfo (PostDevi } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo")) { try @@ -554,13 +558,15 @@ public ApiResponse< InlineResponse2009 > PostSearchQueryV3WithHttpInfo (PostDevi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -649,7 +655,7 @@ public async System.Threading.Tasks.Task> PostSe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo")) { try @@ -663,13 +669,15 @@ public async System.Threading.Tasks.Task> PostSe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/DownloadDTDApi.cs b/Api/DownloadDTDApi.cs index c5afec01..b1a2d2eb 100644 --- a/Api/DownloadDTDApi.cs +++ b/Api/DownloadDTDApi.cs @@ -287,7 +287,7 @@ public ApiResponse GetDTDV2WithHttpInfo (string reportDefinitionNameVers } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo")) { try @@ -301,12 +301,14 @@ public ApiResponse GetDTDV2WithHttpInfo (string reportDefinitionNameVers } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -402,7 +404,7 @@ public async System.Threading.Tasks.Task> GetDTDV2AsyncWithH } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo")) { try @@ -416,12 +418,14 @@ public async System.Threading.Tasks.Task> GetDTDV2AsyncWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/DownloadXSDApi.cs b/Api/DownloadXSDApi.cs index 54a04649..f2ce7d58 100644 --- a/Api/DownloadXSDApi.cs +++ b/Api/DownloadXSDApi.cs @@ -287,7 +287,7 @@ public ApiResponse GetXSDV2WithHttpInfo (string reportDefinitionNameVers } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo")) { try @@ -301,12 +301,14 @@ public ApiResponse GetXSDV2WithHttpInfo (string reportDefinitionNameVers } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -402,7 +404,7 @@ public async System.Threading.Tasks.Task> GetXSDV2AsyncWithH } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo")) { try @@ -416,12 +418,14 @@ public async System.Threading.Tasks.Task> GetXSDV2AsyncWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/EMVTagDetailsApi.cs b/Api/EMVTagDetailsApi.cs index 2c6d94f2..d03a4abd 100644 --- a/Api/EMVTagDetailsApi.cs +++ b/Api/EMVTagDetailsApi.cs @@ -316,7 +316,7 @@ public ApiResponse< TssV2GetEmvTags200Response > GetEmvTagsWithHttpInfo () } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo")) { try @@ -330,12 +330,14 @@ public ApiResponse< TssV2GetEmvTags200Response > GetEmvTagsWithHttpInfo () } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -351,7 +353,7 @@ public ApiResponse< TssV2GetEmvTags200Response > GetEmvTagsWithHttpInfo () return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response))); // Return statement + (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response), merchantConfig)); // Return statement } /// @@ -420,7 +422,7 @@ public async System.Threading.Tasks.Task } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo")) { try @@ -434,12 +436,14 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -455,7 +459,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response))); // Return statement + (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response), merchantConfig)); // Return statement } /// /// Parse an EMV String Pass an EMV Tag-Length-Value (TLV) string for parsing. @@ -526,7 +530,7 @@ public ApiResponse< TssV2PostEmvTags200Response > ParseEmvTagsWithHttpInfo (Body } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ParseEmvTags,ParseEmvTagsAsync,ParseEmvTagsWithHttpInfo,ParseEmvTagsAsyncWithHttpInfo")) { try @@ -540,13 +544,15 @@ public ApiResponse< TssV2PostEmvTags200Response > ParseEmvTagsWithHttpInfo (Body } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ParseEmvTags,ParseEmvTagsAsync,ParseEmvTagsWithHttpInfo,ParseEmvTagsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -562,7 +568,7 @@ public ApiResponse< TssV2PostEmvTags200Response > ParseEmvTagsWithHttpInfo (Body return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response))); // Return statement + (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response), merchantConfig)); // Return statement } /// @@ -635,7 +641,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response))); // Return statement + (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response), merchantConfig)); // Return statement } } } diff --git a/Api/FlexAPIApi.cs b/Api/FlexAPIApi.cs index 542cdf95..8b10c5cd 100644 --- a/Api/FlexAPIApi.cs +++ b/Api/FlexAPIApi.cs @@ -282,7 +282,7 @@ public ApiResponse< string > GenerateFlexAPICaptureContextWithHttpInfo (Generate } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< string > GenerateFlexAPICaptureContextWithHttpInfo (Generate } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< string > GenerateFlexAPICaptureContextWithHttpInfo (Generate return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/Api/InstrumentIdentifierApi.cs b/Api/InstrumentIdentifierApi.cs index c90d5ed5..6c5e6a2f 100644 --- a/Api/InstrumentIdentifierApi.cs +++ b/Api/InstrumentIdentifierApi.cs @@ -564,7 +564,7 @@ public ApiResponse DeleteInstrumentIdentifierWithHttpInfo (string instru } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -578,12 +578,14 @@ public ApiResponse DeleteInstrumentIdentifierWithHttpInfo (string instru } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -685,7 +687,7 @@ public async System.Threading.Tasks.Task> DeleteInstrumentId } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -699,12 +701,14 @@ public async System.Threading.Tasks.Task> DeleteInstrumentId } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -814,7 +818,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > GetInstrumentIdentifierWit } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInstrumentIdentifier,GetInstrumentIdentifierAsync,GetInstrumentIdentifierWithHttpInfo,GetInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -828,12 +832,14 @@ public ApiResponse< PostInstrumentIdentifierRequest > GetInstrumentIdentifierWit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInstrumentIdentifier,GetInstrumentIdentifierAsync,GetInstrumentIdentifierWithHttpInfo,GetInstrumentIdentifierAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -849,7 +855,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > GetInstrumentIdentifierWit return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// @@ -944,7 +950,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// /// List Payment Instruments for an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing <br>and account numbers.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the <br>Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) <br>or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Payment Instruments associated with an Instrument Identifier**<br>Your system can use this API to retrieve all Payment Instruments linked to an Instrument Identifier. @@ -1086,7 +1094,7 @@ public ApiResponse< PaymentInstrumentList1 > GetInstrumentIdentifierPaymentInstr } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1100,12 +1108,14 @@ public ApiResponse< PaymentInstrumentList1 > GetInstrumentIdentifierPaymentInstr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1121,7 +1131,7 @@ public ApiResponse< PaymentInstrumentList1 > GetInstrumentIdentifierPaymentInstr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1))); // Return statement + (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1), merchantConfig)); // Return statement } /// @@ -1230,7 +1240,7 @@ public async System.Threading.Tasks.Task> Ge } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1244,12 +1254,14 @@ public async System.Threading.Tasks.Task> Ge } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1265,7 +1277,7 @@ public async System.Threading.Tasks.Task> Ge return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1))); // Return statement + (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1), merchantConfig)); // Return statement } /// /// Update an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating an Instrument Identifier**<br>When an Instrument Identifier is used in a payment the **_previousTransactionId_** and **_originalAuthorizedAmount_** values are automatically recorded.<br>These values will be added for you to future Merchant Initiated Transaction payments.<br>Your system can use this API to update these values. @@ -1368,7 +1380,7 @@ public ApiResponse< PatchInstrumentIdentifierRequest > PatchInstrumentIdentifier } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchInstrumentIdentifier,PatchInstrumentIdentifierAsync,PatchInstrumentIdentifierWithHttpInfo,PatchInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -1382,13 +1394,15 @@ public ApiResponse< PatchInstrumentIdentifierRequest > PatchInstrumentIdentifier } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchInstrumentIdentifier,PatchInstrumentIdentifierAsync,PatchInstrumentIdentifierWithHttpInfo,PatchInstrumentIdentifierAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1404,7 +1418,7 @@ public ApiResponse< PatchInstrumentIdentifierRequest > PatchInstrumentIdentifier return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest))); // Return statement + (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// @@ -1509,7 +1523,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest))); // Return statement + (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// /// Create an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).<br><br>**Creating an Instrument Identifier**<br>It is recommended you [create an Instrument Identifier via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-instrument-identifier-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>An Instrument Identifier will also be created if you [create a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body)<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Instrument Identifiers**<br>To perform a payment with an Instrument Identifier simply specify the [Instrument Identifier Id in the payments request along with the expiration date, card type, & billing address](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-instrument-identifier-token-id_liveconsole-tab-request-body).<br>When an Instrument Identifier is used in a payment the **_previousTransactionId_** and **_originalAuthorizedAmount_** values are automatically recorded.<br>These values will be added for you to future Merchant Initiated Transaction payments. @@ -1629,7 +1645,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > PostInstrumentIdentifierWi } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostInstrumentIdentifier,PostInstrumentIdentifierAsync,PostInstrumentIdentifierWithHttpInfo,PostInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -1643,13 +1659,15 @@ public ApiResponse< PostInstrumentIdentifierRequest > PostInstrumentIdentifierWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostInstrumentIdentifier,PostInstrumentIdentifierAsync,PostInstrumentIdentifierWithHttpInfo,PostInstrumentIdentifierAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1665,7 +1683,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > PostInstrumentIdentifierWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// @@ -1751,7 +1769,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// /// Enroll an Instrument Identifier for Payment Network Token | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Enroll an Instrument Identifier for a Payment Network Token**<br>Your system can use this API to provision a Network token for an existing Instrument Identifier.<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Network token can be [provisioned when creating an Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier_samplerequests-dropdown_create-instrument-identifier-card-enroll-for-network-token_liveconsole-tab-request-body).This will occur automatically when creating a [Customer](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), [Payment Instrument](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body) or [Instrument Identifier](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-instrument-identifier-token-creation_liveconsole-tab-request-body) via the Payments API.<br>For more information about Payment Network Tokens see the Developer Guide. @@ -1874,7 +1894,7 @@ public ApiResponse PostInstrumentIdentifierEnrollmentWithHttpInfo (strin } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo")) { try @@ -1888,13 +1908,15 @@ public ApiResponse PostInstrumentIdentifierEnrollmentWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2000,7 +2022,7 @@ public async System.Threading.Tasks.Task> PostInstrumentIden } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo")) { try @@ -2014,13 +2036,15 @@ public async System.Threading.Tasks.Task> PostInstrumentIden } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/InterchangeClearingLevelDetailsApi.cs b/Api/InterchangeClearingLevelDetailsApi.cs index 1187439e..c854d957 100644 --- a/Api/InterchangeClearingLevelDetailsApi.cs +++ b/Api/InterchangeClearingLevelDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3InterchangeClearingLevelDetailsGet200Response > G } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInterchangeClearingLevelDetails,GetInterchangeClearingLevelDetailsAsync,GetInterchangeClearingLevelDetailsWithHttpInfo,GetInterchangeClearingLevelDetailsAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3InterchangeClearingLevelDetailsGet200Response > G } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInterchangeClearingLevelDetails,GetInterchangeClearingLevelDetailsAsync,GetInterchangeClearingLevelDetailsWithHttpInfo,GetInterchangeClearingLevelDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3InterchangeClearingLevelDetailsGet200Response > G return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response))); // Return statement + (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response), merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response))); // Return statement + (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/InvoiceSettingsApi.cs b/Api/InvoiceSettingsApi.cs index 2018008d..2d790427 100644 --- a/Api/InvoiceSettingsApi.cs +++ b/Api/InvoiceSettingsApi.cs @@ -319,7 +319,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > GetInvoiceSetting } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInvoiceSettings,GetInvoiceSettingsAsync,GetInvoiceSettingsWithHttpInfo,GetInvoiceSettingsAsyncWithHttpInfo")) { try @@ -333,12 +333,14 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > GetInvoiceSetting } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInvoiceSettings,GetInvoiceSettingsAsync,GetInvoiceSettingsWithHttpInfo,GetInvoiceSettingsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -354,7 +356,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > GetInvoiceSetting return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response), merchantConfig)); // Return statement } /// @@ -426,7 +428,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response), merchantConfig)); // Return statement } /// /// Update Invoice Settings Allows you to customize the payment page, the checkout experience, email communication and payer authentication. You can customize the invoice to match your brand with your business name, logo and brand colors, and a VAT Tax number. You can choose to capture the payers shipping details, phone number and email during the checkout process. You can add a custom message to all invoice emails and enable or disable payer authentication for invoice payments. @@ -535,7 +539,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > UpdateInvoiceSett } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateInvoiceSettings,UpdateInvoiceSettingsAsync,UpdateInvoiceSettingsWithHttpInfo,UpdateInvoiceSettingsAsyncWithHttpInfo")) { try @@ -549,13 +553,15 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > UpdateInvoiceSett } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateInvoiceSettings,UpdateInvoiceSettingsAsync,UpdateInvoiceSettingsWithHttpInfo,UpdateInvoiceSettingsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -571,7 +577,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > UpdateInvoiceSett return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response), merchantConfig)); // Return statement } /// @@ -647,7 +653,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/InvoicesApi.cs b/Api/InvoicesApi.cs index b1dfd32f..ce9c0df3 100644 --- a/Api/InvoicesApi.cs +++ b/Api/InvoicesApi.cs @@ -549,7 +549,7 @@ public ApiResponse< InvoicingV2InvoicesPost201Response > CreateInvoiceWithHttpIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateInvoice,CreateInvoiceAsync,CreateInvoiceWithHttpInfo,CreateInvoiceAsyncWithHttpInfo")) { try @@ -563,13 +563,15 @@ public ApiResponse< InvoicingV2InvoicesPost201Response > CreateInvoiceWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateInvoice,CreateInvoiceAsync,CreateInvoiceWithHttpInfo,CreateInvoiceAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -585,7 +587,7 @@ public ApiResponse< InvoicingV2InvoicesPost201Response > CreateInvoiceWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response))); // Return statement + (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response), merchantConfig)); // Return statement } /// @@ -661,7 +663,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response))); // Return statement + (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response), merchantConfig)); // Return statement } /// /// Get a List of Invoices Provides a (filtered) list of invoices that have been created in your account. You can filter the list based on Invoice Status by setting the status query parameter to one of DRAFT, CREATED, SENT, PARTIAL, PAID or CANCELED. @@ -800,7 +804,7 @@ public ApiResponse< InvoicingV2InvoicesAllGet200Response > GetAllInvoicesWithHtt } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllInvoices,GetAllInvoicesAsync,GetAllInvoicesWithHttpInfo,GetAllInvoicesAsyncWithHttpInfo")) { try @@ -814,12 +818,14 @@ public ApiResponse< InvoicingV2InvoicesAllGet200Response > GetAllInvoicesWithHtt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllInvoices,GetAllInvoicesAsync,GetAllInvoicesWithHttpInfo,GetAllInvoicesAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -835,7 +841,7 @@ public ApiResponse< InvoicingV2InvoicesAllGet200Response > GetAllInvoicesWithHtt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response))); // Return statement + (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response), merchantConfig)); // Return statement } /// @@ -940,7 +946,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response))); // Return statement + (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response), merchantConfig)); // Return statement } /// /// Get Invoice Details You can retrieve details of a specific invoice. This can be used to check the Invoice status and get a list of invoice payments in the invoice history section of the response. For each payment transaction you can use the Transaction Details API to get more details on the payment transaction. @@ -1058,7 +1066,7 @@ public ApiResponse< InvoicingV2InvoicesGet200Response > GetInvoiceWithHttpInfo ( } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInvoice,GetInvoiceAsync,GetInvoiceWithHttpInfo,GetInvoiceAsyncWithHttpInfo")) { try @@ -1072,12 +1080,14 @@ public ApiResponse< InvoicingV2InvoicesGet200Response > GetInvoiceWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInvoice,GetInvoiceAsync,GetInvoiceWithHttpInfo,GetInvoiceAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1093,7 +1103,7 @@ public ApiResponse< InvoicingV2InvoicesGet200Response > GetInvoiceWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response))); // Return statement + (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response), merchantConfig)); // Return statement } /// @@ -1178,7 +1188,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response))); // Return statement + (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response), merchantConfig)); // Return statement } /// /// Cancel an Invoice You can cancel an invoice if no payment is made to it. You cannot cancel partially or fully paid invoices. @@ -1296,7 +1308,7 @@ public ApiResponse< InvoicingV2InvoicesCancel200Response > PerformCancelActionWi } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PerformCancelAction,PerformCancelActionAsync,PerformCancelActionWithHttpInfo,PerformCancelActionAsyncWithHttpInfo")) { try @@ -1310,12 +1322,14 @@ public ApiResponse< InvoicingV2InvoicesCancel200Response > PerformCancelActionWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PerformCancelAction,PerformCancelActionAsync,PerformCancelActionWithHttpInfo,PerformCancelActionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1331,7 +1345,7 @@ public ApiResponse< InvoicingV2InvoicesCancel200Response > PerformCancelActionWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response))); // Return statement + (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response), merchantConfig)); // Return statement } /// @@ -1416,7 +1430,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response))); // Return statement + (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response), merchantConfig)); // Return statement } /// /// Publish an Invoice You can publish an invoice in DRAFT status. After invoking this method, the invoice status is changed to CREATED. @@ -1534,7 +1550,7 @@ public ApiResponse< InvoicingV2InvoicesPublish200Response > PerformPublishAction } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PerformPublishAction,PerformPublishActionAsync,PerformPublishActionWithHttpInfo,PerformPublishActionAsyncWithHttpInfo")) { try @@ -1548,12 +1564,14 @@ public ApiResponse< InvoicingV2InvoicesPublish200Response > PerformPublishAction } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PerformPublishAction,PerformPublishActionAsync,PerformPublishActionWithHttpInfo,PerformPublishActionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1569,7 +1587,7 @@ public ApiResponse< InvoicingV2InvoicesPublish200Response > PerformPublishAction return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response))); // Return statement + (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response), merchantConfig)); // Return statement } /// @@ -1654,7 +1672,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response))); // Return statement + (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response), merchantConfig)); // Return statement } /// /// Send an Invoice You can send an invoice in draft or created state or resend a sent or partially paid invoice. Fully paid or canceled invoices cannot be resent. @@ -1772,7 +1792,7 @@ public ApiResponse< InvoicingV2InvoicesSend200Response > PerformSendActionWithHt } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PerformSendAction,PerformSendActionAsync,PerformSendActionWithHttpInfo,PerformSendActionAsyncWithHttpInfo")) { try @@ -1786,12 +1806,14 @@ public ApiResponse< InvoicingV2InvoicesSend200Response > PerformSendActionWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PerformSendAction,PerformSendActionAsync,PerformSendActionWithHttpInfo,PerformSendActionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1807,7 +1829,7 @@ public ApiResponse< InvoicingV2InvoicesSend200Response > PerformSendActionWithHt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response))); // Return statement + (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response), merchantConfig)); // Return statement } /// @@ -1892,7 +1914,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response))); // Return statement + (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response), merchantConfig)); // Return statement } /// /// Update an Invoice You can update all information except the invoice number till any payment is received for an invoice. Invoices that are partially or fully paid or cancelled cannot be updated. @@ -2014,7 +2038,7 @@ public ApiResponse< InvoicingV2InvoicesPut200Response > UpdateInvoiceWithHttpInf } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateInvoice,UpdateInvoiceAsync,UpdateInvoiceWithHttpInfo,UpdateInvoiceAsyncWithHttpInfo")) { try @@ -2028,13 +2052,15 @@ public ApiResponse< InvoicingV2InvoicesPut200Response > UpdateInvoiceWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateInvoice,UpdateInvoiceAsync,UpdateInvoiceWithHttpInfo,UpdateInvoiceAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2050,7 +2076,7 @@ public ApiResponse< InvoicingV2InvoicesPut200Response > UpdateInvoiceWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response))); // Return statement + (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response), merchantConfig)); // Return statement } /// @@ -2139,7 +2165,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response))); // Return statement + (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response), merchantConfig)); // Return statement } } } diff --git a/Api/ManageWebhooksApi.cs b/Api/ManageWebhooksApi.cs index efa7d329..69098817 100644 --- a/Api/ManageWebhooksApi.cs +++ b/Api/ManageWebhooksApi.cs @@ -568,7 +568,7 @@ public ApiResponse DeleteWebhookSubscriptionWithHttpInfo (string webhook } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo")) { try @@ -582,12 +582,14 @@ public ApiResponse DeleteWebhookSubscriptionWithHttpInfo (string webhook } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -683,7 +685,7 @@ public async System.Threading.Tasks.Task> DeleteWebhookSubsc } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo")) { try @@ -697,12 +699,14 @@ public async System.Threading.Tasks.Task> DeleteWebhookSubsc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -799,7 +803,7 @@ public ApiResponse< InlineResponse2015 > GetWebhookSubscriptionByIdWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo")) { try @@ -813,12 +817,14 @@ public ApiResponse< InlineResponse2015 > GetWebhookSubscriptionByIdWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -834,7 +840,7 @@ public ApiResponse< InlineResponse2015 > GetWebhookSubscriptionByIdWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015), merchantConfig)); // Return statement } /// @@ -916,7 +922,7 @@ public async System.Threading.Tasks.Task> GetWeb } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo")) { try @@ -930,12 +936,14 @@ public async System.Threading.Tasks.Task> GetWeb } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -951,7 +959,7 @@ public async System.Threading.Tasks.Task> GetWeb return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015), merchantConfig)); // Return statement } /// /// Get Details On All Created Webhooks Retrieve a list of all previously created webhooks. @@ -1045,7 +1053,7 @@ public ApiResponse< List > GetWebhookSubscriptionsByOrgWithH } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo")) { try @@ -1059,12 +1067,14 @@ public ApiResponse< List > GetWebhookSubscriptionsByOrgWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1176,7 +1186,7 @@ public async System.Threading.Tasks.Task>> } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo")) { try @@ -1190,12 +1200,14 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1291,7 +1303,7 @@ public ApiResponse< InlineResponse2016 > NotificationSubscriptionsV1WebhooksWebh } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo")) { try @@ -1305,12 +1317,14 @@ public ApiResponse< InlineResponse2016 > NotificationSubscriptionsV1WebhooksWebh } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1326,7 +1340,7 @@ public ApiResponse< InlineResponse2016 > NotificationSubscriptionsV1WebhooksWebh return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016))); // Return statement + (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016), merchantConfig)); // Return statement } /// @@ -1408,7 +1422,7 @@ public async System.Threading.Tasks.Task> Notifi } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo")) { try @@ -1422,12 +1436,14 @@ public async System.Threading.Tasks.Task> Notifi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1443,7 +1459,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016))); // Return statement + (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016), merchantConfig)); // Return statement } /// /// Update a Webhook Subscription Update a Webhook Subscription. @@ -1521,7 +1537,7 @@ public ApiResponse< InlineResponse2006 > NotificationSubscriptionsV2WebhooksWebh } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo")) { try @@ -1535,13 +1551,15 @@ public ApiResponse< InlineResponse2006 > NotificationSubscriptionsV2WebhooksWebh } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1637,7 +1655,7 @@ public async System.Threading.Tasks.Task> Notifi } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo")) { try @@ -1651,13 +1669,15 @@ public async System.Threading.Tasks.Task> Notifi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1748,7 +1768,7 @@ public ApiResponse NotificationSubscriptionsV2WebhooksWebhookIdStatusPut } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo")) { try @@ -1762,13 +1782,15 @@ public ApiResponse NotificationSubscriptionsV2WebhooksWebhookIdStatusPut } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1862,7 +1884,7 @@ public async System.Threading.Tasks.Task> NotificationSubscr } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo")) { try @@ -1876,13 +1898,15 @@ public async System.Threading.Tasks.Task> NotificationSubscr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2000,7 +2024,7 @@ public ApiResponse< InlineResponse2017 > SaveAsymEgressKeyWithHttpInfo (string v } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo")) { try @@ -2014,13 +2038,15 @@ public ApiResponse< InlineResponse2017 > SaveAsymEgressKeyWithHttpInfo (string v } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2036,7 +2062,7 @@ public ApiResponse< InlineResponse2017 > SaveAsymEgressKeyWithHttpInfo (string v return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017))); // Return statement + (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017), merchantConfig)); // Return statement } /// @@ -2139,7 +2165,7 @@ public async System.Threading.Tasks.Task> SaveAs } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo")) { try @@ -2153,13 +2179,15 @@ public async System.Threading.Tasks.Task> SaveAs } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2175,7 +2203,7 @@ public async System.Threading.Tasks.Task> SaveAs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017))); // Return statement + (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017), merchantConfig)); // Return statement } } } diff --git a/Api/MerchantBoardingApi.cs b/Api/MerchantBoardingApi.cs index 1aa2872b..dace0684 100644 --- a/Api/MerchantBoardingApi.cs +++ b/Api/MerchantBoardingApi.cs @@ -337,7 +337,7 @@ public ApiResponse< InlineResponse2003 > GetRegistrationWithHttpInfo (string reg } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo")) { try @@ -351,12 +351,14 @@ public ApiResponse< InlineResponse2003 > GetRegistrationWithHttpInfo (string reg } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -454,7 +456,7 @@ public async System.Threading.Tasks.Task> GetReg } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo")) { try @@ -468,12 +470,14 @@ public async System.Threading.Tasks.Task> GetReg } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -566,7 +570,7 @@ public ApiResponse< InlineResponse2013 > PostRegistrationWithHttpInfo (PostRegis } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo")) { try @@ -580,13 +584,15 @@ public ApiResponse< InlineResponse2013 > PostRegistrationWithHttpInfo (PostRegis } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -602,7 +608,7 @@ public ApiResponse< InlineResponse2013 > PostRegistrationWithHttpInfo (PostRegis return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013))); // Return statement + (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013), merchantConfig)); // Return statement } /// @@ -681,7 +687,7 @@ public async System.Threading.Tasks.Task> PostRe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo")) { try @@ -695,13 +701,15 @@ public async System.Threading.Tasks.Task> PostRe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -717,7 +725,7 @@ public async System.Threading.Tasks.Task> PostRe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013))); // Return statement + (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013), merchantConfig)); // Return statement } } } diff --git a/Api/MicroformIntegrationApi.cs b/Api/MicroformIntegrationApi.cs index 04d97c6b..4d5c97d5 100644 --- a/Api/MicroformIntegrationApi.cs +++ b/Api/MicroformIntegrationApi.cs @@ -282,7 +282,7 @@ public ApiResponse< string > GenerateCaptureContextWithHttpInfo (GenerateCapture } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< string > GenerateCaptureContextWithHttpInfo (GenerateCapture } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< string > GenerateCaptureContextWithHttpInfo (GenerateCapture return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/Api/NetFundingsApi.cs b/Api/NetFundingsApi.cs index 520d3d9a..efce0d0a 100644 --- a/Api/NetFundingsApi.cs +++ b/Api/NetFundingsApi.cs @@ -331,7 +331,7 @@ public ApiResponse< ReportingV3NetFundingsGet200Response > GetNetFundingDetailsW } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetNetFundingDetails,GetNetFundingDetailsAsync,GetNetFundingDetailsWithHttpInfo,GetNetFundingDetailsAsyncWithHttpInfo")) { try @@ -345,12 +345,14 @@ public ApiResponse< ReportingV3NetFundingsGet200Response > GetNetFundingDetailsW } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetNetFundingDetails,GetNetFundingDetailsAsync,GetNetFundingDetailsWithHttpInfo,GetNetFundingDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -366,7 +368,7 @@ public ApiResponse< ReportingV3NetFundingsGet200Response > GetNetFundingDetailsW return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response))); // Return statement + (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response), merchantConfig)); // Return statement } /// @@ -476,7 +478,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response))); // Return statement + (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/NotificationOfChangesApi.cs b/Api/NotificationOfChangesApi.cs index 5e2e5f0c..b77e0a28 100644 --- a/Api/NotificationOfChangesApi.cs +++ b/Api/NotificationOfChangesApi.cs @@ -310,7 +310,7 @@ public ApiResponse< ReportingV3NotificationofChangesGet200Response > GetNotifica } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetNotificationOfChangeReport,GetNotificationOfChangeReportAsync,GetNotificationOfChangeReportWithHttpInfo,GetNotificationOfChangeReportAsyncWithHttpInfo")) { try @@ -324,12 +324,14 @@ public ApiResponse< ReportingV3NotificationofChangesGet200Response > GetNotifica } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetNotificationOfChangeReport,GetNotificationOfChangeReportAsync,GetNotificationOfChangeReportWithHttpInfo,GetNotificationOfChangeReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -345,7 +347,7 @@ public ApiResponse< ReportingV3NotificationofChangesGet200Response > GetNotifica return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response))); // Return statement + (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response), merchantConfig)); // Return statement } /// @@ -442,7 +444,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response))); // Return statement + (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/OAuthApi.cs b/Api/OAuthApi.cs index a10a5187..7de658f5 100644 --- a/Api/OAuthApi.cs +++ b/Api/OAuthApi.cs @@ -7,6 +7,7 @@ using CyberSource.Model; using NLog; using AuthenticationSdk.util; +using AuthenticationSdk.core; namespace CyberSource.Api { @@ -281,9 +282,11 @@ public ApiResponse PostAccessTokenRequestWithHttpInfo(Creat } } + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse))); // Return statement + (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse), merchantConfig)); // Return statement } /// @@ -379,9 +382,11 @@ public async System.Threading.Tasks.Task> PostA } } + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse))); // Return statement + (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse), merchantConfig)); // Return statement } } diff --git a/Api/OrdersApi.cs b/Api/OrdersApi.cs index 2756f929..5b76516f 100644 --- a/Api/OrdersApi.cs +++ b/Api/OrdersApi.cs @@ -328,7 +328,7 @@ public ApiResponse< PtsV2CreateOrderPost201Response > CreateOrderWithHttpInfo (C } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateOrder,CreateOrderAsync,CreateOrderWithHttpInfo,CreateOrderAsyncWithHttpInfo")) { try @@ -342,13 +342,15 @@ public ApiResponse< PtsV2CreateOrderPost201Response > CreateOrderWithHttpInfo (C } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateOrder,CreateOrderAsync,CreateOrderWithHttpInfo,CreateOrderAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -364,7 +366,7 @@ public ApiResponse< PtsV2CreateOrderPost201Response > CreateOrderWithHttpInfo (C return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response))); // Return statement + (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response), merchantConfig)); // Return statement } /// @@ -437,7 +439,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response))); // Return statement + (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response), merchantConfig)); // Return statement } /// /// Update an Order This API can be used in two flavours - for updating the order as well as saving the order. @@ -557,7 +561,7 @@ public ApiResponse< PtsV2UpdateOrderPatch201Response > UpdateOrderWithHttpInfo ( } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateOrder,UpdateOrderAsync,UpdateOrderWithHttpInfo,UpdateOrderAsyncWithHttpInfo")) { try @@ -571,13 +575,15 @@ public ApiResponse< PtsV2UpdateOrderPatch201Response > UpdateOrderWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateOrder,UpdateOrderAsync,UpdateOrderWithHttpInfo,UpdateOrderAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -593,7 +599,7 @@ public ApiResponse< PtsV2UpdateOrderPatch201Response > UpdateOrderWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response))); // Return statement + (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response), merchantConfig)); // Return statement } /// @@ -679,7 +685,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response))); // Return statement + (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response), merchantConfig)); // Return statement } } } diff --git a/Api/PayerAuthenticationApi.cs b/Api/PayerAuthenticationApi.cs index 29a83fbe..9edcfece 100644 --- a/Api/PayerAuthenticationApi.cs +++ b/Api/PayerAuthenticationApi.cs @@ -366,7 +366,7 @@ public ApiResponse< RiskV1AuthenticationsPost201Response > CheckPayerAuthEnrollm } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CheckPayerAuthEnrollment,CheckPayerAuthEnrollmentAsync,CheckPayerAuthEnrollmentWithHttpInfo,CheckPayerAuthEnrollmentAsyncWithHttpInfo")) { try @@ -380,13 +380,15 @@ public ApiResponse< RiskV1AuthenticationsPost201Response > CheckPayerAuthEnrollm } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CheckPayerAuthEnrollment,CheckPayerAuthEnrollmentAsync,CheckPayerAuthEnrollmentWithHttpInfo,CheckPayerAuthEnrollmentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -402,7 +404,7 @@ public ApiResponse< RiskV1AuthenticationsPost201Response > CheckPayerAuthEnrollm return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response))); // Return statement + (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response), merchantConfig)); // Return statement } /// @@ -475,7 +477,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response))); // Return statement + (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response), merchantConfig)); // Return statement } /// /// Setup Payer Auth A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal. Set up file while authenticating with Cardinal. This service should be called by Merchant when payment instrument chosen or changes. This service has to be called before enrollment check. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -582,7 +586,7 @@ public ApiResponse< RiskV1AuthenticationSetupsPost201Response > PayerAuthSetupWi } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PayerAuthSetup,PayerAuthSetupAsync,PayerAuthSetupWithHttpInfo,PayerAuthSetupAsyncWithHttpInfo")) { try @@ -596,13 +600,15 @@ public ApiResponse< RiskV1AuthenticationSetupsPost201Response > PayerAuthSetupWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PayerAuthSetup,PayerAuthSetupAsync,PayerAuthSetupWithHttpInfo,PayerAuthSetupAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -618,7 +624,7 @@ public ApiResponse< RiskV1AuthenticationSetupsPost201Response > PayerAuthSetupWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response))); // Return statement + (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response), merchantConfig)); // Return statement } /// @@ -691,7 +697,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response))); // Return statement + (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response), merchantConfig)); // Return statement } /// /// Validate Authentication Results This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment. @@ -798,7 +806,7 @@ public ApiResponse< RiskV1AuthenticationResultsPost201Response > ValidateAuthent } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ValidateAuthenticationResults,ValidateAuthenticationResultsAsync,ValidateAuthenticationResultsWithHttpInfo,ValidateAuthenticationResultsAsyncWithHttpInfo")) { try @@ -812,13 +820,15 @@ public ApiResponse< RiskV1AuthenticationResultsPost201Response > ValidateAuthent } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ValidateAuthenticationResults,ValidateAuthenticationResultsAsync,ValidateAuthenticationResultsWithHttpInfo,ValidateAuthenticationResultsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -834,7 +844,7 @@ public ApiResponse< RiskV1AuthenticationResultsPost201Response > ValidateAuthent return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response))); // Return statement + (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response), merchantConfig)); // Return statement } /// @@ -907,7 +917,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response))); // Return statement + (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/PaymentBatchSummariesApi.cs b/Api/PaymentBatchSummariesApi.cs index 07eca788..237ea8b9 100644 --- a/Api/PaymentBatchSummariesApi.cs +++ b/Api/PaymentBatchSummariesApi.cs @@ -354,7 +354,7 @@ public ApiResponse< ReportingV3PaymentBatchSummariesGet200Response > GetPaymentB } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentBatchSummary,GetPaymentBatchSummaryAsync,GetPaymentBatchSummaryWithHttpInfo,GetPaymentBatchSummaryAsyncWithHttpInfo")) { try @@ -368,12 +368,14 @@ public ApiResponse< ReportingV3PaymentBatchSummariesGet200Response > GetPaymentB } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentBatchSummary,GetPaymentBatchSummaryAsync,GetPaymentBatchSummaryWithHttpInfo,GetPaymentBatchSummaryAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -389,7 +391,7 @@ public ApiResponse< ReportingV3PaymentBatchSummariesGet200Response > GetPaymentB return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response))); // Return statement + (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response), merchantConfig)); // Return statement } /// @@ -514,7 +516,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response))); // Return statement + (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/PaymentInstrumentApi.cs b/Api/PaymentInstrumentApi.cs index 9e2fe1fb..98a98625 100644 --- a/Api/PaymentInstrumentApi.cs +++ b/Api/PaymentInstrumentApi.cs @@ -456,7 +456,7 @@ public ApiResponse DeletePaymentInstrumentWithHttpInfo (string paymentIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo")) { try @@ -470,12 +470,14 @@ public ApiResponse DeletePaymentInstrumentWithHttpInfo (string paymentIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -577,7 +579,7 @@ public async System.Threading.Tasks.Task> DeletePaymentInstr } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo")) { try @@ -591,12 +593,14 @@ public async System.Threading.Tasks.Task> DeletePaymentInstr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -706,7 +710,7 @@ public ApiResponse< PostPaymentInstrumentRequest > GetPaymentInstrumentWithHttpI } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentInstrument,GetPaymentInstrumentAsync,GetPaymentInstrumentWithHttpInfo,GetPaymentInstrumentAsyncWithHttpInfo")) { try @@ -720,12 +724,14 @@ public ApiResponse< PostPaymentInstrumentRequest > GetPaymentInstrumentWithHttpI } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentInstrument,GetPaymentInstrumentAsync,GetPaymentInstrumentWithHttpInfo,GetPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -741,7 +747,7 @@ public ApiResponse< PostPaymentInstrumentRequest > GetPaymentInstrumentWithHttpI return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest), merchantConfig)); // Return statement } /// @@ -836,7 +842,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// Update a Payment Instrument | | | | | - -- | - -- | - -- | |**Standalone Payment Instruments**<br>A Payment Instrument represents tokenized payment information such as expiration date, billing address & card type.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>**Standalone Payment Instruments do not belong to a [Customer](#token-management_customer_create-a-customer).**|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Payment Instrument**<br>Your system can use this API to update an existing Payment Instrument. @@ -974,7 +982,7 @@ public ApiResponse< PatchPaymentInstrumentRequest > PatchPaymentInstrumentWithHt } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchPaymentInstrument,PatchPaymentInstrumentAsync,PatchPaymentInstrumentWithHttpInfo,PatchPaymentInstrumentAsyncWithHttpInfo")) { try @@ -988,13 +996,15 @@ public ApiResponse< PatchPaymentInstrumentRequest > PatchPaymentInstrumentWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchPaymentInstrument,PatchPaymentInstrumentAsync,PatchPaymentInstrumentWithHttpInfo,PatchPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1010,7 +1020,7 @@ public ApiResponse< PatchPaymentInstrumentRequest > PatchPaymentInstrumentWithHt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest))); // Return statement + (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest), merchantConfig)); // Return statement } /// @@ -1115,7 +1125,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest))); // Return statement + (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// Create a Payment Instrument | | | | | - -- | - -- | - -- | |**Standalone Payment Instruments**<br>A Payment Instrument represents tokenized payment information such as expiration date, billing address & card type.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>**Standalone Payment Instruments do not belong to a [Customer](#token-management_customer_create-a-customer).**<br><br>**Creating a Payment Instrument**<br>It is recommended you [create a Payment Instrument via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Payment Instruments**<br>To perform a payment with a particular Payment Instrument specify the [Payment Instrument in the payment request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). @@ -1235,7 +1247,7 @@ public ApiResponse< PostPaymentInstrumentRequest > PostPaymentInstrumentWithHttp } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostPaymentInstrument,PostPaymentInstrumentAsync,PostPaymentInstrumentWithHttpInfo,PostPaymentInstrumentAsyncWithHttpInfo")) { try @@ -1249,13 +1261,15 @@ public ApiResponse< PostPaymentInstrumentRequest > PostPaymentInstrumentWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostPaymentInstrument,PostPaymentInstrumentAsync,PostPaymentInstrumentWithHttpInfo,PostPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1271,7 +1285,7 @@ public ApiResponse< PostPaymentInstrumentRequest > PostPaymentInstrumentWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest), merchantConfig)); // Return statement } /// @@ -1357,7 +1371,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest), merchantConfig)); // Return statement } } } diff --git a/Api/PaymentLinksApi.cs b/Api/PaymentLinksApi.cs index 656bca09..235a3ae7 100644 --- a/Api/PaymentLinksApi.cs +++ b/Api/PaymentLinksApi.cs @@ -423,7 +423,7 @@ public ApiResponse< PblPaymentLinksPost201Response > CreatePaymentLinkWithHttpIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePaymentLink,CreatePaymentLinkAsync,CreatePaymentLinkWithHttpInfo,CreatePaymentLinkAsyncWithHttpInfo")) { try @@ -437,13 +437,15 @@ public ApiResponse< PblPaymentLinksPost201Response > CreatePaymentLinkWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePaymentLink,CreatePaymentLinkAsync,CreatePaymentLinkWithHttpInfo,CreatePaymentLinkAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -459,7 +461,7 @@ public ApiResponse< PblPaymentLinksPost201Response > CreatePaymentLinkWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response), merchantConfig)); // Return statement } /// @@ -535,7 +537,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response), merchantConfig)); // Return statement } /// /// Get a List of Payment Links Provides a (filtered) list of payment links that have been created in your account. You can filter the list based on the following status types: - ACTIVE - INACTIVE @@ -674,7 +678,7 @@ public ApiResponse< PblPaymentLinksAllGet200Response > GetAllPaymentLinksWithHtt } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllPaymentLinks,GetAllPaymentLinksAsync,GetAllPaymentLinksWithHttpInfo,GetAllPaymentLinksAsyncWithHttpInfo")) { try @@ -688,12 +692,14 @@ public ApiResponse< PblPaymentLinksAllGet200Response > GetAllPaymentLinksWithHtt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllPaymentLinks,GetAllPaymentLinksAsync,GetAllPaymentLinksWithHttpInfo,GetAllPaymentLinksAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -709,7 +715,7 @@ public ApiResponse< PblPaymentLinksAllGet200Response > GetAllPaymentLinksWithHtt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response))); // Return statement + (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response), merchantConfig)); // Return statement } /// @@ -814,7 +820,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response))); // Return statement + (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response), merchantConfig)); // Return statement } /// /// Get Payment Link Details You can retrieve details of a specific payment link. For each payment transaction you can use the Transaction Details API to get more details on the payment transaction. @@ -932,7 +940,7 @@ public ApiResponse< PblPaymentLinksGet200Response > GetPaymentLinkWithHttpInfo ( } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentLink,GetPaymentLinkAsync,GetPaymentLinkWithHttpInfo,GetPaymentLinkAsyncWithHttpInfo")) { try @@ -946,12 +954,14 @@ public ApiResponse< PblPaymentLinksGet200Response > GetPaymentLinkWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentLink,GetPaymentLinkAsync,GetPaymentLinkWithHttpInfo,GetPaymentLinkAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -967,7 +977,7 @@ public ApiResponse< PblPaymentLinksGet200Response > GetPaymentLinkWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response))); // Return statement + (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response), merchantConfig)); // Return statement } /// @@ -1052,7 +1062,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response))); // Return statement + (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response), merchantConfig)); // Return statement } /// /// Update a Payment Link You can update all information except the payment link number for a payment link. Changes made to amount/price will apply to new payments made using the payment link. @@ -1174,7 +1186,7 @@ public ApiResponse< PblPaymentLinksPost201Response > UpdatePaymentLinkWithHttpIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdatePaymentLink,UpdatePaymentLinkAsync,UpdatePaymentLinkWithHttpInfo,UpdatePaymentLinkAsyncWithHttpInfo")) { try @@ -1188,13 +1200,15 @@ public ApiResponse< PblPaymentLinksPost201Response > UpdatePaymentLinkWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdatePaymentLink,UpdatePaymentLinkAsync,UpdatePaymentLinkWithHttpInfo,UpdatePaymentLinkAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1210,7 +1224,7 @@ public ApiResponse< PblPaymentLinksPost201Response > UpdatePaymentLinkWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response), merchantConfig)); // Return statement } /// @@ -1299,7 +1313,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/PaymentTokensApi.cs b/Api/PaymentTokensApi.cs index 7a47f468..1b0d5fa0 100644 --- a/Api/PaymentTokensApi.cs +++ b/Api/PaymentTokensApi.cs @@ -282,7 +282,7 @@ public ApiResponse< InlineResponse201 > RetrieveOrDeletePaymentTokenWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< InlineResponse201 > RetrieveOrDeletePaymentTokenWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< InlineResponse201 > RetrieveOrDeletePaymentTokenWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201))); // Return statement + (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> Retriev } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> Retriev } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> Retriev return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201))); // Return statement + (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201), merchantConfig)); // Return statement } } } diff --git a/Api/PaymentsApi.cs b/Api/PaymentsApi.cs index b84282dc..8a79ff27 100644 --- a/Api/PaymentsApi.cs +++ b/Api/PaymentsApi.cs @@ -521,7 +521,7 @@ public ApiResponse< PtsV2PaymentsOrderPost201Response > CreateOrderRequestWithHt } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateOrderRequest,CreateOrderRequestAsync,CreateOrderRequestWithHttpInfo,CreateOrderRequestAsyncWithHttpInfo")) { try @@ -535,13 +535,15 @@ public ApiResponse< PtsV2PaymentsOrderPost201Response > CreateOrderRequestWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateOrderRequest,CreateOrderRequestAsync,CreateOrderRequestWithHttpInfo,CreateOrderRequestAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -557,7 +559,7 @@ public ApiResponse< PtsV2PaymentsOrderPost201Response > CreateOrderRequestWithHt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response))); // Return statement + (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response), merchantConfig)); // Return statement } /// @@ -643,7 +645,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response))); // Return statement + (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response), merchantConfig)); // Return statement } /// /// Process a Payment A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation. @@ -750,7 +754,7 @@ public ApiResponse< PtsV2PaymentsPost201Response > CreatePaymentWithHttpInfo (Cr } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePayment,CreatePaymentAsync,CreatePaymentWithHttpInfo,CreatePaymentAsyncWithHttpInfo")) { try @@ -764,13 +768,15 @@ public ApiResponse< PtsV2PaymentsPost201Response > CreatePaymentWithHttpInfo (Cr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePayment,CreatePaymentAsync,CreatePaymentWithHttpInfo,CreatePaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -786,7 +792,7 @@ public ApiResponse< PtsV2PaymentsPost201Response > CreatePaymentWithHttpInfo (Cr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response))); // Return statement + (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response), merchantConfig)); // Return statement } /// @@ -859,7 +865,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response))); // Return statement + (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response), merchantConfig)); // Return statement } /// /// Create Alternative Payments Sessions Request Create Alternative Payments Sessions Request @@ -966,7 +974,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > CreateSessionRequestWithHttp } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSessionRequest,CreateSessionRequestAsync,CreateSessionRequestWithHttpInfo,CreateSessionRequestAsyncWithHttpInfo")) { try @@ -980,13 +988,15 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > CreateSessionRequestWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSessionRequest,CreateSessionRequestAsync,CreateSessionRequestWithHttpInfo,CreateSessionRequestAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1002,7 +1012,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > CreateSessionRequestWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2), merchantConfig)); // Return statement } /// @@ -1075,7 +1085,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2), merchantConfig)); // Return statement } /// /// Increment an Authorization Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization. @@ -1195,7 +1207,7 @@ public ApiResponse< PtsV2IncrementalAuthorizationPatch201Response > IncrementAut } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "IncrementAuth,IncrementAuthAsync,IncrementAuthWithHttpInfo,IncrementAuthAsyncWithHttpInfo")) { try @@ -1209,13 +1221,15 @@ public ApiResponse< PtsV2IncrementalAuthorizationPatch201Response > IncrementAut } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "IncrementAuth,IncrementAuthAsync,IncrementAuthWithHttpInfo,IncrementAuthAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1231,7 +1245,7 @@ public ApiResponse< PtsV2IncrementalAuthorizationPatch201Response > IncrementAut return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response))); // Return statement + (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response), merchantConfig)); // Return statement } /// @@ -1317,7 +1331,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response))); // Return statement + (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response), merchantConfig)); // Return statement } /// /// Check a Payment Status Checks and updates the payment status @@ -1437,7 +1453,7 @@ public ApiResponse< PtsV2PaymentsPost201Response1 > RefreshPaymentStatusWithHttp } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RefreshPaymentStatus,RefreshPaymentStatusAsync,RefreshPaymentStatusWithHttpInfo,RefreshPaymentStatusAsyncWithHttpInfo")) { try @@ -1451,13 +1467,15 @@ public ApiResponse< PtsV2PaymentsPost201Response1 > RefreshPaymentStatusWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RefreshPaymentStatus,RefreshPaymentStatusAsync,RefreshPaymentStatusWithHttpInfo,RefreshPaymentStatusAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1473,7 +1491,7 @@ public ApiResponse< PtsV2PaymentsPost201Response1 > RefreshPaymentStatusWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1))); // Return statement + (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1), merchantConfig)); // Return statement } /// @@ -1559,7 +1577,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1))); // Return statement + (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1), merchantConfig)); // Return statement } /// /// Update Alternative Payments Sessions Request Update Alternative Payments Sessions Request @@ -1679,7 +1699,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > UpdateSessionReqWithHttpInfo } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateSessionReq,UpdateSessionReqAsync,UpdateSessionReqWithHttpInfo,UpdateSessionReqAsyncWithHttpInfo")) { try @@ -1693,13 +1713,15 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > UpdateSessionReqWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateSessionReq,UpdateSessionReqAsync,UpdateSessionReqWithHttpInfo,UpdateSessionReqAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1715,7 +1737,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > UpdateSessionReqWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2), merchantConfig)); // Return statement } /// @@ -1801,7 +1823,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2), merchantConfig)); // Return statement } } } diff --git a/Api/PayoutsApi.cs b/Api/PayoutsApi.cs index ac1ec3fd..0f25dd56 100644 --- a/Api/PayoutsApi.cs +++ b/Api/PayoutsApi.cs @@ -282,7 +282,7 @@ public ApiResponse< PtsV2PayoutsPost201Response > OctCreatePaymentWithHttpInfo ( } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "OctCreatePayment,OctCreatePaymentAsync,OctCreatePaymentWithHttpInfo,OctCreatePaymentAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< PtsV2PayoutsPost201Response > OctCreatePaymentWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "OctCreatePayment,OctCreatePaymentAsync,OctCreatePaymentWithHttpInfo,OctCreatePaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< PtsV2PayoutsPost201Response > OctCreatePaymentWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response))); // Return statement + (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response))); // Return statement + (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/PlansApi.cs b/Api/PlansApi.cs index 9c77efa1..13dd001a 100644 --- a/Api/PlansApi.cs +++ b/Api/PlansApi.cs @@ -604,7 +604,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > ActivatePlanWithHttpInfo (s } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActivatePlan,ActivatePlanAsync,ActivatePlanWithHttpInfo,ActivatePlanAsyncWithHttpInfo")) { try @@ -618,12 +618,14 @@ public ApiResponse< ActivateDeactivatePlanResponse > ActivatePlanWithHttpInfo (s } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActivatePlan,ActivatePlanAsync,ActivatePlanWithHttpInfo,ActivatePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -639,7 +641,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > ActivatePlanWithHttpInfo (s return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse), merchantConfig)); // Return statement } /// @@ -724,7 +726,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse), merchantConfig)); // Return statement } /// /// Create a Plan The recurring billing service enables you to manage payment plans and subscriptions for recurring payment schedules. It securely stores your customer's payment information and personal data within secure Visa data centers, reducing storage risks and PCI DSS scope through the use of *Token Management* (*TMS*). The three key elements of *Cybersource* Recurring Billing are: -  **Token**: stores customer billing, shipping, and payment details. -  **Plan**: stores the billing schedule. -  **Subscription**: combines the token and plan, and defines the subscription start date, name, and description. The APIs in this section demonstrate the management of the Plans and Subscriptions. For Tokens please refer to [Token Management](#token-management) The availability of API features for a merchant can depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -833,7 +837,7 @@ public ApiResponse< CreatePlanResponse > CreatePlanWithHttpInfo (CreatePlanReque } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo")) { try @@ -847,13 +851,15 @@ public ApiResponse< CreatePlanResponse > CreatePlanWithHttpInfo (CreatePlanReque } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -869,7 +875,7 @@ public ApiResponse< CreatePlanResponse > CreatePlanWithHttpInfo (CreatePlanReque return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse))); // Return statement + (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse), merchantConfig)); // Return statement } /// @@ -945,7 +951,7 @@ public async System.Threading.Tasks.Task> Create } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo")) { try @@ -959,13 +965,15 @@ public async System.Threading.Tasks.Task> Create } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -981,7 +989,7 @@ public async System.Threading.Tasks.Task> Create return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse))); // Return statement + (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse), merchantConfig)); // Return statement } /// /// Deactivate a Plan Deactivate a Plan @@ -1064,7 +1072,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > DeactivatePlanWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeactivatePlan,DeactivatePlanAsync,DeactivatePlanWithHttpInfo,DeactivatePlanAsyncWithHttpInfo")) { try @@ -1078,12 +1086,14 @@ public ApiResponse< ActivateDeactivatePlanResponse > DeactivatePlanWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeactivatePlan,DeactivatePlanAsync,DeactivatePlanWithHttpInfo,DeactivatePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1099,7 +1109,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > DeactivatePlanWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse), merchantConfig)); // Return statement } /// @@ -1184,7 +1194,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse), merchantConfig)); // Return statement } /// /// Delete a Plan Delete a Plan is only allowed: - plan status is in `DRAFT` - plan status is in `ACTIVE`, and `INACTIVE` only allowed when no subscriptions attached to a plan in the lifetime of a plan @@ -1302,7 +1314,7 @@ public ApiResponse< DeletePlanResponse > DeletePlanWithHttpInfo (string id) } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo")) { try @@ -1316,12 +1328,14 @@ public ApiResponse< DeletePlanResponse > DeletePlanWithHttpInfo (string id) } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1337,7 +1351,7 @@ public ApiResponse< DeletePlanResponse > DeletePlanWithHttpInfo (string id) return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse))); // Return statement + (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse), merchantConfig)); // Return statement } /// @@ -1422,7 +1436,7 @@ public async System.Threading.Tasks.Task> Delete } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo")) { try @@ -1436,12 +1450,14 @@ public async System.Threading.Tasks.Task> Delete } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1457,7 +1473,7 @@ public async System.Threading.Tasks.Task> Delete return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse))); // Return statement + (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse), merchantConfig)); // Return statement } /// /// Get a Plan Retrieve a Plan details by Plan Id. @@ -1540,7 +1556,7 @@ public ApiResponse< GetPlanResponse > GetPlanWithHttpInfo (string id) } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo")) { try @@ -1554,12 +1570,14 @@ public ApiResponse< GetPlanResponse > GetPlanWithHttpInfo (string id) } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1575,7 +1593,7 @@ public ApiResponse< GetPlanResponse > GetPlanWithHttpInfo (string id) return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse))); // Return statement + (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse), merchantConfig)); // Return statement } /// @@ -1660,7 +1678,7 @@ public async System.Threading.Tasks.Task> GetPlanAs } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo")) { try @@ -1674,12 +1692,14 @@ public async System.Threading.Tasks.Task> GetPlanAs } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1695,7 +1715,7 @@ public async System.Threading.Tasks.Task> GetPlanAs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse))); // Return statement + (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse), merchantConfig)); // Return statement } /// /// Get a Plan Code Get a Unique Plan Code @@ -1765,7 +1785,7 @@ public ApiResponse< GetPlanCodeResponse > GetPlanCodeWithHttpInfo () } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo")) { try @@ -1779,12 +1799,14 @@ public ApiResponse< GetPlanCodeResponse > GetPlanCodeWithHttpInfo () } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1800,7 +1822,7 @@ public ApiResponse< GetPlanCodeResponse > GetPlanCodeWithHttpInfo () return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse))); // Return statement + (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse), merchantConfig)); // Return statement } /// @@ -1872,7 +1894,7 @@ public async System.Threading.Tasks.Task> GetPl } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo")) { try @@ -1886,12 +1908,14 @@ public async System.Threading.Tasks.Task> GetPl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1907,7 +1931,7 @@ public async System.Threading.Tasks.Task> GetPl return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse))); // Return statement + (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse), merchantConfig)); // Return statement } /// /// Get a List of Plans Retrieve Plans by Plan Code & Plan Status. @@ -2012,7 +2036,7 @@ public ApiResponse< GetAllPlansResponse > GetPlansWithHttpInfo (int? offset = nu } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo")) { try @@ -2026,12 +2050,14 @@ public ApiResponse< GetAllPlansResponse > GetPlansWithHttpInfo (int? offset = nu } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2047,7 +2073,7 @@ public ApiResponse< GetAllPlansResponse > GetPlansWithHttpInfo (int? offset = nu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse))); // Return statement + (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse), merchantConfig)); // Return statement } /// @@ -2154,7 +2180,7 @@ public async System.Threading.Tasks.Task> GetPl } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo")) { try @@ -2168,12 +2194,14 @@ public async System.Threading.Tasks.Task> GetPl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2189,7 +2217,7 @@ public async System.Threading.Tasks.Task> GetPl return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse))); // Return statement + (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse), merchantConfig)); // Return statement } /// /// Update a Plan Update a Plan Plan in `DRAFT` status - All updates are allowed on Plan with `DRAFT` status Plan in `ACTIVE` status [Following fields are **Not Updatable**] - `planInformation.billingPeriod` - `planInformation.billingCycles` [Update is only allowed to **increase** billingCycles] - `orderInformation.amountDetails.currency` @@ -2276,7 +2304,7 @@ public ApiResponse< UpdatePlanResponse > UpdatePlanWithHttpInfo (string id, Upda } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo")) { try @@ -2290,13 +2318,15 @@ public ApiResponse< UpdatePlanResponse > UpdatePlanWithHttpInfo (string id, Upda } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2312,7 +2342,7 @@ public ApiResponse< UpdatePlanResponse > UpdatePlanWithHttpInfo (string id, Upda return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse))); // Return statement + (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse), merchantConfig)); // Return statement } /// @@ -2401,7 +2431,7 @@ public async System.Threading.Tasks.Task> Update } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo")) { try @@ -2415,13 +2445,15 @@ public async System.Threading.Tasks.Task> Update } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2437,7 +2469,7 @@ public async System.Threading.Tasks.Task> Update return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse))); // Return statement + (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse), merchantConfig)); // Return statement } } } diff --git a/Api/PurchaseAndRefundDetailsApi.cs b/Api/PurchaseAndRefundDetailsApi.cs index 0ecd8fa6..64339caa 100644 --- a/Api/PurchaseAndRefundDetailsApi.cs +++ b/Api/PurchaseAndRefundDetailsApi.cs @@ -376,7 +376,7 @@ public ApiResponse< ReportingV3PurchaseRefundDetailsGet200Response > GetPurchase } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPurchaseAndRefundDetails,GetPurchaseAndRefundDetailsAsync,GetPurchaseAndRefundDetailsWithHttpInfo,GetPurchaseAndRefundDetailsAsyncWithHttpInfo")) { try @@ -390,12 +390,14 @@ public ApiResponse< ReportingV3PurchaseRefundDetailsGet200Response > GetPurchase } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPurchaseAndRefundDetails,GetPurchaseAndRefundDetailsAsync,GetPurchaseAndRefundDetailsWithHttpInfo,GetPurchaseAndRefundDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -411,7 +413,7 @@ public ApiResponse< ReportingV3PurchaseRefundDetailsGet200Response > GetPurchase return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response))); // Return statement + (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response), merchantConfig)); // Return statement } /// @@ -550,7 +552,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response))); // Return statement + (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/PushFundsApi.cs b/Api/PushFundsApi.cs index 38eb1113..11bb26fa 100644 --- a/Api/PushFundsApi.cs +++ b/Api/PushFundsApi.cs @@ -378,7 +378,7 @@ public ApiResponse< PushFunds201Response > CreatePushFundsTransferWithHttpInfo ( } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo")) { try @@ -392,13 +392,15 @@ public ApiResponse< PushFunds201Response > CreatePushFundsTransferWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -414,7 +416,7 @@ public ApiResponse< PushFunds201Response > CreatePushFundsTransferWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response))); // Return statement + (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response), merchantConfig)); // Return statement } /// @@ -559,7 +561,7 @@ public async System.Threading.Tasks.Task> Crea } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo")) { try @@ -573,13 +575,15 @@ public async System.Threading.Tasks.Task> Crea } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -595,7 +599,7 @@ public async System.Threading.Tasks.Task> Crea return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response))); // Return statement + (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response), merchantConfig)); // Return statement } } } diff --git a/Api/RefundApi.cs b/Api/RefundApi.cs index 34f7a344..bb1f1d9d 100644 --- a/Api/RefundApi.cs +++ b/Api/RefundApi.cs @@ -345,7 +345,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundCaptureWithHttpIn } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RefundCapture,RefundCaptureAsync,RefundCaptureWithHttpInfo,RefundCaptureAsyncWithHttpInfo")) { try @@ -359,13 +359,15 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundCaptureWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RefundCapture,RefundCaptureAsync,RefundCaptureWithHttpInfo,RefundCaptureAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -381,7 +383,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundCaptureWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response), merchantConfig)); // Return statement } /// @@ -467,7 +469,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response), merchantConfig)); // Return statement } /// /// Refund a Payment Refund a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to refund the payment amount. @@ -587,7 +591,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundPaymentWithHttpIn } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RefundPayment,RefundPaymentAsync,RefundPaymentWithHttpInfo,RefundPaymentAsyncWithHttpInfo")) { try @@ -601,13 +605,15 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundPaymentWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RefundPayment,RefundPaymentAsync,RefundPaymentWithHttpInfo,RefundPaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -623,7 +629,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundPaymentWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response), merchantConfig)); // Return statement } /// @@ -709,7 +715,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/ReportDefinitionsApi.cs b/Api/ReportDefinitionsApi.cs index 356c036a..556ba449 100644 --- a/Api/ReportDefinitionsApi.cs +++ b/Api/ReportDefinitionsApi.cs @@ -370,7 +370,7 @@ public ApiResponse< ReportingV3ReportDefinitionsNameGet200Response > GetResource } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetResourceInfoByReportDefinition,GetResourceInfoByReportDefinitionAsync,GetResourceInfoByReportDefinitionWithHttpInfo,GetResourceInfoByReportDefinitionAsyncWithHttpInfo")) { try @@ -384,12 +384,14 @@ public ApiResponse< ReportingV3ReportDefinitionsNameGet200Response > GetResource } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetResourceInfoByReportDefinition,GetResourceInfoByReportDefinitionAsync,GetResourceInfoByReportDefinitionWithHttpInfo,GetResourceInfoByReportDefinitionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -405,7 +407,7 @@ public ApiResponse< ReportingV3ReportDefinitionsNameGet200Response > GetResource return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response))); // Return statement + (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response), merchantConfig)); // Return statement } /// @@ -508,7 +510,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response))); // Return statement + (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response), merchantConfig)); // Return statement } /// /// Get Reporting Resource Information View a list of supported reports and their attributes before subscribing to them. @@ -624,7 +628,7 @@ public ApiResponse< ReportingV3ReportDefinitionsGet200Response > GetResourceV2In } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetResourceV2Info,GetResourceV2InfoAsync,GetResourceV2InfoWithHttpInfo,GetResourceV2InfoAsyncWithHttpInfo")) { try @@ -638,12 +642,14 @@ public ApiResponse< ReportingV3ReportDefinitionsGet200Response > GetResourceV2In } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetResourceV2Info,GetResourceV2InfoAsync,GetResourceV2InfoWithHttpInfo,GetResourceV2InfoAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -659,7 +665,7 @@ public ApiResponse< ReportingV3ReportDefinitionsGet200Response > GetResourceV2In return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response))); // Return statement + (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response), merchantConfig)); // Return statement } /// @@ -742,7 +748,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response))); // Return statement + (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/ReportDownloadsApi.cs b/Api/ReportDownloadsApi.cs index 6b0dcc44..e55bfd0a 100644 --- a/Api/ReportDownloadsApi.cs +++ b/Api/ReportDownloadsApi.cs @@ -317,7 +317,7 @@ public ApiResponse DownloadReportWithHttpInfo (DateTime? reportDate, str } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo")) { try @@ -331,12 +331,14 @@ public ApiResponse DownloadReportWithHttpInfo (DateTime? reportDate, str } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -453,7 +455,7 @@ public async System.Threading.Tasks.Task> DownloadReportAsyn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo")) { try @@ -467,12 +469,14 @@ public async System.Threading.Tasks.Task> DownloadReportAsyn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/ReportSubscriptionsApi.cs b/Api/ReportSubscriptionsApi.cs index 8a656dcd..b57e290e 100644 --- a/Api/ReportSubscriptionsApi.cs +++ b/Api/ReportSubscriptionsApi.cs @@ -470,7 +470,7 @@ public ApiResponse CreateStandardOrClassicSubscriptionWithHttpInfo (Pred } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo")) { try @@ -484,13 +484,15 @@ public ApiResponse CreateStandardOrClassicSubscriptionWithHttpInfo (Pred } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -584,7 +586,7 @@ public async System.Threading.Tasks.Task> CreateStandardOrCl } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo")) { try @@ -598,13 +600,15 @@ public async System.Threading.Tasks.Task> CreateStandardOrCl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -696,7 +700,7 @@ public ApiResponse CreateSubscriptionWithHttpInfo (CreateReportSubscript } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -710,13 +714,15 @@ public ApiResponse CreateSubscriptionWithHttpInfo (CreateReportSubscript } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -810,7 +816,7 @@ public async System.Threading.Tasks.Task> CreateSubscription } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -824,13 +830,15 @@ public async System.Threading.Tasks.Task> CreateSubscription } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -931,7 +939,7 @@ public ApiResponse DeleteSubscriptionWithHttpInfo (string reportName, st } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo")) { try @@ -945,12 +953,14 @@ public ApiResponse DeleteSubscriptionWithHttpInfo (string reportName, st } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1053,7 +1063,7 @@ public async System.Threading.Tasks.Task> DeleteSubscription } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo")) { try @@ -1067,12 +1077,14 @@ public async System.Threading.Tasks.Task> DeleteSubscription } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1163,7 +1175,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200Response > GetAllSubscri } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo")) { try @@ -1177,12 +1189,14 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200Response > GetAllSubscri } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1198,7 +1212,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200Response > GetAllSubscri return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response))); // Return statement + (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response), merchantConfig)); // Return statement } /// @@ -1274,7 +1288,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response))); // Return statement + (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response), merchantConfig)); // Return statement } /// /// Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report's unique name. @@ -1396,7 +1412,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200ResponseSubscriptions > } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo")) { try @@ -1410,12 +1426,14 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200ResponseSubscriptions > } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1431,7 +1449,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200ResponseSubscriptions > return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions))); // Return statement + (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions), merchantConfig)); // Return statement } /// @@ -1520,7 +1538,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions))); // Return statement + (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions), merchantConfig)); // Return statement } } } diff --git a/Api/ReportsApi.cs b/Api/ReportsApi.cs index e1f18573..308da8f6 100644 --- a/Api/ReportsApi.cs +++ b/Api/ReportsApi.cs @@ -410,7 +410,7 @@ public ApiResponse CreateReportWithHttpInfo (CreateAdhocReportRequest cr } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo")) { try @@ -424,13 +424,15 @@ public ApiResponse CreateReportWithHttpInfo (CreateAdhocReportRequest cr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -524,7 +526,7 @@ public async System.Threading.Tasks.Task> CreateReportAsyncW } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo")) { try @@ -538,13 +540,15 @@ public async System.Threading.Tasks.Task> CreateReportAsyncW } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -649,7 +653,7 @@ public ApiResponse< ReportingV3ReportsIdGet200Response > GetReportByReportIdWith } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetReportByReportId,GetReportByReportIdAsync,GetReportByReportIdWithHttpInfo,GetReportByReportIdAsyncWithHttpInfo")) { try @@ -663,12 +667,14 @@ public ApiResponse< ReportingV3ReportsIdGet200Response > GetReportByReportIdWith } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetReportByReportId,GetReportByReportIdAsync,GetReportByReportIdWithHttpInfo,GetReportByReportIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -684,7 +690,7 @@ public ApiResponse< ReportingV3ReportsIdGet200Response > GetReportByReportIdWith return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response))); // Return statement + (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response), merchantConfig)); // Return statement } /// @@ -774,7 +780,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response))); // Return statement + (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response), merchantConfig)); // Return statement } /// /// Retrieve Available Reports Retrieve a list of the available reports to which you are subscribed. This will also give you the reportId value, which you can also use to download a report. @@ -957,7 +965,7 @@ public ApiResponse< ReportingV3ReportsGet200Response > SearchReportsWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SearchReports,SearchReportsAsync,SearchReportsWithHttpInfo,SearchReportsAsyncWithHttpInfo")) { try @@ -971,12 +979,14 @@ public ApiResponse< ReportingV3ReportsGet200Response > SearchReportsWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SearchReports,SearchReportsAsync,SearchReportsWithHttpInfo,SearchReportsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -992,7 +1002,7 @@ public ApiResponse< ReportingV3ReportsGet200Response > SearchReportsWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response))); // Return statement + (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response), merchantConfig)); // Return statement } /// @@ -1142,7 +1152,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response))); // Return statement + (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/RetrievalDetailsApi.cs b/Api/RetrievalDetailsApi.cs index 4f387eaf..92fd5ef8 100644 --- a/Api/RetrievalDetailsApi.cs +++ b/Api/RetrievalDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3RetrievalDetailsGet200Response > GetRetrievalDeta } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRetrievalDetails,GetRetrievalDetailsAsync,GetRetrievalDetailsWithHttpInfo,GetRetrievalDetailsAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3RetrievalDetailsGet200Response > GetRetrievalDeta } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRetrievalDetails,GetRetrievalDetailsAsync,GetRetrievalDetailsWithHttpInfo,GetRetrievalDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3RetrievalDetailsGet200Response > GetRetrievalDeta return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response))); // Return statement + (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response), merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response))); // Return statement + (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/RetrievalSummariesApi.cs b/Api/RetrievalSummariesApi.cs index 1d2eb8dc..ca47e7d9 100644 --- a/Api/RetrievalSummariesApi.cs +++ b/Api/RetrievalSummariesApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3RetrievalSummariesGet200Response > GetRetrievalSu } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRetrievalSummary,GetRetrievalSummaryAsync,GetRetrievalSummaryWithHttpInfo,GetRetrievalSummaryAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3RetrievalSummariesGet200Response > GetRetrievalSu } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRetrievalSummary,GetRetrievalSummaryAsync,GetRetrievalSummaryWithHttpInfo,GetRetrievalSummaryAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3RetrievalSummariesGet200Response > GetRetrievalSu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response))); // Return statement + (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response), merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response))); // Return statement + (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/ReversalApi.cs b/Api/ReversalApi.cs index 003f749c..b7b326ce 100644 --- a/Api/ReversalApi.cs +++ b/Api/ReversalApi.cs @@ -341,7 +341,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > AuthReversalWithHttp } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "AuthReversal,AuthReversalAsync,AuthReversalWithHttpInfo,AuthReversalAsyncWithHttpInfo")) { try @@ -355,13 +355,15 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > AuthReversalWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "AuthReversal,AuthReversalAsync,AuthReversalWithHttpInfo,AuthReversalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -377,7 +379,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > AuthReversalWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response), merchantConfig)); // Return statement } /// @@ -463,7 +465,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response), merchantConfig)); // Return statement } /// /// Timeout Reversal This is to reverse a previous payment that merchant does not receive a reply(Mostly due to Timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call and use same transactionId in this API request payload to reverse the payment. @@ -570,7 +574,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > MitReversalWithHttpI } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "MitReversal,MitReversalAsync,MitReversalWithHttpInfo,MitReversalAsyncWithHttpInfo")) { try @@ -584,13 +588,15 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > MitReversalWithHttpI } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "MitReversal,MitReversalAsync,MitReversalWithHttpInfo,MitReversalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -606,7 +612,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > MitReversalWithHttpI return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response), merchantConfig)); // Return statement } /// @@ -679,7 +685,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/SearchTransactionsApi.cs b/Api/SearchTransactionsApi.cs index 7adac639..b398bd2c 100644 --- a/Api/SearchTransactionsApi.cs +++ b/Api/SearchTransactionsApi.cs @@ -324,7 +324,7 @@ public ApiResponse< TssV2TransactionsPost201Response > CreateSearchWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSearch,CreateSearchAsync,CreateSearchWithHttpInfo,CreateSearchAsyncWithHttpInfo")) { try @@ -338,13 +338,15 @@ public ApiResponse< TssV2TransactionsPost201Response > CreateSearchWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSearch,CreateSearchAsync,CreateSearchWithHttpInfo,CreateSearchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -360,7 +362,7 @@ public ApiResponse< TssV2TransactionsPost201Response > CreateSearchWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response), merchantConfig)); // Return statement } /// @@ -433,7 +435,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response), merchantConfig)); // Return statement } /// /// Get Search Results Include the Search ID in the GET request to retrieve the search results. @@ -549,7 +553,7 @@ public ApiResponse< TssV2TransactionsPost201Response > GetSearchWithHttpInfo (st } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSearch,GetSearchAsync,GetSearchWithHttpInfo,GetSearchAsyncWithHttpInfo")) { try @@ -563,12 +567,14 @@ public ApiResponse< TssV2TransactionsPost201Response > GetSearchWithHttpInfo (st } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSearch,GetSearchAsync,GetSearchWithHttpInfo,GetSearchAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -584,7 +590,7 @@ public ApiResponse< TssV2TransactionsPost201Response > GetSearchWithHttpInfo (st return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response), merchantConfig)); // Return statement } /// @@ -666,7 +672,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/SecureFileShareApi.cs b/Api/SecureFileShareApi.cs index 9ea77bf5..1fef5723 100644 --- a/Api/SecureFileShareApi.cs +++ b/Api/SecureFileShareApi.cs @@ -355,7 +355,7 @@ public ApiResponse GetFileWithHttpInfo (string fileId, string organizati } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo")) { try @@ -369,12 +369,14 @@ public ApiResponse GetFileWithHttpInfo (string fileId, string organizati } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -479,7 +481,7 @@ public async System.Threading.Tasks.Task> GetFileAsyncWithHt } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo")) { try @@ -493,12 +495,14 @@ public async System.Threading.Tasks.Task> GetFileAsyncWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -622,7 +626,7 @@ public ApiResponse< V1FileDetailsGet200Response > GetFileDetailWithHttpInfo (Dat } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFileDetail,GetFileDetailAsync,GetFileDetailWithHttpInfo,GetFileDetailAsyncWithHttpInfo")) { try @@ -636,12 +640,14 @@ public ApiResponse< V1FileDetailsGet200Response > GetFileDetailWithHttpInfo (Dat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFileDetail,GetFileDetailAsync,GetFileDetailWithHttpInfo,GetFileDetailAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -657,7 +663,7 @@ public ApiResponse< V1FileDetailsGet200Response > GetFileDetailWithHttpInfo (Dat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response))); // Return statement + (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response), merchantConfig)); // Return statement } /// @@ -766,7 +772,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response))); // Return statement + (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/SubscriptionsApi.cs b/Api/SubscriptionsApi.cs index b5c5d901..0d0ffcd8 100644 --- a/Api/SubscriptionsApi.cs +++ b/Api/SubscriptionsApi.cs @@ -611,7 +611,7 @@ public ApiResponse< ActivateSubscriptionResponse > ActivateSubscriptionWithHttpI } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActivateSubscription,ActivateSubscriptionAsync,ActivateSubscriptionWithHttpInfo,ActivateSubscriptionAsyncWithHttpInfo")) { try @@ -625,12 +625,14 @@ public ApiResponse< ActivateSubscriptionResponse > ActivateSubscriptionWithHttpI } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActivateSubscription,ActivateSubscriptionAsync,ActivateSubscriptionWithHttpInfo,ActivateSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -646,7 +648,7 @@ public ApiResponse< ActivateSubscriptionResponse > ActivateSubscriptionWithHttpI return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse))); // Return statement + (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -738,7 +740,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse))); // Return statement + (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse), merchantConfig)); // Return statement } /// /// Cancel a Subscription Cancel a Subscription @@ -856,7 +860,7 @@ public ApiResponse< CancelSubscriptionResponse > CancelSubscriptionWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo")) { try @@ -870,12 +874,14 @@ public ApiResponse< CancelSubscriptionResponse > CancelSubscriptionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -891,7 +897,7 @@ public ApiResponse< CancelSubscriptionResponse > CancelSubscriptionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse))); // Return statement + (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -976,7 +982,7 @@ public async System.Threading.Tasks.Task } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo")) { try @@ -990,12 +996,14 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1011,7 +1019,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse))); // Return statement + (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse), merchantConfig)); // Return statement } /// /// Create a Subscription Create a Recurring Billing Subscription @@ -1085,7 +1093,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -1099,13 +1107,15 @@ public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1121,7 +1131,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -1197,7 +1207,7 @@ public async System.Threading.Tasks.Task } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -1211,13 +1221,15 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1233,7 +1245,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse), merchantConfig)); // Return statement } /// /// Get a List of Subscriptions Retrieve Subscriptions by Subscription Code & Subscription Status. @@ -1331,7 +1343,7 @@ public ApiResponse< GetAllSubscriptionsResponse > GetAllSubscriptionsWithHttpInf } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo")) { try @@ -1345,12 +1357,14 @@ public ApiResponse< GetAllSubscriptionsResponse > GetAllSubscriptionsWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1366,7 +1380,7 @@ public ApiResponse< GetAllSubscriptionsResponse > GetAllSubscriptionsWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse))); // Return statement + (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse), merchantConfig)); // Return statement } /// @@ -1466,7 +1480,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse))); // Return statement + (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse), merchantConfig)); // Return statement } /// /// Get a Subscription Get a Subscription by Subscription Id @@ -1584,7 +1600,7 @@ public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (strin } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo")) { try @@ -1598,12 +1614,14 @@ public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1619,7 +1637,7 @@ public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (strin return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse))); // Return statement + (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -1704,7 +1722,7 @@ public async System.Threading.Tasks.Task> G } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo")) { try @@ -1718,12 +1736,14 @@ public async System.Threading.Tasks.Task> G } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1739,7 +1759,7 @@ public async System.Threading.Tasks.Task> G return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse))); // Return statement + (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse), merchantConfig)); // Return statement } /// /// Get a Subscription Code Get a Unique Subscription Code @@ -1809,7 +1829,7 @@ public ApiResponse< GetSubscriptionCodeResponse > GetSubscriptionCodeWithHttpInf } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscriptionCode,GetSubscriptionCodeAsync,GetSubscriptionCodeWithHttpInfo,GetSubscriptionCodeAsyncWithHttpInfo")) { try @@ -1823,12 +1843,14 @@ public ApiResponse< GetSubscriptionCodeResponse > GetSubscriptionCodeWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscriptionCode,GetSubscriptionCodeAsync,GetSubscriptionCodeWithHttpInfo,GetSubscriptionCodeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1844,7 +1866,7 @@ public ApiResponse< GetSubscriptionCodeResponse > GetSubscriptionCodeWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse))); // Return statement + (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse), merchantConfig)); // Return statement } /// @@ -1916,7 +1938,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse))); // Return statement + (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse), merchantConfig)); // Return statement } /// /// Suspend a Subscription Suspend a Subscription @@ -2034,7 +2058,7 @@ public ApiResponse< SuspendSubscriptionResponse > SuspendSubscriptionWithHttpInf } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SuspendSubscription,SuspendSubscriptionAsync,SuspendSubscriptionWithHttpInfo,SuspendSubscriptionAsyncWithHttpInfo")) { try @@ -2048,12 +2072,14 @@ public ApiResponse< SuspendSubscriptionResponse > SuspendSubscriptionWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SuspendSubscription,SuspendSubscriptionAsync,SuspendSubscriptionWithHttpInfo,SuspendSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2069,7 +2095,7 @@ public ApiResponse< SuspendSubscriptionResponse > SuspendSubscriptionWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse))); // Return statement + (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -2154,7 +2180,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse))); // Return statement + (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse), merchantConfig)); // Return statement } /// /// Update a Subscription Update a Subscription by Subscription Id @@ -2276,7 +2304,7 @@ public ApiResponse< UpdateSubscriptionResponse > UpdateSubscriptionWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo")) { try @@ -2290,13 +2318,15 @@ public ApiResponse< UpdateSubscriptionResponse > UpdateSubscriptionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2312,7 +2342,7 @@ public ApiResponse< UpdateSubscriptionResponse > UpdateSubscriptionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse))); // Return statement + (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -2401,7 +2431,7 @@ public async System.Threading.Tasks.Task } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo")) { try @@ -2415,13 +2445,15 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2437,7 +2469,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse))); // Return statement + (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse), merchantConfig)); // Return statement } } } diff --git a/Api/SubscriptionsFollowOnsApi.cs b/Api/SubscriptionsFollowOnsApi.cs index 164fb5aa..6dc4bd89 100644 --- a/Api/SubscriptionsFollowOnsApi.cs +++ b/Api/SubscriptionsFollowOnsApi.cs @@ -344,7 +344,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateFollowOnSubscriptionWithH } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -358,13 +358,15 @@ public ApiResponse< CreateSubscriptionResponse > CreateFollowOnSubscriptionWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -380,7 +382,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateFollowOnSubscriptionWithH return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse), merchantConfig)); // Return statement } /// @@ -469,7 +471,7 @@ public async System.Threading.Tasks.Task } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -483,13 +485,15 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -505,7 +509,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse), merchantConfig)); // Return statement } /// /// Get a Follow-On Subscription Get details of the Subscription being created based on the Request Id of an existing successful Transaction. @@ -588,7 +592,7 @@ public ApiResponse< GetSubscriptionResponse1 > GetFollowOnSubscriptionWithHttpIn } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -602,12 +606,14 @@ public ApiResponse< GetSubscriptionResponse1 > GetFollowOnSubscriptionWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -623,7 +629,7 @@ public ApiResponse< GetSubscriptionResponse1 > GetFollowOnSubscriptionWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1))); // Return statement + (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1), merchantConfig)); // Return statement } /// @@ -708,7 +714,7 @@ public async System.Threading.Tasks.Task> } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -722,12 +728,14 @@ public async System.Threading.Tasks.Task> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -743,7 +751,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1))); // Return statement + (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1), merchantConfig)); // Return statement } } } diff --git a/Api/TaxesApi.cs b/Api/TaxesApi.cs index 53990f2d..9e26b621 100644 --- a/Api/TaxesApi.cs +++ b/Api/TaxesApi.cs @@ -328,7 +328,7 @@ public ApiResponse< VasV2PaymentsPost201Response > CalculateTaxWithHttpInfo (Tax } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CalculateTax,CalculateTaxAsync,CalculateTaxWithHttpInfo,CalculateTaxAsyncWithHttpInfo")) { try @@ -342,13 +342,15 @@ public ApiResponse< VasV2PaymentsPost201Response > CalculateTaxWithHttpInfo (Tax } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CalculateTax,CalculateTaxAsync,CalculateTaxWithHttpInfo,CalculateTaxAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -364,7 +366,7 @@ public ApiResponse< VasV2PaymentsPost201Response > CalculateTaxWithHttpInfo (Tax return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response))); // Return statement + (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response), merchantConfig)); // Return statement } /// @@ -437,7 +439,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response))); // Return statement + (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response), merchantConfig)); // Return statement } /// /// Void Taxes Pass the Tax Request ID in the PATCH request to void the committed tax calculation. @@ -557,7 +561,7 @@ public ApiResponse< VasV2TaxVoid200Response > VoidTaxWithHttpInfo (VoidTaxReques } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo")) { try @@ -571,13 +575,15 @@ public ApiResponse< VasV2TaxVoid200Response > VoidTaxWithHttpInfo (VoidTaxReques } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -593,7 +599,7 @@ public ApiResponse< VasV2TaxVoid200Response > VoidTaxWithHttpInfo (VoidTaxReques return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response))); // Return statement + (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response), merchantConfig)); // Return statement } /// @@ -679,7 +685,7 @@ public async System.Threading.Tasks.Task> V } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo")) { try @@ -693,13 +699,15 @@ public async System.Threading.Tasks.Task> V } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -715,7 +723,7 @@ public async System.Threading.Tasks.Task> V return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response))); // Return statement + (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response), merchantConfig)); // Return statement } } } diff --git a/Api/TokenApi.cs b/Api/TokenApi.cs index 146d6353..dd12584c 100644 --- a/Api/TokenApi.cs +++ b/Api/TokenApi.cs @@ -375,7 +375,7 @@ public ApiResponse< InlineResponse200 > GetCardArtAssetWithHttpInfo (string inst } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo")) { try @@ -389,12 +389,14 @@ public ApiResponse< InlineResponse200 > GetCardArtAssetWithHttpInfo (string inst } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -410,7 +412,7 @@ public ApiResponse< InlineResponse200 > GetCardArtAssetWithHttpInfo (string inst return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); // Return statement + (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200), merchantConfig)); // Return statement } /// @@ -518,7 +520,7 @@ public async System.Threading.Tasks.Task> GetCard } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo")) { try @@ -532,12 +534,14 @@ public async System.Threading.Tasks.Task> GetCard } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -553,7 +557,7 @@ public async System.Threading.Tasks.Task> GetCard return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); // Return statement + (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200), merchantConfig)); // Return statement } /// /// Generate Payment Credentials for a TMS Token | | | | | - -- | - -- | - -- | |**Token**<br>A Token can represent your tokenized Customer, Payment Instrument or Instrument Identifier information.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Credentials**<br>Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.<br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument or Instrument Identifier. @@ -643,7 +647,7 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo")) { try @@ -657,13 +661,15 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -679,7 +685,7 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// @@ -771,7 +777,7 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo")) { try @@ -785,13 +791,15 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -807,7 +815,7 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/Api/TokenizedCardApi.cs b/Api/TokenizedCardApi.cs index 09e3236d..d59f68cf 100644 --- a/Api/TokenizedCardApi.cs +++ b/Api/TokenizedCardApi.cs @@ -440,7 +440,7 @@ public ApiResponse DeleteTokenizedCardWithHttpInfo (string tokenizedCard } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo")) { try @@ -454,12 +454,14 @@ public ApiResponse DeleteTokenizedCardWithHttpInfo (string tokenizedCard } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -561,7 +563,7 @@ public async System.Threading.Tasks.Task> DeleteTokenizedCar } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo")) { try @@ -575,12 +577,14 @@ public async System.Threading.Tasks.Task> DeleteTokenizedCar } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -683,7 +687,7 @@ public ApiResponse< TokenizedcardRequest > GetTokenizedCardWithHttpInfo (string } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo")) { try @@ -697,12 +701,14 @@ public ApiResponse< TokenizedcardRequest > GetTokenizedCardWithHttpInfo (string } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -718,7 +724,7 @@ public ApiResponse< TokenizedcardRequest > GetTokenizedCardWithHttpInfo (string return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest), merchantConfig)); // Return statement } /// @@ -806,7 +812,7 @@ public async System.Threading.Tasks.Task> GetT } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo")) { try @@ -820,12 +826,14 @@ public async System.Threading.Tasks.Task> GetT } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -841,7 +849,7 @@ public async System.Threading.Tasks.Task> GetT return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest), merchantConfig)); // Return statement } /// /// Simulate Issuer Life Cycle Management Events **Lifecycle Management Events**<br>Simulates an issuer life cycle manegement event for updates on the tokenized card. The events that can be simulated are: - Token status changes (e.g. active, suspended, deleted) - Updates to the underlying card, including card art changes, expiration date changes, and card number suffix. **Note:** This is only available in CAS environment. @@ -1180,7 +1188,7 @@ public ApiResponse< TokenizedcardRequest > PostTokenizedCardWithHttpInfo (Tokeni } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo")) { try @@ -1194,13 +1202,15 @@ public ApiResponse< TokenizedcardRequest > PostTokenizedCardWithHttpInfo (Tokeni } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1216,7 +1226,7 @@ public ApiResponse< TokenizedcardRequest > PostTokenizedCardWithHttpInfo (Tokeni return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest), merchantConfig)); // Return statement } /// @@ -1295,7 +1305,7 @@ public async System.Threading.Tasks.Task> Post } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo")) { try @@ -1309,13 +1319,15 @@ public async System.Threading.Tasks.Task> Post } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1331,7 +1343,7 @@ public async System.Threading.Tasks.Task> Post return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest), merchantConfig)); // Return statement } } } diff --git a/Api/TransactionBatchesApi.cs b/Api/TransactionBatchesApi.cs index e3115d36..41c12f60 100644 --- a/Api/TransactionBatchesApi.cs +++ b/Api/TransactionBatchesApi.cs @@ -442,7 +442,7 @@ public ApiResponse GetTransactionBatchDetailsWithHttpInfo (string id, Da } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo")) { try @@ -456,12 +456,14 @@ public ApiResponse GetTransactionBatchDetailsWithHttpInfo (string id, Da } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -573,7 +575,7 @@ public async System.Threading.Tasks.Task> GetTransactionBatc } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo")) { try @@ -587,12 +589,14 @@ public async System.Threading.Tasks.Task> GetTransactionBatc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -689,7 +693,7 @@ public ApiResponse< PtsV1TransactionBatchesIdGet200Response > GetTransactionBatc } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatchId,GetTransactionBatchIdAsync,GetTransactionBatchIdWithHttpInfo,GetTransactionBatchIdAsyncWithHttpInfo")) { try @@ -703,12 +707,14 @@ public ApiResponse< PtsV1TransactionBatchesIdGet200Response > GetTransactionBatc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatchId,GetTransactionBatchIdAsync,GetTransactionBatchIdWithHttpInfo,GetTransactionBatchIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -724,7 +730,7 @@ public ApiResponse< PtsV1TransactionBatchesIdGet200Response > GetTransactionBatc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response))); // Return statement + (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response), merchantConfig)); // Return statement } /// @@ -806,7 +812,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response))); // Return statement + (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response), merchantConfig)); // Return statement } /// /// Get a List of Batch Files Provide the date and time search range to get a list of Batch Files ready for settlement @@ -934,7 +942,7 @@ public ApiResponse< PtsV1TransactionBatchesGet200Response > GetTransactionBatche } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatches,GetTransactionBatchesAsync,GetTransactionBatchesWithHttpInfo,GetTransactionBatchesAsyncWithHttpInfo")) { try @@ -948,12 +956,14 @@ public ApiResponse< PtsV1TransactionBatchesGet200Response > GetTransactionBatche } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatches,GetTransactionBatchesAsync,GetTransactionBatchesWithHttpInfo,GetTransactionBatchesAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -969,7 +979,7 @@ public ApiResponse< PtsV1TransactionBatchesGet200Response > GetTransactionBatche return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response))); // Return statement + (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response), merchantConfig)); // Return statement } /// @@ -1064,7 +1074,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response))); // Return statement + (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response), merchantConfig)); // Return statement } /// /// Upload a Batch File This endpoint enables the upload of a batch file containing transactions for processing. @@ -1175,7 +1187,7 @@ public ApiResponse UploadTransactionBatchWithHttpInfo (System.IO.Stream } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo")) { try @@ -1189,12 +1201,14 @@ public ApiResponse UploadTransactionBatchWithHttpInfo (System.IO.Stream } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1289,7 +1303,7 @@ public async System.Threading.Tasks.Task> UploadTransactionB } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo")) { try @@ -1303,12 +1317,14 @@ public async System.Threading.Tasks.Task> UploadTransactionB } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/TransactionDetailsApi.cs b/Api/TransactionDetailsApi.cs index 39bf2d89..10751f7d 100644 --- a/Api/TransactionDetailsApi.cs +++ b/Api/TransactionDetailsApi.cs @@ -291,7 +291,7 @@ public ApiResponse< TssV2TransactionsGet200Response > GetTransactionWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransaction,GetTransactionAsync,GetTransactionWithHttpInfo,GetTransactionAsyncWithHttpInfo")) { try @@ -305,12 +305,14 @@ public ApiResponse< TssV2TransactionsGet200Response > GetTransactionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransaction,GetTransactionAsync,GetTransactionWithHttpInfo,GetTransactionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -326,7 +328,7 @@ public ApiResponse< TssV2TransactionsGet200Response > GetTransactionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response))); // Return statement + (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response), merchantConfig)); // Return statement } /// @@ -408,7 +410,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response))); // Return statement + (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/TransientTokenDataApi.cs b/Api/TransientTokenDataApi.cs index d819b630..49da0568 100644 --- a/Api/TransientTokenDataApi.cs +++ b/Api/TransientTokenDataApi.cs @@ -332,7 +332,7 @@ public ApiResponse< string > GetPaymentCredentialsForTransientTokenWithHttpInfo } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo")) { try @@ -346,12 +346,14 @@ public ApiResponse< string > GetPaymentCredentialsForTransientTokenWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -367,7 +369,7 @@ public ApiResponse< string > GetPaymentCredentialsForTransientTokenWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// @@ -449,7 +451,7 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo")) { try @@ -463,12 +465,14 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -484,7 +488,7 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// /// Get Transient Token Data Retrieve the data captured by Unified Checkout. This API is used to retrieve the detailed data represented by the Transient Token. This API will not return PCI payment data (PAN). Include the Request ID in the GET request to retrieve the transaction details. @@ -561,7 +565,7 @@ public ApiResponse GetTransactionForTransientTokenWithHttpInfo (string t } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo")) { try @@ -575,12 +579,14 @@ public ApiResponse GetTransactionForTransientTokenWithHttpInfo (string t } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -676,7 +682,7 @@ public async System.Threading.Tasks.Task> GetTransactionForT } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo")) { try @@ -690,12 +696,14 @@ public async System.Threading.Tasks.Task> GetTransactionForT } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/Api/UnifiedCheckoutCaptureContextApi.cs b/Api/UnifiedCheckoutCaptureContextApi.cs index c60b05ed..ca6c5eb6 100644 --- a/Api/UnifiedCheckoutCaptureContextApi.cs +++ b/Api/UnifiedCheckoutCaptureContextApi.cs @@ -282,7 +282,7 @@ public ApiResponse< string > GenerateUnifiedCheckoutCaptureContextWithHttpInfo ( } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< string > GenerateUnifiedCheckoutCaptureContextWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< string > GenerateUnifiedCheckoutCaptureContextWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/Api/UserManagementApi.cs b/Api/UserManagementApi.cs index fe2e3c0e..ff29ce7b 100644 --- a/Api/UserManagementApi.cs +++ b/Api/UserManagementApi.cs @@ -318,7 +318,7 @@ public ApiResponse< UmsV1UsersGet200Response > GetUsersWithHttpInfo (string orga } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo")) { try @@ -332,12 +332,14 @@ public ApiResponse< UmsV1UsersGet200Response > GetUsersWithHttpInfo (string orga } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -353,7 +355,7 @@ public ApiResponse< UmsV1UsersGet200Response > GetUsersWithHttpInfo (string orga return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response), merchantConfig)); // Return statement } /// @@ -450,7 +452,7 @@ public async System.Threading.Tasks.Task> } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo")) { try @@ -464,12 +466,14 @@ public async System.Threading.Tasks.Task> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -485,7 +489,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/UserManagementSearchApi.cs b/Api/UserManagementSearchApi.cs index 6ae90ad7..a0edbbc1 100644 --- a/Api/UserManagementSearchApi.cs +++ b/Api/UserManagementSearchApi.cs @@ -282,7 +282,7 @@ public ApiResponse< UmsV1UsersGet200Response > SearchUsersWithHttpInfo (SearchRe } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< UmsV1UsersGet200Response > SearchUsersWithHttpInfo (SearchRe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< UmsV1UsersGet200Response > SearchUsersWithHttpInfo (SearchRe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response), merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response), merchantConfig)); // Return statement } } } diff --git a/Api/VerificationApi.cs b/Api/VerificationApi.cs index 8c7b9fe6..70fb89c3 100644 --- a/Api/VerificationApi.cs +++ b/Api/VerificationApi.cs @@ -324,7 +324,7 @@ public ApiResponse< RiskV1ExportComplianceInquiriesPost201Response > ValidateExp } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ValidateExportCompliance,ValidateExportComplianceAsync,ValidateExportComplianceWithHttpInfo,ValidateExportComplianceAsyncWithHttpInfo")) { try @@ -338,13 +338,15 @@ public ApiResponse< RiskV1ExportComplianceInquiriesPost201Response > ValidateExp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ValidateExportCompliance,ValidateExportComplianceAsync,ValidateExportComplianceWithHttpInfo,ValidateExportComplianceAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -360,7 +362,7 @@ public ApiResponse< RiskV1ExportComplianceInquiriesPost201Response > ValidateExp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response))); // Return statement + (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response), merchantConfig)); // Return statement } /// @@ -433,7 +435,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response))); // Return statement + (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response), merchantConfig)); // Return statement } /// /// Verify customer address This call verifies that the customer address submitted is valid. @@ -540,7 +544,7 @@ public ApiResponse< RiskV1AddressVerificationsPost201Response > VerifyCustomerAd } String inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VerifyCustomerAddress,VerifyCustomerAddressAsync,VerifyCustomerAddressWithHttpInfo,VerifyCustomerAddressAsyncWithHttpInfo")) { try @@ -554,13 +558,15 @@ public ApiResponse< RiskV1AddressVerificationsPost201Response > VerifyCustomerAd } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VerifyCustomerAddress,VerifyCustomerAddressAsync,VerifyCustomerAddressWithHttpInfo,VerifyCustomerAddressAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -576,7 +582,7 @@ public ApiResponse< RiskV1AddressVerificationsPost201Response > VerifyCustomerAd return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response))); // Return statement + (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response), merchantConfig)); // Return statement } /// @@ -649,7 +655,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response))); // Return statement + (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Api/VoidApi.cs b/Api/VoidApi.cs index 4d7a93b5..903e03e9 100644 --- a/Api/VoidApi.cs +++ b/Api/VoidApi.cs @@ -466,7 +466,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > MitVoidWithHttpInfo (Mit } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "MitVoid,MitVoidAsync,MitVoidWithHttpInfo,MitVoidAsyncWithHttpInfo")) { try @@ -480,13 +480,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > MitVoidWithHttpInfo (Mit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "MitVoid,MitVoidAsync,MitVoidWithHttpInfo,MitVoidAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -502,7 +504,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > MitVoidWithHttpInfo (Mit return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// @@ -575,7 +577,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Capture Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture. @@ -695,7 +699,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCaptureWithHttpInfo } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidCapture,VoidCaptureAsync,VoidCaptureWithHttpInfo,VoidCaptureAsyncWithHttpInfo")) { try @@ -709,13 +713,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCaptureWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidCapture,VoidCaptureAsync,VoidCaptureWithHttpInfo,VoidCaptureAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -731,7 +737,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCaptureWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// @@ -817,7 +823,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Credit Include the credit ID in the POST request to cancel the credit. @@ -937,7 +945,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCreditWithHttpInfo ( } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidCredit,VoidCreditAsync,VoidCreditWithHttpInfo,VoidCreditAsyncWithHttpInfo")) { try @@ -951,13 +959,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCreditWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidCredit,VoidCreditAsync,VoidCreditWithHttpInfo,VoidCreditAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -973,7 +983,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCreditWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// @@ -1059,7 +1069,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Payment Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment. @@ -1179,7 +1191,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidPaymentWithHttpInfo } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidPayment,VoidPaymentAsync,VoidPaymentWithHttpInfo,VoidPaymentAsyncWithHttpInfo")) { try @@ -1193,13 +1205,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidPaymentWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidPayment,VoidPaymentAsync,VoidPaymentWithHttpInfo,VoidPaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1215,7 +1229,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidPaymentWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// @@ -1301,7 +1315,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Refund Include the refund ID in the POST request to cancel the refund. @@ -1421,7 +1437,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidRefundWithHttpInfo ( } String inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidRefund,VoidRefundAsync,VoidRefundWithHttpInfo,VoidRefundAsyncWithHttpInfo")) { try @@ -1435,13 +1451,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidRefundWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidRefund,VoidRefundAsync,VoidRefundWithHttpInfo,VoidRefundAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1457,7 +1475,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidRefundWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// @@ -1543,7 +1561,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } } } diff --git a/Client/ApiClient.cs b/Client/ApiClient.cs index 8ab61a6b..bef3fc64 100644 --- a/Client/ApiClient.cs +++ b/Client/ApiClient.cs @@ -187,7 +187,7 @@ private RestRequest PrepareRequest( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //1.set in the defaultHeaders of configuration @@ -231,11 +231,11 @@ private RestRequest PrepareRequest( if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path, isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(), isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -318,7 +318,7 @@ public object CallApi( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //declared separately to handle both regular call and download file calls int httpResponseStatusCode; @@ -340,9 +340,9 @@ public object CallApi( //check if the Response is to be downloaded as a file, this value to be set by the calling API class var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType, isResponseMLEForApi); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); @@ -484,13 +484,13 @@ public async System.Threading.Tasks.Task CallApiAsync( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { LogUtility logUtility = new LogUtility(); var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType, isResponseMLEForApi); // Logging Request Headers var headerPrintOutput = new StringBuilder(); @@ -504,7 +504,7 @@ public async System.Threading.Tasks.Task CallApiAsync( logger.Debug($"HTTP Request Headers :\n{logUtility.MaskSensitiveData(headerPrintOutput.ToString())}"); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); @@ -607,7 +607,7 @@ public string ParameterToString(object obj) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type) // CHANGED + public object Deserialize(RestResponse response, Type type, MerchantConfig merchantConfig) // CHANGED { IList headers = response.Headers.ToList(); if (type == typeof(byte[])) // return byte array @@ -629,8 +629,16 @@ public object Deserialize(RestResponse response, Type type) // CHANGED if (match.Success) { string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); + try + { + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + catch (Exception ex) + { + logger.Error($"Error writing file '{fileName}': {ex.Message}"); + throw new Exception($"Error writing file '{fileName}': {ex.Message}"); + } } } } @@ -643,6 +651,28 @@ public object Deserialize(RestResponse response, Type type) // CHANGED return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); } + // check if Response MLE is enabled, then decrypt the response content and then deserialize + if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) + { + if (merchantConfig == null) + { + throw new ApiException((int)response.StatusCode, "merchantConfig cannot be null when decrypting MLE encrypted response."); + } + + // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block + try + { + // Decrypt the MLE encrypted response payload using the merchant configuration + var decryptedContent = MLEUtility.DecryptMleResponsePayload(merchantConfig, response.Content); + response.Content = decryptedContent; + } + catch (Exception e) + { + logger.Error($"MLE Encrypted Response Decryption Error Occurred. Error: {e.Message}"); + throw new ApiException((int)response.StatusCode, e.Message); + } + } + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type { return ConvertType(response.Content, type); @@ -829,12 +859,12 @@ public static string SanitizeFilename(string filename) /// GET/POST/PUT/PATCH/DELETE /// Resource Path /// Request Payload - public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null) + public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null, bool isResponseMLEForApi = false) { requestTarget = Uri.EscapeUriString(requestTarget); var merchantConfig = Configuration.MerchantConfigDictionaryObj != null - ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj) + ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj,Configuration.MapToControlMLEonAPI,Configuration.ResponseMlePrivateKey) : new MerchantConfig(); merchantConfig.RequestType = requestType; @@ -849,7 +879,7 @@ public void CallAuthenticationHeaders(string requestType, string requestTarget, if (merchantConfig.IsJwtTokenAuthType) { //generate token and set JWT token headers - var jwtToken = authorize.GetToken(); + var jwtToken = authorize.GetToken(isResponseMLEForApi); authenticationHeaders.Add("Authorization", jwtToken.BearerToken); } else if (merchantConfig.IsHttpSignAuthType) diff --git a/Client/Configuration.cs b/Client/Configuration.cs index c4e0352d..9ce73db4 100644 --- a/Client/Configuration.cs +++ b/Client/Configuration.cs @@ -15,6 +15,7 @@ using System.Linq; using System.Text; using System.Net; +using System.Security.Cryptography; namespace CyberSource.Client { @@ -50,7 +51,8 @@ public Configuration(ApiClient apiClient = null, int timeout = 100000, string userAgent = "Swagger-Codegen/1.0.0/csharp", IReadOnlyDictionary merchConfigDictObj = null, - Dictionary mapToControlMLEonAPI = null + Dictionary mapToControlMLEonAPI = null, + AsymmetricAlgorithm responseMlePrivateKey = null ) { Username = username; @@ -107,6 +109,7 @@ public Configuration(ApiClient apiClient = null, DateTimeFormat = dateTimeFormat; MerchantConfigDictionaryObj = merchConfigDictObj; MapToControlMLEonAPI = mapToControlMLEonAPI; + ResponseMlePrivateKey = responseMlePrivateKey; SetApiClientUsingDefault(apiClient); } @@ -204,7 +207,9 @@ public void SetApiClientUsingDefault (ApiClient apiClient = null) /// public Dictionary DefaultHeader { get; set; } = new Dictionary(); - public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + + public AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } = null; /// /// Add default header. diff --git a/MLE.md b/MLE.md index c7b25ac7..55a63dc0 100644 --- a/MLE.md +++ b/MLE.md @@ -4,111 +4,522 @@ This feature provides an implementation of Message Level Encryption (MLE) for APIs provided by CyberSource, integrated within our SDK. This feature ensures secure communication by encrypting messages at the application level before they are sent over the network. +MLE supports both **Request Encryption** (encrypting outgoing request payloads) and **Response Decryption** (decrypting incoming response payloads). + +## Authentication Requirements + +- **Request MLE**: Only supported with `JWT (JSON Web Token)` authentication type +- **Response MLE**: Only supported with `JWT (JSON Web Token)` authentication type + +
+ ## Configuration -### Global MLE Configuration +## 1. Request MLE Configuration + +#### 1.1 Global Request MLE Configuration -In the `merchantConfig` object, set the `useMLEGlobally` variable to enable or disable MLE for all supported APIs for the Rest SDK. +Configure global settings for request MLE using these properties in your `merchantConfig`: -- **Variable**: `useMLEGlobally` -- **Type**: `boolean` +##### (i) Primary Configuration + +- **Variable**: `enableRequestMLEForOptionalApisGlobally` +- **Type**: `bool` - **Default**: `false` -- **Description**: Enables MLE globally for all APIs when set to `true`. If set to `true`, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by `mapToControlMLEonAPI`. +- **Description**: Enables request MLE globally for all APIs that have optional MLE support when set to `true`. -### API-level MLE Control +--- -Optionally, you can control the MLE feature at the API level using the `mapToControlMLEonAPI` variable in the `merchantConfig` object. +##### (ii) Deprecated Configuration (Backward Compatibility) -- **Variable**: `mapToControlMLEonAPI` -- **Type**: `Dictionary` -- **Description**: Overrides the global MLE setting for specific APIs. The key is the function name of the API in the SDK, and the value is a boolean indicating whether MLE should be enabled (`true`) or disabled (`false`) for that specific API call. +- **Variable**: `useMLEGlobally` ⚠️ **DEPRECATED** +- **Type**: `bool` +- **Default**: `false` +- **Description**: **DEPRECATED** - Use `enableRequestMLEForOptionalApisGlobally` instead. This field is maintained for backward compatibility and will be used as an alias for `enableRequestMLEForOptionalApisGlobally`. + +--- + +##### (iii) Advanced Configuration + +- **Variable**: `disableRequestMLEForMandatoryApisGlobally` +- **Type**: `bool` +- **Default**: `false` +- **Description**: Disables request MLE for APIs that have mandatory MLE requirement when set to `true`. + +--- + +#### 1.2 Request MLE Certificate Configuration [Optional Params] + +##### (i) Certificate File Path (Optional) + +- **Variable**: `mleForRequestPublicCertPath` +- **Type**: `string` +- **Optional**: `true` +- **Description**: Path to the public certificate file used for request encryption. Supported formats: `.pem`, `.crt`. + - **Note**: This parameter is optional when using JWT authentication. If not provided, the request MLE certificate will be automatically fetched from the JWT authentication P12 file using the `requestMleKeyAlias`. + +--- -### MLE Key Alias +##### (ii) Key Alias Configuration (Optional) -Another optional parameter for MLE is `mleKeyAlias`, which specifies the key alias used to retrieve the MLE certificate from the JWT P12 file. +- **Variable**: `requestMleKeyAlias` +- **Type**: `string` +- **Optional**: `true` +- **Default**: `CyberSource_SJC_US` +- **Description**: Key alias used to retrieve the MLE certificate from the certificate file. When `mleForRequestPublicCertPath` is not provided, this alias is used to fetch the certificate from the JWT authentication P12 file. If not specified, the SDK will automatically use the default value `CyberSource_SJC_US`. + +--- -- **Variable**: `mleKeyAlias` +##### (iii) Deprecated Key Alias (Backward Compatibility) (Optional) + +- **Variable**: `mleKeyAlias` ⚠️ **DEPRECATED** - **Type**: `string` +- **Optional**: `true` - **Default**: `CyberSource_SJC_US` -- **Description**: By default, CyberSource uses the `CyberSource_SJC_US` public certificate to encrypt the payload. However, users can override this default value by setting their own key alias. - -## Notes -- If `useMLEGlobally` is set to true, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by mapToControlMLEonAPI. -- If `mapToControlMLEonAPI` is not provided or does not contain a specific API function name, the global useMLEGlobally setting will be applied. -- The `mleKeyAlias` parameter is optional and defaults to CyberSource_SJC_US if not specified by the user. Users can override this default value by setting their own key alias. - -## Example Configuration - - private readonly Dictionary _configurationDictionary = new Dictionary(); - - public Dictionary GetConfiguration() - { - _configurationDictionary.Add("authenticationType", "JWT"); - _configurationDictionary.Add("useMLEGlobally", "true"); //globally MLE will be enabled for all the MLE supported APIs by Cybs in SDK - _configurationDictionary.Add("mleKeyAlias", "CyberSource_SJC_US"); //this is optional paramter, not required to set the parameter/value if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - //other properties - } - -Or - - private readonly Dictionary _configurationDictionary = new Dictionary(); - private readonly Dictionary _configurationDictionaryforMLE = new Dictionary(); - - public Dictionary GetMapToControlMLE() - { - _configurationDictionaryforMLE.Add("CreatePayment", true); //CreatePayment function will have MLE=true i.e. (/pts/v2/payments POST API) - _configurationDictionaryforMLE.Add("CapturePayment", false); //capturePayment function will have MLE=false i.e. (/pts/v2/payments/{id}/captures POST API) - - return _configurationDictionaryforMLE; - } - - public Dictionary GetConfiguration() - { - _configurationDictionary.Add("authenticationType", "JWT"); - _configurationDictionary.Add("useMLEGlobally", "true"); //globally MLE will be enabled for all the MLE supported APIs by Cybs in SDK except the APIs marked false in GetMapToControlMLE. - _configurationDictionary.Add("mleKeyAlias", "CyberSource_SJC_US"); //this is optional paramter, not required to set the parameter/value if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - //other properties - } - -Or - - private readonly Dictionary _configurationDictionary = new Dictionary(); - private readonly Dictionary _configurationDictionaryforMLE = new Dictionary(); - - public Dictionary GetMapToControlMLE() - { - _configurationDictionaryforMLE.Add("CreatePayment", true); //CreatePayment function will have MLE=true i.e. (/pts/v2/payments POST API) - _configurationDictionaryforMLE.Add("CapturePayment", false); //capturePayment function will have MLE=false i.e. (/pts/v2/payments/{id}/captures POST API) - - return _configurationDictionaryforMLE; - } - - public Dictionary GetConfiguration() - { - _configurationDictionary.Add("authenticationType", "JWT"); - _configurationDictionary.Add("useMLEGlobally", "false"); //globally MLE will be disabled for all the MLE supported APIs by Cybs in SDK, the APIs marked true in GetMapToControlMLE will only have MLE enabled. - _configurationDictionary.Add("mleKeyAlias", "CyberSource_SJC_US"); //this is optional paramter, not required to set the parameter/value if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - //other properties - } - -In the above examples: -- MLE is enabled/disabled globally (`useMLEGlobally` is true/false). -- `apiFunctionName1` i.e. (CapturePayment) will have MLE disabled/enabled based on value provided. -- `apiFunctionName2` i.e. (CreatePayment) will have MLE enabled. -- `mleKeyAlias` is set to `Custom_Key_Alias`, overriding the default value. - -Please refer given link for sample codes with MLE: -https://github.com/CyberSource/cybersource-rest-samples-csharp/tree/master/Source/Samples/MLEFeature - -## Additional Information - -### API Support -- MLE is initially designed to support a few APIs. -- It can be extended to support more APIs in the future based on requirements and updates. -### Authentication Type -- MLE is only supported with `JWT (JSON Web Token)` authentication type within the SDK. -### Using the SDK -To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization. - -## Contact +- **Description**: **DEPRECATED** - Use `requestMleKeyAlias` instead. This field is maintained for backward compatibility and will be used as an alias for `requestMleKeyAlias`. + +
+ +## 2. Response MLE Configuration + +#### 2.1 Global Response MLE Configuration + +- **Variable**: `enableResponseMleGlobally` +- **Type**: `bool` +- **Default**: `false` +- **Description**: Enables response MLE globally for all APIs that support MLE responses when set to `true`. + +---- + +#### 2.2 Response MLE Private Key Configuration + +##### (i) Option 1: Provide Private Key Object + +- **Variable**: `responseMlePrivateKey` +- **Type**: `AsymmetricAlgorithm` +- **Description**: Direct private key object for response decryption. + +--- + +##### (ii) Option 2: Provide Private Key File Path + +- **Variable**: `responseMlePrivateKeyFilePath` +- **Type**: `string` +- **Description**: Path to the private key file. Supported formats: `.p12`, `.pfx`, `.pem`, `.key`, `.p8`. Recommendation use encrypted private Key (password protection) for MLE response. + +--- + +##### (iii) Private Key File Password + +- **Variable**: `responseMlePrivateKeyFilePassword` +- **Type**: `String` +- **Description**: Password for the private key file (required for `.p12/.pfx` files or encrypted private keys). + +--- + +#### 2.3 Response MLE Additional Configuration + +- **Variable**: `responseMleKID` +- **Type**: `string` +- **Required**: `true` (when response MLE is enabled) +- **Description**: Key ID value for the MLE response certificate (provided in merchant portal). + +
+ +## 3. API-level MLE Control for Request and Response MLE + +### Dictionary Configuration + +- **Variable**: `mapToControlMLEonAPI` +- **Type**: `Dictionary` +- **Description**: Overrides global MLE settings for specific APIs. The key is the API function name, and the value controls both request and response MLE. +- **Example**: `Dictionary { {"apiFunctionName", "true::true"} }` + +#### Structure of Values in Dictionary: + +(i) **"requestMLE::responseMLE"** - Control both request and response MLE + - `"true::true"` - Enable both request and response MLE + - `"false::false"` - Disable both request and response MLE + - `"true::false"` - Enable request MLE, disable response MLE + - `"false::true"` - Disable request MLE, enable response MLE + - `"::true"` - Use global setting for request, enable response MLE + - `"true::"` - Enable request MLE, use global setting for response + - `"::false"` - Use global setting for request, disable response MLE + - `"false::"` - Disable request MLE, use global setting for response + +(ii) **"requestMLE"** - Control request MLE only (response uses global setting) + - `"true"` - Enable request MLE + - `"false"` - Disable request MLE + +
+ +## 4. Example Configurations + +### (i) Minimal Request MLE Configuration + +```csharp +// Dictionary-based configuration - Uses defaults (most common scenario) +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + // Both mleForRequestPublicCertPath and requestMleKeyAlias are optional + // SDK will use JWT P12 file with default alias "CyberSource_SJC_US" + + return _configurationDictionary; +} +``` + +### (ii) Request MLE with Deprecated Parameters (Backward Compatibility) + +```csharp +// Using deprecated parameters - still supported but not recommended +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("useMLEGlobally", "true"); // Deprecated - use enableRequestMLEForOptionalApisGlobally + _configurationDictionary.Add("mleKeyAlias", "Custom_Key_Alias"); // Deprecated - use requestMleKeyAlias + + return _configurationDictionary; +} +``` + +### (iii) Request MLE with Custom Key Alias + +```csharp +// Dictionary-based configuration - With custom key alias only +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + _configurationDictionary.Add("requestMleKeyAlias", "Custom_Key_Alias"); + // Will fetch from JWT P12 file using custom alias + + return _configurationDictionary; +} +``` + +### (iv) Request MLE with Separate Certificate File + +```csharp +// Dictionary-based configuration - With separate MLE certificate file +private readonly Dictionary _configurationDictionary = new Dictionary(); +private readonly Dictionary _mleControlDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + _configurationDictionary.Add("mleForRequestPublicCertPath", "C:\path\to\public\cert.pem"); + _configurationDictionary.Add("requestMleKeyAlias", "Custom_Key_Alias"); + + return _configurationDictionary; +} + +public Dictionary GetMLEControlMap() +{ + _mleControlDictionary.Add("CreatePayment", "true"); // Enable request MLE for this API + _mleControlDictionary.Add("CapturePayment", "false"); // Disable request MLE for this API + + return _mleControlDictionary; +} +``` + +### (v) Response MLE Configuration with Private Key File + +```csharp +// Dictionary-based configuration +private readonly Dictionary _configurationDictionary = new Dictionary(); +private readonly Dictionary _mleControlDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableResponseMleGlobally", "true"); + _configurationDictionary.Add("responseMlePrivateKeyFilePath", "C:\path\to\private\key.p12"); + _configurationDictionary.Add("responseMlePrivateKeyFilePassword", "password"); + _configurationDictionary.Add("responseMleKID", "your-key-id"); + + return _configurationDictionary; +} + +public Dictionary GetMLEControlMap() +{ + _mleControlDictionary.Add("CreatePayment", "::true"); // Enable response MLE only for this API + + return _mleControlDictionary; +} +``` + +### (vi) Response MLE Configuration with Private Key Object + +```csharp +// Load private key programmatically +AsymmetricAlgorithm privateKey = LoadPrivateKeyFromSomewhere(); + +// Dictionary-based configuration +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableResponseMleGlobally", "true"); + _configurationDictionary.Add("responseMleKID", "your-key-id"); + + return _configurationDictionary; +} + +// Use constructor that accepts private key object +MerchantConfig merchantConfig = new MerchantConfig(GetConfiguration(), null, privateKey); +``` + +### (vii) Both Request and Response MLE Configuration + +```csharp +// Dictionary-based configuration +private readonly Dictionary _configurationDictionary = new Dictionary(); +private readonly Dictionary _mleControlDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + + // Request MLE settings (minimal - uses defaults) + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + + // Response MLE settings + _configurationDictionary.Add("enableResponseMleGlobally", "true"); + _configurationDictionary.Add("responseMlePrivateKeyFilePath", @"C:\path\to\private\key.p12"); + _configurationDictionary.Add("responseMlePrivateKeyFilePassword", "password"); + _configurationDictionary.Add("responseMleKID", "your-key-id"); + + return _configurationDictionary; +} + +public Dictionary GetMLEControlMap() +{ + _mleControlDictionary.Add("CreatePayment", "true::true"); // Enable both request and response MLE for this API + _mleControlDictionary.Add("CapturePayment", "false::true"); // Disable request, enable response MLE for this API + _mleControlDictionary.Add("RefundPayment", "true::false"); // Enable request, disable response MLE for this API + _mleControlDictionary.Add("CreateCredit", "::true"); // Use global request setting, enable response MLE for this API + + return _mleControlDictionary; +} +``` + +### (viii) Mixed Configuration (New and Deprecated Parameters) + +```csharp +// Example showing both new and deprecated parameters (deprecated will be used as aliases) +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + + // If both are set with same value, it works fine + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + _configurationDictionary.Add("useMLEGlobally", "true"); // Deprecated but same value + + // If both are set with different values, it will cause ConfigException + + // Key alias - new parameter takes precedence if both are provided + _configurationDictionary.Add("requestMleKeyAlias", "New_Alias"); + _configurationDictionary.Add("mleKeyAlias", "Old_Alias"); // This will be ignored + + return _configurationDictionary; +} +``` + +
+ +## 5. App.Config Configuration Examples + +### (i) Minimal Request MLE + +```xml + + +
+ + + + + + +``` + +### (ii) Request MLE with Deprecated Parameters + +```xml + + +
+ + + + + + + +``` + +### (iii) Request MLE with Custom Configuration + +```xml + + +
+ + + + + + + + +``` + +### (iv) Response MLE Only + +```xml + + +
+ + + + + + + + + +``` + +### (v) Both Request and Response MLE + +```xml + + +
+ + + + + + + + + + +``` + +
+ +## 6. Supported Private Key File Formats + +For Response MLE private key files, the following formats are supported: + +- **PKCS#12**: `.p12`, `.pfx` (requires password) +- **PEM**: `.pem`, `.key`, `.p8` (supports both encrypted and unencrypted) + +
+ +## 7. Important Notes + +### (i) Request MLE +- Both `mleForRequestPublicCertPath` and `requestMleKeyAlias` are **optional** parameters +- If `mleForRequestPublicCertPath` is not provided, the SDK will automatically fetch the MLE certificate from the JWT authentication P12 file +- If `requestMleKeyAlias` is not provided, the SDK will use the default value `CyberSource_SJC_US` +- The SDK provides flexible configuration options: you can use defaults, customize the key alias only, or provide a separate certificate file +- If `enableRequestMLEForOptionalApisGlobally` is set to `true`, it enables request MLE for all APIs that have optional MLE support +- APIs with mandatory MLE requirements are enabled by default unless `disableRequestMLEForMandatoryApisGlobally` is set to `true` +- If `mapToControlMLEonAPI` doesn't contain a specific API, the global setting applies +- For HTTP Signature authentication, request MLE will fall back to non-encrypted requests with a warning + +### (ii) Response MLE +- Response MLE requires either `responseMlePrivateKey` object OR `responseMlePrivateKeyFilePath` (not both) +- The `responseMleKID` parameter is mandatory when response MLE is enabled +- If an API expects a mandatory MLE response but the map specifies non-MLE response, the API might return an error +- Both the private key object and file path approaches are mutually exclusive +- `responseMlePrivateKeyFilePassword` uses `SecureString` type for enhanced security + +### (iii) Backward Compatibility +- `useMLEGlobally` is **deprecated** but still supported as an alias for `enableRequestMLEForOptionalApisGlobally` + +- If `useMLEGlobally` and `enableRequestMLEForOptionalApisGlobally` are provided with **different values**, it will cause a `ConfigException` +- `mleKeyAlias` is **deprecated** but still supported as an alias for `requestMleKeyAlias` +- When both `mleKeyAlias` and `requestMleKeyAlias` are provided, the **`requestMleKeyAlias`** takes precedence + +### (iv) API-level Control Validation +- The `mapToControlMLEonAPI` values are validated for proper format +- Invalid formats (empty values, multiple separators, non-boolean values) will cause configuration errors +- Empty string after or before `::` separator will use global defaults + + +### (v) Configuration Validation +- The SDK performs comprehensive validation of MLE configuration parameters +- Conflicting values between new and deprecated parameters will result in `ConfigException` +- File path validation is performed for certificate and private key files +- Invalid boolean values in `mapToControlMLEonAPI` will cause parsing errors + +
+ +## 8. Error Handling + +The SDK provides specific error messages for common MLE issues: +- Invalid private key for response decryption +- Missing certificates for request encryption +- Invalid file formats or paths +- Authentication type mismatches +- Configuration validation errors +- Conflicting parameter values between new and deprecated fields +- Invalid format in `mapToControlMLEonAPI` values + +
+ +## 9. Sample Code Repository + +For comprehensive examples and sample implementations, please refer to: +[Cybersource .NET Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-csharp) + +
+ +## 10. Additional Information + +### (i) API Support +- MLE is designed to support specific APIs that have been enabled for encryption +- Support can be extended to additional APIs based on requirements and updates + +### (ii) Using the SDK +To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization. The SDK will automatically handle encryption and decryption based on your configuration. + + + +### (iii) Migration from Deprecated Parameters + +If you're currently using deprecated parameters, here's how to migrate: + +```csharp +// OLD (Deprecated) +_configurationDictionary.Add("useMLEGlobally", "true"); +_configurationDictionary.Add("mleKeyAlias", "Custom_Alias"); + +// NEW (Recommended) +_configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); +_configurationDictionary.Add("requestMleKeyAlias", "Custom_Alias"); +``` + +The deprecated parameters will continue to work but are not recommended for new implementations. + +
+ +## 11. Contact For any issues or further assistance, please open an issue on the GitHub repository or contact our support team. diff --git a/generator/cybersource-csharp-template/ApiClient.mustache b/generator/cybersource-csharp-template/ApiClient.mustache index d0860b73..02283817 100644 --- a/generator/cybersource-csharp-template/ApiClient.mustache +++ b/generator/cybersource-csharp-template/ApiClient.mustache @@ -194,7 +194,7 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //1.set in the defaultHeaders of configuration @@ -242,11 +242,11 @@ namespace {{packageName}}.Client if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path, isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(), isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -357,7 +357,7 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //declared separately to handle both regular call and download file calls int httpResponseStatusCode; @@ -379,9 +379,9 @@ namespace {{packageName}}.Client //check if the Response is to be downloaded as a file, this value to be set by the calling API class var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType, isResponseMLEForApi); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); @@ -535,13 +535,13 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { LogUtility logUtility = new LogUtility(); var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType, isResponseMLEForApi); // Logging Request Headers var headerPrintOutput = new StringBuilder(); @@ -555,7 +555,7 @@ namespace {{packageName}}.Client logger.Debug($"HTTP Request Headers :\n{logUtility.MaskSensitiveData(headerPrintOutput.ToString())}"); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); @@ -658,7 +658,7 @@ namespace {{packageName}}.Client /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type) // CHANGED + public object Deserialize(RestResponse response, Type type, MerchantConfig merchantConfig) // CHANGED { {{^netStandard}}IList{{/netStandard}}{{#netStandard}}IHttpHeaders{{/netStandard}} headers = response.Headers.ToList(); if (type == typeof(byte[])) // return byte array @@ -680,8 +680,16 @@ namespace {{packageName}}.Client if (match.Success) { string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); + try + { + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + catch (Exception ex) + { + logger.Error($"Error writing file '{fileName}': {ex.Message}"); + throw new Exception($"Error writing file '{fileName}': {ex.Message}"); + } } } } @@ -694,6 +702,28 @@ namespace {{packageName}}.Client return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); } + // check if Response MLE is enabled, then decrypt the response content and then deserialize + if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) + { + if (merchantConfig == null) + { + throw new ApiException((int)response.StatusCode, "merchantConfig cannot be null when decrypting MLE encrypted response."); + } + + // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block + try + { + // Decrypt the MLE encrypted response payload using the merchant configuration + var decryptedContent = MLEUtility.DecryptMleResponsePayload(merchantConfig, response.Content); + response.Content = decryptedContent; + } + catch (Exception e) + { + logger.Error($"MLE Encrypted Response Decryption Error Occurred. Error: {e.Message}"); + throw new ApiException((int)response.StatusCode, e.Message); + } + } + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type { return ConvertType(response.Content, type); @@ -897,12 +927,12 @@ namespace {{packageName}}.Client /// GET/POST/PUT/PATCH/DELETE /// Resource Path /// Request Payload - public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null) + public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null, bool isResponseMLEForApi = false) { requestTarget = Uri.EscapeUriString(requestTarget); var merchantConfig = Configuration.MerchantConfigDictionaryObj != null - ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj) + ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj,Configuration.MapToControlMLEonAPI,Configuration.ResponseMlePrivateKey) : new MerchantConfig(); merchantConfig.RequestType = requestType; @@ -917,7 +947,7 @@ namespace {{packageName}}.Client if (merchantConfig.IsJwtTokenAuthType) { //generate token and set JWT token headers - var jwtToken = authorize.GetToken(); + var jwtToken = authorize.GetToken(isResponseMLEForApi); authenticationHeaders.Add("Authorization", jwtToken.BearerToken); } else if (merchantConfig.IsHttpSignAuthType) diff --git a/generator/cybersource-csharp-template/Configuration.mustache b/generator/cybersource-csharp-template/Configuration.mustache index 0e4c2108..8dc3ad8a 100644 --- a/generator/cybersource-csharp-template/Configuration.mustache +++ b/generator/cybersource-csharp-template/Configuration.mustache @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using System.Text; using System.Net; +using System.Security.Cryptography; namespace {{packageName}}.Client { @@ -41,7 +42,8 @@ namespace {{packageName}}.Client int timeout = 100000, string userAgent = "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{packageVersion}}/csharp{{/httpUserAgent}}", IReadOnlyDictionary merchConfigDictObj = null, - Dictionary mapToControlMLEonAPI = null + Dictionary mapToControlMLEonAPI = null, + AsymmetricAlgorithm responseMlePrivateKey = null ) { Username = username; @@ -98,6 +100,7 @@ namespace {{packageName}}.Client DateTimeFormat = dateTimeFormat; MerchantConfigDictionaryObj = merchConfigDictObj; MapToControlMLEonAPI = mapToControlMLEonAPI; + ResponseMlePrivateKey = responseMlePrivateKey; SetApiClientUsingDefault(apiClient); } @@ -197,7 +200,9 @@ namespace {{packageName}}.Client ///
public Dictionary DefaultHeader { get; set; } = new Dictionary(); - public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + + public AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } = null; /// /// Add default header. diff --git a/generator/cybersource-csharp-template/api.mustache b/generator/cybersource-csharp-template/api.mustache index cf8c7aa2..140aed7b 100644 --- a/generator/cybersource-csharp-template/api.mustache +++ b/generator/cybersource-csharp-template/api.mustache @@ -344,7 +344,7 @@ namespace {{packageName}}.{{apiPackage}} {{/bodyParam}} String inboundMLEStatus = "{{#vendorExtensions.x-devcenter-metaData.mleForRequest}}{{vendorExtensions.x-devcenter-metaData.mleForRequest}}{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}{{^vendorExtensions.x-devcenter-metaData.mleForRequest}}false{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo")) { try @@ -358,6 +358,8 @@ namespace {{packageName}}.{{apiPackage}} } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo"); + {{#bodyParam}} logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); {{/bodyParam}} @@ -396,7 +398,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -413,7 +415,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); // Return statement + ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}), merchantConfig)); // Return statement {{/returnType}} {{^returnType}} this.SetStatusCode(localVarStatusCode); @@ -550,7 +552,7 @@ namespace {{packageName}}.{{apiPackage}} {{/bodyParam}} String inboundMLEStatus = "{{#vendorExtensions.x-devcenter-metaData.mleForRequest}}{{vendorExtensions.x-devcenter-metaData.mleForRequest}}{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}{{^vendorExtensions.x-devcenter-metaData.mleForRequest}}false{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo")) { try @@ -564,6 +566,8 @@ namespace {{packageName}}.{{apiPackage}} } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo"); + {{#bodyParam}} logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); {{/bodyParam}} @@ -602,7 +606,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -619,7 +623,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); // Return statement + ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}), merchantConfig)); // Return statement {{/returnType}} {{^returnType}} this.SetStatusCode(localVarStatusCode);