Class: Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/billing_portal/session_service.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.



115
116
117
118
119
# File 'lib/stripe/services/billing_portal/session_service.rb', line 115

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.



109
110
111
# File 'lib/stripe/services/billing_portal/session_service.rb', line 109

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.



111
112
113
# File 'lib/stripe/services/billing_portal/session_service.rb', line 111

def items
  @items
end

#subscriptionObject

The ID of the subscription to be updated.



113
114
115
# File 'lib/stripe/services/billing_portal/session_service.rb', line 113

def subscription
  @subscription
end