stripe-ruby/lib/stripe/resources/terminal/connection_token.rb
helenye-stripe ce8d7ca4cc
Add methods for dynamically referenced constants (#1327)
* Update dynamic constant references

* Manual additionsg

* Fix lint

* Use const_Get

* Remove puts
2024-02-09 17:15:39 -08:00

29 lines
949 B
Ruby

# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module Terminal
# A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
#
# Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
class ConnectionToken < APIResource
extend Stripe::APIOperations::Create
OBJECT_NAME = "terminal.connection_token"
def self.object_name
"terminal.connection_token"
end
# To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
path: "/v1/terminal/connection_tokens",
params: params,
opts: opts
)
end
end
end
end