Class: Minfraud::Components::Report::Transaction

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

Overview

Contains all of the fields which are used in the report transaction API

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::Report::Transaction

Creates Minfraud::Components::Report::Transaction instance

Parameters:

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

    hash of parameters



57
58
59
60
61
62
63
64
65
# File 'lib/minfraud/components/report/transaction.rb', line 57

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]
end

Instance Attribute Details

#chargeback_codeString?

Returns A string which is provided by your payment processor indicating the reason for the chargeback.

Returns:

  • (String, nil)

    A string which is provided by your payment processor indicating the reason for the chargeback.



24
25
26
# File 'lib/minfraud/components/report/transaction.rb', line 24

def chargeback_code
  @chargeback_code
end

#ip_addressString?

Returns The IP address of the customer placing the order. This should be passed as a string like “44.55.66.77” or “2001:db8::2:1”.

Returns:

  • (String, nil)

    The IP address of the customer placing the order. This should be passed as a string like “44.55.66.77” or “2001:db8::2:1”.



13
14
15
# File 'lib/minfraud/components/report/transaction.rb', line 13

def ip_address
  @ip_address
end

#maxmind_idString?

Returns 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, but you are encouraged to provide it, if possible.

Returns:

  • (String, nil)

    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, but you are encouraged to provide it, if possible.



31
32
33
# File 'lib/minfraud/components/report/transaction.rb', line 31

def maxmind_id
  @maxmind_id
end

#minfraud_idString?

Returns 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, but you are encouraged to provide it if the request was made to one of these services.

Returns:

  • (String, nil)

    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, but you are encouraged to provide it if the request was made to one of these services.



38
39
40
# File 'lib/minfraud/components/report/transaction.rb', line 38

def minfraud_id
  @minfraud_id
end

#notesString?

Returns 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.

Returns:

  • (String, nil)

    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.



45
46
47
# File 'lib/minfraud/components/report/transaction.rb', line 45

def notes
  @notes
end

#tagSymbol?

This may be one of :chargeback, :not_fraud, :spam_or_abuse or :suspected_fraud

Returns:

  • (Symbol, nil)

    A symbol indicating the likelihood that a transaction may be fraudulent.



19
# File 'lib/minfraud/components/report/transaction.rb', line 19

enum_accessor :tag, [:chargeback, :not_fraud, :spam_or_abuse, :suspected_fraud]

#transaction_idString?

Returns The transaction ID you originally passed to minFraud. This field is not required, but you are encouraged to provide it or the transaction’s maxmind_id or minfraud_id.

Returns:

  • (String, nil)

    The transaction ID you originally passed to minFraud. This field is not required, but you are encouraged to provide it or the transaction’s maxmind_id or minfraud_id



51
52
53
# File 'lib/minfraud/components/report/transaction.rb', line 51

def transaction_id
  @transaction_id
end