Class: Inttegro::Resources::ChildrenPolicies
- Inherits:
-
Object
- Object
- Inttegro::Resources::ChildrenPolicies
- Extended by:
- T::Sig
- Defined in:
- lib/inttegro/resources/children_policies.rb
Overview
Read access to the authenticated application's active children policy.
Instance Method Summary collapse
-
#initialize(http) ⇒ ChildrenPolicies
constructor
A new instance of ChildrenPolicies.
- #lookup(version: nil) ⇒ Object
- #page(number: nil, size: nil) ⇒ Object
Constructor Details
#initialize(http) ⇒ ChildrenPolicies
Returns a new instance of ChildrenPolicies.
13 14 15 |
# File 'lib/inttegro/resources/children_policies.rb', line 13 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#lookup(version: nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/inttegro/resources/children_policies.rb', line 18 def lookup(version: nil) validate_version!(version) body = T.let({}, Inttegro::Types::Payload) body[:version] = version unless version.nil? @http.post_resource( "/children_policies/lookup", Inttegro::Shared::ChildrenPolicy, :children_policy, body ) end |
#page(number: nil, size: nil) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/inttegro/resources/children_policies.rb', line 34 def page(number: nil, size: nil) @http.post_resource( "/children_policies/page", Inttegro::Shared::ChildrenPolicyVersionsPage, :page, pagination_payload(number, size) ) end |