From 315658ed6cd7097348580f2d79278819352b4d71 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Wed, 15 Oct 2025 23:00:32 +0530 Subject: [PATCH 01/10] Changes for MLE for Response --- .../authentication/jwt/JwtToken.rb | 20 +- lib/AuthenticationSDK/core/Authorization.rb | 4 +- lib/AuthenticationSDK/core/MerchantConfig.rb | 269 ++++++++++++++++-- lib/AuthenticationSDK/util/Cache.rb | 56 +++- .../util/CertificateUtility.rb | 47 +++ lib/AuthenticationSDK/util/Constants.rb | 2 + lib/AuthenticationSDK/util/MLEUtility.rb | 104 ++++++- 7 files changed, 465 insertions(+), 37 deletions(-) diff --git a/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb b/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb index d9a14ff3..57e45987 100644 --- a/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +++ b/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb @@ -16,19 +16,19 @@ class GenerateJwtToken @log_obj #JWT Token-generated based on the Request type - def getToken(merchantconfig_obj,gmtDatetime) + def getToken(merchantconfig_obj, gmtDatetime, isResponseMLEForApi) @log_obj = Log.new merchantconfig_obj.log_config, "JwtToken" jwtBody = '' request_type = merchantconfig_obj.requestType.upcase - jwtBody=getJwtBody(request_type, gmtDatetime, merchantconfig_obj) + jwtBody = getJwtBody(request_type, gmtDatetime, merchantconfig_obj, isResponseMLEForApi) claimSet = JSON.parse(jwtBody) cache_value = Cache.new.fetchCachedP12Certificate(merchantconfig_obj) privateKey = cache_value.private_key jwt_cert_obj = cache_value.cert - jwt_cert_in_der= Base64.strict_encode64(jwt_cert_obj.to_der) + jwt_cert_in_der = Base64.strict_encode64(jwt_cert_obj.to_der) # JWT token-Generates using RS256 algorithm only @@ -51,18 +51,26 @@ def getToken(merchantconfig_obj,gmtDatetime) raise err end - def getJwtBody(request_type, gmtDatetime, merchantconfig_obj) + def getJwtBody(request_type, gmtDatetime, merchantconfig_obj, isResponseMLEForApi=false) + jwtBody = "{\n " + if request_type == Constants::POST_REQUEST_TYPE || request_type == Constants::PUT_REQUEST_TYPE || request_type == Constants::PATCH_REQUEST_TYPE payload = merchantconfig_obj.requestJsonData # Note: Digest is not passed for GET calls digest = DigestGeneration.new.generateDigest(payload) - jwtBody = "{\n \"digest\":\"" + digest + "\", \"digestAlgorithm\":\"SHA-256\", \"iat\":" + Time.parse(gmtDatetime).to_i.to_s + "}" + jwtBody = jwtBody + "\"digest\":\"" + digest + "\", \"digestAlgorithm\":\"SHA-256\", \"iat\":" + Time.parse(gmtDatetime).to_i.to_s elsif request_type == Constants::GET_REQUEST_TYPE || request_type == Constants::DELETE_REQUEST_TYPE - jwtBody = "{\n \"iat\":" + Time.parse(gmtDatetime).to_i.to_s + "\n} \n\n" + jwtBody = jwtBody + "\"iat\":" + Time.parse(gmtDatetime).to_i.to_s else raise StandardError.new(Constants::ERROR_PREFIX + Constants::INVALID_REQUEST_TYPE_METHOD) end + + if isResponseMLEForApi + jwtBody = jwtBody + ", \"v-c-response-mle-kid\":\"" + merchantconfig_obj.responseMleKID + "\"" + end + + jwtBody = jwtBody + "\n}" end implements TokenInterface end \ No newline at end of file diff --git a/lib/AuthenticationSDK/core/Authorization.rb b/lib/AuthenticationSDK/core/Authorization.rb index 25f8b6a5..8cc0af32 100644 --- a/lib/AuthenticationSDK/core/Authorization.rb +++ b/lib/AuthenticationSDK/core/Authorization.rb @@ -8,7 +8,7 @@ # This function calls for the generation of Signature message depending on the authentication type. class Authorization @log_obj - def getToken(merchantconfig_obj, gmtdatetime) + def getToken(merchantconfig_obj, gmtdatetime, isResponseMLEForApi) @log_obj = Log.new merchantconfig_obj.log_config, "Authorization" authenticationType = merchantconfig_obj.authenticationType.upcase @@ -21,7 +21,7 @@ def getToken(merchantconfig_obj, gmtdatetime) if authenticationType == Constants::AUTH_TYPE_HTTP token = GenerateHttpSignature.new.getToken(merchantconfig_obj, gmtdatetime) elsif authenticationType == Constants::AUTH_TYPE_JWT - token = GenerateJwtToken.new.getToken(merchantconfig_obj, gmtdatetime) + token = GenerateJwtToken.new.getToken(merchantconfig_obj, gmtdatetime, isResponseMLEForApi) elsif authenticationType == Constants::AUTH_TYPE_OAUTH token = GenerateOAuthToken.new.getToken(merchantconfig_obj, gmtdatetime) else diff --git a/lib/AuthenticationSDK/core/MerchantConfig.rb b/lib/AuthenticationSDK/core/MerchantConfig.rb index 4809c4f9..b9bccafc 100644 --- a/lib/AuthenticationSDK/core/MerchantConfig.rb +++ b/lib/AuthenticationSDK/core/MerchantConfig.rb @@ -7,7 +7,7 @@ public # This fuction has all the merchantConfig properties getters and setters methods class Merchantconfig - def initialize(cybsPropertyObj) + def initialize(cybsPropertyObj, responseMlePrivateKeyValue = nil) # Common Parameters @merchantId = cybsPropertyObj['merchantID'] @runEnvironment = cybsPropertyObj['runEnvironment'] @@ -50,18 +50,69 @@ def initialize(cybsPropertyObj) @keepAliveTime = cybsPropertyObj['keepAliveTime'] || 118 # Default to 118 seconds as same as default of libcurl # Path to client JWE pem file directory @pemFileDirectory = cybsPropertyObj['pemFileDirectory'] - @mleKeyAlias = cybsPropertyObj['mleKeyAlias'] + + # Optional parameter. User can pass a custom requestMleKeyAlias to fetch from the certificate. + # Older flag "mleKeyAlias" is deprecated and will be used as alias/another name for requestMleKeyAlias. + if cybsPropertyObj.has_key?('mleKeyAlias') + @requestMleKeyAlias = cybsPropertyObj['mleKeyAlias'] + elsif cybsPropertyObj.has_key?('requestMleKeyAlias') + @requestMleKeyAlias = cybsPropertyObj['requestMleKeyAlias'] + end + + # Deprecated flag to enable MLE for request. This flag is now known as "enableRequestMLEForOptionalApisGlobally" @useMLEGlobally = cybsPropertyObj['useMLEGlobally'] + + # Flag to enable MLE (Message Level Encryption) for request body to all APIs in SDK which have optional support for MLE. + # This means the API can send both non-encrypted and encrypted requests. + # Older flag "useMLEGlobally" is deprecated and will be used as alias/another name for enableRequestMLEForOptionalApisGlobally. @enableRequestMLEForOptionalApisGlobally = !!(cybsPropertyObj['enableRequestMLEForOptionalApisGlobally'] || cybsPropertyObj['useMLEGlobally']) + # Flag to disable MLE (Message Level Encryption) for request body to APIs in SDK which have mandatory MLE requirement when sending calls. @disableRequestMLEForMandatoryApisGlobally = cybsPropertyObj['disableRequestMLEForMandatoryApisGlobally'] - + # Parameter to pass the request MLE public certificate path. if !cybsPropertyObj['mleForRequestPublicCertPath'].nil? && !cybsPropertyObj['mleForRequestPublicCertPath'].to_s.strip.empty? @mleForRequestPublicCertPath = cybsPropertyObj['mleForRequestPublicCertPath'].to_s.strip end + # Map to control MLE (Message Level Encryption) settings for individual API functions. This overrides global MLE configuration for specific APIs. + # The key is the function name of the API in the SDK, and the value is a String in the format "requestMLE::responseMLE" separated by "::", + # where the first boolean value controls MLE for the request and the second boolean value controls MLE for the response. + # Use "true" to enable or "false" to disable MLE for that specific component. + + # Valid Examples: + # mapToControlMLEonAPI.put("apiFunctionName1", "true::true") - enables MLE for both request and response for apiFunctionName1 + # mapToControlMLEonAPI.put("apiFunctionName2", "false::false") - disables MLE for both request and response for apiFunctionName2 + # mapToControlMLEonAPI.put("apiFunctionName3", "true::false") - enables request MLE only, disables response MLE for apiFunctionName3 + # mapToControlMLEonAPI.put("apiFunctionName4", "false::true") - disables request MLE, enables response MLE only for apiFunctionName4 + # mapToControlMLEonAPI.put("apiFunctionName5", "false") - disables request MLE only. Since the "::" separator is not included, mleForResponse will use the default value set by the global flag + # mapToControlMLEonAPI.put("apiFunctionName6", "true") - enables request MLE only. Since the "::" separator is not included, mleForResponse will use the default value set by the global flag + # mapToControlMLEonAPI.put("apiFunctionName7", "::true") - enables response MLE only. Because the value before "::" is missing, the SDK will use the default request MLE value from the global flag + # mapToControlMLEonAPI.put("apiFunctionName8", "true::") - enables request MLE only. Since the value after the "::" separator is missing, mleForResponse will use the default value + + # Invalid Examples (will be ignored or cause errors): + # mapToControlMLEonAPI.put("apiFunctionName9", "::") - both values empty, will use global defaults + # mapToControlMLEonAPI.put("apiFunctionName10", "invalid::true") - invalid first value, may cause parsing error + # mapToControlMLEonAPI.put("apiFunctionName11", "true::invalid") - invalid second value, may cause parsing error + # mapToControlMLEonAPI.put("apiFunctionName12", "true::true::false") - multiple separators not allowed + # mapToControlMLEonAPI.put("apiFunctionName13", "") - empty string not allowed @mapToControlMLEonAPI = cybsPropertyObj['mapToControlMLEonAPI'] - validateMerchantDetails + + # Both fields used for internal purpose only not exposed for merchants to set. Both sets from mapToControlMLEonAPI internally. + @internalMapToControlRequestMLEonAPI = {} + @internalMapToControlResponseMLEonAPI = {} + + @responseMlePrivateKey = responseMlePrivateKeyValue + + @enableResponseMleGlobally = false + if !cybsPropertyObj['enableResponseMleGlobally'].nil? + @enableResponseMleGlobally = cybsPropertyObj['enableResponseMleGlobally'] + end + + @responseMleKID = cybsPropertyObj['responseMleKID'] + @responseMlePrivateKeyFilePath = cybsPropertyObj['responseMlePrivateKeyFilePath'] + @responseMlePrivateKeyFilePassword = cybsPropertyObj['responseMlePrivateKeyFilePassword'] + + validateMerchantDetails() validateMLEConfiguration(cybsPropertyObj) @p12KeyFilePath = File.join(@keysDirectory, @keyFilename + ".p12") logAllProperties(cybsPropertyObj) @@ -252,7 +303,6 @@ def validateMerchantDetails() end def validateMLEConfiguration(cybsPropertyObj) - if !@useMLEGlobally.nil? && !cybsPropertyObj['enableRequestMLEForOptionalApisGlobally'].nil? if @useMLEGlobally != cybsPropertyObj['enableRequestMLEForOptionalApisGlobally'] raise StandardError.new(Constants::ERROR_PREFIX + "useMLEGlobally and enableRequestMLEForOptionalApisGlobally must have the same value if both are set") @@ -276,20 +326,28 @@ def validateMLEConfiguration(cybsPropertyObj) end unless @mapToControlMLEonAPI.nil? - unless @mapToControlMLEonAPI.is_a?(Hash) && @mapToControlMLEonAPI.keys.all? {|k| k.is_a?(String)} && @mapToControlMLEonAPI.values.all? { |v| [true, false].include?(v) } - err = StandardError.new(Constants::ERROR_PREFIX + "mapToControlMLEonAPI must be a map with boolean values") - @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) - raise err + begin + @mapToControlMLEonAPI = convertBooleanToStringMapType(@mapToControlMLEonAPI) + setMapToControlMLEOnAPI(@mapToControlMLEonAPI) + rescue => err + error = StandardError.new(Constants::WARNING_PREFIX + "Unable to initialise MLE control Map from config: #{err.message}") + @log_obj.logger.warn(ExceptionHandler.new.new_api_exception error) + raise error end + # unless @mapToControlMLEonAPI.is_a?(Hash) && @mapToControlMLEonAPI.keys.all? {|k| k.is_a?(String)} && @mapToControlMLEonAPI.values.all? { |v| [true, false].include?(v) } + # err = StandardError.new(Constants::ERROR_PREFIX + "mapToControlMLEonAPI must be a map with boolean values") + # @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + # raise err + # end end - !@mleKeyAlias.nil? && unless @mleKeyAlias.instance_of? String - (err = StandardError.new(Constants::ERROR_PREFIX + "mleKeyAlias must be a string")) - @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) - raise err - end - if @mleKeyAlias.to_s.empty? - @mleKeyAlias = Constants::DEFAULT_ALIAS_FOR_MLE_CERT + !@requestMleKeyAlias.nil? && unless @requestMleKeyAlias.instance_of? String + err = StandardError.new(Constants::ERROR_PREFIX + "requestMleKeyAlias must be a string") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + if @requestMleKeyAlias.to_s.empty? + @requestMleKeyAlias = Constants::DEFAULT_ALIAS_FOR_MLE_CERT end if @mleForRequestPublicCertPath && !@mleForRequestPublicCertPath.to_s.strip.empty? @@ -302,9 +360,9 @@ def validateMLEConfiguration(cybsPropertyObj) end request_mle_configured = @enableRequestMLEForOptionalApisGlobally - if !@mapToControlMLEonAPI.nil? && !@mapToControlMLEonAPI.empty? - @mapToControlMLEonAPI.each do |_, value| - unless [true, false].include?(value) && value + if !@internalMapToControlRequestMLEonAPI.nil? && !@internalMapToControlRequestMLEonAPI.empty? + @internalMapToControlRequestMLEonAPI.each do |_, value| + if value request_mle_configured = true break end @@ -316,10 +374,174 @@ def validateMLEConfiguration(cybsPropertyObj) @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) raise err end + + is_response_mle_configured = @enableResponseMleGlobally + + if !@internalMapToControlResponseMLEonAPI.nil? && !@internalMapToControlResponseMLEonAPI.empty? + @internalMapToControlResponseMLEonAPI.values.each do |value| + if value == true + is_response_mle_configured = true + break + end + end + end + + if is_response_mle_configured + # Validate for Auth type- Currently responseMLE feature will be enabled for JWT auth type only + if !Constants::AUTH_TYPE_JWT.eql?(@authenticationType.upcase) + err = StandardError.new(Constants::ERROR_PREFIX + "Response MLE can only be used with JWT authentication type") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + + # Check if either private key object or private key file path is provided + if @responseMlePrivateKey.nil? || @responseMlePrivateKey.to_s.strip.empty? + if @responseMlePrivateKeyFilePath.nil? || @responseMlePrivateKeyFilePath.to_s.strip.empty? + err = StandardError.new(Constants::ERROR_PREFIX + "Response MLE is enabled but no private key provided. Either set responseMlePrivateKey object or provide responseMlePrivateKeyFilePath.") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + end + + # Check that both private key object or private key file path should not be provided + if !@responseMlePrivateKey.nil? && !@responseMlePrivateKey.to_s.strip.empty? + && !@responseMlePrivateKeyFilePath.nil? && !@responseMlePrivateKeyFilePath.to_s.strip.empty? + err = StandardError.new(Constants::ERROR_PREFIX + "Both responseMlePrivateKey object and responseMlePrivateKeyFilePath are provided. Please provide only one of them for response mle private key.") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + + # If private key file path is provided, validate the file exists + if !@responseMlePrivateKeyFilePath.nil? && !@responseMlePrivateKeyFilePath.to_s.strip.empty? + begin + CertificateUtility.validatePathAndFile(@responseMlePrivateKeyFilePath, "responseMlePrivateKeyFilePath", @log_config) + rescue => err + error = StandardError.new(Constants::ERROR_PREFIX + "Invalid responseMlePrivateKeyFilePath : #{err.message}") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception error) + raise error + end + end + + # Validate responseMleKID is provided when response MLE is enabled + if @responseMleKID.nil? || @responseMleKID.to_s.strip.empty? + err = StandardError.new(Constants::ERROR_PREFIX + "Response MLE is enabled but responseMleKID is not provided.") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + end + + def setMapToControlMLEOnAPI(inputMap) + # validate the map value format + validateMapToControlMleOnApiValues(inputMap) if inputMap + + # @mapToControlMLEonAPI = inputMap + + if inputMap + internalRequest = {} + internalResponse = {} + + inputMap.each do |apiName, rawValue| + value = rawValue.to_s + + if value.include?("::") + # Format: "requestMLE::responseMLE" + requestMLE, responseMLE = value.split("::", 2) + + # Set request MLE value when present + unless requestMLE.nil? || requestMLE.empty? + internalRequest[apiName] = requestMLE.to_s.strip.casecmp?("true") + end + + # Set response MLE value when present + unless responseMLE.nil? || responseMLE.empty? + internalResponse[apiName] = responseMLE.to_s.strip.casecmp?("true") + end + else + # Format: "true" or "false" - applies to request MLE only + internalRequest[apiName] = value.to_s.strip.casecmp?("true") + end + end + + @internalMapToControlRequestMLEonAPI = internalRequest + @internalMapToControlResponseMLEonAPI = internalResponse + end + end + + # Validates the map values for MLE control API configuration. + # Allowed formats: "true::true", "false::false", "::true", "true::", "::false", "false::", "true", "false" + def validateMapToControlMLEonAPIValues(inputMap) + inputMap.each do |key, value| + if value.nil? || value == "" + err = StandardError.new(Constants::ERROR_PREFIX + "Invalid MLE control map value for key '#{key}'. Value cannot be null or empty.") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + + str = value.to_s + if str.include?("::") + parts = str.split("::", -1) + + unless parts.length == 2 + err = StandardError.new(Constants::ERROR_PREFIX + "Invalid MLE control map value format for key '#{key}'. Expected format: true/false for 'requestMLE::responseMLE' but got: '#{str}'") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + + requestMLE, responseMLE = parts + + if !requestMLE.empty? && !isValidBooleanString?(requestMLE) + err = StandardError.new(Constants::ERROR_PREFIX + "Invalid request MLE value for key '#{key}'. Expected 'true', 'false', or empty but got: '#{requestMLE}'") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + + if !responseMLE.empty? && !isValidBooleanString?(responseMLE) + err = StandardError.new(Constants::ERROR_PREFIX + "Invalid response MLE value for key '#{key}'. Expected 'true', 'false', or empty but got: '#{responseMLE}'") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + else + unless isValidBooleanString?(str) + err = StandardError.new(Constants::ERROR_PREFIX + "Invalid MLE control map value for key '#{key}'. Expected 'true' or 'false' for requestMLE but got: '#{str}'") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + end + end + end + + def isValidBooleanString?(s) + s.casecmp?("true") || s.casecmp?("false") + end + + def convertBooleanToStringMapType(inputMap) + if inputMap.nil? || inputMap.empty? + raise StandardError.new(Constants::ERROR_PREFIX + "Unsupported null value to mapToControlMLEonAPI in merchantConfig. Expected Map which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field.") + end + + unless map.is_a?(Hash) + raise TypeError.new(Constants::ERROR_PREFIX + "Unsupported datatype for field mapToControlMLEonAPI. Expected Hash which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field but got: #{map.class}") + end + + keys_all_strings = map.keys.all? { |k| k.is_a?(String) } + values_all_strings = map.values.all? { |v| v.is_a?(String) } + values_all_bools = map.values.all? { |v| v.is_a?(TrueClass) || v.is_a?(FalseClass) } + + if keys_all_strings && values_all_strings + # Already Hash + map + elsif keys_all_strings && values_all_bools + # Convert Hash -> Hash + map.transform_values { |v| v.to_s } + else + err = StandardError.new("Unsupported map type combination for mapToControlMLEonAPI in merchantConfig. Expected Hash which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field.") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end end def logAllProperties(merchantPropertyObj) - propertyObj = Marshal.load(Marshal.dump(merchantPropertyObj)) + propertyObj = Marshal.load(Marshal.dump(merchantPropertyObj)) merchantConfig = '' hiddenProperties = (Constants::HIDDEN_MERCHANT_PROPERTIES).split(',') hiddenPropArray = Array.new @@ -407,6 +629,11 @@ def check_key_file attr_accessor :disableRequestMLEForMandatoryApisGlobally attr_accessor :mleForRequestPublicCertPath attr_accessor :mapToControlMLEonAPI - attr_accessor :mleKeyAlias + attr_accessor :requestMleKeyAlias attr_accessor :p12KeyFilePath + attr_accessor :enableResponseMleGlobally + attr_accessor :responseMleKID + attr_accessor :responseMlePrivateKeyFilePath + attr_accessor :responseMlePrivateKeyFilePassword + attr_accessor :responseMlePrivateKey end diff --git a/lib/AuthenticationSDK/util/Cache.rb b/lib/AuthenticationSDK/util/Cache.rb index 6f5361e5..11a5125b 100644 --- a/lib/AuthenticationSDK/util/Cache.rb +++ b/lib/AuthenticationSDK/util/Cache.rb @@ -41,6 +41,34 @@ def setupCache(cacheKey, certificateFilePath, merchantConfig) logger = @@logger.logger fileModifiedTime = File.mtime(certificateFilePath) + if cache_key.end_with?(Constants::MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY) + password = merchantConfig.responseMlePrivateKeyPassword + mlePrivateKey = nil + + begin + fileExtension = File.extname(certificateFilePath).delete_prefix('.').downcase + + if fileExtension == 'p12' || fileExtension == 'pfx' + mlePrivateKey = CertificateUtility.read_private_key_from_p12(certificateFilePath, password) + elsif fileExtension == 'pem' || fileExtension == 'key' || fileExtension == 'p8' + mlePrivateKey = CertificateUtility.load_private_key_from_pem_file(certificateFilePath, password) + else + err = StandardError.new(Constants::ERROR_PREFIX + "Unsupported Response MLE Private Key file format: `" + fileExtension + "`. Supported formats are: .p12, .pfx, .pem, .key, .p8") + logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + + cacheValue = CacheValue.new(mlePrivateKey, nil, fileModifiedTime) + + @@cache_obj.write(cacheKey, cacheValue) + rescue StandardError => e + err = StandardError.new(Constants::ERROR_PREFIX + "Error loading MLE response private key from: " + filePath + ". Error: " + e.message) + logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + return + end + if (cacheKey.end_with?("_JWT")) privateKey, certificateList = CertificateUtility.getCertificateCollectionAndPrivateKeyFromP12(certificateFilePath, merchantConfig) jwtCertificate = CertificateUtility.getCertificateBasedOnKeyAlias(certificateList, merchantConfig.keyAlias) @@ -53,10 +81,10 @@ def setupCache(cacheKey, certificateFilePath, merchantConfig) if (cacheKey.end_with?(Constants::MLE_CACHE_IDENTIFIER_FOR_CONFIG_CERT)) certificateList = CertificateUtility.getCertificatesFromPemFile(certificateFilePath) - mleCertificate = CertificateUtility.getCertificateBasedOnKeyAlias(certificateList, merchantConfig.mleKeyAlias) + mleCertificate = CertificateUtility.getCertificateBasedOnKeyAlias(certificateList, merchantConfig.requestMleKeyAlias) if (!mleCertificate) fileName = File.basename(certificateFilePath) - logger.warn("No certificate found for the specified mle_key_alias '#{merchantConfig.mleKeyAlias}'. Using the first certificate from file #{fileName} as the MLE request certificate.") + logger.warn("No certificate found for the specified mle_key_alias '#{merchantConfig.requestMleKeyAlias}'. Using the first certificate from file #{fileName} as the MLE request certificate.") mleCertificate = certificateList[0] end @@ -68,11 +96,11 @@ def setupCache(cacheKey, certificateFilePath, merchantConfig) if (cacheKey.end_with?(Constants::MLE_CACHE_IDENTIFIER_FOR_P12_CERT)) privateKey, certificateList = CertificateUtility.getCertificateCollectionAndPrivateKeyFromP12(certificateFilePath, merchantConfig) - mleCertificate = CertificateUtility.getCertificateBasedOnKeyAlias(certificateList, merchantConfig.mleKeyAlias) + mleCertificate = CertificateUtility.getCertificateBasedOnKeyAlias(certificateList, merchantConfig.requestMleKeyAlias) if (!mleCertificate) fileName = File.basename(certificateFilePath) - logger.error("No certificate found for the specified mle_key_alias '#{merchantConfig.mleKeyAlias}' in file #{fileName}.") - raise ArgumentError, "No certificate found for the specified mle_key_alias '#{merchantConfig.mleKeyAlias}' in file #{fileName}." + logger.error("No certificate found for the specified mle_key_alias '#{merchantConfig.requestMleKeyAlias}' in file #{fileName}.") + raise ArgumentError, "No certificate found for the specified mle_key_alias '#{merchantConfig.requestMleKeyAlias}' in file #{fileName}." end cacheValue = CacheValue.new(privateKey, mleCertificate, fileModifiedTime) @@ -129,6 +157,24 @@ def getMLECertificateBasedOnCacheKey(merchantConfig, cacheKey, certificateFilePa cachedCertificateInfo ? cachedCertificateInfo.cert : nil end + def getMLEResponsePrivateKeyFromFilePath(merchantConfig) + merchantId = merchantConfig.merchantId + keyIdentifier = Constants::MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY + cacheIdentifier = "#{merchantId}_#{keyIdentifier}" + mleResponsePrivateKeyFilePath = merchantConfig.responseMlePrivateKeyFilePath + + @@mutex.synchronize do + cachedCertificateInfo = @@cache_obj.read(cacheIdentifier) + + if cachedCertificateInfo.nil? || cachedCertificateInfo.file_modified_time != File.mtime(mleResponsePrivateKeyFilePath) + setupCache(cacheIdentifier, mleResponsePrivateKeyFilePath, merchantConfig) + cachedCertificateInfo = @@cache_obj.read(cacheIdentifier) + end + end + + cachedCertificateInfo ? cachedCertificateInfo.private_key : nil + end + # DEPRECATED: This method has been marked as Deprecated and will be removed in coming releases. def fetchPEMFileForNetworkTokenization(filePath) warn("[DEPRECATED] 'fetchPEMFileForNetworkTokenization' method is deprecated and will be removed in coming releases.") diff --git a/lib/AuthenticationSDK/util/CertificateUtility.rb b/lib/AuthenticationSDK/util/CertificateUtility.rb index 908eab55..b8ac8c84 100644 --- a/lib/AuthenticationSDK/util/CertificateUtility.rb +++ b/lib/AuthenticationSDK/util/CertificateUtility.rb @@ -121,4 +121,51 @@ def self.validatePathAndFile(filePath, pathType, logConfig) raise IOError, "#{pathType} is not readable: #{path}" end end + + def self.read_private_key_from_p12(p12_file_path, password) + begin + # `password` should be a String in Ruby + raise ArgumentError, "password must be a String" unless password.is_a?(String) + + data = File.binread(p12_file_path) + pkcs12 = OpenSSL::PKCS12.new(data, password) + + key = pkcs12.key + raise "No private key found in the P12 file" if key.nil? + + key + rescue OpenSSL::PKCS12::PKCS12Error => e + raise "Could not recover key from P12: #{e.message}" + rescue Errno::ENOENT => e + raise "P12 file not found: #{p12_file_path}" + end + end + + def self.load_private_key_from_pem_file(key_file_path, password = nil) + begin + pem_data = File.binread(key_file_path) + + # OpenSSL::PKey.read supports: + # - "BEGIN RSA/EC/PRIVATE KEY" (PKCS#1), encrypted or not (Proc-Type/DEK-Info) + # - "BEGIN PRIVATE KEY" (PKCS#8 unencrypted) + # - "BEGIN ENCRYPTED PRIVATE KEY" (PKCS#8 encrypted) + OpenSSL::PKey.read(pem_data, password) + rescue OpenSSL::PKey::PKeyError => e + # Missing password for an encrypted PEM + if pem =~ /(BEGIN ENCRYPTED PRIVATE KEY|Proc-Type:\s*4,ENCRYPTED)/ && (password.nil? || password.to_s.empty?) + raise ArgumentError, "Private key is password protected, but no password was provided." + end + + # Wrong password (common OpenSSL messages) + if password && e.message =~ /(bad decrypt|bad password|mac verify failure)/i + logger&.error("Failed to decrypt PKCS#8 private key - incorrect password provided") + raise ArgumentError, "Password is incorrect for the encrypted private key. Error: #{e.message}" + end + + # Unsupported/invalid PEM contents + raise ArgumentError, "Unsupported PEM object or invalid key: #{e.message}" + rescue Errno::ENOENT + raise ArgumentError, "PEM file not found: #{key_file_path}" + end + end end \ No newline at end of file diff --git a/lib/AuthenticationSDK/util/Constants.rb b/lib/AuthenticationSDK/util/Constants.rb index d36015de..cb9e8ca3 100644 --- a/lib/AuthenticationSDK/util/Constants.rb +++ b/lib/AuthenticationSDK/util/Constants.rb @@ -175,4 +175,6 @@ class Constants MLE_CACHE_IDENTIFIER_FOR_P12_CERT = "mleCertFromP12" DEFAULT_KEY_FILE_PATH = File.join(Dir.pwd, "resources") + + MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY = "mleResponsePrivateKeyFromFile" end diff --git a/lib/AuthenticationSDK/util/MLEUtility.rb b/lib/AuthenticationSDK/util/MLEUtility.rb index 18797531..7d3f2c87 100644 --- a/lib/AuthenticationSDK/util/MLEUtility.rb +++ b/lib/AuthenticationSDK/util/MLEUtility.rb @@ -1,5 +1,6 @@ require_relative '../logging/log_factory.rb' require 'jose' +require 'json' require_relative './Cache' public @@ -16,10 +17,10 @@ def self.check_is_mle_for_API(merchant_config, inbound_mle_status, operation_ids is_mle_for_api = !merchant_config.disableRequestMLEForMandatoryApisGlobally end - if merchant_config.mapToControlMLEonAPI && operation_ids + if merchant_config.internalMapToControlRequestMLEonAPI && operation_ids operation_ids.each do |operation_id| - if merchant_config.mapToControlMLEonAPI.key?(operation_id) - is_mle_for_api = merchant_config.mapToControlMLEonAPI[operation_id] + if merchant_config.internalMapToControlRequestMLEonAPI.key?(operation_id) + is_mle_for_api = merchant_config.internalMapToControlRequestMLEonAPI[operation_id] break end end @@ -86,4 +87,101 @@ def self.extract_serial_number_from_certificate(certificate) def self.create_request_payload(compact_jwe) "{ \"encryptedRequest\": \"#{compact_jwe}\" }" end + + def self.check_is_response_mle_for_api(merchant_config, operation_ids) + isResponseMLEForApi = false + + if merchant_config.enableResponseMLEGlobally + isResponseMLEForApi = true + end + + # operation_ids is a comma-separated string that can be split into an array + # as there are multiple public function for apiCallFunction such as apiCall, apiCallAsync + operation_array = operation_ids.split(',').map(&:strip) + + # Control the Response MLE only from map + # Special Note: If API expect MLE Response mandatory and map is saying to receive non MLE response then API might throw an error from CyberSource + if merchant_config.internalMapToControlResponseMLEonAPI + operation_array.each do |operation_id| + if merchant_config.internalMapToControlResponseMLEonAPI.key?(operation_id) + isResponseMLEForApi = merchant_config.internalMapToControlResponseMLEonAPI[operation_id] + break + end + end + end + + isResponseMLEForApi + end + + def self.check_is_mle_encrypted_response(responseBody) + return false if responseBody.nil? || responseBody.strip.empty? + + begin + jsonObject = JSON.parse(responseBody) + return false unless jsonObject.is_a?(Hash) && jsonObject.size == 1 + + jsonObject.key?('encryptedResponse') && jsonObject['encryptedResponse'].is_a?(String) + rescue JSON::ParserError, TypeError + false + end + end + + def self.decrypt_mle_response_payload(merchantConfig, responseBody) + @log_obj ||= Log.new(merchantConfig.log_config, 'MLEUtility') + + if !self.check_is_mle_encrypted_response(responseBody) + raise StandardError.new('Response body is not MLE encrypted.') + end + + mlePrivateKey = get_mle_response_private_key(merchantConfig) + jweResponseToken = get_response_mle_token(responseBody) + + # When mle token is empty or null then fall back to non mle encrypted response + if jweResponseToken.nil? || jweResponseToken.strip.empty? + return responseBody + end + + begin + @log_obj.logger.info("LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: #{responseBody}") + + decryptedResponse = JWEUtility.decrypt_jwe_using_private_key(mlePrivateKey, jweResponseToken) + + @log_obj.logger.info("LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION: #{decryptedResponse}") + + return decryptedResponse + rescue e + raise StandardError.new(Constants::ERROR_PREFIX + "An error occurred during MLE decryption: #{e.message}") + end + end + + def get_response_mle_token(responseBody) + @log_obj ||= Log.new(merchantConfig.log_config, 'MLEUtility') + + begin + jsonObject = JSON.parse(responseBody) + token = jsonObject['encryptedResponse'] + token.is_a?(String) ? token : nil + rescue JSON::ParserError, TypeError => e + err = StandardError.new(Constants::ERROR_PREFIX + "Failed to extract Response MLE token: #{e.message}") + @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) + raise err + end + end + + private :get_response_mle_token + + def get_mle_response_private_key(merchantConfig) + @log_obj ||= Log.new(merchantConfig.log_config, 'MLEUtility') + + # First priority - Return private key provided in merchant config, if any + if !merchantConfig.responseMlePrivateKey.nil? && !merchantConfig.responseMlePrivateKey.to_s.strip.empty? + return merchantConfig.responseMlePrivateKey + end + + # Second priority - Return private key loaded from merchantConfig.responseMlePrivateKeyFilePath + responseMlePrivateKey = Cache.new.getMLEResponsePrivateKeyFromFilePath(merchantConfig) + return responseMlePrivateKey + end + + private :get_mle_response_private_key end From 9af424adc24dd769f6b4d5bdf2a9f451348c69e0 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Wed, 15 Oct 2025 23:32:12 +0530 Subject: [PATCH 02/10] Provisional commit for changes to handle MLE for response --- .../cybersource-ruby-template/api.mustache | 8 +++++-- .../api_client.mustache | 22 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/generator/cybersource-ruby-template/api.mustache b/generator/cybersource-ruby-template/api.mustache index 22cbcf90..243b88cb 100644 --- a/generator/cybersource-ruby-template/api.mustache +++ b/generator/cybersource-ruby-template/api.mustache @@ -180,10 +180,13 @@ module {{moduleName}} sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, '{{dataType}}', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) {{/bodyParam}} - inbound_mle_status = "{{#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}}" + inbound_mle_status = "{{#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}}" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["{{operationId}}","{{operationId}}_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["{{operationId}}","{{operationId}}_with_http_info"]) + auth_names = [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}] data, status_code, headers = @api_client.call_api(:{{httpMethod}}, local_var_path, :header_params => header_params, @@ -191,7 +194,8 @@ module {{moduleName}} :form_params => form_params, :body => post_body, :auth_names => auth_names{{#returnType}}, - :return_type => '{{{returnType}}}'{{/returnType}}) + :return_type => '{{{returnType}}}'{{/returnType}}, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/generator/cybersource-ruby-template/api_client.mustache b/generator/cybersource-ruby-template/api_client.mustache index b3c94ce5..199f5135 100644 --- a/generator/cybersource-ruby-template/api_client.mustache +++ b/generator/cybersource-ruby-template/api_client.mustache @@ -110,9 +110,11 @@ module {{moduleName}} query_params = Addressable::URI.form_encode(query_params) end + isResponseMLEForApi = opts[:isResponseMLEForApi] || false + headers = opts[:header_params] if @merchantconfig.authenticationType.upcase != Constants::AUTH_TYPE_MUTUAL_AUTH - headers = CallAuthenticationHeader(http_method, path, body_params, headers, query_params) + headers = CallAuthenticationHeader(http_method, path, body_params, headers, query_params, isResponseMLEForApi) end http_method = http_method.to_sym.downcase header_params = headers.merge(@default_headers) @@ -184,7 +186,7 @@ module {{moduleName}} end end # Calling Authentication - def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params) + def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params, isResponseMLEForApi) require_relative '../AuthenticationSDK/core/Authorization.rb' require_relative '../AuthenticationSDK/authentication/payloadDigest/digest.rb' request_target = get_query_param(path, query_params) @@ -203,7 +205,7 @@ module {{moduleName}} @merchantconfig.requestUrl = url # Calling APISDK, Apisdk.controller. gmtDateTime = DateTime.now.httpdate - token = Authorization.new.getToken(@merchantconfig, gmtDateTime) + token = Authorization.new.getToken(@merchantconfig, gmtDateTime, isResponseMLEForApi) # Adding client ID header header_params['v-c-client-id'] = @client_id @@ -263,6 +265,8 @@ module {{moduleName}} # @param [Response] response HTTP response # @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]" def deserialize(response, return_type) + require_relative '../AuthenticationSDK/mle/MLEUtility.rb' + body = response.body # handle file downloading - return the File instance processed in request callbacks @@ -279,6 +283,18 @@ module {{moduleName}} fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) + # Check the response body first if it is mle encrypted then do deserialize + if MLEUtility.check_is_mle_encrypted_response(body) + begin + body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, body) + rescue e + raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}", + :code => response.code, + :response_headers => response.headers, + :body => body) + end + end + begin data = JSON.parse("[#{body}]", :symbolize_names => true)[0] rescue JSON::ParserError => e From c4faedcc2b398550eb80ee804e9927830324bf20 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Thu, 16 Oct 2025 16:22:34 +0530 Subject: [PATCH 03/10] Changes in generated files as per previous commits to templates --- .../api/batches_api.rb | 32 +++++++--- .../api/billing_agreements_api.rb | 24 +++++-- .../api/bin_lookup_api.rb | 8 ++- .../api/capture_api.rb | 8 ++- .../api/chargeback_details_api.rb | 8 ++- .../api/chargeback_summaries_api.rb | 8 ++- .../api/conversion_details_api.rb | 8 ++- .../api/create_new_webhooks_api.rb | 24 +++++-- lib/cybersource_rest_client/api/credit_api.rb | 8 ++- .../api/customer_api.rb | 32 +++++++--- .../api/customer_payment_instrument_api.rb | 40 +++++++++--- .../api/customer_shipping_address_api.rb | 40 +++++++++--- .../api/decision_manager_api.rb | 40 +++++++++--- .../api/device_de_association_api.rb | 16 +++-- .../api/device_search_api.rb | 16 +++-- .../api/download_dtd_api.rb | 8 ++- .../api/download_xsd_api.rb | 8 ++- .../api/emv_tag_details_api.rb | 16 +++-- .../api/flex_api_api.rb | 8 ++- .../api/instrument_identifier_api.rb | 48 ++++++++++---- .../interchange_clearing_level_details_api.rb | 8 ++- .../api/invoice_settings_api.rb | 16 +++-- .../api/invoices_api.rb | 56 ++++++++++++---- .../api/manage_webhooks_api.rb | 56 ++++++++++++---- .../api/merchant_boarding_api.rb | 16 +++-- .../api/microform_integration_api.rb | 8 ++- .../api/net_fundings_api.rb | 8 ++- .../api/notification_of_changes_api.rb | 8 ++- lib/cybersource_rest_client/api/orders_api.rb | 16 +++-- .../api/payer_authentication_api.rb | 24 +++++-- .../api/payment_batch_summaries_api.rb | 8 ++- .../api/payment_instrument_api.rb | 32 +++++++--- .../api/payment_links_api.rb | 32 +++++++--- .../api/payment_tokens_api.rb | 8 ++- .../api/payments_api.rb | 48 ++++++++++---- .../api/payouts_api.rb | 8 ++- lib/cybersource_rest_client/api/plans_api.rb | 64 ++++++++++++++----- .../api/purchase_and_refund_details_api.rb | 8 ++- .../api/push_funds_api.rb | 8 ++- lib/cybersource_rest_client/api/refund_api.rb | 16 +++-- .../api/report_definitions_api.rb | 16 +++-- .../api/report_downloads_api.rb | 8 ++- .../api/report_subscriptions_api.rb | 40 +++++++++--- .../api/reports_api.rb | 24 +++++-- .../api/retrieval_details_api.rb | 8 ++- .../api/retrieval_summaries_api.rb | 8 ++- .../api/reversal_api.rb | 16 +++-- .../api/search_transactions_api.rb | 16 +++-- .../api/secure_file_share_api.rb | 16 +++-- .../api/subscriptions_api.rb | 64 ++++++++++++++----- .../api/subscriptions_follow_ons_api.rb | 16 +++-- lib/cybersource_rest_client/api/taxes_api.rb | 16 +++-- lib/cybersource_rest_client/api/token_api.rb | 16 +++-- .../api/tokenized_card_api.rb | 24 +++++-- .../api/transaction_batches_api.rb | 32 +++++++--- .../api/transaction_details_api.rb | 8 ++- .../api/transient_token_data_api.rb | 16 +++-- .../unified_checkout_capture_context_api.rb | 8 ++- .../api/user_management_api.rb | 8 ++- .../api/user_management_search_api.rb | 8 ++- .../api/verification_api.rb | 16 +++-- lib/cybersource_rest_client/api/void_api.rb | 40 +++++++++--- lib/cybersource_rest_client/api_client.rb | 22 ++++++- 63 files changed, 973 insertions(+), 321 deletions(-) diff --git a/lib/cybersource_rest_client/api/batches_api.rb b/lib/cybersource_rest_client/api/batches_api.rb index 44c3c540..5df61409 100644 --- a/lib/cybersource_rest_client/api/batches_api.rb +++ b/lib/cybersource_rest_client/api/batches_api.rb @@ -76,10 +76,13 @@ def get_batch_report_with_http_info(batch_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_batch_report","get_batch_report_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_batch_report","get_batch_report_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def get_batch_report_with_http_info(batch_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20011') + :return_type => 'InlineResponse20011', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -155,10 +159,13 @@ def get_batch_status_with_http_info(batch_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_batch_status","get_batch_status_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_batch_status","get_batch_status_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -166,7 +173,8 @@ def get_batch_status_with_http_info(batch_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse20010') + :return_type => 'InlineResponse20010', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -236,10 +244,13 @@ def get_batches_list_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_batches_list","get_batches_list_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_batches_list","get_batches_list_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -247,7 +258,8 @@ def get_batches_list_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2009') + :return_type => 'InlineResponse2009', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -309,10 +321,13 @@ def post_batch_with_http_info(body, opts = {}) post_body = @api_client.object_to_http_body(body) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Body', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_batch","post_batch_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_batch","post_batch_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -320,7 +335,8 @@ def post_batch_with_http_info(body, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse202') + :return_type => 'InlineResponse202', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/billing_agreements_api.rb b/lib/cybersource_rest_client/api/billing_agreements_api.rb index ec02ea31..be42f419 100644 --- a/lib/cybersource_rest_client/api/billing_agreements_api.rb +++ b/lib/cybersource_rest_client/api/billing_agreements_api.rb @@ -76,10 +76,13 @@ def billing_agreements_de_registration_with_http_info(modify_billing_agreement, post_body = @api_client.object_to_http_body(modify_billing_agreement) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'ModifyBillingAgreement', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["billing_agreements_de_registration","billing_agreements_de_registration_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["billing_agreements_de_registration","billing_agreements_de_registration_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def billing_agreements_de_registration_with_http_info(modify_billing_agreement, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2ModifyBillingAgreementPost201Response') + :return_type => 'PtsV2ModifyBillingAgreementPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -155,10 +159,13 @@ def billing_agreements_intimation_with_http_info(intimate_billing_agreement, id, post_body = @api_client.object_to_http_body(intimate_billing_agreement) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'IntimateBillingAgreement', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["billing_agreements_intimation","billing_agreements_intimation_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["billing_agreements_intimation","billing_agreements_intimation_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -166,7 +173,8 @@ def billing_agreements_intimation_with_http_info(intimate_billing_agreement, id, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2CreditsPost201Response1') + :return_type => 'PtsV2CreditsPost201Response1', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -228,10 +236,13 @@ def billing_agreements_registration_with_http_info(create_billing_agreement, opt post_body = @api_client.object_to_http_body(create_billing_agreement) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateBillingAgreement', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["billing_agreements_registration","billing_agreements_registration_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["billing_agreements_registration","billing_agreements_registration_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -239,7 +250,8 @@ def billing_agreements_registration_with_http_info(create_billing_agreement, opt :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2CreateBillingAgreementPost201Response') + :return_type => 'PtsV2CreateBillingAgreementPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/bin_lookup_api.rb b/lib/cybersource_rest_client/api/bin_lookup_api.rb index e4b84b4e..599ac4cc 100644 --- a/lib/cybersource_rest_client/api/bin_lookup_api.rb +++ b/lib/cybersource_rest_client/api/bin_lookup_api.rb @@ -71,10 +71,13 @@ def get_account_info_with_http_info(create_bin_lookup_request, opts = {}) post_body = @api_client.object_to_http_body(create_bin_lookup_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateBinLookupRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_account_info","get_account_info_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_account_info","get_account_info_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -82,7 +85,8 @@ def get_account_info_with_http_info(create_bin_lookup_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2012') + :return_type => 'InlineResponse2012', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/capture_api.rb b/lib/cybersource_rest_client/api/capture_api.rb index bbd37bfc..bbb497dc 100644 --- a/lib/cybersource_rest_client/api/capture_api.rb +++ b/lib/cybersource_rest_client/api/capture_api.rb @@ -76,10 +76,13 @@ def capture_payment_with_http_info(capture_payment_request, id, opts = {}) post_body = @api_client.object_to_http_body(capture_payment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CapturePaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["capture_payment","capture_payment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["capture_payment","capture_payment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def capture_payment_with_http_info(capture_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsCapturesPost201Response') + :return_type => 'PtsV2PaymentsCapturesPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/chargeback_details_api.rb b/lib/cybersource_rest_client/api/chargeback_details_api.rb index 49fab4d2..41525017 100644 --- a/lib/cybersource_rest_client/api/chargeback_details_api.rb +++ b/lib/cybersource_rest_client/api/chargeback_details_api.rb @@ -87,10 +87,13 @@ def get_chargeback_details_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_chargeback_details","get_chargeback_details_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_chargeback_details","get_chargeback_details_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -98,7 +101,8 @@ def get_chargeback_details_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ChargebackDetailsGet200Response') + :return_type => 'ReportingV3ChargebackDetailsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/chargeback_summaries_api.rb b/lib/cybersource_rest_client/api/chargeback_summaries_api.rb index f075de35..2fa24210 100644 --- a/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +++ b/lib/cybersource_rest_client/api/chargeback_summaries_api.rb @@ -87,10 +87,13 @@ def get_chargeback_summaries_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_chargeback_summaries","get_chargeback_summaries_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_chargeback_summaries","get_chargeback_summaries_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -98,7 +101,8 @@ def get_chargeback_summaries_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ChargebackSummariesGet200Response') + :return_type => 'ReportingV3ChargebackSummariesGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/conversion_details_api.rb b/lib/cybersource_rest_client/api/conversion_details_api.rb index d898152c..81669f23 100644 --- a/lib/cybersource_rest_client/api/conversion_details_api.rb +++ b/lib/cybersource_rest_client/api/conversion_details_api.rb @@ -87,10 +87,13 @@ def get_conversion_detail_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_conversion_detail","get_conversion_detail_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_conversion_detail","get_conversion_detail_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -98,7 +101,8 @@ def get_conversion_detail_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ConversionDetailsGet200Response') + :return_type => 'ReportingV3ConversionDetailsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/create_new_webhooks_api.rb b/lib/cybersource_rest_client/api/create_new_webhooks_api.rb index c8fd822d..322aedf4 100644 --- a/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +++ b/lib/cybersource_rest_client/api/create_new_webhooks_api.rb @@ -72,10 +72,13 @@ def find_products_to_subscribe_with_http_info(organization_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["find_products_to_subscribe","find_products_to_subscribe_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["find_products_to_subscribe","find_products_to_subscribe_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -83,7 +86,8 @@ def find_products_to_subscribe_with_http_info(organization_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'Array') + :return_type => 'Array', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -141,10 +145,13 @@ def notification_subscriptions_v2_webhooks_post_with_http_info(opts = {}) post_body = @api_client.object_to_http_body(opts[:'create_webhook']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateWebhook', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v2_webhooks_post","notification_subscriptions_v2_webhooks_post_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["notification_subscriptions_v2_webhooks_post","notification_subscriptions_v2_webhooks_post_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -152,7 +159,8 @@ def notification_subscriptions_v2_webhooks_post_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2015') + :return_type => 'InlineResponse2015', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -235,10 +243,13 @@ def save_sym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissio post_body = @api_client.object_to_http_body(opts[:'save_sym_egress_key']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'SaveSymEgressKey', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["save_sym_egress_key","save_sym_egress_key_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["save_sym_egress_key","save_sym_egress_key_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -246,7 +257,8 @@ def save_sym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissio :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2014') + :return_type => 'InlineResponse2014', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/credit_api.rb b/lib/cybersource_rest_client/api/credit_api.rb index 18fff96a..b7bf2d1a 100644 --- a/lib/cybersource_rest_client/api/credit_api.rb +++ b/lib/cybersource_rest_client/api/credit_api.rb @@ -70,10 +70,13 @@ def create_credit_with_http_info(create_credit_request, opts = {}) post_body = @api_client.object_to_http_body(create_credit_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateCreditRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_credit","create_credit_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_credit","create_credit_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def create_credit_with_http_info(create_credit_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2CreditsPost201Response') + :return_type => 'PtsV2CreditsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/customer_api.rb b/lib/cybersource_rest_client/api/customer_api.rb index 7821a6e4..a59bb01a 100644 --- a/lib/cybersource_rest_client/api/customer_api.rb +++ b/lib/cybersource_rest_client/api/customer_api.rb @@ -75,17 +75,21 @@ def delete_customer_with_http_info(customer_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_customer","delete_customer_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_customer","delete_customer_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -152,10 +156,13 @@ def get_customer_with_http_info(customer_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_customer","get_customer_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_customer","get_customer_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -163,7 +170,8 @@ def get_customer_with_http_info(customer_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostCustomerRequest') + :return_type => 'PostCustomerRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -237,10 +245,13 @@ def patch_customer_with_http_info(customer_id, patch_customer_request, opts = {} post_body = @api_client.object_to_http_body(patch_customer_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PatchCustomerRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["patch_customer","patch_customer_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["patch_customer","patch_customer_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -248,7 +259,8 @@ def patch_customer_with_http_info(customer_id, patch_customer_request, opts = {} :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PatchCustomerRequest') + :return_type => 'PatchCustomerRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -313,10 +325,13 @@ def post_customer_with_http_info(post_customer_request, opts = {}) post_body = @api_client.object_to_http_body(post_customer_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostCustomerRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_customer","post_customer_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_customer","post_customer_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -324,7 +339,8 @@ def post_customer_with_http_info(post_customer_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostCustomerRequest') + :return_type => 'PostCustomerRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb b/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb index cb2579d5..15a30a03 100644 --- a/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +++ b/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb @@ -81,17 +81,21 @@ def delete_customer_payment_instrument_with_http_info(customer_id, payment_instr else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_customer_payment_instrument","delete_customer_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_customer_payment_instrument","delete_customer_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -164,10 +168,13 @@ def get_customer_payment_instrument_with_http_info(customer_id, payment_instrume else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_customer_payment_instrument","get_customer_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_customer_payment_instrument","get_customer_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -175,7 +182,8 @@ def get_customer_payment_instrument_with_http_info(customer_id, payment_instrume :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostCustomerPaymentInstrumentRequest') + :return_type => 'PostCustomerPaymentInstrumentRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -248,10 +256,13 @@ def get_customer_payment_instruments_list_with_http_info(customer_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_customer_payment_instruments_list","get_customer_payment_instruments_list_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_customer_payment_instruments_list","get_customer_payment_instruments_list_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -259,7 +270,8 @@ def get_customer_payment_instruments_list_with_http_info(customer_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PaymentInstrumentList') + :return_type => 'PaymentInstrumentList', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -339,10 +351,13 @@ def patch_customers_payment_instrument_with_http_info(customer_id, payment_instr post_body = @api_client.object_to_http_body(patch_customer_payment_instrument_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PatchCustomerPaymentInstrumentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["patch_customers_payment_instrument","patch_customers_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["patch_customers_payment_instrument","patch_customers_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -350,7 +365,8 @@ def patch_customers_payment_instrument_with_http_info(customer_id, payment_instr :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PatchCustomerPaymentInstrumentRequest') + :return_type => 'PatchCustomerPaymentInstrumentRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -421,10 +437,13 @@ def post_customer_payment_instrument_with_http_info(customer_id, post_customer_p post_body = @api_client.object_to_http_body(post_customer_payment_instrument_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostCustomerPaymentInstrumentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_customer_payment_instrument","post_customer_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_customer_payment_instrument","post_customer_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -432,7 +451,8 @@ def post_customer_payment_instrument_with_http_info(customer_id, post_customer_p :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostCustomerPaymentInstrumentRequest') + :return_type => 'PostCustomerPaymentInstrumentRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/customer_shipping_address_api.rb b/lib/cybersource_rest_client/api/customer_shipping_address_api.rb index 027a5cf6..faf24dde 100644 --- a/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +++ b/lib/cybersource_rest_client/api/customer_shipping_address_api.rb @@ -81,17 +81,21 @@ def delete_customer_shipping_address_with_http_info(customer_id, shipping_addres else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_customer_shipping_address","delete_customer_shipping_address_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_customer_shipping_address","delete_customer_shipping_address_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -164,10 +168,13 @@ def get_customer_shipping_address_with_http_info(customer_id, shipping_address_i else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_customer_shipping_address","get_customer_shipping_address_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_customer_shipping_address","get_customer_shipping_address_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -175,7 +182,8 @@ def get_customer_shipping_address_with_http_info(customer_id, shipping_address_i :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostCustomerShippingAddressRequest') + :return_type => 'PostCustomerShippingAddressRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -248,10 +256,13 @@ def get_customer_shipping_addresses_list_with_http_info(customer_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_customer_shipping_addresses_list","get_customer_shipping_addresses_list_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_customer_shipping_addresses_list","get_customer_shipping_addresses_list_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -259,7 +270,8 @@ def get_customer_shipping_addresses_list_with_http_info(customer_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ShippingAddressListForCustomer') + :return_type => 'ShippingAddressListForCustomer', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -339,10 +351,13 @@ def patch_customers_shipping_address_with_http_info(customer_id, shipping_addres post_body = @api_client.object_to_http_body(patch_customer_shipping_address_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PatchCustomerShippingAddressRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["patch_customers_shipping_address","patch_customers_shipping_address_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["patch_customers_shipping_address","patch_customers_shipping_address_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -350,7 +365,8 @@ def patch_customers_shipping_address_with_http_info(customer_id, shipping_addres :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PatchCustomerShippingAddressRequest') + :return_type => 'PatchCustomerShippingAddressRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -421,10 +437,13 @@ def post_customer_shipping_address_with_http_info(customer_id, post_customer_shi post_body = @api_client.object_to_http_body(post_customer_shipping_address_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostCustomerShippingAddressRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_customer_shipping_address","post_customer_shipping_address_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_customer_shipping_address","post_customer_shipping_address_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -432,7 +451,8 @@ def post_customer_shipping_address_with_http_info(customer_id, post_customer_shi :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostCustomerShippingAddressRequest') + :return_type => 'PostCustomerShippingAddressRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/decision_manager_api.rb b/lib/cybersource_rest_client/api/decision_manager_api.rb index 3813aa88..aa75f159 100644 --- a/lib/cybersource_rest_client/api/decision_manager_api.rb +++ b/lib/cybersource_rest_client/api/decision_manager_api.rb @@ -76,10 +76,13 @@ def action_decision_manager_case_with_http_info(id, case_management_actions_requ post_body = @api_client.object_to_http_body(case_management_actions_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CaseManagementActionsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["action_decision_manager_case","action_decision_manager_case_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["action_decision_manager_case","action_decision_manager_case_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def action_decision_manager_case_with_http_info(id, case_management_actions_requ :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2001') + :return_type => 'InlineResponse2001', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -155,10 +159,13 @@ def add_negative_with_http_info(type, add_negative_list_request, opts = {}) post_body = @api_client.object_to_http_body(add_negative_list_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AddNegativeListRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["add_negative","add_negative_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["add_negative","add_negative_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -166,7 +173,8 @@ def add_negative_with_http_info(type, add_negative_list_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1UpdatePost201Response') + :return_type => 'RiskV1UpdatePost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -234,10 +242,13 @@ def comment_decision_manager_case_with_http_info(id, case_management_comments_re post_body = @api_client.object_to_http_body(case_management_comments_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CaseManagementCommentsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["comment_decision_manager_case","comment_decision_manager_case_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["comment_decision_manager_case","comment_decision_manager_case_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -245,7 +256,8 @@ def comment_decision_manager_case_with_http_info(id, case_management_comments_re :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2011') + :return_type => 'InlineResponse2011', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -307,10 +319,13 @@ def create_bundled_decision_manager_case_with_http_info(create_bundled_decision_ post_body = @api_client.object_to_http_body(create_bundled_decision_manager_case_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateBundledDecisionManagerCaseRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_bundled_decision_manager_case","create_bundled_decision_manager_case_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_bundled_decision_manager_case","create_bundled_decision_manager_case_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -318,7 +333,8 @@ def create_bundled_decision_manager_case_with_http_info(create_bundled_decision_ :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1DecisionsPost201Response') + :return_type => 'RiskV1DecisionsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -386,10 +402,13 @@ def fraud_update_with_http_info(id, fraud_marking_action_request, opts = {}) post_body = @api_client.object_to_http_body(fraud_marking_action_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'FraudMarkingActionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["fraud_update","fraud_update_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["fraud_update","fraud_update_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -397,7 +416,8 @@ def fraud_update_with_http_info(id, fraud_marking_action_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1UpdatePost201Response') + :return_type => 'RiskV1UpdatePost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/device_de_association_api.rb b/lib/cybersource_rest_client/api/device_de_association_api.rb index 668ce550..c877fc64 100644 --- a/lib/cybersource_rest_client/api/device_de_association_api.rb +++ b/lib/cybersource_rest_client/api/device_de_association_api.rb @@ -70,17 +70,21 @@ def delete_terminal_association_with_http_info(de_association_request_body, opts post_body = @api_client.object_to_http_body(de_association_request_body) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'DeAssociationRequestBody', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_terminal_association","delete_terminal_association_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_terminal_association","delete_terminal_association_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -142,10 +146,13 @@ def post_de_associate_v3_terminal_with_http_info(device_de_associate_v3_request, post_body = @api_client.object_to_http_body(device_de_associate_v3_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Array<DeviceDeAssociateV3Request>', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_de_associate_v3_terminal","post_de_associate_v3_terminal_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_de_associate_v3_terminal","post_de_associate_v3_terminal_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -153,7 +160,8 @@ def post_de_associate_v3_terminal_with_http_info(device_de_associate_v3_request, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'Array') + :return_type => 'Array', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/device_search_api.rb b/lib/cybersource_rest_client/api/device_search_api.rb index a0317f74..ba39726f 100644 --- a/lib/cybersource_rest_client/api/device_search_api.rb +++ b/lib/cybersource_rest_client/api/device_search_api.rb @@ -70,10 +70,13 @@ def post_search_query_with_http_info(post_device_search_request, opts = {}) post_body = @api_client.object_to_http_body(post_device_search_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostDeviceSearchRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_search_query","post_search_query_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_search_query","post_search_query_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def post_search_query_with_http_info(post_device_search_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2006') + :return_type => 'InlineResponse2006', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -143,10 +147,13 @@ def post_search_query_v3_with_http_info(post_device_search_request_v3, opts = {} post_body = @api_client.object_to_http_body(post_device_search_request_v3) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostDeviceSearchRequestV3', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_search_query_v3","post_search_query_v3_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_search_query_v3","post_search_query_v3_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -154,7 +161,8 @@ def post_search_query_v3_with_http_info(post_device_search_request_v3, opts = {} :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2008') + :return_type => 'InlineResponse2008', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/download_dtd_api.rb b/lib/cybersource_rest_client/api/download_dtd_api.rb index aee5d7c8..56dd18c0 100644 --- a/lib/cybersource_rest_client/api/download_dtd_api.rb +++ b/lib/cybersource_rest_client/api/download_dtd_api.rb @@ -72,17 +72,21 @@ def get_dtdv2_with_http_info(report_definition_name_version, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_dtdv2","get_dtdv2_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_dtdv2","get_dtdv2_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/download_xsd_api.rb b/lib/cybersource_rest_client/api/download_xsd_api.rb index 26fd592a..9d6ba040 100644 --- a/lib/cybersource_rest_client/api/download_xsd_api.rb +++ b/lib/cybersource_rest_client/api/download_xsd_api.rb @@ -72,17 +72,21 @@ def get_xsdv2_with_http_info(report_definition_name_version, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_xsdv2","get_xsdv2_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_xsdv2","get_xsdv2_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/emv_tag_details_api.rb b/lib/cybersource_rest_client/api/emv_tag_details_api.rb index cd6a71b0..219fe335 100644 --- a/lib/cybersource_rest_client/api/emv_tag_details_api.rb +++ b/lib/cybersource_rest_client/api/emv_tag_details_api.rb @@ -66,10 +66,13 @@ def get_emv_tags_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_emv_tags","get_emv_tags_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_emv_tags","get_emv_tags_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -77,7 +80,8 @@ def get_emv_tags_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TssV2GetEmvTags200Response') + :return_type => 'TssV2GetEmvTags200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -139,10 +143,13 @@ def parse_emv_tags_with_http_info(body, opts = {}) post_body = @api_client.object_to_http_body(body) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Body', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["parse_emv_tags","parse_emv_tags_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["parse_emv_tags","parse_emv_tags_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -150,7 +157,8 @@ def parse_emv_tags_with_http_info(body, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TssV2PostEmvTags200Response') + :return_type => 'TssV2PostEmvTags200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/flex_api_api.rb b/lib/cybersource_rest_client/api/flex_api_api.rb index 989ca674..df0ca791 100644 --- a/lib/cybersource_rest_client/api/flex_api_api.rb +++ b/lib/cybersource_rest_client/api/flex_api_api.rb @@ -70,10 +70,13 @@ def generate_flex_api_capture_context_with_http_info(generate_flex_api_capture_c post_body = @api_client.object_to_http_body(generate_flex_api_capture_context_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'GenerateFlexAPICaptureContextRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["generate_flex_api_capture_context","generate_flex_api_capture_context_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["generate_flex_api_capture_context","generate_flex_api_capture_context_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def generate_flex_api_capture_context_with_http_info(generate_flex_api_capture_c :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'String') + :return_type => 'String', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/instrument_identifier_api.rb b/lib/cybersource_rest_client/api/instrument_identifier_api.rb index 761ba03c..b1f423cb 100644 --- a/lib/cybersource_rest_client/api/instrument_identifier_api.rb +++ b/lib/cybersource_rest_client/api/instrument_identifier_api.rb @@ -75,17 +75,21 @@ def delete_instrument_identifier_with_http_info(instrument_identifier_id, opts = else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_instrument_identifier","delete_instrument_identifier_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_instrument_identifier","delete_instrument_identifier_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -155,10 +159,13 @@ def get_instrument_identifier_with_http_info(instrument_identifier_id, opts = {} else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_instrument_identifier","get_instrument_identifier_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_instrument_identifier","get_instrument_identifier_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -166,7 +173,8 @@ def get_instrument_identifier_with_http_info(instrument_identifier_id, opts = {} :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostInstrumentIdentifierRequest') + :return_type => 'PostInstrumentIdentifierRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -242,10 +250,13 @@ def get_instrument_identifier_payment_instruments_list_with_http_info(instrument else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_instrument_identifier_payment_instruments_list","get_instrument_identifier_payment_instruments_list_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_instrument_identifier_payment_instruments_list","get_instrument_identifier_payment_instruments_list_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -253,7 +264,8 @@ def get_instrument_identifier_payment_instruments_list_with_http_info(instrument :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PaymentInstrumentList1') + :return_type => 'PaymentInstrumentList1', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -330,10 +342,13 @@ def patch_instrument_identifier_with_http_info(instrument_identifier_id, patch_i post_body = @api_client.object_to_http_body(patch_instrument_identifier_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PatchInstrumentIdentifierRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["patch_instrument_identifier","patch_instrument_identifier_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["patch_instrument_identifier","patch_instrument_identifier_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -341,7 +356,8 @@ def patch_instrument_identifier_with_http_info(instrument_identifier_id, patch_i :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PatchInstrumentIdentifierRequest') + :return_type => 'PatchInstrumentIdentifierRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -409,10 +425,13 @@ def post_instrument_identifier_with_http_info(post_instrument_identifier_request post_body = @api_client.object_to_http_body(post_instrument_identifier_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostInstrumentIdentifierRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_instrument_identifier","post_instrument_identifier_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_instrument_identifier","post_instrument_identifier_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -420,7 +439,8 @@ def post_instrument_identifier_with_http_info(post_instrument_identifier_request :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostInstrumentIdentifierRequest') + :return_type => 'PostInstrumentIdentifierRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -491,17 +511,21 @@ def post_instrument_identifier_enrollment_with_http_info(instrument_identifier_i post_body = @api_client.object_to_http_body(post_instrument_identifier_enrollment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostInstrumentIdentifierEnrollmentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_instrument_identifier_enrollment","post_instrument_identifier_enrollment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_instrument_identifier_enrollment","post_instrument_identifier_enrollment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb b/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb index df9d0634..33916c2a 100644 --- a/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +++ b/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb @@ -87,10 +87,13 @@ def get_interchange_clearing_level_details_with_http_info(start_time, end_time, else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_interchange_clearing_level_details","get_interchange_clearing_level_details_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_interchange_clearing_level_details","get_interchange_clearing_level_details_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -98,7 +101,8 @@ def get_interchange_clearing_level_details_with_http_info(start_time, end_time, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3InterchangeClearingLevelDetailsGet200Response') + :return_type => 'ReportingV3InterchangeClearingLevelDetailsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/invoice_settings_api.rb b/lib/cybersource_rest_client/api/invoice_settings_api.rb index ead73502..c752e7d4 100644 --- a/lib/cybersource_rest_client/api/invoice_settings_api.rb +++ b/lib/cybersource_rest_client/api/invoice_settings_api.rb @@ -66,10 +66,13 @@ def get_invoice_settings_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_invoice_settings","get_invoice_settings_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_invoice_settings","get_invoice_settings_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -77,7 +80,8 @@ def get_invoice_settings_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoiceSettingsGet200Response') + :return_type => 'InvoicingV2InvoiceSettingsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -139,10 +143,13 @@ def update_invoice_settings_with_http_info(invoice_settings_request, opts = {}) post_body = @api_client.object_to_http_body(invoice_settings_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'InvoiceSettingsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_invoice_settings","update_invoice_settings_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_invoice_settings","update_invoice_settings_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, @@ -150,7 +157,8 @@ def update_invoice_settings_with_http_info(invoice_settings_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoiceSettingsGet200Response') + :return_type => 'InvoicingV2InvoiceSettingsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/invoices_api.rb b/lib/cybersource_rest_client/api/invoices_api.rb index 916e7656..73571460 100644 --- a/lib/cybersource_rest_client/api/invoices_api.rb +++ b/lib/cybersource_rest_client/api/invoices_api.rb @@ -70,10 +70,13 @@ def create_invoice_with_http_info(create_invoice_request, opts = {}) post_body = @api_client.object_to_http_body(create_invoice_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateInvoiceRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_invoice","create_invoice_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_invoice","create_invoice_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def create_invoice_with_http_info(create_invoice_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesPost201Response') + :return_type => 'InvoicingV2InvoicesPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -156,10 +160,13 @@ def get_all_invoices_with_http_info(offset, limit, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_all_invoices","get_all_invoices_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_all_invoices","get_all_invoices_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -167,7 +174,8 @@ def get_all_invoices_with_http_info(offset, limit, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesAllGet200Response') + :return_type => 'InvoicingV2InvoicesAllGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -231,10 +239,13 @@ def get_invoice_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_invoice","get_invoice_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_invoice","get_invoice_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -242,7 +253,8 @@ def get_invoice_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesGet200Response') + :return_type => 'InvoicingV2InvoicesGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -306,10 +318,13 @@ def perform_cancel_action_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["perform_cancel_action","perform_cancel_action_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["perform_cancel_action","perform_cancel_action_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -317,7 +332,8 @@ def perform_cancel_action_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesCancel200Response') + :return_type => 'InvoicingV2InvoicesCancel200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -381,10 +397,13 @@ def perform_publish_action_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["perform_publish_action","perform_publish_action_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["perform_publish_action","perform_publish_action_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -392,7 +411,8 @@ def perform_publish_action_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesPublish200Response') + :return_type => 'InvoicingV2InvoicesPublish200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -456,10 +476,13 @@ def perform_send_action_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["perform_send_action","perform_send_action_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["perform_send_action","perform_send_action_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -467,7 +490,8 @@ def perform_send_action_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesSend200Response') + :return_type => 'InvoicingV2InvoicesSend200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -535,10 +559,13 @@ def update_invoice_with_http_info(id, update_invoice_request, opts = {}) post_body = @api_client.object_to_http_body(update_invoice_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateInvoiceRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_invoice","update_invoice_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_invoice","update_invoice_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, @@ -546,7 +573,8 @@ def update_invoice_with_http_info(id, update_invoice_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InvoicingV2InvoicesPut200Response') + :return_type => 'InvoicingV2InvoicesPut200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/manage_webhooks_api.rb b/lib/cybersource_rest_client/api/manage_webhooks_api.rb index 3c6b0a65..653a3441 100644 --- a/lib/cybersource_rest_client/api/manage_webhooks_api.rb +++ b/lib/cybersource_rest_client/api/manage_webhooks_api.rb @@ -72,17 +72,21 @@ def delete_webhook_subscription_with_http_info(webhook_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_webhook_subscription","delete_webhook_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_webhook_subscription","delete_webhook_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -146,10 +150,13 @@ def get_webhook_subscription_by_id_with_http_info(webhook_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_webhook_subscription_by_id","get_webhook_subscription_by_id_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_webhook_subscription_by_id","get_webhook_subscription_by_id_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -157,7 +164,8 @@ def get_webhook_subscription_by_id_with_http_info(webhook_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2015') + :return_type => 'InlineResponse2015', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -228,10 +236,13 @@ def get_webhook_subscriptions_by_org_with_http_info(organization_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_webhook_subscriptions_by_org","get_webhook_subscriptions_by_org_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_webhook_subscriptions_by_org","get_webhook_subscriptions_by_org_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -239,7 +250,8 @@ def get_webhook_subscriptions_by_org_with_http_info(organization_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'Array') + :return_type => 'Array', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -303,10 +315,13 @@ def notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info(webhoo else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v1_webhooks_webhook_id_post","notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["notification_subscriptions_v1_webhooks_webhook_id_post","notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -314,7 +329,8 @@ def notification_subscriptions_v1_webhooks_webhook_id_post_with_http_info(webhoo :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2016') + :return_type => 'InlineResponse2016', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -378,10 +394,13 @@ def notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webho post_body = @api_client.object_to_http_body(opts[:'update_webhook']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateWebhook', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v2_webhooks_webhook_id_patch","notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["notification_subscriptions_v2_webhooks_webhook_id_patch","notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -389,7 +408,8 @@ def notification_subscriptions_v2_webhooks_webhook_id_patch_with_http_info(webho :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2005') + :return_type => 'InlineResponse2005', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -453,17 +473,21 @@ def notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info( post_body = @api_client.object_to_http_body(opts[:'update_status']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateStatus', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["notification_subscriptions_v2_webhooks_webhook_id_status_put","notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["notification_subscriptions_v2_webhooks_webhook_id_status_put","notification_subscriptions_v2_webhooks_webhook_id_status_put_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -550,10 +574,13 @@ def save_asym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissi post_body = @api_client.object_to_http_body(save_asym_egress_key) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'SaveAsymEgressKey', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["save_asym_egress_key","save_asym_egress_key_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["save_asym_egress_key","save_asym_egress_key_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -561,7 +588,8 @@ def save_asym_egress_key_with_http_info(v_c_sender_organization_id, v_c_permissi :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2017') + :return_type => 'InlineResponse2017', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/merchant_boarding_api.rb b/lib/cybersource_rest_client/api/merchant_boarding_api.rb index 56ed0dae..ee0b4c32 100644 --- a/lib/cybersource_rest_client/api/merchant_boarding_api.rb +++ b/lib/cybersource_rest_client/api/merchant_boarding_api.rb @@ -72,10 +72,13 @@ def get_registration_with_http_info(registration_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_registration","get_registration_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_registration","get_registration_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -83,7 +86,8 @@ def get_registration_with_http_info(registration_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2002') + :return_type => 'InlineResponse2002', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -148,10 +152,13 @@ def post_registration_with_http_info(post_registration_body, opts = {}) post_body = @api_client.object_to_http_body(post_registration_body) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostRegistrationBody', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_registration","post_registration_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_registration","post_registration_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -159,7 +166,8 @@ def post_registration_with_http_info(post_registration_body, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse2013') + :return_type => 'InlineResponse2013', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/microform_integration_api.rb b/lib/cybersource_rest_client/api/microform_integration_api.rb index fa64d0a7..89540164 100644 --- a/lib/cybersource_rest_client/api/microform_integration_api.rb +++ b/lib/cybersource_rest_client/api/microform_integration_api.rb @@ -70,10 +70,13 @@ def generate_capture_context_with_http_info(generate_capture_context_request, op post_body = @api_client.object_to_http_body(generate_capture_context_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'GenerateCaptureContextRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["generate_capture_context","generate_capture_context_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["generate_capture_context","generate_capture_context_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def generate_capture_context_with_http_info(generate_capture_context_request, op :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'String') + :return_type => 'String', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/net_fundings_api.rb b/lib/cybersource_rest_client/api/net_fundings_api.rb index afad54df..fd5c25c3 100644 --- a/lib/cybersource_rest_client/api/net_fundings_api.rb +++ b/lib/cybersource_rest_client/api/net_fundings_api.rb @@ -90,10 +90,13 @@ def get_net_funding_details_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_net_funding_details","get_net_funding_details_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_net_funding_details","get_net_funding_details_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -101,7 +104,8 @@ def get_net_funding_details_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3NetFundingsGet200Response') + :return_type => 'ReportingV3NetFundingsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/notification_of_changes_api.rb b/lib/cybersource_rest_client/api/notification_of_changes_api.rb index 873478a4..e4c0daff 100644 --- a/lib/cybersource_rest_client/api/notification_of_changes_api.rb +++ b/lib/cybersource_rest_client/api/notification_of_changes_api.rb @@ -80,10 +80,13 @@ def get_notification_of_change_report_with_http_info(start_time, end_time, opts else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_notification_of_change_report","get_notification_of_change_report_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_notification_of_change_report","get_notification_of_change_report_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -91,7 +94,8 @@ def get_notification_of_change_report_with_http_info(start_time, end_time, opts :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3NotificationofChangesGet200Response') + :return_type => 'ReportingV3NotificationofChangesGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/orders_api.rb b/lib/cybersource_rest_client/api/orders_api.rb index eb36728c..7d9a3a14 100644 --- a/lib/cybersource_rest_client/api/orders_api.rb +++ b/lib/cybersource_rest_client/api/orders_api.rb @@ -70,10 +70,13 @@ def create_order_with_http_info(create_order_request, opts = {}) post_body = @api_client.object_to_http_body(create_order_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateOrderRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_order","create_order_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_order","create_order_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def create_order_with_http_info(create_order_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2CreateOrderPost201Response') + :return_type => 'PtsV2CreateOrderPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -149,10 +153,13 @@ def update_order_with_http_info(id, update_order_request, opts = {}) post_body = @api_client.object_to_http_body(update_order_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateOrderRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_order","update_order_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_order","update_order_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -160,7 +167,8 @@ def update_order_with_http_info(id, update_order_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2UpdateOrderPatch201Response') + :return_type => 'PtsV2UpdateOrderPatch201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payer_authentication_api.rb b/lib/cybersource_rest_client/api/payer_authentication_api.rb index bb8545a4..8704e164 100644 --- a/lib/cybersource_rest_client/api/payer_authentication_api.rb +++ b/lib/cybersource_rest_client/api/payer_authentication_api.rb @@ -70,10 +70,13 @@ def check_payer_auth_enrollment_with_http_info(check_payer_auth_enrollment_reque post_body = @api_client.object_to_http_body(check_payer_auth_enrollment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CheckPayerAuthEnrollmentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["check_payer_auth_enrollment","check_payer_auth_enrollment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["check_payer_auth_enrollment","check_payer_auth_enrollment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def check_payer_auth_enrollment_with_http_info(check_payer_auth_enrollment_reque :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1AuthenticationsPost201Response') + :return_type => 'RiskV1AuthenticationsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -143,10 +147,13 @@ def payer_auth_setup_with_http_info(payer_auth_setup_request, opts = {}) post_body = @api_client.object_to_http_body(payer_auth_setup_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PayerAuthSetupRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["payer_auth_setup","payer_auth_setup_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["payer_auth_setup","payer_auth_setup_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -154,7 +161,8 @@ def payer_auth_setup_with_http_info(payer_auth_setup_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1AuthenticationSetupsPost201Response') + :return_type => 'RiskV1AuthenticationSetupsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -216,10 +224,13 @@ def validate_authentication_results_with_http_info(validate_request, opts = {}) post_body = @api_client.object_to_http_body(validate_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'ValidateRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["validate_authentication_results","validate_authentication_results_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["validate_authentication_results","validate_authentication_results_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -227,7 +238,8 @@ def validate_authentication_results_with_http_info(validate_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1AuthenticationResultsPost201Response') + :return_type => 'RiskV1AuthenticationResultsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb b/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb index 1f41f1c6..bb929b4d 100644 --- a/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +++ b/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb @@ -96,10 +96,13 @@ def get_payment_batch_summary_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_payment_batch_summary","get_payment_batch_summary_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_payment_batch_summary","get_payment_batch_summary_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -107,7 +110,8 @@ def get_payment_batch_summary_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3PaymentBatchSummariesGet200Response') + :return_type => 'ReportingV3PaymentBatchSummariesGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payment_instrument_api.rb b/lib/cybersource_rest_client/api/payment_instrument_api.rb index 1ae84d3c..87b02515 100644 --- a/lib/cybersource_rest_client/api/payment_instrument_api.rb +++ b/lib/cybersource_rest_client/api/payment_instrument_api.rb @@ -75,17 +75,21 @@ def delete_payment_instrument_with_http_info(payment_instrument_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_payment_instrument","delete_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_payment_instrument","delete_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -155,10 +159,13 @@ def get_payment_instrument_with_http_info(payment_instrument_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_payment_instrument","get_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_payment_instrument","get_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -166,7 +173,8 @@ def get_payment_instrument_with_http_info(payment_instrument_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostPaymentInstrumentRequest') + :return_type => 'PostPaymentInstrumentRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -243,10 +251,13 @@ def patch_payment_instrument_with_http_info(payment_instrument_id, patch_payment post_body = @api_client.object_to_http_body(patch_payment_instrument_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PatchPaymentInstrumentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["patch_payment_instrument","patch_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["patch_payment_instrument","patch_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -254,7 +265,8 @@ def patch_payment_instrument_with_http_info(payment_instrument_id, patch_payment :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PatchPaymentInstrumentRequest') + :return_type => 'PatchPaymentInstrumentRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -322,10 +334,13 @@ def post_payment_instrument_with_http_info(post_payment_instrument_request, opts post_body = @api_client.object_to_http_body(post_payment_instrument_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostPaymentInstrumentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_payment_instrument","post_payment_instrument_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_payment_instrument","post_payment_instrument_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -333,7 +348,8 @@ def post_payment_instrument_with_http_info(post_payment_instrument_request, opts :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PostPaymentInstrumentRequest') + :return_type => 'PostPaymentInstrumentRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payment_links_api.rb b/lib/cybersource_rest_client/api/payment_links_api.rb index 12dfac13..7d90d118 100644 --- a/lib/cybersource_rest_client/api/payment_links_api.rb +++ b/lib/cybersource_rest_client/api/payment_links_api.rb @@ -70,10 +70,13 @@ def create_payment_link_with_http_info(create_payment_link_request, opts = {}) post_body = @api_client.object_to_http_body(create_payment_link_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreatePaymentLinkRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_payment_link","create_payment_link_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_payment_link","create_payment_link_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def create_payment_link_with_http_info(create_payment_link_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PblPaymentLinksPost201Response') + :return_type => 'PblPaymentLinksPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -156,10 +160,13 @@ def get_all_payment_links_with_http_info(offset, limit, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_all_payment_links","get_all_payment_links_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_all_payment_links","get_all_payment_links_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -167,7 +174,8 @@ def get_all_payment_links_with_http_info(offset, limit, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PblPaymentLinksAllGet200Response') + :return_type => 'PblPaymentLinksAllGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -231,10 +239,13 @@ def get_payment_link_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_payment_link","get_payment_link_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_payment_link","get_payment_link_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -242,7 +253,8 @@ def get_payment_link_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PblPaymentLinksGet200Response') + :return_type => 'PblPaymentLinksGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -310,10 +322,13 @@ def update_payment_link_with_http_info(id, update_payment_link_request, opts = { post_body = @api_client.object_to_http_body(update_payment_link_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdatePaymentLinkRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_payment_link","update_payment_link_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_payment_link","update_payment_link_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -321,7 +336,8 @@ def update_payment_link_with_http_info(id, update_payment_link_request, opts = { :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PblPaymentLinksPost201Response') + :return_type => 'PblPaymentLinksPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payment_tokens_api.rb b/lib/cybersource_rest_client/api/payment_tokens_api.rb index 926d3784..d0d36dba 100644 --- a/lib/cybersource_rest_client/api/payment_tokens_api.rb +++ b/lib/cybersource_rest_client/api/payment_tokens_api.rb @@ -70,10 +70,13 @@ def retrieve_or_delete_payment_token_with_http_info(request, opts = {}) post_body = @api_client.object_to_http_body(request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'Request', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["retrieve_or_delete_payment_token","retrieve_or_delete_payment_token_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["retrieve_or_delete_payment_token","retrieve_or_delete_payment_token_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def retrieve_or_delete_payment_token_with_http_info(request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse201') + :return_type => 'InlineResponse201', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payments_api.rb b/lib/cybersource_rest_client/api/payments_api.rb index eae9b035..a6c84a50 100644 --- a/lib/cybersource_rest_client/api/payments_api.rb +++ b/lib/cybersource_rest_client/api/payments_api.rb @@ -76,10 +76,13 @@ def create_order_request_with_http_info(order_payment_request, id, opts = {}) post_body = @api_client.object_to_http_body(order_payment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'OrderPaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_order_request","create_order_request_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_order_request","create_order_request_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def create_order_request_with_http_info(order_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsOrderPost201Response') + :return_type => 'PtsV2PaymentsOrderPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -149,10 +153,13 @@ def create_payment_with_http_info(create_payment_request, opts = {}) post_body = @api_client.object_to_http_body(create_payment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreatePaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_payment","create_payment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_payment","create_payment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -160,7 +167,8 @@ def create_payment_with_http_info(create_payment_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsPost201Response') + :return_type => 'PtsV2PaymentsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -222,10 +230,13 @@ def create_session_request_with_http_info(create_session_req, opts = {}) post_body = @api_client.object_to_http_body(create_session_req) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateSessionReq', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_session_request","create_session_request_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_session_request","create_session_request_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -233,7 +244,8 @@ def create_session_request_with_http_info(create_session_req, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsPost201Response2') + :return_type => 'PtsV2PaymentsPost201Response2', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -301,10 +313,13 @@ def increment_auth_with_http_info(id, increment_auth_request, opts = {}) post_body = @api_client.object_to_http_body(increment_auth_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'IncrementAuthRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["increment_auth","increment_auth_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["increment_auth","increment_auth_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -312,7 +327,8 @@ def increment_auth_with_http_info(id, increment_auth_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2IncrementalAuthorizationPatch201Response') + :return_type => 'PtsV2IncrementalAuthorizationPatch201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -380,10 +396,13 @@ def refresh_payment_status_with_http_info(id, refresh_payment_status_request, op post_body = @api_client.object_to_http_body(refresh_payment_status_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'RefreshPaymentStatusRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["refresh_payment_status","refresh_payment_status_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["refresh_payment_status","refresh_payment_status_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -391,7 +410,8 @@ def refresh_payment_status_with_http_info(id, refresh_payment_status_request, op :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsPost201Response1') + :return_type => 'PtsV2PaymentsPost201Response1', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -459,10 +479,13 @@ def update_session_req_with_http_info(create_session_request, id, opts = {}) post_body = @api_client.object_to_http_body(create_session_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateSessionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_session_req","update_session_req_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_session_req","update_session_req_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -470,7 +493,8 @@ def update_session_req_with_http_info(create_session_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsPost201Response2') + :return_type => 'PtsV2PaymentsPost201Response2', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/payouts_api.rb b/lib/cybersource_rest_client/api/payouts_api.rb index a7f29949..bac9f94c 100644 --- a/lib/cybersource_rest_client/api/payouts_api.rb +++ b/lib/cybersource_rest_client/api/payouts_api.rb @@ -70,10 +70,13 @@ def oct_create_payment_with_http_info(oct_create_payment_request, opts = {}) post_body = @api_client.object_to_http_body(oct_create_payment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'OctCreatePaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["oct_create_payment","oct_create_payment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["oct_create_payment","oct_create_payment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def oct_create_payment_with_http_info(oct_create_payment_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PayoutsPost201Response') + :return_type => 'PtsV2PayoutsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/plans_api.rb b/lib/cybersource_rest_client/api/plans_api.rb index 9a5883d8..3bf9207c 100644 --- a/lib/cybersource_rest_client/api/plans_api.rb +++ b/lib/cybersource_rest_client/api/plans_api.rb @@ -72,10 +72,13 @@ def activate_plan_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["activate_plan","activate_plan_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["activate_plan","activate_plan_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -83,7 +86,8 @@ def activate_plan_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ActivateDeactivatePlanResponse') + :return_type => 'ActivateDeactivatePlanResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -145,10 +149,13 @@ def create_plan_with_http_info(create_plan_request, opts = {}) post_body = @api_client.object_to_http_body(create_plan_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreatePlanRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_plan","create_plan_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_plan","create_plan_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -156,7 +163,8 @@ def create_plan_with_http_info(create_plan_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CreatePlanResponse') + :return_type => 'CreatePlanResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -220,10 +228,13 @@ def deactivate_plan_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["deactivate_plan","deactivate_plan_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["deactivate_plan","deactivate_plan_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -231,7 +242,8 @@ def deactivate_plan_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ActivateDeactivatePlanResponse') + :return_type => 'ActivateDeactivatePlanResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -295,10 +307,13 @@ def delete_plan_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_plan","delete_plan_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_plan","delete_plan_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, @@ -306,7 +321,8 @@ def delete_plan_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'DeletePlanResponse') + :return_type => 'DeletePlanResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -370,10 +386,13 @@ def get_plan_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_plan","get_plan_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_plan","get_plan_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -381,7 +400,8 @@ def get_plan_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetPlanResponse') + :return_type => 'GetPlanResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -439,10 +459,13 @@ def get_plan_code_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_plan_code","get_plan_code_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_plan_code","get_plan_code_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -450,7 +473,8 @@ def get_plan_code_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetPlanCodeResponse') + :return_type => 'GetPlanCodeResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -523,10 +547,13 @@ def get_plans_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_plans","get_plans_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_plans","get_plans_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -534,7 +561,8 @@ def get_plans_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetAllPlansResponse') + :return_type => 'GetAllPlansResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -602,10 +630,13 @@ def update_plan_with_http_info(id, update_plan_request, opts = {}) post_body = @api_client.object_to_http_body(update_plan_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdatePlanRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_plan","update_plan_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_plan","update_plan_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -613,7 +644,8 @@ def update_plan_with_http_info(id, update_plan_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'UpdatePlanResponse') + :return_type => 'UpdatePlanResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb b/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb index a7f58604..326f62e9 100644 --- a/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +++ b/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb @@ -102,10 +102,13 @@ def get_purchase_and_refund_details_with_http_info(start_time, end_time, opts = else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_purchase_and_refund_details","get_purchase_and_refund_details_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_purchase_and_refund_details","get_purchase_and_refund_details_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -113,7 +116,8 @@ def get_purchase_and_refund_details_with_http_info(start_time, end_time, opts = :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3PurchaseRefundDetailsGet200Response') + :return_type => 'ReportingV3PurchaseRefundDetailsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/push_funds_api.rb b/lib/cybersource_rest_client/api/push_funds_api.rb index d49a7b5d..1b68cc1f 100644 --- a/lib/cybersource_rest_client/api/push_funds_api.rb +++ b/lib/cybersource_rest_client/api/push_funds_api.rb @@ -112,10 +112,13 @@ def create_push_funds_transfer_with_http_info(push_funds_request, content_type, post_body = @api_client.object_to_http_body(push_funds_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PushFundsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_push_funds_transfer","create_push_funds_transfer_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_push_funds_transfer","create_push_funds_transfer_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -123,7 +126,8 @@ def create_push_funds_transfer_with_http_info(push_funds_request, content_type, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PushFunds201Response') + :return_type => 'PushFunds201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/refund_api.rb b/lib/cybersource_rest_client/api/refund_api.rb index b49d8e3a..fc11b95a 100644 --- a/lib/cybersource_rest_client/api/refund_api.rb +++ b/lib/cybersource_rest_client/api/refund_api.rb @@ -76,10 +76,13 @@ def refund_capture_with_http_info(refund_capture_request, id, opts = {}) post_body = @api_client.object_to_http_body(refund_capture_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'RefundCaptureRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["refund_capture","refund_capture_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["refund_capture","refund_capture_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def refund_capture_with_http_info(refund_capture_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsRefundPost201Response') + :return_type => 'PtsV2PaymentsRefundPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -155,10 +159,13 @@ def refund_payment_with_http_info(refund_payment_request, id, opts = {}) post_body = @api_client.object_to_http_body(refund_payment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'RefundPaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["refund_payment","refund_payment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["refund_payment","refund_payment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -166,7 +173,8 @@ def refund_payment_with_http_info(refund_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsRefundPost201Response') + :return_type => 'PtsV2PaymentsRefundPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/report_definitions_api.rb b/lib/cybersource_rest_client/api/report_definitions_api.rb index ae0e00c8..b548997c 100644 --- a/lib/cybersource_rest_client/api/report_definitions_api.rb +++ b/lib/cybersource_rest_client/api/report_definitions_api.rb @@ -85,10 +85,13 @@ def get_resource_info_by_report_definition_with_http_info(report_definition_name else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_resource_info_by_report_definition","get_resource_info_by_report_definition_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_resource_info_by_report_definition","get_resource_info_by_report_definition_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -96,7 +99,8 @@ def get_resource_info_by_report_definition_with_http_info(report_definition_name :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ReportDefinitionsNameGet200Response') + :return_type => 'ReportingV3ReportDefinitionsNameGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -164,10 +168,13 @@ def get_resource_v2_info_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_resource_v2_info","get_resource_v2_info_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_resource_v2_info","get_resource_v2_info_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -175,7 +182,8 @@ def get_resource_v2_info_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ReportDefinitionsGet200Response') + :return_type => 'ReportingV3ReportDefinitionsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/report_downloads_api.rb b/lib/cybersource_rest_client/api/report_downloads_api.rb index ffe21fa8..e33fd64d 100644 --- a/lib/cybersource_rest_client/api/report_downloads_api.rb +++ b/lib/cybersource_rest_client/api/report_downloads_api.rb @@ -87,17 +87,21 @@ def download_report_with_http_info(report_date, report_name, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["download_report","download_report_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["download_report","download_report_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/report_subscriptions_api.rb b/lib/cybersource_rest_client/api/report_subscriptions_api.rb index 612349d0..001472ba 100644 --- a/lib/cybersource_rest_client/api/report_subscriptions_api.rb +++ b/lib/cybersource_rest_client/api/report_subscriptions_api.rb @@ -77,17 +77,21 @@ def create_standard_or_classic_subscription_with_http_info(predefined_subscripti post_body = @api_client.object_to_http_body(predefined_subscription_request_bean) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PredefinedSubscriptionRequestBean', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_standard_or_classic_subscription","create_standard_or_classic_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_standard_or_classic_subscription","create_standard_or_classic_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -156,17 +160,21 @@ def create_subscription_with_http_info(create_report_subscription_request, opts post_body = @api_client.object_to_http_body(create_report_subscription_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateReportSubscriptionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_subscription","create_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_subscription","create_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -241,17 +249,21 @@ def delete_subscription_with_http_info(report_name, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_subscription","delete_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_subscription","delete_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -316,10 +328,13 @@ def get_all_subscriptions_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_all_subscriptions","get_all_subscriptions_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_all_subscriptions","get_all_subscriptions_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -327,7 +342,8 @@ def get_all_subscriptions_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ReportSubscriptionsGet200Response') + :return_type => 'ReportingV3ReportSubscriptionsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -402,10 +418,13 @@ def get_subscription_with_http_info(report_name, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_subscription","get_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_subscription","get_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -413,7 +432,8 @@ def get_subscription_with_http_info(report_name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ReportSubscriptionsGet200ResponseSubscriptions') + :return_type => 'ReportingV3ReportSubscriptionsGet200ResponseSubscriptions', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/reports_api.rb b/lib/cybersource_rest_client/api/reports_api.rb index e7a263c3..40ea84d2 100644 --- a/lib/cybersource_rest_client/api/reports_api.rb +++ b/lib/cybersource_rest_client/api/reports_api.rb @@ -77,17 +77,21 @@ def create_report_with_http_info(create_adhoc_report_request, opts = {}) post_body = @api_client.object_to_http_body(create_adhoc_report_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateAdhocReportRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_report","create_report_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_report","create_report_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -158,10 +162,13 @@ def get_report_by_report_id_with_http_info(report_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_report_by_report_id","get_report_by_report_id_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_report_by_report_id","get_report_by_report_id_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -169,7 +176,8 @@ def get_report_by_report_id_with_http_info(report_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ReportsIdGet200Response') + :return_type => 'ReportingV3ReportsIdGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -270,10 +278,13 @@ def search_reports_with_http_info(start_time, end_time, time_query_type, opts = else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["search_reports","search_reports_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["search_reports","search_reports_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -281,7 +292,8 @@ def search_reports_with_http_info(start_time, end_time, time_query_type, opts = :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3ReportsGet200Response') + :return_type => 'ReportingV3ReportsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/retrieval_details_api.rb b/lib/cybersource_rest_client/api/retrieval_details_api.rb index 952605d6..a03fb0f3 100644 --- a/lib/cybersource_rest_client/api/retrieval_details_api.rb +++ b/lib/cybersource_rest_client/api/retrieval_details_api.rb @@ -87,10 +87,13 @@ def get_retrieval_details_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_retrieval_details","get_retrieval_details_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_retrieval_details","get_retrieval_details_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -98,7 +101,8 @@ def get_retrieval_details_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3RetrievalDetailsGet200Response') + :return_type => 'ReportingV3RetrievalDetailsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/retrieval_summaries_api.rb b/lib/cybersource_rest_client/api/retrieval_summaries_api.rb index 94822a42..c91f3bfc 100644 --- a/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +++ b/lib/cybersource_rest_client/api/retrieval_summaries_api.rb @@ -87,10 +87,13 @@ def get_retrieval_summary_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_retrieval_summary","get_retrieval_summary_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_retrieval_summary","get_retrieval_summary_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -98,7 +101,8 @@ def get_retrieval_summary_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ReportingV3RetrievalSummariesGet200Response') + :return_type => 'ReportingV3RetrievalSummariesGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/reversal_api.rb b/lib/cybersource_rest_client/api/reversal_api.rb index 9e763174..3e755004 100644 --- a/lib/cybersource_rest_client/api/reversal_api.rb +++ b/lib/cybersource_rest_client/api/reversal_api.rb @@ -76,10 +76,13 @@ def auth_reversal_with_http_info(id, auth_reversal_request, opts = {}) post_body = @api_client.object_to_http_body(auth_reversal_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AuthReversalRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["auth_reversal","auth_reversal_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["auth_reversal","auth_reversal_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def auth_reversal_with_http_info(id, auth_reversal_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsReversalsPost201Response') + :return_type => 'PtsV2PaymentsReversalsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -149,10 +153,13 @@ def mit_reversal_with_http_info(mit_reversal_request, opts = {}) post_body = @api_client.object_to_http_body(mit_reversal_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'MitReversalRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["mit_reversal","mit_reversal_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["mit_reversal","mit_reversal_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -160,7 +167,8 @@ def mit_reversal_with_http_info(mit_reversal_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsReversalsPost201Response') + :return_type => 'PtsV2PaymentsReversalsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/search_transactions_api.rb b/lib/cybersource_rest_client/api/search_transactions_api.rb index 19e2e0bf..266c62dd 100644 --- a/lib/cybersource_rest_client/api/search_transactions_api.rb +++ b/lib/cybersource_rest_client/api/search_transactions_api.rb @@ -70,10 +70,13 @@ def create_search_with_http_info(create_search_request, opts = {}) post_body = @api_client.object_to_http_body(create_search_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateSearchRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_search","create_search_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_search","create_search_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def create_search_with_http_info(create_search_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TssV2TransactionsPost201Response') + :return_type => 'TssV2TransactionsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -145,10 +149,13 @@ def get_search_with_http_info(search_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_search","get_search_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_search","get_search_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -156,7 +163,8 @@ def get_search_with_http_info(search_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TssV2TransactionsPost201Response') + :return_type => 'TssV2TransactionsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/secure_file_share_api.rb b/lib/cybersource_rest_client/api/secure_file_share_api.rb index 8bbc07dc..de715766 100644 --- a/lib/cybersource_rest_client/api/secure_file_share_api.rb +++ b/lib/cybersource_rest_client/api/secure_file_share_api.rb @@ -79,17 +79,21 @@ def get_file_with_http_info(file_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_file","get_file_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_file","get_file_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -175,10 +179,13 @@ def get_file_detail_with_http_info(start_date, end_date, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_file_detail","get_file_detail_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_file_detail","get_file_detail_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -186,7 +193,8 @@ def get_file_detail_with_http_info(start_date, end_date, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'V1FileDetailsGet200Response') + :return_type => 'V1FileDetailsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/subscriptions_api.rb b/lib/cybersource_rest_client/api/subscriptions_api.rb index d80d88dd..36376967 100644 --- a/lib/cybersource_rest_client/api/subscriptions_api.rb +++ b/lib/cybersource_rest_client/api/subscriptions_api.rb @@ -75,10 +75,13 @@ def activate_subscription_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["activate_subscription","activate_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["activate_subscription","activate_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -86,7 +89,8 @@ def activate_subscription_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ActivateSubscriptionResponse') + :return_type => 'ActivateSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -150,10 +154,13 @@ def cancel_subscription_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["cancel_subscription","cancel_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["cancel_subscription","cancel_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -161,7 +168,8 @@ def cancel_subscription_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CancelSubscriptionResponse') + :return_type => 'CancelSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -223,10 +231,13 @@ def create_subscription_with_http_info(create_subscription_request, opts = {}) post_body = @api_client.object_to_http_body(create_subscription_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateSubscriptionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_subscription","create_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_subscription","create_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -234,7 +245,8 @@ def create_subscription_with_http_info(create_subscription_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CreateSubscriptionResponse') + :return_type => 'CreateSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -304,10 +316,13 @@ def get_all_subscriptions_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_all_subscriptions","get_all_subscriptions_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_all_subscriptions","get_all_subscriptions_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -315,7 +330,8 @@ def get_all_subscriptions_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetAllSubscriptionsResponse') + :return_type => 'GetAllSubscriptionsResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -379,10 +395,13 @@ def get_subscription_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_subscription","get_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_subscription","get_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -390,7 +409,8 @@ def get_subscription_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetSubscriptionResponse') + :return_type => 'GetSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -448,10 +468,13 @@ def get_subscription_code_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_subscription_code","get_subscription_code_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_subscription_code","get_subscription_code_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -459,7 +482,8 @@ def get_subscription_code_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetSubscriptionCodeResponse') + :return_type => 'GetSubscriptionCodeResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -523,10 +547,13 @@ def suspend_subscription_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["suspend_subscription","suspend_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["suspend_subscription","suspend_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -534,7 +561,8 @@ def suspend_subscription_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'SuspendSubscriptionResponse') + :return_type => 'SuspendSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -602,10 +630,13 @@ def update_subscription_with_http_info(id, update_subscription, opts = {}) post_body = @api_client.object_to_http_body(update_subscription) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'UpdateSubscription', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["update_subscription","update_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["update_subscription","update_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -613,7 +644,8 @@ def update_subscription_with_http_info(id, update_subscription, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'UpdateSubscriptionResponse') + :return_type => 'UpdateSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb b/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb index 8a3175ce..36b61935 100644 --- a/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +++ b/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb @@ -76,10 +76,13 @@ def create_follow_on_subscription_with_http_info(request_id, create_subscription post_body = @api_client.object_to_http_body(create_subscription_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateSubscriptionRequest1', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_follow_on_subscription","create_follow_on_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_follow_on_subscription","create_follow_on_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -87,7 +90,8 @@ def create_follow_on_subscription_with_http_info(request_id, create_subscription :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'CreateSubscriptionResponse') + :return_type => 'CreateSubscriptionResponse', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -151,10 +155,13 @@ def get_follow_on_subscription_with_http_info(request_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_follow_on_subscription","get_follow_on_subscription_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_follow_on_subscription","get_follow_on_subscription_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -162,7 +169,8 @@ def get_follow_on_subscription_with_http_info(request_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'GetSubscriptionResponse1') + :return_type => 'GetSubscriptionResponse1', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/taxes_api.rb b/lib/cybersource_rest_client/api/taxes_api.rb index e1b05ef6..e3186e2b 100644 --- a/lib/cybersource_rest_client/api/taxes_api.rb +++ b/lib/cybersource_rest_client/api/taxes_api.rb @@ -70,10 +70,13 @@ def calculate_tax_with_http_info(tax_request, opts = {}) post_body = @api_client.object_to_http_body(tax_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'TaxRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["calculate_tax","calculate_tax_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["calculate_tax","calculate_tax_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def calculate_tax_with_http_info(tax_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'VasV2PaymentsPost201Response') + :return_type => 'VasV2PaymentsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -149,10 +153,13 @@ def void_tax_with_http_info(void_tax_request, id, opts = {}) post_body = @api_client.object_to_http_body(void_tax_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidTaxRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_tax","void_tax_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_tax","void_tax_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, @@ -160,7 +167,8 @@ def void_tax_with_http_info(void_tax_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'VasV2TaxVoid200Response') + :return_type => 'VasV2TaxVoid200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/token_api.rb b/lib/cybersource_rest_client/api/token_api.rb index 2fd35270..68288038 100644 --- a/lib/cybersource_rest_client/api/token_api.rb +++ b/lib/cybersource_rest_client/api/token_api.rb @@ -92,10 +92,13 @@ def get_card_art_asset_with_http_info(instrument_identifier_id, token_provider, else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_card_art_asset","get_card_art_asset_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_card_art_asset","get_card_art_asset_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -103,7 +106,8 @@ def get_card_art_asset_with_http_info(instrument_identifier_id, token_provider, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'InlineResponse200') + :return_type => 'InlineResponse200', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -174,10 +178,13 @@ def post_token_payment_credentials_with_http_info(token_id, post_payment_credent post_body = @api_client.object_to_http_body(post_payment_credentials_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostPaymentCredentialsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_token_payment_credentials","post_token_payment_credentials_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_token_payment_credentials","post_token_payment_credentials_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -185,7 +192,8 @@ def post_token_payment_credentials_with_http_info(token_id, post_payment_credent :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'String') + :return_type => 'String', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/tokenized_card_api.rb b/lib/cybersource_rest_client/api/tokenized_card_api.rb index 2feb3e7a..36081994 100644 --- a/lib/cybersource_rest_client/api/tokenized_card_api.rb +++ b/lib/cybersource_rest_client/api/tokenized_card_api.rb @@ -75,17 +75,21 @@ def delete_tokenized_card_with_http_info(tokenized_card_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_tokenized_card","delete_tokenized_card_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_tokenized_card","delete_tokenized_card_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -152,10 +156,13 @@ def get_tokenized_card_with_http_info(tokenized_card_id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_tokenized_card","get_tokenized_card_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_tokenized_card","get_tokenized_card_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -163,7 +170,8 @@ def get_tokenized_card_with_http_info(tokenized_card_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TokenizedcardRequest') + :return_type => 'TokenizedcardRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -228,10 +236,13 @@ def post_tokenized_card_with_http_info(tokenizedcard_request, opts = {}) post_body = @api_client.object_to_http_body(tokenizedcard_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'TokenizedcardRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_tokenized_card","post_tokenized_card_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_tokenized_card","post_tokenized_card_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -239,7 +250,8 @@ def post_tokenized_card_with_http_info(tokenizedcard_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TokenizedcardRequest') + :return_type => 'TokenizedcardRequest', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/transaction_batches_api.rb b/lib/cybersource_rest_client/api/transaction_batches_api.rb index bf167e58..2b47c11f 100644 --- a/lib/cybersource_rest_client/api/transaction_batches_api.rb +++ b/lib/cybersource_rest_client/api/transaction_batches_api.rb @@ -78,17 +78,21 @@ def get_transaction_batch_details_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_transaction_batch_details","get_transaction_batch_details_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_transaction_batch_details","get_transaction_batch_details_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -152,10 +156,13 @@ def get_transaction_batch_id_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_transaction_batch_id","get_transaction_batch_id_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_transaction_batch_id","get_transaction_batch_id_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -163,7 +170,8 @@ def get_transaction_batch_id_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV1TransactionBatchesIdGet200Response') + :return_type => 'PtsV1TransactionBatchesIdGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -235,10 +243,13 @@ def get_transaction_batches_with_http_info(start_time, end_time, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_transaction_batches","get_transaction_batches_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_transaction_batches","get_transaction_batches_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -246,7 +257,8 @@ def get_transaction_batches_with_http_info(start_time, end_time, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV1TransactionBatchesGet200Response') + :return_type => 'PtsV1TransactionBatchesGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -316,17 +328,21 @@ def upload_transaction_batch_with_http_info(file, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["upload_transaction_batch","upload_transaction_batch_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["upload_transaction_batch","upload_transaction_batch_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/transaction_details_api.rb b/lib/cybersource_rest_client/api/transaction_details_api.rb index 416af94b..5bdc4e0b 100644 --- a/lib/cybersource_rest_client/api/transaction_details_api.rb +++ b/lib/cybersource_rest_client/api/transaction_details_api.rb @@ -72,10 +72,13 @@ def get_transaction_with_http_info(id, opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_transaction","get_transaction_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_transaction","get_transaction_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -83,7 +86,8 @@ def get_transaction_with_http_info(id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TssV2TransactionsGet200Response') + :return_type => 'TssV2TransactionsGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/transient_token_data_api.rb b/lib/cybersource_rest_client/api/transient_token_data_api.rb index 3cf4068e..ac93ed5a 100644 --- a/lib/cybersource_rest_client/api/transient_token_data_api.rb +++ b/lib/cybersource_rest_client/api/transient_token_data_api.rb @@ -72,10 +72,13 @@ def get_payment_credentials_for_transient_token_with_http_info(payment_credentia else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_payment_credentials_for_transient_token","get_payment_credentials_for_transient_token_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_payment_credentials_for_transient_token","get_payment_credentials_for_transient_token_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -83,7 +86,8 @@ def get_payment_credentials_for_transient_token_with_http_info(payment_credentia :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'String') + :return_type => 'String', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -147,17 +151,21 @@ def get_transaction_for_transient_token_with_http_info(transient_token, opts = { else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_transaction_for_transient_token","get_transaction_for_transient_token_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_transaction_for_transient_token","get_transaction_for_transient_token_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, - :auth_names => auth_names) + :auth_names => auth_names, + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb b/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb index 485eaf0d..b24a6879 100644 --- a/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +++ b/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb @@ -70,10 +70,13 @@ def generate_unified_checkout_capture_context_with_http_info(generate_unified_ch post_body = @api_client.object_to_http_body(generate_unified_checkout_capture_context_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'GenerateUnifiedCheckoutCaptureContextRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["generate_unified_checkout_capture_context","generate_unified_checkout_capture_context_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["generate_unified_checkout_capture_context","generate_unified_checkout_capture_context_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def generate_unified_checkout_capture_context_with_http_info(generate_unified_ch :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'String') + :return_type => 'String', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/user_management_api.rb b/lib/cybersource_rest_client/api/user_management_api.rb index c0390bf2..dd2df622 100644 --- a/lib/cybersource_rest_client/api/user_management_api.rb +++ b/lib/cybersource_rest_client/api/user_management_api.rb @@ -78,10 +78,13 @@ def get_users_with_http_info(opts = {}) else post_body = nil end - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_users","get_users_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_users","get_users_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, @@ -89,7 +92,8 @@ def get_users_with_http_info(opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'UmsV1UsersGet200Response') + :return_type => 'UmsV1UsersGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/user_management_search_api.rb b/lib/cybersource_rest_client/api/user_management_search_api.rb index d417fe6f..aea40c90 100644 --- a/lib/cybersource_rest_client/api/user_management_search_api.rb +++ b/lib/cybersource_rest_client/api/user_management_search_api.rb @@ -70,10 +70,13 @@ def search_users_with_http_info(search_request, opts = {}) post_body = @api_client.object_to_http_body(search_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'SearchRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["search_users","search_users_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["search_users","search_users_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def search_users_with_http_info(search_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'UmsV1UsersGet200Response') + :return_type => 'UmsV1UsersGet200Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/verification_api.rb b/lib/cybersource_rest_client/api/verification_api.rb index 169e6cf4..59ba4ce9 100644 --- a/lib/cybersource_rest_client/api/verification_api.rb +++ b/lib/cybersource_rest_client/api/verification_api.rb @@ -70,10 +70,13 @@ def validate_export_compliance_with_http_info(validate_export_compliance_request post_body = @api_client.object_to_http_body(validate_export_compliance_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'ValidateExportComplianceRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["validate_export_compliance","validate_export_compliance_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["validate_export_compliance","validate_export_compliance_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def validate_export_compliance_with_http_info(validate_export_compliance_request :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1ExportComplianceInquiriesPost201Response') + :return_type => 'RiskV1ExportComplianceInquiriesPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -143,10 +147,13 @@ def verify_customer_address_with_http_info(verify_customer_address_request, opts post_body = @api_client.object_to_http_body(verify_customer_address_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VerifyCustomerAddressRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "false" + inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["verify_customer_address","verify_customer_address_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["verify_customer_address","verify_customer_address_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -154,7 +161,8 @@ def verify_customer_address_with_http_info(verify_customer_address_request, opts :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RiskV1AddressVerificationsPost201Response') + :return_type => 'RiskV1AddressVerificationsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api/void_api.rb b/lib/cybersource_rest_client/api/void_api.rb index c33426bd..53da6aa0 100644 --- a/lib/cybersource_rest_client/api/void_api.rb +++ b/lib/cybersource_rest_client/api/void_api.rb @@ -70,10 +70,13 @@ def mit_void_with_http_info(mit_void_request, opts = {}) post_body = @api_client.object_to_http_body(mit_void_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'MitVoidRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["mit_void","mit_void_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["mit_void","mit_void_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -81,7 +84,8 @@ def mit_void_with_http_info(mit_void_request, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsVoidsPost201Response') + :return_type => 'PtsV2PaymentsVoidsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -149,10 +153,13 @@ def void_capture_with_http_info(void_capture_request, id, opts = {}) post_body = @api_client.object_to_http_body(void_capture_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidCaptureRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_capture","void_capture_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_capture","void_capture_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -160,7 +167,8 @@ def void_capture_with_http_info(void_capture_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsVoidsPost201Response') + :return_type => 'PtsV2PaymentsVoidsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -228,10 +236,13 @@ def void_credit_with_http_info(void_credit_request, id, opts = {}) post_body = @api_client.object_to_http_body(void_credit_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidCreditRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_credit","void_credit_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_credit","void_credit_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -239,7 +250,8 @@ def void_credit_with_http_info(void_credit_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsVoidsPost201Response') + :return_type => 'PtsV2PaymentsVoidsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -307,10 +319,13 @@ def void_payment_with_http_info(void_payment_request, id, opts = {}) post_body = @api_client.object_to_http_body(void_payment_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidPaymentRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_payment","void_payment_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_payment","void_payment_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -318,7 +333,8 @@ def void_payment_with_http_info(void_payment_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsVoidsPost201Response') + :return_type => 'PtsV2PaymentsVoidsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @@ -386,10 +402,13 @@ def void_refund_with_http_info(void_refund_request, id, opts = {}) post_body = @api_client.object_to_http_body(void_refund_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'VoidRefundRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) - inbound_mle_status = "optional" + inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["void_refund","void_refund_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end + + is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["void_refund","void_refund_with_http_info"]) + auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -397,7 +416,8 @@ def void_refund_with_http_info(void_refund_request, id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'PtsV2PaymentsVoidsPost201Response') + :return_type => 'PtsV2PaymentsVoidsPost201Response', + :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise diff --git a/lib/cybersource_rest_client/api_client.rb b/lib/cybersource_rest_client/api_client.rb index 43b5e234..06d12ec0 100644 --- a/lib/cybersource_rest_client/api_client.rb +++ b/lib/cybersource_rest_client/api_client.rb @@ -117,9 +117,11 @@ def build_request(http_method, path, opts = {}) query_params = Addressable::URI.form_encode(query_params) end + isResponseMLEForApi = opts[:isResponseMLEForApi] || false + headers = opts[:header_params] if @merchantconfig.authenticationType.upcase != Constants::AUTH_TYPE_MUTUAL_AUTH - headers = CallAuthenticationHeader(http_method, path, body_params, headers, query_params) + headers = CallAuthenticationHeader(http_method, path, body_params, headers, query_params, isResponseMLEForApi) end http_method = http_method.to_sym.downcase header_params = headers.merge(@default_headers) @@ -188,7 +190,7 @@ def set_configuration(config) end end # Calling Authentication - def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params) + def CallAuthenticationHeader(http_method, path, body_params, header_params, query_params, isResponseMLEForApi) require_relative '../AuthenticationSDK/core/Authorization.rb' require_relative '../AuthenticationSDK/authentication/payloadDigest/digest.rb' request_target = get_query_param(path, query_params) @@ -207,7 +209,7 @@ def CallAuthenticationHeader(http_method, path, body_params, header_params, quer @merchantconfig.requestUrl = url # Calling APISDK, Apisdk.controller. gmtDateTime = DateTime.now.httpdate - token = Authorization.new.getToken(@merchantconfig, gmtDateTime) + token = Authorization.new.getToken(@merchantconfig, gmtDateTime, isResponseMLEForApi) # Adding client ID header header_params['v-c-client-id'] = @client_id @@ -267,6 +269,8 @@ def json_mime?(mime) # @param [Response] response HTTP response # @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]" def deserialize(response, return_type) + require_relative '../AuthenticationSDK/mle/MLEUtility.rb' + body = response.body # handle file downloading - return the File instance processed in request callbacks @@ -283,6 +287,18 @@ def deserialize(response, return_type) fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) + # Check the response body first if it is mle encrypted then do deserialize + if MLEUtility.check_is_mle_encrypted_response(body) + begin + body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, body) + rescue e + raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}", + :code => response.code, + :response_headers => response.headers, + :body => body) + end + end + begin data = JSON.parse("[#{body}]", :symbolize_names => true)[0] rescue JSON::ParserError => e From b13261d8b89c14346a4e8688aaa950268d1bfd09 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Fri, 31 Oct 2025 22:50:18 +0530 Subject: [PATCH 04/10] Fixes for issues found during testing --- .../api_client.mustache | 27 +++++---- lib/AuthenticationSDK/core/MerchantConfig.rb | 59 ++++++++++++------- lib/AuthenticationSDK/util/Cache.rb | 7 ++- .../util/CertificateUtility.rb | 9 ++- lib/AuthenticationSDK/util/JWEUtility.rb | 2 +- lib/AuthenticationSDK/util/MLEUtility.rb | 32 +++++----- lib/cybersource_rest_client/api_client.rb | 27 +++++---- 7 files changed, 93 insertions(+), 70 deletions(-) diff --git a/generator/cybersource-ruby-template/api_client.mustache b/generator/cybersource-ruby-template/api_client.mustache index 199f5135..157abbe7 100644 --- a/generator/cybersource-ruby-template/api_client.mustache +++ b/generator/cybersource-ruby-template/api_client.mustache @@ -85,6 +85,19 @@ module {{moduleName}} end end + # Check the response body first if it is mle encrypted then do deserialize + if MLEUtility.check_is_mle_encrypted_response(response.body) + begin + body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, response.body) + response = Typhoeus::Response.new(:code => response.code, :headers => response.headers.to_hash, :body => body) + rescue => e + raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}", + :code => response.code, + :response_headers => response.headers, + :body => response.body) + end + end + if opts[:return_type] data = deserialize(response, opts[:return_type]) else @@ -265,7 +278,7 @@ module {{moduleName}} # @param [Response] response HTTP response # @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]" def deserialize(response, return_type) - require_relative '../AuthenticationSDK/mle/MLEUtility.rb' + require_relative '../AuthenticationSDK/util/MLEUtility.rb' body = response.body @@ -283,18 +296,6 @@ module {{moduleName}} fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) - # Check the response body first if it is mle encrypted then do deserialize - if MLEUtility.check_is_mle_encrypted_response(body) - begin - body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, body) - rescue e - raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}", - :code => response.code, - :response_headers => response.headers, - :body => body) - end - end - begin data = JSON.parse("[#{body}]", :symbolize_names => true)[0] rescue JSON::ParserError => e diff --git a/lib/AuthenticationSDK/core/MerchantConfig.rb b/lib/AuthenticationSDK/core/MerchantConfig.rb index b9bccafc..3e59a8a7 100644 --- a/lib/AuthenticationSDK/core/MerchantConfig.rb +++ b/lib/AuthenticationSDK/core/MerchantConfig.rb @@ -97,10 +97,35 @@ def initialize(cybsPropertyObj, responseMlePrivateKeyValue = nil) # mapToControlMLEonAPI.put("apiFunctionName13", "") - empty string not allowed @mapToControlMLEonAPI = cybsPropertyObj['mapToControlMLEonAPI'] - # Both fields used for internal purpose only not exposed for merchants to set. Both sets from mapToControlMLEonAPI internally. + # Initialize internal maps before validation + # Both fields used for internal purpose only not exposed for merchants to set @internalMapToControlRequestMLEonAPI = {} @internalMapToControlResponseMLEonAPI = {} + # Set up MLE configuration first since validation depends on it + if @mapToControlMLEonAPI + begin + @mapToControlMLEonAPI = convertBooleanToStringMapType(@mapToControlMLEonAPI) + setMapToControlMLEOnAPI(@mapToControlMLEonAPI) + rescue => err + error = StandardError.new(Constants::WARNING_PREFIX + "Unable to initialise MLE control Map from config: #{err.message}") + raise error + end + end + + if responseMlePrivateKeyValue.nil? + responseMlePrivateKeyValue = cybsPropertyObj['responseMlePrivateKey'] + end + + if !responseMlePrivateKeyValue.nil? + case responseMlePrivateKeyValue + when OpenSSL::PKey::RSA + responseMlePrivateKeyValue = JOSE::JWK.from_pem(responseMlePrivateKeyValue.to_pem) + else + responseMlePrivateKeyValue = JOSE::JWK.from_key(responseMlePrivateKeyValue) + end + end + @responseMlePrivateKey = responseMlePrivateKeyValue @enableResponseMleGlobally = false @@ -325,21 +350,11 @@ def validateMLEConfiguration(cybsPropertyObj) raise err end - unless @mapToControlMLEonAPI.nil? - begin - @mapToControlMLEonAPI = convertBooleanToStringMapType(@mapToControlMLEonAPI) - setMapToControlMLEOnAPI(@mapToControlMLEonAPI) - rescue => err - error = StandardError.new(Constants::WARNING_PREFIX + "Unable to initialise MLE control Map from config: #{err.message}") - @log_obj.logger.warn(ExceptionHandler.new.new_api_exception error) - raise error - end # unless @mapToControlMLEonAPI.is_a?(Hash) && @mapToControlMLEonAPI.keys.all? {|k| k.is_a?(String)} && @mapToControlMLEonAPI.values.all? { |v| [true, false].include?(v) } # err = StandardError.new(Constants::ERROR_PREFIX + "mapToControlMLEonAPI must be a map with boolean values") # @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) # raise err # end - end !@requestMleKeyAlias.nil? && unless @requestMleKeyAlias.instance_of? String err = StandardError.new(Constants::ERROR_PREFIX + "requestMleKeyAlias must be a string") @@ -404,8 +419,7 @@ def validateMLEConfiguration(cybsPropertyObj) end # Check that both private key object or private key file path should not be provided - if !@responseMlePrivateKey.nil? && !@responseMlePrivateKey.to_s.strip.empty? - && !@responseMlePrivateKeyFilePath.nil? && !@responseMlePrivateKeyFilePath.to_s.strip.empty? + if !@responseMlePrivateKey.nil? && !@responseMlePrivateKey.to_s.strip.empty? && !@responseMlePrivateKeyFilePath.nil? && !@responseMlePrivateKeyFilePath.to_s.strip.empty? err = StandardError.new(Constants::ERROR_PREFIX + "Both responseMlePrivateKey object and responseMlePrivateKeyFilePath are provided. Please provide only one of them for response mle private key.") @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) raise err @@ -428,11 +442,12 @@ def validateMLEConfiguration(cybsPropertyObj) @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) raise err end + end end def setMapToControlMLEOnAPI(inputMap) # validate the map value format - validateMapToControlMleOnApiValues(inputMap) if inputMap + validateMapToControlMLEonAPIValues(inputMap) if inputMap # @mapToControlMLEonAPI = inputMap @@ -519,20 +534,20 @@ def convertBooleanToStringMapType(inputMap) raise StandardError.new(Constants::ERROR_PREFIX + "Unsupported null value to mapToControlMLEonAPI in merchantConfig. Expected Map which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field.") end - unless map.is_a?(Hash) - raise TypeError.new(Constants::ERROR_PREFIX + "Unsupported datatype for field mapToControlMLEonAPI. Expected Hash which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field but got: #{map.class}") + unless inputMap.is_a?(Hash) + raise TypeError.new(Constants::ERROR_PREFIX + "Unsupported datatype for field mapToControlMLEonAPI. Expected Hash which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field but got: #{inputMap.class}") end - keys_all_strings = map.keys.all? { |k| k.is_a?(String) } - values_all_strings = map.values.all? { |v| v.is_a?(String) } - values_all_bools = map.values.all? { |v| v.is_a?(TrueClass) || v.is_a?(FalseClass) } + keys_all_strings = inputMap.keys.all? { |k| k.is_a?(String) } + values_all_strings = inputMap.values.all? { |v| v.is_a?(String) } + values_all_bools = inputMap.values.all? { |v| v.is_a?(TrueClass) || v.is_a?(FalseClass) } if keys_all_strings && values_all_strings # Already Hash - map + inputMap elsif keys_all_strings && values_all_bools # Convert Hash -> Hash - map.transform_values { |v| v.to_s } + inputMap.transform_values { |v| v.to_s } else err = StandardError.new("Unsupported map type combination for mapToControlMLEonAPI in merchantConfig. Expected Hash which corresponds to <'apiFunctionName','flagForRequestMLE::flagForResponseMLE'> as dataType for field.") @log_obj.logger.error(ExceptionHandler.new.new_api_exception err) @@ -636,4 +651,6 @@ def check_key_file attr_accessor :responseMlePrivateKeyFilePath attr_accessor :responseMlePrivateKeyFilePassword attr_accessor :responseMlePrivateKey + attr_accessor :internalMapToControlRequestMLEonAPI + attr_accessor :internalMapToControlResponseMLEonAPI end diff --git a/lib/AuthenticationSDK/util/Cache.rb b/lib/AuthenticationSDK/util/Cache.rb index 11a5125b..dc7319c6 100644 --- a/lib/AuthenticationSDK/util/Cache.rb +++ b/lib/AuthenticationSDK/util/Cache.rb @@ -41,8 +41,8 @@ def setupCache(cacheKey, certificateFilePath, merchantConfig) logger = @@logger.logger fileModifiedTime = File.mtime(certificateFilePath) - if cache_key.end_with?(Constants::MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY) - password = merchantConfig.responseMlePrivateKeyPassword + if cacheKey.end_with?(Constants::MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY) + password = merchantConfig.responseMlePrivateKeyFilePassword mlePrivateKey = nil begin @@ -62,7 +62,7 @@ def setupCache(cacheKey, certificateFilePath, merchantConfig) @@cache_obj.write(cacheKey, cacheValue) rescue StandardError => e - err = StandardError.new(Constants::ERROR_PREFIX + "Error loading MLE response private key from: " + filePath + ". Error: " + e.message) + err = StandardError.new(Constants::ERROR_PREFIX + "Error loading MLE response private key from: " + certificateFilePath + ". Error: " + e.message) logger.error(ExceptionHandler.new.new_api_exception err) raise err end @@ -162,6 +162,7 @@ def getMLEResponsePrivateKeyFromFilePath(merchantConfig) keyIdentifier = Constants::MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY cacheIdentifier = "#{merchantId}_#{keyIdentifier}" mleResponsePrivateKeyFilePath = merchantConfig.responseMlePrivateKeyFilePath + cachedCertificateInfo = nil @@mutex.synchronize do cachedCertificateInfo = @@cache_obj.read(cacheIdentifier) diff --git a/lib/AuthenticationSDK/util/CertificateUtility.rb b/lib/AuthenticationSDK/util/CertificateUtility.rb index b8ac8c84..07ed09e8 100644 --- a/lib/AuthenticationSDK/util/CertificateUtility.rb +++ b/lib/AuthenticationSDK/util/CertificateUtility.rb @@ -133,7 +133,8 @@ def self.read_private_key_from_p12(p12_file_path, password) key = pkcs12.key raise "No private key found in the P12 file" if key.nil? - key + jwk_private_key = JOSE::JWK.from_pem(key.to_pem) + return jwk_private_key rescue OpenSSL::PKCS12::PKCS12Error => e raise "Could not recover key from P12: #{e.message}" rescue Errno::ENOENT => e @@ -149,10 +150,12 @@ def self.load_private_key_from_pem_file(key_file_path, password = nil) # - "BEGIN RSA/EC/PRIVATE KEY" (PKCS#1), encrypted or not (Proc-Type/DEK-Info) # - "BEGIN PRIVATE KEY" (PKCS#8 unencrypted) # - "BEGIN ENCRYPTED PRIVATE KEY" (PKCS#8 encrypted) - OpenSSL::PKey.read(pem_data, password) + rsa_key = OpenSSL::PKey.read(pem_data, password) + jwk_private_key = JOSE::JWK.from_key(rsa_key) + return jwk_private_key rescue OpenSSL::PKey::PKeyError => e # Missing password for an encrypted PEM - if pem =~ /(BEGIN ENCRYPTED PRIVATE KEY|Proc-Type:\s*4,ENCRYPTED)/ && (password.nil? || password.to_s.empty?) + if pem_data =~ /(BEGIN ENCRYPTED PRIVATE KEY|Proc-Type:\s*4,ENCRYPTED)/ && (password.nil? || password.to_s.empty?) raise ArgumentError, "Private key is password protected, but no password was provided." end diff --git a/lib/AuthenticationSDK/util/JWEUtility.rb b/lib/AuthenticationSDK/util/JWEUtility.rb index fe6eb63a..3fab9a41 100644 --- a/lib/AuthenticationSDK/util/JWEUtility.rb +++ b/lib/AuthenticationSDK/util/JWEUtility.rb @@ -4,7 +4,7 @@ require 'jose' public -class AuthJWEUtility +class JWEUtility # DEPRECATED: This method has been marked as Deprecated and will be removed in coming releases. Use decrypt_jwe_using_private_key() instead. def self.decrypt_jwe_using_pem(merchant_config, encoded_response) warn("[DEPRECATED] `decrypt_jwe_using_pem()` method is deprecated and will be removed in coming releases. Use `decrypt_jwe_using_private_key()` instead.") diff --git a/lib/AuthenticationSDK/util/MLEUtility.rb b/lib/AuthenticationSDK/util/MLEUtility.rb index 7d3f2c87..0e482920 100644 --- a/lib/AuthenticationSDK/util/MLEUtility.rb +++ b/lib/AuthenticationSDK/util/MLEUtility.rb @@ -2,6 +2,9 @@ require 'jose' require 'json' require_relative './Cache' +require_relative './Constants' +require_relative './ExceptionHandler' +require_relative './JWEUtility' public class MLEUtility @@ -17,7 +20,7 @@ def self.check_is_mle_for_API(merchant_config, inbound_mle_status, operation_ids is_mle_for_api = !merchant_config.disableRequestMLEForMandatoryApisGlobally end - if merchant_config.internalMapToControlRequestMLEonAPI && operation_ids + if !merchant_config.internalMapToControlRequestMLEonAPI.nil? && !merchant_config.internalMapToControlRequestMLEonAPI.empty? && operation_ids operation_ids.each do |operation_id| if merchant_config.internalMapToControlRequestMLEonAPI.key?(operation_id) is_mle_for_api = merchant_config.internalMapToControlRequestMLEonAPI[operation_id] @@ -46,7 +49,7 @@ def self.encrypt_request_payload(merchantConfig, requestBody) end begin - serial_number = extract_serial_number_from_certificate(mleCertificate) + serial_number = self.extract_serial_number_from_certificate(mleCertificate) if serial_number.nil? @log_obj.logger.error('Serial number not found in certificate for MLE') raise StandardError.new('Serial number not found in MLE certificate') @@ -67,7 +70,7 @@ def self.encrypt_request_payload(merchantConfig, requestBody) jwe = JOSE::JWE.block_encrypt(jwk, requestBody, headers) compact_jwe = jwe.compact - mle_request_body = create_request_payload(compact_jwe) + mle_request_body = self.create_request_payload(compact_jwe) @log_obj.logger.debug('LOG_REQUEST_AFTER_MLE: ' + mle_request_body) return mle_request_body rescue StandardError => e @@ -91,18 +94,15 @@ def self.create_request_payload(compact_jwe) def self.check_is_response_mle_for_api(merchant_config, operation_ids) isResponseMLEForApi = false - if merchant_config.enableResponseMLEGlobally + if merchant_config.enableResponseMleGlobally isResponseMLEForApi = true end - # operation_ids is a comma-separated string that can be split into an array - # as there are multiple public function for apiCallFunction such as apiCall, apiCallAsync - operation_array = operation_ids.split(',').map(&:strip) - + # operation_ids is an array of the multiple public function for apiCallFunction such as apiCall, apiCallAsync # Control the Response MLE only from map # Special Note: If API expect MLE Response mandatory and map is saying to receive non MLE response then API might throw an error from CyberSource if merchant_config.internalMapToControlResponseMLEonAPI - operation_array.each do |operation_id| + operation_ids.each do |operation_id| if merchant_config.internalMapToControlResponseMLEonAPI.key?(operation_id) isResponseMLEForApi = merchant_config.internalMapToControlResponseMLEonAPI[operation_id] break @@ -133,8 +133,8 @@ def self.decrypt_mle_response_payload(merchantConfig, responseBody) raise StandardError.new('Response body is not MLE encrypted.') end - mlePrivateKey = get_mle_response_private_key(merchantConfig) - jweResponseToken = get_response_mle_token(responseBody) + mlePrivateKey = self.get_mle_response_private_key(merchantConfig) + jweResponseToken = self.get_response_mle_token(responseBody) # When mle token is empty or null then fall back to non mle encrypted response if jweResponseToken.nil? || jweResponseToken.strip.empty? @@ -149,12 +149,12 @@ def self.decrypt_mle_response_payload(merchantConfig, responseBody) @log_obj.logger.info("LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION: #{decryptedResponse}") return decryptedResponse - rescue e + rescue => e raise StandardError.new(Constants::ERROR_PREFIX + "An error occurred during MLE decryption: #{e.message}") end end - def get_response_mle_token(responseBody) + def self.get_response_mle_token(responseBody) @log_obj ||= Log.new(merchantConfig.log_config, 'MLEUtility') begin @@ -168,9 +168,9 @@ def get_response_mle_token(responseBody) end end - private :get_response_mle_token + private_class_method :get_response_mle_token - def get_mle_response_private_key(merchantConfig) + def self.get_mle_response_private_key(merchantConfig) @log_obj ||= Log.new(merchantConfig.log_config, 'MLEUtility') # First priority - Return private key provided in merchant config, if any @@ -183,5 +183,5 @@ def get_mle_response_private_key(merchantConfig) return responseMlePrivateKey end - private :get_mle_response_private_key + private_class_method :get_mle_response_private_key end diff --git a/lib/cybersource_rest_client/api_client.rb b/lib/cybersource_rest_client/api_client.rb index 06d12ec0..503c980c 100644 --- a/lib/cybersource_rest_client/api_client.rb +++ b/lib/cybersource_rest_client/api_client.rb @@ -92,6 +92,19 @@ def call_api(http_method, path, opts = {}) end end + # Check the response body first if it is mle encrypted then do deserialize + if MLEUtility.check_is_mle_encrypted_response(response.body) + begin + body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, response.body) + response = Typhoeus::Response.new(:code => response.code, :headers => response.headers.to_hash, :body => body) + rescue => e + raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}", + :code => response.code, + :response_headers => response.headers, + :body => response.body) + end + end + if opts[:return_type] data = deserialize(response, opts[:return_type]) else @@ -269,7 +282,7 @@ def json_mime?(mime) # @param [Response] response HTTP response # @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]" def deserialize(response, return_type) - require_relative '../AuthenticationSDK/mle/MLEUtility.rb' + require_relative '../AuthenticationSDK/util/MLEUtility.rb' body = response.body @@ -287,18 +300,6 @@ def deserialize(response, return_type) fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) - # Check the response body first if it is mle encrypted then do deserialize - if MLEUtility.check_is_mle_encrypted_response(body) - begin - body = MLEUtility.decrypt_mle_response_payload(@merchantconfig, body) - rescue e - raise ApiError.new(:message => "MLE Encrypted Response Decryption Error Occurred. Error: #{e.message}", - :code => response.code, - :response_headers => response.headers, - :body => body) - end - end - begin data = JSON.parse("[#{body}]", :symbolize_names => true)[0] rescue JSON::ParserError => e From 68e84d8f9453fffda53abb39e4eefa699ea06a51 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Fri, 31 Oct 2025 23:08:21 +0530 Subject: [PATCH 05/10] Moved functionality to correct file --- lib/AuthenticationSDK/core/MerchantConfig.rb | 9 +-------- lib/AuthenticationSDK/util/CertificateUtility.rb | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/AuthenticationSDK/core/MerchantConfig.rb b/lib/AuthenticationSDK/core/MerchantConfig.rb index 3e59a8a7..1d141993 100644 --- a/lib/AuthenticationSDK/core/MerchantConfig.rb +++ b/lib/AuthenticationSDK/core/MerchantConfig.rb @@ -117,14 +117,7 @@ def initialize(cybsPropertyObj, responseMlePrivateKeyValue = nil) responseMlePrivateKeyValue = cybsPropertyObj['responseMlePrivateKey'] end - if !responseMlePrivateKeyValue.nil? - case responseMlePrivateKeyValue - when OpenSSL::PKey::RSA - responseMlePrivateKeyValue = JOSE::JWK.from_pem(responseMlePrivateKeyValue.to_pem) - else - responseMlePrivateKeyValue = JOSE::JWK.from_key(responseMlePrivateKeyValue) - end - end + responseMlePrivateKeyValue = CertificateUtility.convert_key_to_JWK(responseMlePrivateKeyValue) @responseMlePrivateKey = responseMlePrivateKeyValue diff --git a/lib/AuthenticationSDK/util/CertificateUtility.rb b/lib/AuthenticationSDK/util/CertificateUtility.rb index 07ed09e8..07df0070 100644 --- a/lib/AuthenticationSDK/util/CertificateUtility.rb +++ b/lib/AuthenticationSDK/util/CertificateUtility.rb @@ -133,7 +133,7 @@ def self.read_private_key_from_p12(p12_file_path, password) key = pkcs12.key raise "No private key found in the P12 file" if key.nil? - jwk_private_key = JOSE::JWK.from_pem(key.to_pem) + jwk_private_key = self.convert_key_to_JWK(key) return jwk_private_key rescue OpenSSL::PKCS12::PKCS12Error => e raise "Could not recover key from P12: #{e.message}" @@ -151,7 +151,7 @@ def self.load_private_key_from_pem_file(key_file_path, password = nil) # - "BEGIN PRIVATE KEY" (PKCS#8 unencrypted) # - "BEGIN ENCRYPTED PRIVATE KEY" (PKCS#8 encrypted) rsa_key = OpenSSL::PKey.read(pem_data, password) - jwk_private_key = JOSE::JWK.from_key(rsa_key) + jwk_private_key = self.convert_key_to_JWK(rsa_key) return jwk_private_key rescue OpenSSL::PKey::PKeyError => e # Missing password for an encrypted PEM @@ -171,4 +171,15 @@ def self.load_private_key_from_pem_file(key_file_path, password = nil) raise ArgumentError, "PEM file not found: #{key_file_path}" end end + + def self.convert_key_to_JWK(keyValue) + if !keyValue.nil? + case keyValue + when OpenSSL::PKey::RSA + keyValue = JOSE::JWK.from_pem(keyValue.to_pem) + else + keyValue = JOSE::JWK.from_key(keyValue) + end + end + end end \ No newline at end of file From 05688bb63c8e24dc87fe5770442d4fa14d489f93 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Fri, 31 Oct 2025 23:14:13 +0530 Subject: [PATCH 06/10] Renamed file to match class name --- .../util/{JWEUtility.rb => AuthJWEUtility.rb} | 2 +- lib/AuthenticationSDK/util/MLEUtility.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/AuthenticationSDK/util/{JWEUtility.rb => AuthJWEUtility.rb} (97%) diff --git a/lib/AuthenticationSDK/util/JWEUtility.rb b/lib/AuthenticationSDK/util/AuthJWEUtility.rb similarity index 97% rename from lib/AuthenticationSDK/util/JWEUtility.rb rename to lib/AuthenticationSDK/util/AuthJWEUtility.rb index 3fab9a41..fe6eb63a 100644 --- a/lib/AuthenticationSDK/util/JWEUtility.rb +++ b/lib/AuthenticationSDK/util/AuthJWEUtility.rb @@ -4,7 +4,7 @@ require 'jose' public -class JWEUtility +class AuthJWEUtility # DEPRECATED: This method has been marked as Deprecated and will be removed in coming releases. Use decrypt_jwe_using_private_key() instead. def self.decrypt_jwe_using_pem(merchant_config, encoded_response) warn("[DEPRECATED] `decrypt_jwe_using_pem()` method is deprecated and will be removed in coming releases. Use `decrypt_jwe_using_private_key()` instead.") diff --git a/lib/AuthenticationSDK/util/MLEUtility.rb b/lib/AuthenticationSDK/util/MLEUtility.rb index 0e482920..eb792e41 100644 --- a/lib/AuthenticationSDK/util/MLEUtility.rb +++ b/lib/AuthenticationSDK/util/MLEUtility.rb @@ -4,7 +4,7 @@ require_relative './Cache' require_relative './Constants' require_relative './ExceptionHandler' -require_relative './JWEUtility' +require_relative './AuthJWEUtility' public class MLEUtility @@ -144,7 +144,7 @@ def self.decrypt_mle_response_payload(merchantConfig, responseBody) begin @log_obj.logger.info("LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: #{responseBody}") - decryptedResponse = JWEUtility.decrypt_jwe_using_private_key(mlePrivateKey, jweResponseToken) + decryptedResponse = AuthJWEUtility.decrypt_jwe_using_private_key(mlePrivateKey, jweResponseToken) @log_obj.logger.info("LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION: #{decryptedResponse}") From c7116a840216f5f363582874aa03d083b67ae09c Mon Sep 17 00:00:00 2001 From: gnongsie Date: Fri, 31 Oct 2025 23:15:16 +0530 Subject: [PATCH 07/10] Renamed file to match class name --- lib/cybersource_rest_client/utilities/jwe_utility.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cybersource_rest_client/utilities/jwe_utility.rb b/lib/cybersource_rest_client/utilities/jwe_utility.rb index d7d7d68a..bbbdfb16 100644 --- a/lib/cybersource_rest_client/utilities/jwe_utility.rb +++ b/lib/cybersource_rest_client/utilities/jwe_utility.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../../AuthenticationSDK/util/JWEUtility' +require_relative '../../AuthenticationSDK/util/AuthJWEUtility' module CyberSource public From 9ef79741b0378831c88dda260822879300591e37 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Tue, 4 Nov 2025 09:55:10 +0530 Subject: [PATCH 08/10] Improved coverage for private key passed as string --- lib/AuthenticationSDK/core/MerchantConfig.rb | 15 +++++- .../util/CertificateUtility.rb | 49 ++++++++++++++++++- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/lib/AuthenticationSDK/core/MerchantConfig.rb b/lib/AuthenticationSDK/core/MerchantConfig.rb index 1d141993..56fad924 100644 --- a/lib/AuthenticationSDK/core/MerchantConfig.rb +++ b/lib/AuthenticationSDK/core/MerchantConfig.rb @@ -7,7 +7,7 @@ public # This fuction has all the merchantConfig properties getters and setters methods class Merchantconfig - def initialize(cybsPropertyObj, responseMlePrivateKeyValue = nil) + def initialize(cybsPropertyObj, responseMlePrivateKeyValue = nil, responseMlePrivateKeyPasswordValue = nil) # Common Parameters @merchantId = cybsPropertyObj['merchantID'] @runEnvironment = cybsPropertyObj['runEnvironment'] @@ -113,11 +113,21 @@ def initialize(cybsPropertyObj, responseMlePrivateKeyValue = nil) end end + if responseMlePrivateKeyPasswordValue.nil? + responseMlePrivateKeyPasswordValue = cybsPropertyObj['responseMlePrivateKeyPassword'] + end + + responseMlePrivateKeyPassword = responseMlePrivateKeyPasswordValue + + if !responseMlePrivateKeyValue.nil? && !cybsPropertyObj['responseMlePrivateKey'].nil? + raise StandardError.new(Constants::ERROR_PREFIX + "The value for `responseMlePrivateKey` is provided in both the configuration object and the constructor for MerchantConfig. Please provide only one of them for response mle private key.") + end + if responseMlePrivateKeyValue.nil? responseMlePrivateKeyValue = cybsPropertyObj['responseMlePrivateKey'] end - responseMlePrivateKeyValue = CertificateUtility.convert_key_to_JWK(responseMlePrivateKeyValue) + responseMlePrivateKeyValue = CertificateUtility.convert_key_to_JWK(responseMlePrivateKeyValue, responseMlePrivateKeyPassword) @responseMlePrivateKey = responseMlePrivateKeyValue @@ -644,6 +654,7 @@ def check_key_file attr_accessor :responseMlePrivateKeyFilePath attr_accessor :responseMlePrivateKeyFilePassword attr_accessor :responseMlePrivateKey + attr_accessor :responseMlePrivateKeyPassword attr_accessor :internalMapToControlRequestMLEonAPI attr_accessor :internalMapToControlResponseMLEonAPI end diff --git a/lib/AuthenticationSDK/util/CertificateUtility.rb b/lib/AuthenticationSDK/util/CertificateUtility.rb index 07df0070..38159849 100644 --- a/lib/AuthenticationSDK/util/CertificateUtility.rb +++ b/lib/AuthenticationSDK/util/CertificateUtility.rb @@ -172,9 +172,56 @@ def self.load_private_key_from_pem_file(key_file_path, password = nil) end end - def self.convert_key_to_JWK(keyValue) + def self.convert_key_to_JWK(keyValue, password=nil) if !keyValue.nil? case keyValue + when String + begin + if keyValue.encoding == Encoding::UTF_8 + # This is for PEM formatted string + encrypted = keyValue.include?('BEGIN ENCRYPTED PRIVATE KEY') + pkey = nil + + key = begin + if encrypted + if password.nil? || password.empty? + raise ArgumentError, "Encrypted PEM detected, but no password was provided." + end + pkey = OpenSSL::PKey.read(keyValue, password) + else + # Try without password first + pkey = OpenSSL::PKey.read(keyValue) + end + rescue OpenSSL::PKey::PKeyError + # If initial attempt failed and a password was provided, retry with password + if !password.nil? && !password.empty? + begin + pkey = OpenSSL::PKey.read(keyValue, password) + rescue OpenSSL::PKey::PKeyError => e + raise "Failed to load PEM private key. Incorrect password or corrupted/unsupported format. OpenSSL: #{e.message}" + end + else + raise "Failed to load PEM private key. Invalid key format or password required." + end + end + keyValue = JOSE::JWK.from_key(pkey) + else + # This is for P12 formatted string + begin + if !password.nil? && !password.empty? + pkey = OpenSSL::PKCS12.new(keyValue, password) + else + pkey = OpenSSL::PKCS12.new(keyValue) + end + rescue OpenSSL::PKCS12::PKCS12Error => e + raise "Could not recover key from P12 data: #{e.message}" + end + + key = pkey.key + raise "No private key found in the P12 data" if key.nil? + keyValue = JOSE::JWK.from_key(key) + end + end when OpenSSL::PKey::RSA keyValue = JOSE::JWK.from_pem(keyValue.to_pem) else From ea5dcde89418bffc400f167cf5e86eb4c11e7ac2 Mon Sep 17 00:00:00 2001 From: gnongsie Date: Tue, 4 Nov 2025 12:49:13 +0530 Subject: [PATCH 09/10] Added documentation --- MLE.md | 419 ++++++++++++++++--- lib/AuthenticationSDK/core/MerchantConfig.rb | 1 + 2 files changed, 360 insertions(+), 60 deletions(-) diff --git a/MLE.md b/MLE.md index 43a9064c..2d0f7cdc 100644 --- a/MLE.md +++ b/MLE.md @@ -4,106 +4,405 @@ 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 -In the `merchantConfig` object, set the `useMLEGlobally` variable to enable or disable MLE for all supported APIs for the Rest SDK. +#### 1.1. Global Request MLE Configuration -- **Variable**: `useMLEGlobally` +Configure global settings for request MLE using these properties in your merchant configuration: + +##### (i) Primary Configuration + +- **Variable**: `enableRequestMLEForOptionalApisGlobally` - **Type**: `Boolean` - **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**: `Hash of string to boolean` -- **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**: `Boolean` +- **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 -### MLE Key Alias +- **Variable**: `disableRequestMLEForMandatoryApisGlobally` +- **Type**: `Boolean` +- **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`. -Another optional parameter for MLE is `mleKeyAlias`, which specifies the key alias used to retrieve the MLE certificate from the JWT P12 file. +--- -- **Variable**: `mleKeyAlias` +##### (ii) Key Alias Configuration (Optional) + +- **Variable**: `requestMleKeyAlias` - **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. +- **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`. + +--- + +##### (iii) Deprecated Key Alias (Backward Compatibility) (Optional) + +- **Variable**: `mleKeyAlias` ⚠️ **DEPRECATED** +- **Type**: `String` +- **Optional**: `true` +- **Default**: `CyberSource_SJC_US` +- **Description**: **DEPRECATED** - Use `requestMleKeyAlias` instead. This field is maintained for backward compatibility and will be used as an alias for `requestMleKeyAlias`. + +
-## 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 configurations contain only properties related to MLE. +### 2. Response MLE Configuration -## Example Configuration +#### 2.1 Global Response MLE Configuration + +- **Variable**: `enableResponseMleGlobally` +- **Type**: `Boolean` +- **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**: `OpenSSL::PKey` | `String` +- **Description**: Direct private key object for response decryption. If this field contains an encrypted string, the `responseMlePrivateKeyPassword` field must also be provided. + +
+ +- **Variable**: `responseMlePrivateKeyPassword` +- **Type**: `String` +- **Description**: This password is used to decrypt a password-protected key if the value of `responseMlePrivateKey` is an encrypted `String`. + +--- + +##### (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 + +#### Map Configuration + +- **Variable**: `mapToControlMLEonAPI` +- **Type**: `Map` +- **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**: `Map<'apiFunctionName', 'true::true'>` -### Option 1: Enable MLE globally for all MLE supported APIs +#### Structure of Values in Map: + +(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 + +```ruby + # Configuration in Hash - Uses defaults (most common scenario) + merchantCustomConfiguration = {} + merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + + # Both mleForRequestPublicCertPath and requestMleKeyAlias are optional + # SDK will use JWT P12 file with default alias "CyberSource_SJC_US" +``` + +#### (ii) Request MLE with Deprecated Parameters (Backward Compatibility) + +```ruby + # Using deprecated parameters - still supported but not recommended + merchantCustomConfiguration = {} + merchantCustomConfiguration['useMLEGlobally'] = true # Deprecated - use enableRequestMLEForOptionalApisGlobally + merchantCustomConfiguration['mleKeyAlias'] = 'Custom_Key_Alias' # Deprecated - use requestMleKeyAlias +``` + +#### (iii) Request MLE with Custom Key Alias ```ruby -configuration_dictionary = { -"useMLEGlobally": true # Globally MLE will be enabled for all MLE supported APIs -} + # Configuration in Hash - With custom key alias only + merchantCustomConfiguration = {} + merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + merchantCustomConfiguration['requestMleKeyAlias'] = 'Custom_Key_Alias' + # Will fetch from JWT P12 file using provided custom alias ``` -### Option 2: Enable/Disable MLE for specific APIs +#### (iv) Request MLE with Separate Certificate File ```ruby -configuration_dictionary = {} -configuration_dictionary['useMLEGlobally'] = true # globally MLE will be enabled for all the MLE supported APIs by Cybs in SDK -mapToControlMLE = { - 'create_payment' => false, # only create_payment function will have MLE=false i.e. (/pts/v2/payments POST API) out of all MLE supported APIs - 'capture_payment' => true # capture_payment function will have MLE=true i.e. (/pts/v2/payments/{id}/captures POST API), if it not in list of MLE supportedAPIs else it will already have MLE=true by global MLE parameter. -} -configuration_dictionary['mapToControlMLEonAPI'] = mapToControlMLE -# Set other properties -api_client = CyberSource::ApiClient.new -# Create API instance using the configuration dictionary -api_instance = CyberSource::PaymentsApi.new(api_client, configuration_dictionary) + # Configuration in Hash - With separate MLE certificate file + merchantCustomConfiguration = {} + merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + merchantCustomConfiguration['mleForRequestPublicCertPath'] = 'path/to/public/cert.pem' + merchantCustomConfiguration['requestMleKeyAlias'] = 'Custom_Key_Alias' + + # API-specific control + mleControlMap = { + 'createPayment' => 'true', # Enable request MLE for this API + 'capturePayment' => 'false' # Disable request MLE for this API + } + merchantCustomConfiguration['mapToControlMLEonAPI'] = mleControlMap +``` + +#### (v) Response MLE Configuration with Private Key File + +```ruby + # Configuration in Hash + merchantCustomConfiguration = {} + merchantCustomConfiguration['enableResponseMleGlobally'] = true + merchantCustomConfiguration['responseMlePrivateKeyFilePath'] = 'path/to/private/key.p12' + merchantCustomConfiguration['responseMlePrivateKeyFilePassword'] = 'password' + merchantCustomConfiguration['responseMleKID'] = 'your-key-id' + + # API-specific control + mleControlMap = { + 'createPayment' => '::true' # Enable response MLE only for this API + } + merchantCustomConfiguration['mapToControlMLEonAPI'] = mleControlMap +``` + +#### (vi) Response MLE Configuration with Private Key Object +```ruby + # Load private key programmatically into configuration in Hash + merchantCustomConfiguration = {} + merchantCustomConfiguration['enableResponseMleGlobally'] = true + merchantCustomConfiguration['responseMleKID'] = 'your-key-id' + merchantCustomConfiguration['responseMlePrivateKey'] = loadPrivateKeyFromSomewhere(); + # If `responseMlePrivateKey` is NOT an instance of `OpenSSL::PKey`, then uncomment the following line: + # merchantCustomConfiguration['responseMlePrivateKeyPassword'] = 'password' ``` -### Option 3: Disable MLE globally and enable for specific APIs +#### (vii) Both Request and Response MLE Configuration ```ruby -configuration_dictionary = { - "useMLEGlobally": false, # Globally MLE will be disabled for all APIs - "mleKeyAlias": "Custom_Key_Alias" # optional if any custom value provided by Cybs -} -mapToControlMLE = { - 'apiFunctionName1' => false, # MLE will be disabled for this API - 'apiFunctionName2' => true # MLE will be enabled for this API -} -configuration_dictionary['mapToControlMLEonAPI'] = mapToControlMLE + # Configuration in Hash + merchantCustomConfiguration = {} + + # Request MLE Settings (minimal - uses default values) + merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + + # Response MLE Settings + merchantCustomConfiguration['enableResponseMleGlobally'] = true + merchantCustomConfiguration['responseMlePrivateKeyFilePath'] = 'path/to/private/key.p12' + merchantCustomConfiguration['responseMlePrivateKeyFilePassword'] = 'password' + merchantCustomConfiguration['responseMleKID'] = 'your-key-id' + + # API-specific control for both request and response + mleControlMap = { + 'createPayment' => 'true::true', # Enable both request and response MLE for this API + 'capturePayment' => 'false::true', # Disable request MLE, enable response MLE for this API + 'refundPayment' => 'true::false', # Enable request MLE, disable response MLE for this API + 'createCredit' => '::true' # Use global request settings, enable response MLE for this API + } + merchantCustomConfiguration['mapToControlMLEonAPI'] = mleControlMap ``` -In the above examples: -- MLE is enabled/disabled globally (`useMLEGlobally` is true/false). -- `apiFunctionName1` will have MLE disabled/enabled based on value provided. -- `apiFunctionName2` will have MLE enabled. -- `mleKeyAlias` is set to `Custom_Key_Alias`, overriding the default value. +#### (viii) Mixed Configuration (New and Deprecated Parameters) + +```ruby + # Example showing both new and deprecated parameters (deprecated will be used as aliases) + merchantCustomConfiguration = {} + + # If both are set with the same value, it works fine + merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + merchantCustomConfiguration['useMLEGlobally'] = true # Deprecated but same value + + # If both are set with different values, it will throw an error + # merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + # merchantCustomConfiguration['useMLEGlobally'] = false # This would cause an error + + # Key alias - new parameter takes precedence if both are provided + merchantCustomConfiguration['requestMleKeyAlias'] = 'New_Alias' + merchantCustomConfiguration['mleKeyAlias'] = 'Old_Alias' # This will be ignored +``` -Please refer to the given link for sample codes with MLE: [MLE Samples](https://github.com/CyberSource/cybersource-rest-samples-ruby/tree/master/Samples/MLEFeature) +
+--- -## Additional Information +### 5. Supported Private Key File Formats -### API Support +For Response MLE private key files, the following formats are supported: -- 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. +- **PKCS#12**: `.p12`, `.pfx` (requires password) +- **PEM**: `.pem`, `.key`, `.p8` (supports both encrypted and unencrypted) -### Authentication Type +
-- MLE is only supported with `JWT (JSON Web Token)` authentication type within the SDK. +--- + +### 6. 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 + +#### (iii) Backward Compatibility +- `useMLEGlobally` is **deprecated** but still supported as an alias for `enableRequestMLEForOptionalApisGlobally` +- `mleKeyAlias` is **deprecated** but still supported as an alias for `requestMleKeyAlias` +- If both new and deprecated parameters are provided with the **same value**, it works fine +- If both new and deprecated parameters are provided with **different values**, it will throw an error +- When both new and deprecated parameters are provided, the **new parameter 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 before or after `::` separator will use global defaults +- The map also supports backward compatibility with `Map` format, which will be automatically converted to `Map` + +#### (v) Configuration Validation +- The SDK performs comprehensive validation of MLE configuration parameters +- Conflicting values between new and deprecated parameters will result in an error +- File path validation is performed for certificate and private key files +- Invalid boolean values in `mapToControlMLEonAPI` will cause parsing errors + +
+ +--- + +### 7. 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 + +
+ +--- + +### 8. Sample Code Repository + +For comprehensive examples and sample implementations, please refer to: +[Cybersource Ruby Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-ruby) + +
+ +--- + +### 9. 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, create a custom configuration as a Ruby `Hash` 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: + +```ruby + # OLD (DEPRECATED) + merchantCustomConfiguration['useMLEGlobally'] = true + merchantCustomConfiguration['mleKeyAlias'] = 'Custom_Alias' + + # NEW (RECOMMENDED) + merchantCustomConfiguration['enableRequestMLEForOptionalApisGlobally'] = true + merchantCustomConfiguration['requestMleKeyAlias'] = 'Custom_Alias' +``` -### Using the SDK +The deprecated parameters will continue to work but are not recommended for new implementations. -To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization. +
-## Contact +--- +## 10. Contact For any issues or further assistance, please open an issue on the GitHub repository or contact our support team. \ No newline at end of file diff --git a/lib/AuthenticationSDK/core/MerchantConfig.rb b/lib/AuthenticationSDK/core/MerchantConfig.rb index 56fad924..aba572f9 100644 --- a/lib/AuthenticationSDK/core/MerchantConfig.rb +++ b/lib/AuthenticationSDK/core/MerchantConfig.rb @@ -647,6 +647,7 @@ def check_key_file attr_accessor :disableRequestMLEForMandatoryApisGlobally attr_accessor :mleForRequestPublicCertPath attr_accessor :mapToControlMLEonAPI + attr_accessor :mleKeyAlias attr_accessor :requestMleKeyAlias attr_accessor :p12KeyFilePath attr_accessor :enableResponseMleGlobally From 45e4071c8ad6385b9e40923dd9c86b0199144ed0 Mon Sep 17 00:00:00 2001 From: Gabriel Broadwin Nongsiej Date: Tue, 4 Nov 2025 21:15:32 +0530 Subject: [PATCH 10/10] Update MLE.md for parameter precedence and error handling Clarified behavior of new and deprecated parameters in MLE documentation. --- MLE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MLE.md b/MLE.md index 2d0f7cdc..1bf801b0 100644 --- a/MLE.md +++ b/MLE.md @@ -330,8 +330,8 @@ For Response MLE private key files, the following formats are supported: - `useMLEGlobally` is **deprecated** but still supported as an alias for `enableRequestMLEForOptionalApisGlobally` - `mleKeyAlias` is **deprecated** but still supported as an alias for `requestMleKeyAlias` - If both new and deprecated parameters are provided with the **same value**, it works fine -- If both new and deprecated parameters are provided with **different values**, it will throw an error -- When both new and deprecated parameters are provided, the **new parameter takes precedence** +- If both new and deprecated parameters are provided with **different values**, it may throw an error +- When both new and deprecated parameters are provided, the **new parameter takes precedence** wherever ambiguity can be avoided #### (iv) API-level Control Validation - The `mapToControlMLEonAPI` values are validated for proper format @@ -405,4 +405,4 @@ The deprecated parameters will continue to work but are not recommended for new --- ## 10. Contact -For any issues or further assistance, please open an issue on the GitHub repository or contact our support team. \ No newline at end of file +For any issues or further assistance, please open an issue on the GitHub repository or contact our support team.