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

Returns a new instance of RealTimeDecisions.



6
7
8
# File 'lib/increase/resources/real_time_decisions.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

#action(real_time_decision_id, params = {}, opts = {}) ⇒ Increase::Models::RealTimeDecision

Action a Real-Time Decision

Parameters:

  • real_time_decision_id (String)

    The identifier of the Real-Time Decision.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :card_authorization (CardAuthorization)

    If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization.

  • :digital_wallet_authentication (DigitalWalletAuthentication)

    If the Real-Time Decision relates to a digital wallet authentication attempt, this object contains your response to the authentication.

  • :digital_wallet_token (DigitalWalletToken)

    If the Real-Time Decision relates to a digital wallet token provisioning attempt, this object contains your response to the attempt.

Returns:



39
40
41
42
43
44
45
46
# File 'lib/increase/resources/real_time_decisions.rb', line 39

def action(real_time_decision_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/real_time_decisions/#{real_time_decision_id}/action"
  req[:body] = params
  req[:model] = Increase::Models::RealTimeDecision
  @client.request(req, opts)
end

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

Retrieve a Real-Time Decision

Parameters:

  • real_time_decision_id (String)

    The identifier of the Real-Time Decision.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



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

def retrieve(real_time_decision_id, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/real_time_decisions/#{real_time_decision_id}"
  req[:model] = Increase::Models::RealTimeDecision
  @client.request(req, opts)
end