Class: Stripe::Issuing::Dispute
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Issuing::Dispute
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/issuing/dispute.rb
Overview
As a card issuer, you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
Related guide: Issuing disputes
Defined Under Namespace
Classes: CryptoTransaction, Evidence, NetworkLifecycle, ProvisionalCredit, Redaction, TestHelpers, Treasury
Constant Summary collapse
- OBJECT_NAME =
"issuing.dispute"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Disputed amount in the card's currency and in the smallest currency unit.
-
#balance_transactions ⇒ Object
readonly
List of balance transactions associated with the dispute.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#crypto_transactions ⇒ Object
readonly
Array of onchain crypto transactions linked to this resource.
-
#currency ⇒ Object
readonly
The currency the
transactionwas made in. -
#evidence ⇒ Object
readonly
Attribute for field evidence.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#loss_reason ⇒ Object
readonly
The enum that describes the dispute loss outcome.
-
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#network_lifecycle ⇒ Object
readonly
Incoming information from the card network for this dispute.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#provisional_credit ⇒ Object
readonly
Provisional credit details for this dispute.
-
#redaction ⇒ Object
readonly
Redaction status of this dispute.
-
#status ⇒ Object
readonly
Current status of the dispute.
-
#transaction ⇒ Object
readonly
The transaction being disputed.
-
#treasury ⇒ Object
readonly
Treasury details related to this dispute if it was created on a FinancialAccount.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates an Issuing Dispute object.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Dispute objects.
- .object_name ⇒ Object
-
.submit(dispute, params = {}, opts = {}) ⇒ Object
Submits an Issuing Dispute to the card network.
-
.update(dispute, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Dispute object by setting the values of the parameters passed.
Instance Method Summary collapse
-
#submit(params = {}, opts = {}) ⇒ Object
Submits an Issuing Dispute to the card network.
- #test_helpers ⇒ Object
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#amount ⇒ Object (readonly)
Disputed amount in the card's currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
453 454 455 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 453 def amount @amount end |
#balance_transactions ⇒ Object (readonly)
List of balance transactions associated with the dispute.
455 456 457 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 455 def balance_transactions @balance_transactions end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
457 458 459 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 457 def created @created end |
#crypto_transactions ⇒ Object (readonly)
Array of onchain crypto transactions linked to this resource.
459 460 461 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 459 def crypto_transactions @crypto_transactions end |
#currency ⇒ Object (readonly)
The currency the transaction was made in.
461 462 463 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 461 def currency @currency end |
#evidence ⇒ Object (readonly)
Attribute for field evidence
463 464 465 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 463 def evidence @evidence end |
#id ⇒ Object (readonly)
Unique identifier for the object.
465 466 467 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 465 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
467 468 469 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 467 def livemode @livemode end |
#loss_reason ⇒ Object (readonly)
The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
469 470 471 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 469 def loss_reason @loss_reason end |
#metadata ⇒ Object (readonly)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
471 472 473 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 471 def @metadata end |
#network_lifecycle ⇒ Object (readonly)
Incoming information from the card network for this dispute. Includes the acquiring merchant's initial response, pre-arbitration submission, and pre-arbitration response to the dispute.
473 474 475 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 473 def network_lifecycle @network_lifecycle end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
475 476 477 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 475 def object @object end |
#provisional_credit ⇒ Object (readonly)
Provisional credit details for this dispute.
477 478 479 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 477 def provisional_credit @provisional_credit end |
#redaction ⇒ Object (readonly)
Redaction status of this dispute. If the dispute is not redacted, this field will be null.
479 480 481 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 479 def redaction @redaction end |
#status ⇒ Object (readonly)
Current status of the dispute.
481 482 483 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 481 def status @status end |
#transaction ⇒ Object (readonly)
The transaction being disputed.
483 484 485 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 483 def transaction @transaction end |
#treasury ⇒ Object (readonly)
Treasury details related to this dispute if it was created on a FinancialAccount
485 486 487 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 485 def treasury @treasury end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.
488 489 490 491 492 493 494 495 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 488 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/issuing/disputes", params: params, opts: opts ) end |
.field_remappings ⇒ Object
667 668 669 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 667 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
656 657 658 659 660 661 662 663 664 665 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 656 def self.inner_class_types @inner_class_types = { crypto_transactions: CryptoTransaction, evidence: Evidence, network_lifecycle: NetworkLifecycle, provisional_credit: ProvisionalCredit, redaction: Redaction, treasury: Treasury, } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
498 499 500 501 502 503 504 505 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 498 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/disputes", params: params, opts: opts ) end |
.object_name ⇒ Object
15 16 17 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 15 def self.object_name "issuing.dispute" end |
.submit(dispute, params = {}, opts = {}) ⇒ Object
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see Dispute reasons and evidence.
518 519 520 521 522 523 524 525 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 518 def self.submit(dispute, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/disputes/%<dispute>s/submit", { dispute: CGI.escape(dispute) }), params: params, opts: opts ) end |
.update(dispute, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
528 529 530 531 532 533 534 535 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 528 def self.update(dispute, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/disputes/%<dispute>s", { dispute: CGI.escape(dispute) }), params: params, opts: opts ) end |
Instance Method Details
#submit(params = {}, opts = {}) ⇒ Object
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see Dispute reasons and evidence.
508 509 510 511 512 513 514 515 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 508 def submit(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/disputes/%<dispute>s/submit", { dispute: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#test_helpers ⇒ Object
537 538 539 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 537 def test_helpers TestHelpers.new(self) end |