Package com.stripe.model
Class CustomerSession
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.CustomerSession
- All Implemented Interfaces:
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 classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static CustomerSession
create
(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 CustomerSession
create
(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 CustomerSession
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 CustomerSession
create
(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.boolean
The client secret of this customer session.Get ID of expandablecustomer
object.Get expandedcustomer
.The timestamp at which this customer session will expire.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.String representing the object's type.int
hashCode()
void
setClientSecret
(String clientSecret) The client secret of this customer session.void
setCustomer
(String id) void
setCustomerObject
(Customer expandableObject) void
setExpiresAt
(Long expiresAt) The timestamp at which this customer session will expire.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
String representing the object's type.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, fullUrl, instanceUrl, instanceUrl, rawRequest, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
CustomerSession
public CustomerSession()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomer
object. -
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
-
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
customer
from 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. -
getExpiresAt
The timestamp at which this customer session will expire. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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
customer
from 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. -
setExpiresAt
The timestamp at which this customer session will expire. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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()
-