lib/hackerone/client/program.rb in hackerone-client-0.22.1 vs lib/hackerone/client/program.rb in hackerone-client-0.23.0

- old
+ new

@@ -49,10 +49,19 @@ def find_group(groupname) groups.find { |group| group.name == groupname } end + def structured_scopes(page_number: 1, page_size: 100) + make_get_request( + "programs/#{id}/structured_scopes", + params: { page: { number: page_number, size: page_size } } + ).map do |data| + StructuredScope.new(data, self) + end + end + def update_policy(policy:) body = { type: "program-policy", attributes: { policy: policy @@ -81,18 +90,22 @@ "programs/#{id}/billing/balance" ) BillingBalance.new(response_body).balance end - private - def members @members ||= relationships.members[:data].map { |member_data| Member.new(member_data) } end def groups @groups ||= relationships.groups[:data].map { |group_data| Group.new(group_data) } end + + def organization + @organization ||= Organization.new(relationships.organization[:data]) + end + + private def relationships # Relationships are only included in the /programs/:id call, # which is why we need to do a separate call here. @relationships ||= begin