pub struct CustomerSession {
pub client_secret: String,
pub components: Option<CustomerSessionResourceComponents>,
pub created: Timestamp,
pub customer: Expandable<Customer>,
pub expires_at: Timestamp,
pub livemode: bool,
}
Expand description
The resource representing a Stripe “CustomerSessionResourceCustomerSession”.
For more details see https://stripe.com/docs/api/customer_sessions/object
Fields§
§client_secret: String
The client secret of this customer session.
Used on the client to set up secure access to the given customer
. 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.
components: Option<CustomerSessionResourceComponents>
§created: Timestamp
Time at which the object was created.
Measured in seconds since the Unix epoch.
customer: Expandable<Customer>
The customer the customer session was created for.
expires_at: Timestamp
The timestamp at which this customer session will expire.
livemode: bool
Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
Implementations§
Source§impl CustomerSession
impl CustomerSession
Sourcepub fn create(
client: &Client,
params: CreateCustomerSession<'_>,
) -> Response<CustomerSession>
pub fn create( client: &Client, params: CreateCustomerSession<'_>, ) -> Response<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.
Trait Implementations§
Source§impl Clone for CustomerSession
impl Clone for CustomerSession
Source§fn clone(&self) -> CustomerSession
fn clone(&self) -> CustomerSession
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more