Class: Minfraud::Components::CustomInputs

Inherits:
Base
  • Object
show all
Defined in:
lib/minfraud/components/custom_inputs.rb

Overview

CustomInputs corresponds to the custom_inputs object of a minFraud request.

Instance Method Summary collapse

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ CustomInputs

Returns a new instance of CustomInputs.

Parameters:

  • params (Hash) (defaults to: {})

    Each key/value should correspond to your defined custom inputs.



14
15
16
17
18
19
20
21
22
# File 'lib/minfraud/components/custom_inputs.rb', line 14

def initialize(params = {})
  params.each do |name, value|
    instance_variable_set("@#{name}", value)

    if Minfraud.enable_validation
      validate_custom_input_value(name, value)
    end
  end
end