Class: Increase::Resources::Simulations::CardDisputes

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardDisputes

Returns a new instance of CardDisputes.



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

def initialize(client:)
  @client = client
end

Instance Method Details

#action(card_dispute_id, params = {}, opts = {}) ⇒ Increase::Models::CardDispute

After a Card Dispute 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.

Parameters:

  • card_dispute_id (String)

    The dispute you would like to action.

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

  • :status (Symbol)

    The status to move the dispute to.

  • :explanation (String)

    Why the dispute was rejected. Not required for accepting disputes.

Returns:



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

def action(card_dispute_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/simulations/card_disputes/#{card_dispute_id}/action"
  req[:body] = params
  req[:model] = Increase::Models::CardDispute
  @client.request(req, opts)
end