mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-06 00:02:18 -04:00
* Update dynamic constant references * Manual additionsg * Fix lint * Use const_Get * Remove puts
26 lines
772 B
Ruby
26 lines
772 B
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
# A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
|
|
# control over a customer.
|
|
class CustomerSession < APIResource
|
|
extend Stripe::APIOperations::Create
|
|
|
|
OBJECT_NAME = "customer_session"
|
|
def self.object_name
|
|
"customer_session"
|
|
end
|
|
|
|
# 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.
|
|
def self.create(params = {}, opts = {})
|
|
request_stripe_object(
|
|
method: :post,
|
|
path: "/v1/customer_sessions",
|
|
params: params,
|
|
opts: opts
|
|
)
|
|
end
|
|
end
|
|
end
|