Class: Minfraud::Components::Report::Transaction
- Includes:
- Enum
- Defined in:
- lib/minfraud/components/report/transaction.rb
Overview
Contains the fields used in the Report Transaction API.
Instance Attribute Summary collapse
-
#chargeback_code ⇒ String?
A string which is provided by your payment processor indicating the reason for the chargeback.
-
#ip_address ⇒ String?
The IP address of the customer placing the order.
-
#maxmind_id ⇒ String?
A unique eight character string identifying a minFraud Standard or Premium request.
-
#minfraud_id ⇒ String?
A UUID that identifies a minFraud Score, minFraud Insights, or minFraud Factors request.
-
#notes ⇒ String?
Your notes on the fraud tag associated with the transaction.
-
#tag ⇒ Symbol?
A symbol indicating the likelihood that a transaction may be fraudulent.
-
#transaction_id ⇒ String?
The transaction ID you originally passed to minFraud.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Transaction
constructor
A new instance of Transaction.
Methods included from Enum
Methods inherited from Base
Constructor Details
permalink #initialize(params = {}) ⇒ Transaction
Returns a new instance of Transaction.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/minfraud/components/report/transaction.rb', line 76 def initialize(params = {}) @ip_address = params[:ip_address] @chargeback_code = params[:chargeback_code] @maxmind_id = params[:maxmind_id] @minfraud_id = params[:minfraud_id] @notes = params[:notes] @transaction_id = params[:transaction_id] self.tag = params[:tag] validate end |
Instance Attribute Details
permalink #chargeback_code ⇒ String?
A string which is provided by your payment processor indicating the reason for the chargeback.
37 38 39 |
# File 'lib/minfraud/components/report/transaction.rb', line 37 def chargeback_code @chargeback_code end |
permalink #ip_address ⇒ String?
The IP address of the customer placing the order. This should be passed as a string like “152.216.7.110”. This field is not required if you provide at least one of the transaction’s minfraud_id, maxmind_id, or transaction_id. You are encouraged to provide it, if possible.
20 21 22 |
# File 'lib/minfraud/components/report/transaction.rb', line 20 def ip_address @ip_address end |
permalink #maxmind_id ⇒ String?
A unique eight character string identifying a minFraud Standard or Premium request. These IDs are returned in the maxmindID field of a response for a successful minFraud request. This field is not required if you provide at least one of the transaction’s ip_address, minfraud_id, or transaction_id. You are encouraged to provide it, if possible.
47 48 49 |
# File 'lib/minfraud/components/report/transaction.rb', line 47 def maxmind_id @maxmind_id end |
permalink #minfraud_id ⇒ String?
A UUID that identifies a minFraud Score, minFraud Insights, or minFraud Factors request. This ID is returned at /id in the response. This field is not required if you provide at least one of the transaction’s ip_address, maxmind_id, or transaction_id. You are encouraged to provide it, if possible.
56 57 58 |
# File 'lib/minfraud/components/report/transaction.rb', line 56 def minfraud_id @minfraud_id end |
permalink #notes ⇒ String?
Your notes on the fraud tag associated with the transaction. We manually review many reported transactions to improve our scoring for you so any additional details to help us understand context are helpful.
64 65 66 |
# File 'lib/minfraud/components/report/transaction.rb', line 64 def notes @notes end |
permalink #tag ⇒ Symbol?
A symbol indicating the likelihood that a transaction may be fraudulent.
This may be one of :chargeback
, :not_fraud
, :spam_or_abuse
, or :suspected_fraud
.
31 |
# File 'lib/minfraud/components/report/transaction.rb', line 31 enum_accessor :tag, %i[chargeback not_fraud spam_or_abuse suspected_fraud] |
permalink #transaction_id ⇒ String?
The transaction ID you originally passed to minFraud. This field is not required if you provide at least one of the transaction’s ip_address, maxmind_id, or minfraud_id. You are encouraged to provide it, if possible.
72 73 74 |
# File 'lib/minfraud/components/report/transaction.rb', line 72 def transaction_id @transaction_id end |