Class: Increase::Resources::Simulations::CardDisputes
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardDisputes
- Defined in:
- lib/increase/resources/simulations/card_disputes.rb
Instance Method Summary collapse
-
#action(card_dispute_id, status: , explanation: nil, request_options: {}) ⇒ Increase::Models::CardDispute
After a [Card Dispute](#card-disputes) is created in production, the dispute will be reviewed.
-
#initialize(client:) ⇒ CardDisputes
constructor
private
A new instance of CardDisputes.
Constructor Details
#initialize(client:) ⇒ CardDisputes
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 CardDisputes.
39 40 41 |
# File 'lib/increase/resources/simulations/card_disputes.rb', line 39 def initialize(client:) @client = client end |
Instance Method Details
#action(card_dispute_id, status: , explanation: nil, request_options: {}) ⇒ Increase::Models::CardDispute
After a [Card Dispute](#card-disputes) is created in production, the dispute will be reviewed. Since no review happens in sandbox, this endpoint simulates moving a Card Dispute into a rejected or accepted state. A Card Dispute can only be actioned one time and must have a status of ‘pending_reviewing`.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/increase/resources/simulations/card_disputes.rb', line 25 def action(card_dispute_id, params) parsed, = Increase::Simulations::CardDisputeActionParams.dump_request(params) @client.request( method: :post, path: ["simulations/card_disputes/%1$s/action", card_dispute_id], body: parsed, model: Increase::CardDispute, options: ) end |