Class: Minfraud::Components::Email

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

Overview

Email corresponds to the email object of a minFraud request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Email

Returns a new instance of Email.

Parameters:

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

    Hash of parameters. Each key/value should correspond to one of the available attributes.



26
27
28
29
30
31
# File 'lib/minfraud/components/email.rb', line 26

def initialize(params = {})
  @address = params[:address]
  @domain  = params[:domain]

  validate
end

Instance Attribute Details

#addressString?

This field must be either be a valid email address or an MD5 of the lowercased email used in the transaction. Important: if using the MD5 hash, please be sure to convert the email address to lowercase before calculating its MD5 hash.

Returns:

  • (String, nil)


17
18
19
# File 'lib/minfraud/components/email.rb', line 17

def address
  @address
end

#domainString?

The domain of the email address used in the transaction.

Returns:

  • (String, nil)


22
23
24
# File 'lib/minfraud/components/email.rb', line 22

def domain
  @domain
end