Class: Minfraud::Components::Device

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Minfraud::Components::Device

Creates Minfraud::Components::Device instance

Parameters:

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

    hash of parameters


20
21
22
23
24
# File 'lib/minfraud/components/device.rb', line 20

def initialize(params = {})
  @ip_address      = params[:ip_address]
  @user_agent      = params[:user_agent]
  @accept_language = params[:accept_language]
end

Instance Attribute Details

#:accept_language(: accept_language) ⇒ String

Returns The HTTP “Accept-Language” header of the browser used in the transaction.

Returns:

  • (String)

    The HTTP “Accept-Language” header of the browser used in the transaction


15
# File 'lib/minfraud/components/device.rb', line 15

attr_accessor :accept_language

#accept_languageString

Returns The HTTP “Accept-Language” header of the browser used in the transaction.

Returns:

  • (String)

    The HTTP “Accept-Language” header of the browser used in the transaction


15
16
17
# File 'lib/minfraud/components/device.rb', line 15

def accept_language
  @accept_language
end

#ip_addressString

The IP address must be in IPv4 or IPv6 presentation format

Returns:

  • (String)

    The IP address associated with the device used by the customer in the transaction.


7
8
9
# File 'lib/minfraud/components/device.rb', line 7

def ip_address
  @ip_address
end

#user_agentString

Returns The HTTP “User-Agent” header of the browser used in the transaction.

Returns:

  • (String)

    The HTTP “User-Agent” header of the browser used in the transaction


11
12
13
# File 'lib/minfraud/components/device.rb', line 11

def user_agent
  @user_agent
end