class Ecoportal::API::Internal::LoginProviders

@attr_reader client [Common::Client] a `Common::Client` object that holds the configuration of the api connection.

Attributes

client[R]

Public Class Methods

new(client) click to toggle source

@param client [Common::Client] a `Common::Client` object that holds the configuration of the api connection. @return [LoginProviders] an instance object ready to make login providers api requests.

# File lib/ecoportal/api/internal/login_providers.rb, line 12
def initialize(client)
  @client = client
end

Public Instance Methods

each(&block) click to toggle source
# File lib/ecoportal/api/internal/login_providers.rb, line 23
def each(&block)
  return to_enum(:each) unless block
  get_all.each(&block)
end
get_all() click to toggle source

Gets all the login providers via api request. @return [Enumerable<LoginProvider>] an `Enumerable` with all login providers already wrapped as `LoginProvider` objects.

# File lib/ecoportal/api/internal/login_providers.rb, line 18
def get_all
  response = @client.get("/login_providers")
  Common::WrappedResponse.new(response, Internal::LoginProvider)
end