Class: Stripe::Checkout::SessionCreateParams::Item::Subscription::Item
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionCreateParams::Item::Subscription::Item
- Defined in:
- lib/stripe/params/checkout/session_create_params.rb
Defined Under Namespace
Classes: PriceData
Instance Attribute Summary collapse
-
#price ⇒ Object
The ID of the Price.
-
#price_data ⇒ Object
Data used to generate a new Price object inline.
-
#quantity ⇒ Object
Quantity for this item.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(price: nil, price_data: nil, quantity: nil) ⇒ Item
constructor
A new instance of Item.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(price: nil, price_data: nil, quantity: nil) ⇒ Item
Returns a new instance of Item.
697 698 699 700 701 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 697 def initialize(price: nil, price_data: nil, quantity: nil) @price = price @price_data = price_data @quantity = quantity end |
Instance Attribute Details
#price ⇒ Object
The ID of the Price. One of price or price_data is required.
691 692 693 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 691 def price @price end |
#price_data ⇒ Object
Data used to generate a new Price object inline. One of price or price_data is required.
693 694 695 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 693 def price_data @price_data end |
#quantity ⇒ Object
Quantity for this item.
695 696 697 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 695 def quantity @quantity end |
Class Method Details
.field_encodings ⇒ Object
703 704 705 706 707 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 703 def self.field_encodings @field_encodings = { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, } end |