Module: Minfraud
- Defined in:
- lib/minfraud.rb,
lib/minfraud/enum.rb,
lib/minfraud/errors.rb,
lib/minfraud/report.rb,
lib/minfraud/version.rb,
lib/minfraud/resolver.rb,
lib/minfraud/validates.rb,
lib/minfraud/assessments.rb,
lib/minfraud/model/email.rb,
lib/minfraud/model/error.rb,
lib/minfraud/model/phone.rb,
lib/minfraud/model/score.rb,
lib/minfraud/model/device.rb,
lib/minfraud/model/issuer.rb,
lib/minfraud/error_handler.rb,
lib/minfraud/model/address.rb,
lib/minfraud/model/factors.rb,
lib/minfraud/model/warning.rb,
lib/minfraud/model/abstract.rb,
lib/minfraud/model/insights.rb,
lib/minfraud/components/base.rb,
lib/minfraud/model/subscores.rb,
lib/minfraud/components/email.rb,
lib/minfraud/components/event.rb,
lib/minfraud/components/order.rb,
lib/minfraud/model/ip_address.rb,
lib/minfraud/components/device.rb,
lib/minfraud/model/credit_card.rb,
lib/minfraud/model/disposition.rb,
lib/minfraud/components/account.rb,
lib/minfraud/components/billing.rb,
lib/minfraud/components/payment.rb,
lib/minfraud/model/email_domain.rb,
lib/minfraud/components/shipping.rb,
lib/minfraud/model/ip_risk_reason.rb,
lib/minfraud/http_service/response.rb,
lib/minfraud/model/billing_address.rb,
lib/minfraud/model/geoip2_location.rb,
lib/minfraud/components/addressable.rb,
lib/minfraud/components/credit_card.rb,
lib/minfraud/model/score_ip_address.rb,
lib/minfraud/model/shipping_address.rb,
lib/minfraud/components/custom_inputs.rb,
lib/minfraud/components/shopping_cart.rb,
lib/minfraud/components/report/transaction.rb,
lib/minfraud/components/shopping_cart_item.rb
Overview
rubocop:disable Metrics/ModuleLength
Defined Under Namespace
Modules: Components, Enum, ErrorHandler, HTTPService, Model, Resolver Classes: Assessments, AuthorizationError, BaseError, ClientError, InvalidInputError, NotEnumValueError, Report, RequestFormatError, ServerError
Constant Summary collapse
- VERSION =
The Gem version.
'2.6.0'
Class Attribute Summary collapse
-
.account_id ⇒ Integer?
The MaxMind account ID that is used for authorization.
-
.enable_validation ⇒ Boolean?
Enable client side validation.
-
.host ⇒ String?
The host to use when connecting to the web service.
-
.license_key ⇒ String?
The MaxMind license key that is used for authorization.
Class Method Summary collapse
-
.configure {|self| ... } ⇒ Object
Yield self to accept configuration settings.
Class Attribute Details
.account_id ⇒ Integer?
The MaxMind account ID that is used for authorization.
38 39 40 |
# File 'lib/minfraud.rb', line 38 def account_id @account_id end |
.enable_validation ⇒ Boolean?
Enable client side validation. This is disabled by default.
43 44 45 |
# File 'lib/minfraud.rb', line 43 def enable_validation @enable_validation end |
.host ⇒ String?
The host to use when connecting to the web service. By default, the client connects to the production host. However, during testing and development, you can set this option to ‘sandbox.maxmind.com’ to use the Sandbox environment’s host. The sandbox allows you to experiment with the API without affecting your production data.
53 54 55 |
# File 'lib/minfraud.rb', line 53 def host @host end |
.license_key ⇒ String?
The MaxMind license key that is used for authorization.
58 59 60 |
# File 'lib/minfraud.rb', line 58 def license_key @license_key end |
Class Method Details
.configure {|self| ... } ⇒ Object
Yield self to accept configuration settings.
66 67 68 69 70 71 72 73 74 |
# File 'lib/minfraud.rb', line 66 def configure yield self pool_size = 5 host = @host.nil? ? 'minfraud.maxmind.com' : @host @connection_pool = ConnectionPool.new(size: pool_size) do make_http_client.persistent("https://#{host}") end end |