Class: Minfraud::Components::Event
- Includes:
- Enum
- Defined in:
- lib/minfraud/components/event.rb
Overview
Event corresponds to the event object of a minFraud request.
Instance Attribute Summary collapse
-
#party ⇒ Symbol?
The party submitting the transaction.
-
#shop_id ⇒ String?
Your internal ID for the shop, affiliate, or merchant this order is coming from.
-
#time ⇒ String?
The date and time the event occurred.
-
#transaction_id ⇒ String?
Your internal ID for the transaction.
-
#type ⇒ Symbol?
The type of event being scored.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Event
constructor
A new instance of Event.
Methods included from Enum
Methods inherited from Base
Constructor Details
#initialize(params = {}) ⇒ Event
Returns a new instance of Event.
76 77 78 79 80 81 82 83 84 |
# File 'lib/minfraud/components/event.rb', line 76 def initialize(params = {}) self.party = params[:party] @transaction_id = params[:transaction_id] @shop_id = params[:shop_id] @time = params[:time] self.type = params[:type] validate end |
Instance Attribute Details
#party ⇒ Symbol?
The party submitting the transaction. This must be one of :agent or :customer.
18 19 20 21 22 |
# File 'lib/minfraud/components/event.rb', line 18 enum_accessor :party, %i[ agent customer ] |
#shop_id ⇒ String?
Your internal ID for the shop, affiliate, or merchant this order is coming from. Required for minFraud users who are resellers, payment providers, gateways and affiliate networks. No specific format is required.
37 38 39 |
# File 'lib/minfraud/components/event.rb', line 37 def shop_id @shop_id end |
#time ⇒ String?
The date and time the event occurred. The string must be in the RFC 3339 date-time format, e.g., “2012-04-12T23:20:50.52Z”. The time must be within the past 10 years. If this field is not in the request, the current time will be used.
47 48 49 |
# File 'lib/minfraud/components/event.rb', line 47 def time @time end |
#transaction_id ⇒ String?
Your internal ID for the transaction. MaxMind can use this to locate a specific transaction in logs, and it will also show up in email alerts and notifications from MaxMind to you. No specific format is required.
29 30 31 |
# File 'lib/minfraud/components/event.rb', line 29 def transaction_id @transaction_id end |
#type ⇒ Symbol?
The type of event being scored. This must be one of :account_creation, :account_login, :credit_application, :email_change, :fund_transfer, :password_reset, :payout_change, :purchase, :recurring_purchase, :referral, :sim_swap, or :survey.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/minfraud/components/event.rb', line 58 enum_accessor :type, %i[ account_creation account_login credit_application email_change fund_transfer password_reset payout_change purchase recurring_purchase referral sim_swap survey ] |