Sha256: ddfc2dead4dd1e1e304d43f5841f0331a0cdf2fe0acfed54320d97fba26d9910

Contents?: true

Size: 706 Bytes

Versions: 3

Compression:

Stored size: 706 Bytes

Contents

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

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

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

      headers, memberships_page = search_and_page(params, :memberships, search_keys: %w[account email])

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ey-core-3.6.6 lib/ey-core/requests/get_memberships.rb
ey-core-3.4.5 lib/ey-core/requests/get_memberships.rb
ey-core-3.6.5 lib/ey-core/requests/get_memberships.rb