Sha256: a7551b593ff603cefc1a7e8c18c8ce348dbc34477fb4b6541e39fd99a5b25412

Contents?: true

Size: 1.63 KB

Versions: 9

Compression:

Stored size: 1.63 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  module Apps
    # Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.
    #
    # The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.
    #
    # All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.
    #
    # A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
    #
    # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
    class Secret < APIResource
      extend Stripe::APIOperations::Create
      extend Stripe::APIOperations::List

      OBJECT_NAME = "apps.secret"

      # Deletes a secret from the secret store by name and scope.
      def self.delete_where(params = {}, opts = {})
        request_stripe_object(
          method: :post,
          path: "/v1/apps/secrets/delete",
          params: params,
          opts: opts
        )
      end

      # Finds a secret in the secret store by name and scope.
      def self.find(params = {}, opts = {})
        request_stripe_object(
          method: :get,
          path: "/v1/apps/secrets/find",
          params: params,
          opts: opts
        )
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
stripe-10.7.1 lib/stripe/resources/apps/secret.rb
stripe-10.8.0.pre.beta.1 lib/stripe/resources/apps/secret.rb
stripe-10.7.0 lib/stripe/resources/apps/secret.rb
stripe-10.7.0.pre.beta.3 lib/stripe/resources/apps/secret.rb
stripe-10.7.0.pre.beta.2 lib/stripe/resources/apps/secret.rb
stripe-10.7.0.pre.beta.1 lib/stripe/resources/apps/secret.rb
stripe-10.6.0 lib/stripe/resources/apps/secret.rb
stripe-10.6.0.pre.beta.1 lib/stripe/resources/apps/secret.rb
stripe-10.5.0 lib/stripe/resources/apps/secret.rb