Class: Stripe::Terminal::ConnectionTokenService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Terminal::ConnectionTokenService
- Defined in:
- lib/stripe/services/terminal/connection_token_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
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.
8 9 10 11 12 13 14 15 16 |
# File 'lib/stripe/services/terminal/connection_token_service.rb', line 8 def create(params = {}, opts = {}) request( method: :post, path: "/v1/terminal/connection_tokens", params: params, opts: opts, base_address: :api ) end |