Sha256: 495a75cfdb0de9b7b83bb6df1c8fe99b82030414cc7e0e90a5eb3c628b8fb6a3

Contents?: true

Size: 603 Bytes

Versions: 8

Compression:

Stored size: 603 Bytes

Contents

require "digicert/actions/base"

module Digicert
  module Actions
    module All
      extend Digicert::Actions::Base

      def all
        response = Digicert::Request.new(
          :get, resource_path, params: query_params
        ).parse

        response[resources_key]
      end

      def resources_key
        [resource_path, "s"].join
      end

      module ClassMethods
        def all(query_params = {})
          new(params: query_params).all
        end

        def filter(filter_params = {})
          new(params: { filters: filter_params }).all
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
digicert-1.0.0 lib/digicert/actions/all.rb
digicert-0.5.0 lib/digicert/actions/all.rb
digicert-0.4.1 lib/digicert/actions/all.rb
digicert-0.4.0 lib/digicert/actions/all.rb
digicert-0.3.1 lib/digicert/actions/all.rb
digicert-0.3.0 lib/digicert/actions/all.rb
digicert-0.2.0 lib/digicert/actions/all.rb
digicert-0.1.2 lib/digicert/actions/all.rb