Class: Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Card

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(capture_method: nil, setup_future_usage: nil) ⇒ Card

Returns a new instance of Card.



1922
1923
1924
1925
# File 'lib/stripe/resources/order.rb', line 1922

def initialize(capture_method: nil, setup_future_usage: nil)
  @capture_method = capture_method
  @setup_future_usage = setup_future_usage
end

Instance Attribute Details

#capture_methodObject

Controls when the funds will be captured from the customer’s account.



1912
1913
1914
# File 'lib/stripe/resources/order.rb', line 1912

def capture_method
  @capture_method
end

#setup_future_usageObject

Indicates that you intend to make future payments with the payment method.

Providing this parameter will [attach the payment method](stripe.com/docs/payments/save-during-payment) to the order’s Customer, if present, after the order’s PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses ‘setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](stripe.com/docs/strong-customer-authentication).

If ‘setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.



1920
1921
1922
# File 'lib/stripe/resources/order.rb', line 1920

def setup_future_usage
  @setup_future_usage
end