Class: Increase::Resources::RealTimeDecisions

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/real_time_decisions.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RealTimeDecisions

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RealTimeDecisions.

Parameters:



64
65
66
# File 'lib/increase/resources/real_time_decisions.rb', line 64

def initialize(client:)
  @client = client
end

Instance Method Details

#action(real_time_decision_id, card_authentication: nil, card_authentication_challenge: nil, card_authorization: nil, digital_wallet_authentication: nil, digital_wallet_token: nil, request_options: {}) ⇒ Increase::Models::RealTimeDecision

Some parameter documentations has been truncated, see Models::RealTimeDecisionActionParams for more details.

Action a Real-Time Decision

Parameters:

Returns:

See Also:



50
51
52
53
54
55
56
57
58
59
# File 'lib/increase/resources/real_time_decisions.rb', line 50

def action(real_time_decision_id, params = {})
  parsed, options = Increase::RealTimeDecisionActionParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["real_time_decisions/%1$s/action", real_time_decision_id],
    body: parsed,
    model: Increase::RealTimeDecision,
    options: options
  )
end

#retrieve(real_time_decision_id, request_options: {}) ⇒ Increase::Models::RealTimeDecision

Retrieve a Real-Time Decision

Parameters:

  • real_time_decision_id (String)

    The identifier of the Real-Time Decision.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/increase/resources/real_time_decisions.rb', line 17

def retrieve(real_time_decision_id, params = {})
  @client.request(
    method: :get,
    path: ["real_time_decisions/%1$s", real_time_decision_id],
    model: Increase::RealTimeDecision,
    options: params[:request_options]
  )
end