Class: Increase::Resources::Simulations::CardIncrements

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardIncrements

Returns a new instance of CardIncrements.



7
8
9
# File 'lib/increase/resources/simulations/card_increments.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Increase::Models::CardPayment

Simulates the increment of an authorization by a card acquirer. An authorization can be incremented multiple times.

Parameters:

  • 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):

  • :amount (Integer)

    The amount of the increment in minor units in the card authorization's currency.

  • :card_payment_id (String)

    The identifier of the Card Payment to create a increment on.

  • :event_subscription_id (String)

    The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time decision event subscription, you can use this field to route events to any specified event subscription for testing purposes.

Returns:



25
26
27
28
29
30
31
32
# File 'lib/increase/resources/simulations/card_increments.rb', line 25

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/simulations/card_increments"
  req[:body] = params
  req[:model] = Increase::Models::CardPayment
  @client.request(req, opts)
end