Package com.stripe.model
Class CustomerSession
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.CustomerSession
- All Implemented Interfaces:
StripeActiveObject,StripeObjectInterface
A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
control over a customer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration for the components supported by this customer session.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic CustomerSessioncreate(CustomerSessionCreateParams params) Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.static CustomerSessioncreate(CustomerSessionCreateParams params, RequestOptions options) Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.static CustomerSessionCreates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.static CustomerSessioncreate(Map<String, Object> params, RequestOptions options) Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.booleanThe client secret of this customer session.Configuration for the components supported by this customer session.Time at which the object was created.Get ID of expandablecustomerobject.Get expandedcustomer.The timestamp at which this customer session will expire.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.String representing the object's type.inthashCode()voidsetClientSecret(String clientSecret) The client secret of this customer session.voidsetComponents(CustomerSession.Components components) Configuration for the components supported by this customer session.voidsetCreated(Long created) Time at which the object was created.voidsetCustomer(String id) voidsetCustomerObject(Customer expandableObject) voidsetExpiresAt(Long expiresAt) The timestamp at which this customer session will expire.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidString representing the object's type.voidsetResponseGetter(StripeResponseGetter responseGetter) Whether the pricing table is enabled.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
CustomerSession
public CustomerSession()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
create
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
create
public static CustomerSession create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
create
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
create
public static CustomerSession create(CustomerSessionCreateParams params, RequestOptions options) throws StripeException Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.- Throws:
StripeException
-
setResponseGetter
Whether the pricing table is enabled.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getClientSecret
The client secret of this customer session. Used on the client to set up secure access to the givencustomer.The client secret can be used to provide access to
customerfrom your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. -
getComponents
Configuration for the components supported by this customer session. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getExpiresAt
The timestamp at which this customer session will expire. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
customer_session. -
setClientSecret
The client secret of this customer session. Used on the client to set up secure access to the givencustomer.The client secret can be used to provide access to
customerfrom your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. -
setComponents
Configuration for the components supported by this customer session. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setExpiresAt
The timestamp at which this customer session will expire. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
customer_session. -
equals
-
canEqual
-
hashCode
public int hashCode()
-