Sha256: 609cc185d7cf4ae4f135c44c1338db37f39caaf5039dd9bae8a81f2af94b6006

Contents?: true

Size: 961 Bytes

Versions: 11

Compression:

Stored size: 961 Bytes

Contents

# frozen_string_literal: true

module Stripe
  class SubscriptionScheduleRevision < APIResource
    extend Stripe::APIOperations::List

    OBJECT_NAME = "subscription_schedule_revision".freeze

    def resource_url
      if !respond_to?(:schedule) || schedule.nil?
        raise NotImplementedError,
              "Subscription Schedule Revisions cannot be accessed without a Subscription Schedule ID."
      end
      "#{SubscriptionSchedule.resource_url}/#{CGI.escape(schedule)}/revisions/#{CGI.escape(id)}"
    end

    def self.retrieve(_id, _opts = {})
      raise NotImplementedError, "Subscription Schedule Revisions cannot be retrieved without a Subscription Schedule ID. Retrieve it using schedule.revisions.retrieve('revision_id')"
    end

    def self.list(_id, _opts = {})
      raise NotImplementedError, "Subscription Schedule Revisions cannot be listed without a Subscription Schedule ID. List those using schedule.revisions"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
stripe-4.18.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.17.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.16.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.15.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.14.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.13.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.12.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.11.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.10.0 lib/stripe/subscription_schedule_revision.rb
stripe-4.9.1 lib/stripe/subscription_schedule_revision.rb
stripe-4.9.0 lib/stripe/subscription_schedule_revision.rb