Class: Stripe::Checkout::Session::UpdateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::Session::UpdateParams
- Defined in:
- lib/stripe/resources/checkout/session.rb
Defined Under Namespace
Classes: CollectedInformation, Discount, LineItem, ShippingOption, SubscriptionData
Instance Attribute Summary collapse
-
#collected_information ⇒ Object
Information about the customer collected within the Checkout Session.
-
#discounts ⇒ Object
List of coupons and promotion codes attached to the Checkout Session.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#line_items ⇒ Object
A list of items the customer is purchasing.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#shipping_options ⇒ Object
The shipping rate options to apply to this Session.
-
#subscription_data ⇒ Object
A subset of parameters to be passed to subscription creation for Checkout Sessions in ‘subscription` mode.
Instance Method Summary collapse
-
#initialize(collected_information: nil, discounts: nil, expand: nil, line_items: nil, metadata: nil, shipping_options: nil, subscription_data: nil) ⇒ UpdateParams
constructor
A new instance of UpdateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(collected_information: nil, discounts: nil, expand: nil, line_items: nil, metadata: nil, shipping_options: nil, subscription_data: nil) ⇒ UpdateParams
Returns a new instance of UpdateParams.
5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 |
# File 'lib/stripe/resources/checkout/session.rb', line 5030 def initialize( collected_information: nil, discounts: nil, expand: nil, line_items: nil, metadata: nil, shipping_options: nil, subscription_data: nil ) @collected_information = collected_information @discounts = discounts @expand = @line_items = line_items @metadata = @shipping_options = @subscription_data = subscription_data end |
Instance Attribute Details
#collected_information ⇒ Object
Information about the customer collected within the Checkout Session. Can only be set when updating ‘embedded` or `custom` sessions.
5004 5005 5006 |
# File 'lib/stripe/resources/checkout/session.rb', line 5004 def collected_information @collected_information end |
#discounts ⇒ Object
List of coupons and promotion codes attached to the Checkout Session.
5006 5007 5008 |
# File 'lib/stripe/resources/checkout/session.rb', line 5006 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
5008 5009 5010 |
# File 'lib/stripe/resources/checkout/session.rb', line 5008 def @expand end |
#line_items ⇒ Object
A list of items the customer is purchasing.
When updating line items, you must retransmit the entire array of line items.
To retain an existing line item, specify its ‘id`.
To update an existing line item, specify its ‘id` along with the new values of the fields to update.
To add a new line item, specify one of ‘price` or `price_data` and `quantity`.
To remove an existing line item, omit the line item’s ID from the retransmitted array.
To reorder a line item, specify it at the desired position in the retransmitted array.
5022 5023 5024 |
# File 'lib/stripe/resources/checkout/session.rb', line 5022 def line_items @line_items end |
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.
5024 5025 5026 |
# File 'lib/stripe/resources/checkout/session.rb', line 5024 def @metadata end |
#shipping_options ⇒ Object
The shipping rate options to apply to this Session. Up to a maximum of 5.
5026 5027 5028 |
# File 'lib/stripe/resources/checkout/session.rb', line 5026 def @shipping_options end |
#subscription_data ⇒ Object
A subset of parameters to be passed to subscription creation for Checkout Sessions in ‘subscription` mode.
5028 5029 5030 |
# File 'lib/stripe/resources/checkout/session.rb', line 5028 def subscription_data @subscription_data end |