Class: Ecoportal::API::V1::PersonSchemas

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/ecoportal/api/v1/person_schemas.rb

Direct Known Subclasses

Internal::PersonSchemas

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ PersonSchemas

Returns a new instance of PersonSchemas.



7
8
9
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 7

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 6

def client
  @client
end

Instance Method Details

#each(params: {}, &block) ⇒ Object



11
12
13
14
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 11

def each(params: {}, &block)
  return to_enum(:each) unless block
  get_all.each(&block)
end

#get_allObject



16
17
18
19
# File 'lib/ecoportal/api/v1/person_schemas.rb', line 16

def get_all
  response = @client.get("/person_schemas")
  Common::WrappedResponse.new(response, person_schema_class)
end