Class: Stripe::SetupAttempt

Inherits:
APIResource show all
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

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::List

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

included

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

#applicationObject (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.



669
670
671
# File 'lib/stripe/resources/setup_attempt.rb', line 669

def application
  @application
end

#attach_to_selfObject (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.



673
674
675
# File 'lib/stripe/resources/setup_attempt.rb', line 673

def attach_to_self
  @attach_to_self
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



675
676
677
# File 'lib/stripe/resources/setup_attempt.rb', line 675

def created
  @created
end

#customerObject (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.



677
678
679
# File 'lib/stripe/resources/setup_attempt.rb', line 677

def customer
  @customer
end

#customer_accountObject (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.



679
680
681
# File 'lib/stripe/resources/setup_attempt.rb', line 679

def 
  @customer_account
end

#flow_directionsObject (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.



683
684
685
# File 'lib/stripe/resources/setup_attempt.rb', line 683

def flow_directions
  @flow_directions
end

#idObject (readonly)

Unique identifier for the object.



685
686
687
# File 'lib/stripe/resources/setup_attempt.rb', line 685

def id
  @id
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



687
688
689
# File 'lib/stripe/resources/setup_attempt.rb', line 687

def livemode
  @livemode
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



689
690
691
# File 'lib/stripe/resources/setup_attempt.rb', line 689

def object
  @object
end

#on_behalf_ofObject (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.



691
692
693
# File 'lib/stripe/resources/setup_attempt.rb', line 691

def on_behalf_of
  @on_behalf_of
end

#payment_methodObject (readonly)

ID of the payment method used with this SetupAttempt.



693
694
695
# File 'lib/stripe/resources/setup_attempt.rb', line 693

def payment_method
  @payment_method
end

#payment_method_detailsObject (readonly)

Attribute for field payment_method_details



695
696
697
# File 'lib/stripe/resources/setup_attempt.rb', line 695

def payment_method_details
  @payment_method_details
end

#setup_errorObject (readonly)

The error encountered during this attempt to confirm the SetupIntent, if any.



697
698
699
# File 'lib/stripe/resources/setup_attempt.rb', line 697

def setup_error
  @setup_error
end

#setup_intentObject (readonly)

ID of the SetupIntent that this attempt belongs to.



699
700
701
# File 'lib/stripe/resources/setup_attempt.rb', line 699

def setup_intent
  @setup_intent
end

#statusObject (readonly)

Status of this SetupAttempt, one of ‘requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.



701
702
703
# File 'lib/stripe/resources/setup_attempt.rb', line 701

def status
  @status
end

#usageObject (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`.



703
704
705
# File 'lib/stripe/resources/setup_attempt.rb', line 703

def usage
  @usage
end

Class Method Details

.field_remappingsObject



714
715
716
# File 'lib/stripe/resources/setup_attempt.rb', line 714

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



710
711
712
# File 'lib/stripe/resources/setup_attempt.rb', line 710

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.



706
707
708
# File 'lib/stripe/resources/setup_attempt.rb', line 706

def self.list(params = {}, opts = {})
  request_stripe_object(method: :get, path: "/v1/setup_attempts", params: params, opts: opts)
end

.object_nameObject



13
14
15
# File 'lib/stripe/resources/setup_attempt.rb', line 13

def self.object_name
  "setup_attempt"
end