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](docs.stripe.com/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
Related guide: [Issuing disputes](docs.stripe.com/issuing/purchases/disputes)
Defined Under Namespace
Classes: Evidence, Redaction, 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](docs.stripe.com/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
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](docs.stripe.com/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#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](docs.stripe.com/api/treasury) details related to this dispute if it was created on a [FinancialAccount](docs.stripe.com/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.
- .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.
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](docs.stripe.com/currencies#zero-decimal). Usually the amount of the ‘transaction`, but can differ (usually because of currency fluctuation).
252 253 254 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 252 def amount @amount end |
#balance_transactions ⇒ Object (readonly)
List of balance transactions associated with the dispute.
254 255 256 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 254 def balance_transactions @balance_transactions end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
256 257 258 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 256 def created @created end |
#currency ⇒ Object (readonly)
The currency the ‘transaction` was made in.
258 259 260 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 258 def currency @currency end |
#evidence ⇒ Object (readonly)
Attribute for field evidence
260 261 262 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 260 def evidence @evidence end |
#id ⇒ Object (readonly)
Unique identifier for the object.
262 263 264 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 262 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`.
264 265 266 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 264 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.
266 267 268 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 266 def loss_reason @loss_reason end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
268 269 270 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 268 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
270 271 272 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 270 def object @object end |
#redaction ⇒ Object (readonly)
Redaction status of this dispute. If the dispute is not redacted, this field will be null.
272 273 274 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 272 def redaction @redaction end |
#status ⇒ Object (readonly)
Current status of the dispute.
274 275 276 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 274 def status @status end |
#transaction ⇒ Object (readonly)
The transaction being disputed.
276 277 278 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 276 def transaction @transaction end |
#treasury ⇒ Object (readonly)
[Treasury](docs.stripe.com/api/treasury) details related to this dispute if it was created on a [FinancialAccount](docs.stripe.com/api/treasury/financial_accounts)
278 279 280 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 278 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](docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
281 282 283 284 285 286 287 288 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 281 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/issuing/disputes", params: params, opts: opts ) end |
.field_remappings ⇒ Object
334 335 336 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 334 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
330 331 332 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 330 def self.inner_class_types @inner_class_types = { evidence: Evidence, 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.
291 292 293 294 295 296 297 298 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 291 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](docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
311 312 313 314 315 316 317 318 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 311 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.
321 322 323 324 325 326 327 328 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 321 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](docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
301 302 303 304 305 306 307 308 |
# File 'lib/stripe/resources/issuing/dispute.rb', line 301 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 |