Class: Stripe::Checkout::Session::UpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/checkout/session.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) ⇒ UpdateParams

Returns a new instance of UpdateParams.



3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
# File 'lib/stripe/resources/checkout/session.rb', line 3522

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.



3500
3501
3502
# File 'lib/stripe/resources/checkout/session.rb', line 3500

def collected_information
  @collected_information
end

#expandObject

Specifies which fields in the response should be expanded.



3502
3503
3504
# File 'lib/stripe/resources/checkout/session.rb', line 3502

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 a ‘price` and `quantity`. We don’t currently support recurring prices.

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.



3516
3517
3518
# File 'lib/stripe/resources/checkout/session.rb', line 3516

def line_items
  @line_items
end

#metadataObject

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



3518
3519
3520
# File 'lib/stripe/resources/checkout/session.rb', line 3518

def 
  @metadata
end

#shipping_optionsObject

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



3520
3521
3522
# File 'lib/stripe/resources/checkout/session.rb', line 3520

def shipping_options
  @shipping_options
end