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](stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
Related guide: [Issuing disputes](stripe.com/docs/issuing/purchases/disputes)
Defined Under Namespace
Classes: CreateParams, Evidence, ListParams, RetrieveParams, SubmitParams, Treasury, UpdateParams
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](stripe.com/docs/currencies#zero-decimal).
-
#balance_transactions ⇒ Object
readonly
List of balance transactions associated with the dispute.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
The currency the ‘transaction` was made in.
-
#evidence ⇒ Object
readonly
Attribute for field evidence.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#loss_reason ⇒ Object
readonly
The enum that describes the dispute loss outcome.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#status ⇒ Object
readonly
Current status of the dispute.
-
#transaction ⇒ Object
readonly
The transaction being disputed.
-
#treasury ⇒ Object
readonly
[Treasury](stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates an Issuing Dispute 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(id, 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.
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
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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](stripe.com/docs/currencies#zero-decimal). Usually the amount of the ‘transaction`, but can differ (usually because of currency fluctuation).
783 784 785 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 783 def amount @amount end |
#balance_transactions ⇒ Object (readonly)
List of balance transactions associated with the dispute.
785 786 787 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 785 def balance_transactions @balance_transactions end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
787 788 789 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 787 def created @created end |
#currency ⇒ Object (readonly)
The currency the ‘transaction` was made in.
789 790 791 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 789 def currency @currency end |
#evidence ⇒ Object (readonly)
Attribute for field evidence
791 792 793 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 791 def evidence @evidence end |
#id ⇒ Object (readonly)
Unique identifier for the object.
793 794 795 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 793 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
795 796 797 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 795 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.
797 798 799 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 797 def loss_reason @loss_reason end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
799 800 801 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 799 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
801 802 803 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 801 def object @object end |
#status ⇒ Object (readonly)
Current status of the dispute.
803 804 805 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 803 def status @status end |
#transaction ⇒ Object (readonly)
The transaction being disputed.
805 806 807 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 805 def transaction @transaction end |
#treasury ⇒ Object (readonly)
[Treasury](stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
807 808 809 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 807 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](stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
810 811 812 813 814 815 816 817 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 810 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/issuing/disputes", params: params, opts: opts ) 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.
820 821 822 823 824 825 826 827 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 820 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](stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
840 841 842 843 844 845 846 847 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 840 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(id, 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.
850 851 852 853 854 855 856 857 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 850 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/disputes/%<id>s", { id: CGI.escape(id) }), 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](stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
830 831 832 833 834 835 836 837 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 830 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 |