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(card_id: , pending_transaction_id: , amount: nil, request_options: {}) ⇒ Increase::Models::Transaction
Some parameter documentations has been truncated, see Models::Simulations::CardSettlementCreateParams for more details.
-
#initialize(client:) ⇒ CardSettlements
constructor
private
A new instance of CardSettlements.
Constructor Details
#initialize(client:) ⇒ CardSettlements
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 CardSettlements.
43 44 45 |
# File 'lib/increase/resources/simulations/card_settlements.rb', line 43 def initialize(client:) @client = client end |
Instance Method Details
#create(card_id: , pending_transaction_id: , amount: nil, request_options: {}) ⇒ Increase::Models::Transaction
Some parameter documentations has been truncated, see Models::Simulations::CardSettlementCreateParams for more details.
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.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/increase/resources/simulations/card_settlements.rb', line 29 def create(params) parsed, = Increase::Simulations::CardSettlementCreateParams.dump_request(params) @client.request( method: :post, path: "simulations/card_settlements", body: parsed, model: Increase::Transaction, options: ) end |