Class: Minfraud::Assessments
- Inherits:
-
Object
- Object
- Minfraud::Assessments
- Includes:
- Resolver
- Defined in:
- lib/minfraud/assessments.rb
Overview
Assessments is used to perform minFraud Score, Insights, and Factors requests.
Instance Attribute Summary collapse
-
#account ⇒ Minfraud::Components::Account?
The Account component.
-
#billing ⇒ Minfraud::Components::Billing?
The Billing component.
-
#credit_card ⇒ Minfraud::Components::CreditCard?
The CreditCard component.
-
#custom_inputs ⇒ Minfraud::Components::CustomInputs?
The CustomInputs component.
-
#device ⇒ Minfraud::Components::Device?
The Device component.
-
#email ⇒ Minfraud::Components::Email?
The Email component.
-
#event ⇒ Minfraud::Components::Event?
The Event component.
-
#order ⇒ Minfraud::Components::Order?
The Order component.
-
#payment ⇒ Minfraud::Components::Payment?
The Payment component.
-
#shipping ⇒ Minfraud::Components::Shipping?
The Shipping component.
-
#shopping_cart ⇒ Minfraud::Components::ShoppingCart?
The ShoppingCart component.
Instance Method Summary collapse
-
#factors ⇒ Minfraud::HTTPService::Response
Perform a minFraud Factors request.
-
#initialize(params = {}, resolver = ::Minfraud::Resolver) ⇒ Assessments
constructor
A new instance of Assessments.
-
#insights ⇒ Minfraud::HTTPService::Response
Perform a minFraud Insights request.
-
#score ⇒ Minfraud::HTTPService::Response
Perform a minFraud Score request.
Methods included from Resolver
Constructor Details
#initialize(params = {}, resolver = ::Minfraud::Resolver) ⇒ Assessments
Returns a new instance of Assessments.
73 74 75 76 77 78 |
# File 'lib/minfraud/assessments.rb', line 73 def initialize(params = {}, resolver = ::Minfraud::Resolver) @locales = params.delete('locales') @locales = ['en'] if @locales.nil? resolver.assign(self, params) end |
Instance Attribute Details
#account ⇒ Minfraud::Components::Account?
The Account component.
14 15 16 |
# File 'lib/minfraud/assessments.rb', line 14 def account @account end |
#billing ⇒ Minfraud::Components::Billing?
The Billing component.
19 20 21 |
# File 'lib/minfraud/assessments.rb', line 19 def billing @billing end |
#credit_card ⇒ Minfraud::Components::CreditCard?
The CreditCard component.
24 25 26 |
# File 'lib/minfraud/assessments.rb', line 24 def credit_card @credit_card end |
#custom_inputs ⇒ Minfraud::Components::CustomInputs?
The CustomInputs component.
29 30 31 |
# File 'lib/minfraud/assessments.rb', line 29 def custom_inputs @custom_inputs end |
#device ⇒ Minfraud::Components::Device?
The Device component.
34 35 36 |
# File 'lib/minfraud/assessments.rb', line 34 def device @device end |
#email ⇒ Minfraud::Components::Email?
The Email component.
39 40 41 |
# File 'lib/minfraud/assessments.rb', line 39 def email @email end |
#event ⇒ Minfraud::Components::Event?
The Event component.
44 45 46 |
# File 'lib/minfraud/assessments.rb', line 44 def event @event end |
#order ⇒ Minfraud::Components::Order?
The Order component.
49 50 51 |
# File 'lib/minfraud/assessments.rb', line 49 def order @order end |
#payment ⇒ Minfraud::Components::Payment?
The Payment component.
54 55 56 |
# File 'lib/minfraud/assessments.rb', line 54 def payment @payment end |
#shipping ⇒ Minfraud::Components::Shipping?
The Shipping component.
59 60 61 |
# File 'lib/minfraud/assessments.rb', line 59 def shipping @shipping end |
#shopping_cart ⇒ Minfraud::Components::ShoppingCart?
The ShoppingCart component.
64 65 66 |
# File 'lib/minfraud/assessments.rb', line 64 def shopping_cart @shopping_cart end |
Instance Method Details
#factors ⇒ Minfraud::HTTPService::Response
Perform a minFraud Factors request.
94 95 96 |
# File 'lib/minfraud/assessments.rb', line 94 def factors perform_request(:factors) end |
#insights ⇒ Minfraud::HTTPService::Response
Perform a minFraud Insights request.
112 113 114 |
# File 'lib/minfraud/assessments.rb', line 112 def insights perform_request(:insights) end |
#score ⇒ Minfraud::HTTPService::Response
Perform a minFraud Score request.
130 131 132 |
# File 'lib/minfraud/assessments.rb', line 130 def score perform_request(:score) end |