Class: Infrawrench::OnCallOverridesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::OnCallOverridesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.on_call.overrides
Instance Method Summary collapse
-
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Arrange cover.
-
#delete(override_id:, org_id: nil, request_options: nil) ⇒ nil
Cancel a cover.
-
#get(org_id: nil, schedule_id: nil, request_options: nil) ⇒ Hash
List covers.
-
#initialize(transport) ⇒ OnCallOverridesNamespace
constructor
private
A new instance of OnCallOverridesNamespace.
Constructor Details
#initialize(transport) ⇒ OnCallOverridesNamespace
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 OnCallOverridesNamespace.
10579 10580 10581 |
# File 'lib/infrawrench/client.rb', line 10579 def initialize(transport) @transport = transport end |
Instance Method Details
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Arrange cover
A cover beats the rotation for exactly its window. Among several overlapping covers the one that started most recently wins, so a later-written cover supersedes an earlier one rather than the answer depending on row order.
Takes team:read, not a settings permission: cover is arranged at 17:55
on a Friday and the person handing over is rarely an org admin. Every
cover is audit-logged, which is the control that makes the looser
permission safe.
POST /api/org/orgId/on-call/overrides
Raises on 400: Bad request
Raises on 404: Not found
10607 10608 10609 10610 10611 10612 10613 10614 10615 |
# File 'lib/infrawrench/client.rb', line 10607 def create(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/on-call/overrides", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(override_id:, org_id: nil, request_options: nil) ⇒ nil
Cancel a cover
DELETE /api/org/orgId/on-call/overrides/overrideId
Raises on 404: Not found
10629 10630 10631 10632 10633 10634 10635 10636 10637 |
# File 'lib/infrawrench/client.rb', line 10629 def delete(override_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/on-call/overrides/{overrideId}", path_params: { "orgId" => org_id, "overrideId" => override_id }, accept: :empty, request_options: ) end |
#get(org_id: nil, schedule_id: nil, request_options: nil) ⇒ Hash
List covers
GET /api/org/orgId/on-call/overrides
10649 10650 10651 10652 10653 10654 10655 10656 10657 |
# File 'lib/infrawrench/client.rb', line 10649 def get(org_id: nil, schedule_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/on-call/overrides", path_params: { "orgId" => org_id }, query: { "scheduleId" => schedule_id }, request_options: ) end |