Class: Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm

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

Defined Under Namespace

Classes: Discount, Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(discounts: nil, items: nil, subscription: nil) ⇒ SubscriptionUpdateConfirm

Returns a new instance of SubscriptionUpdateConfirm.



234
235
236
237
238
# File 'lib/stripe/resources/billing_portal/session.rb', line 234

def initialize(discounts: nil, items: nil, subscription: nil)
  @discounts = discounts
  @items = items
  @subscription = subscription
end

Instance Attribute Details

#discountsObject

The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.



226
227
228
# File 'lib/stripe/resources/billing_portal/session.rb', line 226

def discounts
  @discounts
end

#itemsObject

The [subscription item](stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.



229
230
231
# File 'lib/stripe/resources/billing_portal/session.rb', line 229

def items
  @items
end

#subscriptionObject

The ID of the subscription to be updated.



232
233
234
# File 'lib/stripe/resources/billing_portal/session.rb', line 232

def subscription
  @subscription
end