Class: Stripe::SetupAttempt
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::SetupAttempt
- Extended by:
- APIOperations::List
- Defined in:
- lib/stripe/resources/setup_attempt.rb
Overview
A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent.
Defined Under Namespace
Classes: PaymentMethodDetails, SetupError
Constant Summary collapse
- OBJECT_NAME =
"setup_attempt"
Constants inherited from StripeObject
Stripe::StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
The value of [application](docs.stripe.com/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
-
#attach_to_self ⇒ Object
readonly
If present, the SetupIntent’s payment method will be attached to the in-context Stripe Account.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#customer ⇒ Object
readonly
The value of [customer](docs.stripe.com/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
-
#customer_account ⇒ Object
readonly
The value of [customer_account](docs.stripe.com/api/setup_intents/object#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation.
-
#flow_directions ⇒ Object
readonly
Indicates the directions of money movement for which this payment method is intended to be used.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is ‘true`.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#on_behalf_of ⇒ Object
readonly
The value of [on_behalf_of](docs.stripe.com/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.
-
#payment_method ⇒ Object
readonly
ID of the payment method used with this SetupAttempt.
-
#payment_method_details ⇒ Object
readonly
Attribute for field payment_method_details.
-
#setup_error ⇒ Object
readonly
The error encountered during this attempt to confirm the SetupIntent, if any.
-
#setup_intent ⇒ Object
readonly
ID of the SetupIntent that this attempt belongs to.
-
#status ⇒ Object
readonly
Status of this SetupAttempt, one of ‘requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
-
#usage ⇒ Object
readonly
The value of [usage](docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of ‘off_session` or `on_session`.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of SetupAttempts that associate with a provided SetupIntent.
- .object_name ⇒ Object
Methods included from APIOperations::List
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
#application ⇒ Object (readonly)
The value of [application](docs.stripe.com/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
590 591 592 |
# File 'lib/stripe/resources/setup_attempt.rb', line 590 def application @application end |
#attach_to_self ⇒ Object (readonly)
If present, the SetupIntent’s payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
594 595 596 |
# File 'lib/stripe/resources/setup_attempt.rb', line 594 def attach_to_self @attach_to_self end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
596 597 598 |
# File 'lib/stripe/resources/setup_attempt.rb', line 596 def created @created end |
#customer ⇒ Object (readonly)
The value of [customer](docs.stripe.com/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
598 599 600 |
# File 'lib/stripe/resources/setup_attempt.rb', line 598 def customer @customer end |
#customer_account ⇒ Object (readonly)
The value of [customer_account](docs.stripe.com/api/setup_intents/object#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation.
600 601 602 |
# File 'lib/stripe/resources/setup_attempt.rb', line 600 def customer_account @customer_account end |
#flow_directions ⇒ Object (readonly)
Indicates the directions of money movement for which this payment method is intended to be used.
Include ‘inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
604 605 606 |
# File 'lib/stripe/resources/setup_attempt.rb', line 604 def flow_directions @flow_directions end |
#id ⇒ Object (readonly)
Unique identifier for the object.
606 607 608 |
# File 'lib/stripe/resources/setup_attempt.rb', line 606 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`.
608 609 610 |
# File 'lib/stripe/resources/setup_attempt.rb', line 608 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
610 611 612 |
# File 'lib/stripe/resources/setup_attempt.rb', line 610 def object @object end |
#on_behalf_of ⇒ Object (readonly)
The value of [on_behalf_of](docs.stripe.com/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.
612 613 614 |
# File 'lib/stripe/resources/setup_attempt.rb', line 612 def on_behalf_of @on_behalf_of end |
#payment_method ⇒ Object (readonly)
ID of the payment method used with this SetupAttempt.
614 615 616 |
# File 'lib/stripe/resources/setup_attempt.rb', line 614 def payment_method @payment_method end |
#payment_method_details ⇒ Object (readonly)
Attribute for field payment_method_details
616 617 618 |
# File 'lib/stripe/resources/setup_attempt.rb', line 616 def payment_method_details @payment_method_details end |
#setup_error ⇒ Object (readonly)
The error encountered during this attempt to confirm the SetupIntent, if any.
618 619 620 |
# File 'lib/stripe/resources/setup_attempt.rb', line 618 def setup_error @setup_error end |
#setup_intent ⇒ Object (readonly)
ID of the SetupIntent that this attempt belongs to.
620 621 622 |
# File 'lib/stripe/resources/setup_attempt.rb', line 620 def setup_intent @setup_intent end |
#status ⇒ Object (readonly)
Status of this SetupAttempt, one of ‘requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
622 623 624 |
# File 'lib/stripe/resources/setup_attempt.rb', line 622 def status @status end |
#usage ⇒ Object (readonly)
The value of [usage](docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of ‘off_session` or `on_session`.
624 625 626 |
# File 'lib/stripe/resources/setup_attempt.rb', line 624 def usage @usage end |
Class Method Details
.field_remappings ⇒ Object
635 636 637 |
# File 'lib/stripe/resources/setup_attempt.rb', line 635 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
631 632 633 |
# File 'lib/stripe/resources/setup_attempt.rb', line 631 def self.inner_class_types @inner_class_types = { payment_method_details: PaymentMethodDetails, setup_error: SetupError } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of SetupAttempts that associate with a provided SetupIntent.
627 628 629 |
# File 'lib/stripe/resources/setup_attempt.rb', line 627 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/setup_attempts", params: params, opts: opts) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/setup_attempt.rb', line 13 def self.object_name "setup_attempt" end |