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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(id: nil, price: nil, quantity: nil) ⇒ Item

Returns a new instance of Item.



102
103
104
105
106
# File 'lib/stripe/services/billing_portal/session_service.rb', line 102

def initialize(id: nil, price: nil, quantity: nil)
  @id = id
  @price = price
  @quantity = quantity
end

Instance Attribute Details

#idObject

The ID of the [subscription item](stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.



96
97
98
# File 'lib/stripe/services/billing_portal/session_service.rb', line 96

def id
  @id
end

#priceObject

The price the customer should subscribe to through this flow. The price must also be included in the configuration’s [‘features.subscription_update.products`](stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).



98
99
100
# File 'lib/stripe/services/billing_portal/session_service.rb', line 98

def price
  @price
end

#quantityObject

[Quantity](stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.



100
101
102
# File 'lib/stripe/services/billing_portal/session_service.rb', line 100

def quantity
  @quantity
end