Class: Stripe::Checkout::SessionUpdateParams

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

Defined Under Namespace

Classes: AutomaticTax, CollectedInformation, Discount, InvoiceCreation, LineItem, ShippingOption, SubscriptionData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(automatic_tax: nil, collected_information: nil, discounts: nil, expand: nil, invoice_creation: nil, line_items: nil, metadata: nil, shipping_options: nil, subscription_data: nil) ⇒ SessionUpdateParams

Returns a new instance of SessionUpdateParams.



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/stripe/params/checkout/session_update_params.rb', line 443

def initialize(
  automatic_tax: nil,
  collected_information: nil,
  discounts: nil,
  expand: nil,
  invoice_creation: nil,
  line_items: nil,
  metadata: nil,
  shipping_options: nil,
  subscription_data: nil
)
  @automatic_tax = automatic_tax
  @collected_information = collected_information
  @discounts = discounts
  @expand = expand
  @invoice_creation = invoice_creation
  @line_items = line_items
  @metadata = 
  @shipping_options = shipping_options
  @subscription_data = subscription_data
end

Instance Attribute Details

#automatic_taxObject

Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.



413
414
415
# File 'lib/stripe/params/checkout/session_update_params.rb', line 413

def automatic_tax
  @automatic_tax
end

#collected_informationObject

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



415
416
417
# File 'lib/stripe/params/checkout/session_update_params.rb', line 415

def collected_information
  @collected_information
end

#discountsObject

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



417
418
419
# File 'lib/stripe/params/checkout/session_update_params.rb', line 417

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



419
420
421
# File 'lib/stripe/params/checkout/session_update_params.rb', line 419

def expand
  @expand
end

#invoice_creationObject

Generate a post-purchase Invoice for one-time payments.



421
422
423
# File 'lib/stripe/params/checkout/session_update_params.rb', line 421

def invoice_creation
  @invoice_creation
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.



435
436
437
# File 'lib/stripe/params/checkout/session_update_params.rb', line 435

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



437
438
439
# File 'lib/stripe/params/checkout/session_update_params.rb', line 437

def 
  @metadata
end

#shipping_optionsObject

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



439
440
441
# File 'lib/stripe/params/checkout/session_update_params.rb', line 439

def shipping_options
  @shipping_options
end

#subscription_dataObject

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



441
442
443
# File 'lib/stripe/params/checkout/session_update_params.rb', line 441

def subscription_data
  @subscription_data
end