Sha256: 5388e1ff195e0fa37c1caa12beeadbd67a6f0bf13dd319d8a6cbdcb3f4d1e002

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 Bytes

Contents

# frozen_string_literal: true

require_relative 'client_association_methods_factory'
require_relative 'client_association_all_published_method_factory'

module Contentful
  module Management
    # Wrapper for ContentType API for usage from within Client
    # @private
    class ClientContentTypeMethodsFactory
      include Contentful::Management::ClientAssociationMethodsFactory
      include Contentful::Management::ClientAssociationAllPublishedMethodsFactory

      def all(query = {})
        content_types = super(query)
        client.update_dynamic_entry_cache!(content_types)
        content_types
      end

      def all_published(params = {})
        super({ suppress_warning: true }.merge(params))
      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_content_type_methods_factory.rb
contentful-management-3.9.0 lib/contentful/management/client_content_type_methods_factory.rb