Sha256: 219f085ed1267096db5c0c586529c726dfed6e2ab515ce83f1d91a1a50ae8b5a

Contents?: true

Size: 1.13 KB

Versions: 33

Compression:

Stored size: 1.13 KB

Contents

require_relative 'client_association_methods_factory'

module Contentful
  module Management
    # Wrapper for Webhook API for usage from within Client
    # @private
    class ClientSnapshotMethodsFactory
      include Contentful::Management::ClientAssociationMethodsFactory

      def initialize(client, space_id, environment_id, resource_type)
        super(client, space_id, environment_id)
        @resource_type = resource_type
      end

      def create(*)
        fail 'Not supported'
      end

      def all(resource_id, params = {})
        @resource_requester.all(
          {
            resource_type: @resource_type,
            space_id: @space_id,
            environment_id: @environment_id,
            resource_id: resource_id
          },
          params
        )
      end

      def find(resource_id, snapshot_id)
        @resource_requester.find(
          resource_type: @resource_type,
          space_id: @space_id,
          environment_id: @environment_id,
          resource_id: resource_id,
          snapshot_id: snapshot_id
        )
      end

      def new(*)
        fail 'Not supported'
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
contentful-management-3.8.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.7.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.6.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.5.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.4.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.3.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.2.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.1.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-3.0.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.13.1 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.13.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.12.1 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.12.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.11.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.10.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.9.1 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.9.0 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.8.2 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.8.1 lib/contentful/management/client_snapshot_methods_factory.rb
contentful-management-2.8.0 lib/contentful/management/client_snapshot_methods_factory.rb