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.



212
213
214
215
216
# File 'lib/stripe/resources/billing_portal/session.rb', line 212

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.



206
207
208
# File 'lib/stripe/resources/billing_portal/session.rb', line 206

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.



208
209
210
# File 'lib/stripe/resources/billing_portal/session.rb', line 208

def items
  @items
end

#subscriptionObject

The ID of the subscription to be updated.



210
211
212
# File 'lib/stripe/resources/billing_portal/session.rb', line 210

def subscription
  @subscription
end