mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-11-27 00:03:06 -05:00
41 lines
1.5 KiB
Ruby
41 lines
1.5 KiB
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
# A dispute occurs when a customer questions your charge with their card issuer.
|
|
# When this happens, you have the opportunity to respond to the dispute with
|
|
# evidence that shows that the charge is legitimate.
|
|
#
|
|
# Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
|
|
class Dispute < APIResource
|
|
extend Stripe::APIOperations::List
|
|
include Stripe::APIOperations::Save
|
|
|
|
OBJECT_NAME = "dispute"
|
|
|
|
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
|
#
|
|
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
|
|
def close(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format("/v1/disputes/%<dispute>s/close", { dispute: CGI.escape(self["id"]) }),
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
|
|
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
|
#
|
|
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
|
|
def self.close(dispute, params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: format("/v1/disputes/%<dispute>s/close", { dispute: CGI.escape(dispute) }),
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
end
|
|
end
|