Class: Stripe::EphemeralKeyService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::EphemeralKeyService
- Defined in:
- lib/stripe/services/ephemeral_key_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a short-lived API key for a given resource.
-
#delete(key, params = {}, opts = {}) ⇒ Object
Invalidates a short-lived API key for a given resource.
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
Creates a short-lived API key for a given resource.
7 8 9 10 11 12 13 14 15 |
# File 'lib/stripe/services/ephemeral_key_service.rb', line 7 def create(params = {}, opts = {}) request( method: :post, path: "/v1/ephemeral_keys", params: params, opts: opts, base_address: :api ) end |
#delete(key, params = {}, opts = {}) ⇒ Object
Invalidates a short-lived API key for a given resource.
18 19 20 21 22 23 24 25 26 |
# File 'lib/stripe/services/ephemeral_key_service.rb', line 18 def delete(key, params = {}, opts = {}) request( method: :delete, path: format("/v1/ephemeral_keys/%<key>s", { key: CGI.escape(key) }), params: params, opts: opts, base_address: :api ) end |