Method: CyberSource::RiskV1DecisionsPost201ResponseConsumerAuthenticationInformation#_to_hash

Defined in:
lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



826
827
828
829
830
831
832
833
834
835
836
837
838
# File 'lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb', line 826

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end