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

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/checkout/session.rb

Defined Under Namespace

Classes: CollectedInformation, Discount, LineItem, ShippingOption, SubscriptionData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

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.



4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
# File 'lib/stripe/resources/checkout/session.rb', line 4115

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 = expand
  @line_items = line_items
  @metadata = 
  @shipping_options = shipping_options
  @subscription_data = subscription_data
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.



4089
4090
4091
# File 'lib/stripe/resources/checkout/session.rb', line 4089

def collected_information
  @collected_information
end

#discountsObject

List of coupons and promotion codes attached to the Checkout Session.



4091
4092
4093
# File 'lib/stripe/resources/checkout/session.rb', line 4091

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



4093
4094
4095
# File 'lib/stripe/resources/checkout/session.rb', line 4093

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.



4107
4108
4109
# File 'lib/stripe/resources/checkout/session.rb', line 4107

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



4109
4110
4111
# File 'lib/stripe/resources/checkout/session.rb', line 4109

def 
  @metadata
end

#shipping_optionsObject

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



4111
4112
4113
# File 'lib/stripe/resources/checkout/session.rb', line 4111

def shipping_options
  @shipping_options
end

#subscription_dataObject

A subset of parameters to be passed to subscription creation for Checkout Sessions in ‘subscription` mode.



4113
4114
4115
# File 'lib/stripe/resources/checkout/session.rb', line 4113

def subscription_data
  @subscription_data
end