Class: Yandex360::OrganizationsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/yandex360/resources/organizations.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Yandex360::Resource

Instance Method Details

#info(org_id:) ⇒ Object



10
11
12
13
# File 'lib/yandex360/resources/organizations.rb', line 10

def info(org_id:)
  validate_required_params({org_id: org_id}, [:org_id])
  Organization.new get("/directory/v1/org/#{org_id}").body
end

#listObject



5
6
7
8
# File 'lib/yandex360/resources/organizations.rb', line 5

def list
  resp = get("/directory/v1/org")
  Collection.from_response(resp, key: "organizations", type: Organization)
end