Sha256: f340256e5de34fa8696e56b30838ebf461c6b5e941c0630eca2107e0d5dc592c

Contents?: true

Size: 934 Bytes

Versions: 14

Compression:

Stored size: 934 Bytes

Contents

# frozen_string_literal: true

module Stripe
  class SubscriptionItem < APIResource
    extend Stripe::APIOperations::Create
    include Stripe::APIOperations::Delete
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save
    extend Stripe::APIOperations::NestedResource

    OBJECT_NAME = "subscription_item"

    nested_resource_class_methods :usage_record, operations: %i[create]
    nested_resource_class_methods :usage_record_summary,
                                  operations: %i[list],
                                  resource_plural: "usage_record_summaries"

    def usage_record_summaries(params = {}, opts = {})
      resp, opts = request(:get, resource_url + "/usage_record_summaries", params, opts)
      Util.convert_to_stripe_object(resp.data, opts)
    end
    extend Gem::Deprecate
    deprecate :usage_record_summaries, :"SubscriptionItem.list_usage_record_summaries", 2020, 1
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
stripe-5.22.0 lib/stripe/resources/subscription_item.rb
stripe-5.21.0 lib/stripe/resources/subscription_item.rb
stripe-5.20.0 lib/stripe/resources/subscription_item.rb
stripe-5.19.0 lib/stripe/resources/subscription_item.rb
stripe-5.18.0 lib/stripe/resources/subscription_item.rb
stripe-5.17.0 lib/stripe/resources/subscription_item.rb
stripe-5.16.0 lib/stripe/resources/subscription_item.rb
stripe-5.15.0 lib/stripe/resources/subscription_item.rb
stripe-5.14.0 lib/stripe/resources/subscription_item.rb
stripe-5.13.0 lib/stripe/resources/subscription_item.rb
stripe-5.12.1 lib/stripe/resources/subscription_item.rb
stripe-5.12.0 lib/stripe/resources/subscription_item.rb
stripe-5.11.0 lib/stripe/resources/subscription_item.rb
stripe-5.10.0 lib/stripe/resources/subscription_item.rb