Class: Openlayer::Resources::Governance::Frameworks::Sections
- Inherits:
-
Object
- Object
- Openlayer::Resources::Governance::Frameworks::Sections
- Defined in:
- lib/openlayer/resources/governance/frameworks/sections.rb,
sig/openlayer/resources/governance/frameworks/sections.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Sections
constructor
private
A new instance of Sections.
-
#list_rules(section_id, framework_id:, include_results: nil, include_subsection_rules: nil, page: nil, per_page: nil, project_id: nil, status: nil, request_options: {}) ⇒ Openlayer::Models::Governance::Frameworks::SectionListRulesResponse
Some parameter documentations has been truncated, see Models::Governance::Frameworks::SectionListRulesParams for more details.
Constructor Details
#initialize(client:) ⇒ Sections
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Sections.
65 66 67 |
# File 'lib/openlayer/resources/governance/frameworks/sections.rb', line 65 def initialize(client:) @client = client end |
Instance Method Details
#list_rules(section_id, framework_id:, include_results: nil, include_subsection_rules: nil, page: nil, per_page: nil, project_id: nil, status: nil, request_options: {}) ⇒ Openlayer::Models::Governance::Frameworks::SectionListRulesResponse
Some parameter documentations has been truncated, see Models::Governance::Frameworks::SectionListRulesParams for more details.
List the rules mapped to a section of a framework document.
Pass includeSubsectionRules=true to also return the rules mapped to the
section's subsections, which is how you get every rule covering a requirement
and everything under it.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/openlayer/resources/governance/frameworks/sections.rb', line 41 def list_rules(section_id, params) parsed, = Openlayer::Governance::Frameworks::SectionListRulesParams.dump_request(params) query = Openlayer::Internal::Util.encode_query_params(parsed) framework_id = parsed.delete(:framework_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["frameworks/%1$s/sections/%2$s/rules", framework_id, section_id], query: query.transform_keys( include_results: "includeResults", include_subsection_rules: "includeSubsectionRules", per_page: "perPage", project_id: "projectId" ), model: Openlayer::Models::Governance::Frameworks::SectionListRulesResponse, options: ) end |