Class SessionCreateParams.Permissions.Builder
- Enclosing class:
- SessionCreateParams.Permissions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finalize and obtain parameter instance from this builder.putAllExtraParam(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam(String key, Object value) Add a key/value pair to `extraParams` map.Permissions for updating the Checkout Session.setUpdateDiscounts(SessionCreateParams.Permissions.UpdateDiscounts updateDiscounts) Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session.setUpdateLineItems(SessionCreateParams.Permissions.UpdateLineItems updateLineItems) Determines which entity is allowed to update the line items.setUpdateShippingDetails(SessionCreateParams.Permissions.UpdateShippingDetails updateShippingDetails) Determines which entity is allowed to update the shipping details.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
putExtraParam
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSessionCreateParams.Permissions.extraParamsfor the field documentation. -
putAllExtraParam
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSessionCreateParams.Permissions.extraParamsfor the field documentation. -
setUpdate
public SessionCreateParams.Permissions.Builder setUpdate(SessionCreateParams.Permissions.Update update) Permissions for updating the Checkout Session. -
setUpdateDiscounts
public SessionCreateParams.Permissions.Builder setUpdateDiscounts(SessionCreateParams.Permissions.UpdateDiscounts updateDiscounts) Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session.Default is
client_only. Stripe Checkout client will automatically handle discount updates. If set toserver_only, only your server is allowed to update discounts. -
setUpdateLineItems
public SessionCreateParams.Permissions.Builder setUpdateLineItems(SessionCreateParams.Permissions.UpdateLineItems updateLineItems) 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 toserver_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. -
setUpdateShippingDetails
public SessionCreateParams.Permissions.Builder setUpdateShippingDetails(SessionCreateParams.Permissions.UpdateShippingDetails updateShippingDetails) 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 toserver_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.
-