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
1.0 KiB
Ruby
26 lines
1.0 KiB
Ruby
# File generated from our OpenAPI spec
|
|
# frozen_string_literal: true
|
|
|
|
module Stripe
|
|
# An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
|
|
#
|
|
# We recommend that you create an AccountSession each time you need to display an embedded component
|
|
# to your user. Do not save AccountSessions to your database as they expire relatively
|
|
# quickly, and cannot be used more than once.
|
|
#
|
|
# Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
|
|
class AccountSession < APIResource
|
|
extend Stripe::APIOperations::Create
|
|
|
|
OBJECT_NAME = "account_session"
|
|
def self.object_name
|
|
"account_session"
|
|
end
|
|
|
|
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
|
|
def self.create(params = {}, opts = {})
|
|
request_stripe_object(method: :post, path: "/v1/account_sessions", params: params, opts: opts)
|
|
end
|
|
end
|
|
end
|