Class: Increase::Resources::Simulations::CardFuelConfirmations

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardFuelConfirmations

Returns a new instance of CardFuelConfirmations.



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Simulates the fuel confirmation of an authorization by a card acquirer. This happens asynchronously right after a fuel pump transaction is completed. A fuel confirmation can only happen once per authorization.

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 fuel_confirmation in minor units in the card authorization's currency.

  • :card_payment_id (String)

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

Returns:



23
24
25
26
27
28
29
30
# File 'lib/increase/resources/simulations/card_fuel_confirmations.rb', line 23

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