Class: Stripe::Checkout::SessionUpdateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionUpdateParams
- Defined in:
- lib/stripe/params/checkout/session_update_params.rb
Defined Under Namespace
Classes: CollectedInformation, LineItem, ShippingOption
Instance Attribute Summary collapse
-
#collected_information ⇒ Object
Information about the customer collected within 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 that you can attach to an object.
-
#shipping_options ⇒ Object
The shipping rate options to apply to this Session.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(collected_information: nil, expand: nil, line_items: nil, metadata: nil, shipping_options: nil) ⇒ SessionUpdateParams
constructor
A new instance of SessionUpdateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(collected_information: nil, expand: nil, line_items: nil, metadata: nil, shipping_options: nil) ⇒ SessionUpdateParams
Returns a new instance of SessionUpdateParams.
321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 321 def initialize( collected_information: nil, expand: nil, line_items: nil, metadata: nil, shipping_options: nil ) @collected_information = collected_information = @line_items = line_items = = 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.
299 300 301 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 299 def collected_information @collected_information end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
301 302 303 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 301 def 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.
315 316 317 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 315 def line_items @line_items end |
#metadata ⇒ Object
Set of key-value pairs 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.
317 318 319 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 317 def end |
#shipping_options ⇒ Object
The shipping rate options to apply to this Session. Up to a maximum of 5.
319 320 321 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 319 def end |
Class Method Details
.field_encodings ⇒ Object
335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/stripe/params/checkout/session_update_params.rb', line 335 def self.field_encodings @field_encodings = { line_items: { kind: :array, element: { kind: :object, fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, }, }, } end |