Class: Stripe::DisputeService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::DisputeService
- Defined in:
- lib/stripe/services/dispute_service.rb
Defined Under Namespace
Classes: CloseParams, ListParams, RetrieveParams, UpdateParams
Instance Method Summary collapse
-
#close(dispute, params = {}, opts = {}) ⇒ Object
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.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your disputes.
-
#retrieve(dispute, params = {}, opts = {}) ⇒ Object
Retrieves the dispute with the given ID.
-
#update(dispute, params = {}, opts = {}) ⇒ Object
When you get a dispute, contacting your customer is always the best first step.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#close(dispute, params = {}, opts = {}) ⇒ Object
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.
448 449 450 451 452 453 454 455 456 |
# File 'lib/stripe/services/dispute_service.rb', line 448 def close(dispute, params = {}, opts = {}) request( method: :post, path: format("/v1/disputes/%<dispute>s/close", { dispute: CGI.escape(dispute) }), params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your disputes.
459 460 461 |
# File 'lib/stripe/services/dispute_service.rb', line 459 def list(params = {}, opts = {}) request(method: :get, path: "/v1/disputes", params: params, opts: opts, base_address: :api) end |
#retrieve(dispute, params = {}, opts = {}) ⇒ Object
Retrieves the dispute with the given ID.
464 465 466 467 468 469 470 471 472 |
# File 'lib/stripe/services/dispute_service.rb', line 464 def retrieve(dispute, params = {}, opts = {}) request( method: :get, path: format("/v1/disputes/%<dispute>s", { dispute: CGI.escape(dispute) }), params: params, opts: opts, base_address: :api ) end |
#update(dispute, params = {}, opts = {}) ⇒ Object
When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](stripe.com/docs/disputes/categories).
477 478 479 480 481 482 483 484 485 |
# File 'lib/stripe/services/dispute_service.rb', line 477 def update(dispute, params = {}, opts = {}) request( method: :post, path: format("/v1/disputes/%<dispute>s", { dispute: CGI.escape(dispute) }), params: params, opts: opts, base_address: :api ) end |