Class: Stripe::Checkout::SessionService::CreateParams::Permissions

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/checkout/session_service.rb

Defined Under Namespace

Classes: Update

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(update: nil, update_line_items: nil, update_shipping_details: nil) ⇒ Permissions

Returns a new instance of Permissions.



1794
1795
1796
1797
1798
# File 'lib/stripe/services/checkout/session_service.rb', line 1794

def initialize(update: nil, update_line_items: nil, update_shipping_details: nil)
  @update = update
  @update_line_items = update_line_items
  @update_shipping_details = update_shipping_details
end

Instance Attribute Details

#updateObject

Permissions for updating the Checkout Session.



1780
1781
1782
# File 'lib/stripe/services/checkout/session_service.rb', line 1780

def update
  @update
end

#update_line_itemsObject

Determines which entity is allowed to update the line items.

Default is ‘client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.

When set to ‘server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.



1786
1787
1788
# File 'lib/stripe/services/checkout/session_service.rb', line 1786

def update_line_items
  @update_line_items
end

#update_shipping_detailsObject

Determines which entity is allowed to update the shipping details.

Default is ‘client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.

When set to ‘server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.



1792
1793
1794
# File 'lib/stripe/services/checkout/session_service.rb', line 1792

def update_shipping_details
  @update_shipping_details
end