Class: Cryptopay::Risks

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptopay/api/risks.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Risks

Returns a new instance of Risks.



8
9
10
# File 'lib/cryptopay/api/risks.rb', line 8

def initialize(connection)
  @connection = connection
end

Instance Method Details

#score(risk_params, _opts = {}) ⇒ RiskResult

Score a coin address

Parameters:

  • risk_params (RiskParams)
  • opts (Hash)

    the optional parameters

Returns:



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/cryptopay/api/risks.rb', line 16

def score(risk_params, _opts = {})
  path = '/api/risks/score'

  req = Request.new(
    method: :post,
    path: path,
    body_params: risk_params
  )

  connection.call(req, return_type: RiskResult)
end