Class: Stripe::SubscriptionService::CreateParams::PaymentSettings

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/subscription_service.rb

Defined Under Namespace

Classes: PaymentMethodOptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(payment_method_options: nil, payment_method_types: nil, save_default_payment_method: nil) ⇒ PaymentSettings

Returns a new instance of PaymentSettings.



1182
1183
1184
1185
1186
1187
1188
1189
1190
# File 'lib/stripe/services/subscription_service.rb', line 1182

def initialize(
  payment_method_options: nil,
  payment_method_types: nil,
  save_default_payment_method: nil
)
  @payment_method_options = payment_method_options
  @payment_method_types = payment_method_types
  @save_default_payment_method = save_default_payment_method
end

Instance Attribute Details

#payment_method_optionsObject

Payment-method-specific configuration to provide to invoices created by the subscription.



1176
1177
1178
# File 'lib/stripe/services/subscription_service.rb', line 1176

def payment_method_options
  @payment_method_options
end

#payment_method_typesObject

The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration



1178
1179
1180
# File 'lib/stripe/services/subscription_service.rb', line 1178

def payment_method_types
  @payment_method_types
end

#save_default_payment_methodObject

Configure whether Stripe updates ‘subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.



1180
1181
1182
# File 'lib/stripe/services/subscription_service.rb', line 1180

def save_default_payment_method
  @save_default_payment_method
end