Class: Openlayer::Resources::Governance::Frameworks::Subsections

Inherits:
Object
  • Object
show all
Defined in:
lib/openlayer/resources/governance/frameworks/subsections.rb,
sig/openlayer/resources/governance/frameworks/subsections.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Subsections

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 Subsections.

Parameters:



62
63
64
# File 'lib/openlayer/resources/governance/frameworks/subsections.rb', line 62

def initialize(client:)
  @client = client
end

Instance Method Details

#list_rules(subsection_id, framework_id:, include_results: nil, page: nil, per_page: nil, project_id: nil, status: nil, request_options: {}) ⇒ Openlayer::Models::Governance::Frameworks::SubsectionListRulesResponse

Some parameter documentations has been truncated, see Models::Governance::Frameworks::SubsectionListRulesParams for more details.

List the rules mapped to a subsection of a framework document.

A subsection is usually the level at which a standard states an individual requirement, so this is the endpoint to use when you want to show which rules cover a specific clause.

Parameters:

  • subsection_id (String) —

    Path param: The framework document subsection id.

  • framework_id (String) —

    Path param: The framework id.

  • include_results (Boolean) —

    Query param: Whether to include each rule's results inline, in a results array

  • page (Integer) —

    Query param: The page to return in a paginated query.

  • per_page (Integer) —

    Query param: Maximum number of items to return per page.

  • project_id (String) —

    Query param: Only include items that apply to this project.

  • status (Symbol, Openlayer::Models::Governance::Frameworks::SubsectionListRulesParams::Status) —

    Query param: Only include items whose rule result has this compliance status.

  • request_options (Openlayer::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/openlayer/resources/governance/frameworks/subsections.rb', line 39

def list_rules(subsection_id, params)
  parsed, options = Openlayer::Governance::Frameworks::SubsectionListRulesParams.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/subsections/%2$s/rules", framework_id, subsection_id],
    query: query.transform_keys(
      include_results: "includeResults",
      per_page: "perPage",
      project_id: "projectId"
    ),
    model: Openlayer::Models::Governance::Frameworks::SubsectionListRulesResponse,
    options: options
  )
end