Class: Minfraud::Components::Event

Inherits:
Base
  • Object
show all
Includes:
Enum
Defined in:
lib/minfraud/components/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enum

included

Methods inherited from Base

#to_json

Constructor Details

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

Creates Minfraud::Components::Event instance

Parameters:

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

    hash of parameters


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

def initialize(params = {})
  @transaction_id = params[:transaction_id]
  @shop_id        = params[:shop_id]
  @time           = params[:time]
  self.type       = params[:type]
end

Instance Attribute Details

#shop_idString

Returns Internal ID for the shop, affiliate, or merchant this order is coming from.

Returns:

  • (String)

    Internal ID for the shop, affiliate, or merchant this order is coming from


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

def shop_id
  @shop_id
end

#timeString

If this field is not in the request, the current time will be used

Returns:

  • (String)

    The date and time the event occurred. The string must be in the RFC 3339 date-time format.


16
17
18
# File 'lib/minfraud/components/event.rb', line 16

def time
  @time
end

#transaction_idString

Returns Internal ID for the transaction. Used to locate a specific transaction in minFraud logs.

Returns:

  • (String)

    Internal ID for the transaction. Used to locate a specific transaction in minFraud logs


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

def transaction_id
  @transaction_id
end

#typeString

Returns The type of event being scored.

Returns:

  • (String)

    The type of event being scored


20
# File 'lib/minfraud/components/event.rb', line 20

enum_accessor :type, [:account_creation, :account_login, :purchase, :recurring_purchase, :referral, :survey]