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.



124
125
126
127
128
# File 'lib/stripe/services/billing_portal/session_service.rb', line 124

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.



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

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.



119
120
121
# File 'lib/stripe/services/billing_portal/session_service.rb', line 119

def items
  @items
end

#subscriptionObject

The ID of the subscription to be updated.



122
123
124
# File 'lib/stripe/services/billing_portal/session_service.rb', line 122

def subscription
  @subscription
end