Class: Increase::Resources::Simulations::CardSettlements
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardSettlements
- Defined in:
- lib/increase/resources/simulations/card_settlements.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::Transaction
Simulates the settlement of an authorization by a card acquirer.
-
#initialize(client:) ⇒ CardSettlements
constructor
A new instance of CardSettlements.
Constructor Details
#initialize(client:) ⇒ CardSettlements
Returns a new instance of CardSettlements.
7 8 9 |
# File 'lib/increase/resources/simulations/card_settlements.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::Transaction
Simulates the settlement of an authorization by a card acquirer. After a card authorization is created, the merchant will eventually send a settlement. This simulates that event, which may occur many days after the purchase in production. The amount settled can be different from the amount originally authorized, for example, when adding a tip to a restaurant bill.
27 28 29 30 31 32 33 34 |
# File 'lib/increase/resources/simulations/card_settlements.rb', line 27 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/card_settlements" req[:body] = params req[:model] = Increase::Models::Transaction @client.request(req, opts) end |