Sha256: 31819a25af3ad2be9c991e4d22522be0b3ead2b274451dd0ef00350e6f58c566

Contents?: true

Size: 1018 Bytes

Versions: 1

Compression:

Stored size: 1018 Bytes

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  module Entitlements
    # A feature represents a monetizable ability or functionality in your system.
    # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
    class Feature < APIResource
      extend Stripe::APIOperations::Create
      extend Stripe::APIOperations::List

      OBJECT_NAME = "entitlements.feature"

      # Creates a feature
      def self.create(params = {}, opts = {})
        request_stripe_object(
          method: :post,
          path: "/v1/entitlements/features",
          params: params,
          opts: opts
        )
      end

      # Retrieve a list of features
      def self.list(filters = {}, opts = {})
        request_stripe_object(
          method: :get,
          path: "/v1/entitlements/features",
          params: filters,
          opts: opts
        )
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stripe-10.9.0.pre.beta.1 lib/stripe/resources/entitlements/feature.rb