Sha256: ef4345a8d59cbe96b140c3aedc62ce20fb84d8a6a9f9c8d5023ab8c6c204d7e1

Contents?: true

Size: 837 Bytes

Versions: 2

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true

require_relative 'client_association_methods_factory'

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

      def initialize(client, space_id, webhook_id)
        super(client, space_id)
        @webhook_id = webhook_id
      end

      def all(_params = {})
        @resource_requester.find(
          space_id: @space_id,
          webhook_id: @webhook_id
        )
      end

      def find(call_id)
        @resource_requester.find(
          space_id: @space_id,
          webhook_id: @webhook_id,
          call_id: call_id
        )
      end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
contentful-management-3.10.0 lib/contentful/management/client_webhook_call_methods_factory.rb
contentful-management-3.9.0 lib/contentful/management/client_webhook_call_methods_factory.rb