Class: Minfraud::Assessments
- Inherits:
-
Object
- Object
- Minfraud::Assessments
- Includes:
- HTTPService, Resolver
- Defined in:
- lib/minfraud/assessments.rb
Overview
Assessments is used to perform minFraud Score, Insights, and Factors requests.
Constant Summary
Constants included from HTTPService
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
Methods included from HTTPService
Constructor Details
#initialize(params = {}, resolver = ::Minfraud::Resolver) ⇒ Assessments
Returns a new instance of Assessments.
74 75 76 77 78 79 |
# File 'lib/minfraud/assessments.rb', line 74 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.
15 16 17 |
# File 'lib/minfraud/assessments.rb', line 15 def account @account end |
#billing ⇒ Minfraud::Components::Billing?
The Billing component.
20 21 22 |
# File 'lib/minfraud/assessments.rb', line 20 def billing @billing end |
#credit_card ⇒ Minfraud::Components::CreditCard?
The CreditCard component.
25 26 27 |
# File 'lib/minfraud/assessments.rb', line 25 def credit_card @credit_card end |
#custom_inputs ⇒ Minfraud::Components::CustomInputs?
The CustomInputs component.
30 31 32 |
# File 'lib/minfraud/assessments.rb', line 30 def custom_inputs @custom_inputs end |
#device ⇒ Minfraud::Components::Device?
The Device component.
35 36 37 |
# File 'lib/minfraud/assessments.rb', line 35 def device @device end |
#email ⇒ Minfraud::Components::Email?
The Email component.
40 41 42 |
# File 'lib/minfraud/assessments.rb', line 40 def email @email end |
#event ⇒ Minfraud::Components::Event?
The Event component.
45 46 47 |
# File 'lib/minfraud/assessments.rb', line 45 def event @event end |
#order ⇒ Minfraud::Components::Order?
The Order component.
50 51 52 |
# File 'lib/minfraud/assessments.rb', line 50 def order @order end |
#payment ⇒ Minfraud::Components::Payment?
The Payment component.
55 56 57 |
# File 'lib/minfraud/assessments.rb', line 55 def payment @payment end |
#shipping ⇒ Minfraud::Components::Shipping?
The Shipping component.
60 61 62 |
# File 'lib/minfraud/assessments.rb', line 60 def shipping @shipping end |
#shopping_cart ⇒ Minfraud::Components::ShoppingCart?
The ShoppingCart component.
65 66 67 |
# File 'lib/minfraud/assessments.rb', line 65 def shopping_cart @shopping_cart end |
Instance Method Details
#factors ⇒ Minfraud::HTTPService::Response
Perform a minFraud Factors request.
93 94 95 |
# File 'lib/minfraud/assessments.rb', line 93 def factors perform_request(:factors) end |
#insights ⇒ Minfraud::HTTPService::Response
Perform a minFraud Insights request.
109 110 111 |
# File 'lib/minfraud/assessments.rb', line 109 def insights perform_request(:insights) end |
#score ⇒ Minfraud::HTTPService::Response
Perform a minFraud Score request.
125 126 127 |
# File 'lib/minfraud/assessments.rb', line 125 def score perform_request(:score) end |