Class: Puree::Extractor::OrganisationalUnit

Inherits:
Resource
  • Object
show all
Defined in:
lib/puree/extractor/organisational_unit.rb

Overview

Organisational unit extractor.

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Puree::Extractor::Resource

Instance Method Details

#count(params = {}) ⇒ Integer

Count of records available.

Parameters:

  • params (Hash) (defaults to: {})

    Combined GET and POST parameters for all records

Returns:

  • (Integer)


21
22
23
# File 'lib/puree/extractor/organisational_unit.rb', line 21

def count(params = {})
  record_count :organisational_unit, params
end

#find(id) ⇒ Puree::Model::OrganisationalUnit?

Parameters:

  • id (String)

Returns:



11
12
13
14
15
# File 'lib/puree/extractor/organisational_unit.rb', line 11

def find(id)
  super id: id,
        api_resource_type: :organisational_unit,
        xml_extractor_resource_type: :organisational_unit
end

#random(params = {}) ⇒ Puree::Model::OrganisationalUnit?

Random record.

Parameters:

  • params (Hash) (defaults to: {})

    Combined GET and POST parameters for all records

Returns:



29
30
31
# File 'lib/puree/extractor/organisational_unit.rb', line 29

def random(params = {})
  super :organisational_unit, params
end