Class: Stripe::Checkout::SessionUpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/checkout/session_update_params.rb

Defined Under Namespace

Classes: CollectedInformation, LineItem, ShippingOption

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#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.



311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/stripe/params/checkout/session_update_params.rb', line 311

def initialize(
  collected_information: nil,
  expand: nil,
  line_items: nil,
  metadata: nil,
  shipping_options: nil
)
  @collected_information = collected_information
  @expand = expand
  @line_items = line_items
  @metadata = 
  @shipping_options = shipping_options
end

Instance Attribute Details

#collected_informationObject

Information about the customer collected within the Checkout Session. Can only be set when updating embedded or custom sessions.



289
290
291
# File 'lib/stripe/params/checkout/session_update_params.rb', line 289

def collected_information
  @collected_information
end

#expandObject

Specifies which fields in the response should be expanded.



291
292
293
# File 'lib/stripe/params/checkout/session_update_params.rb', line 291

def expand
  @expand
end

#line_itemsObject

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.



305
306
307
# File 'lib/stripe/params/checkout/session_update_params.rb', line 305

def line_items
  @line_items
end

#metadataObject

Set of [key-value pairs](docs.stripe.com/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.



307
308
309
# File 'lib/stripe/params/checkout/session_update_params.rb', line 307

def 
  @metadata
end

#shipping_optionsObject

The shipping rate options to apply to this Session. Up to a maximum of 5.



309
310
311
# File 'lib/stripe/params/checkout/session_update_params.rb', line 309

def shipping_options
  @shipping_options
end