Sha256: fa6bcce4f886006fc8abfd13ff5b397e597b53786cd2e3fef163321390b19b94

Contents?: true

Size: 666 Bytes

Versions: 31

Compression:

Stored size: 666 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_environments(params={})
      query = Ey::Core.paging_parameters(params)
      url   = params.delete("url")

      request(
        :params => params,
        :query  => query,
        :path   => "/environments",
        :url    => url,
      )
    end
  end # Real

  class Mock
    def get_environments(params={})
      extract_url_params!(params)

      headers, environments_page = search_and_page(params, :environments, search_keys: %w[account name])

      response(
        :body    => {"environments" => environments_page},
        :status  => 200,
        :headers => headers
      )
    end
  end # Mock
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ey-core-3.1.4 lib/ey-core/requests/get_environments.rb
ey-core-3.1.3 lib/ey-core/requests/get_environments.rb
ey-core-3.1.2 lib/ey-core/requests/get_environments.rb
ey-core-3.1.1 lib/ey-core/requests/get_environments.rb
ey-core-3.1.0 lib/ey-core/requests/get_environments.rb
ey-core-3.0.5 lib/ey-core/requests/get_environments.rb
ey-core-3.0.4 lib/ey-core/requests/get_environments.rb
ey-core-3.0.3 lib/ey-core/requests/get_environments.rb
ey-core-3.0.2 lib/ey-core/requests/get_environments.rb
ey-core-3.0.1 lib/ey-core/requests/get_environments.rb
ey-core-3.0.0 lib/ey-core/requests/get_environments.rb