Class: Infrawrench::ExpiringSettingsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::ExpiringSettingsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.expiring.settings
Instance Method Summary collapse
-
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's expiry alert settings.
-
#initialize(transport) ⇒ ExpiringSettingsNamespace
constructor
private
A new instance of ExpiringSettingsNamespace.
-
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update the expiry alert settings.
Constructor Details
#initialize(transport) ⇒ ExpiringSettingsNamespace
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 ExpiringSettingsNamespace.
7478 7479 7480 |
# File 'lib/infrawrench/client.rb', line 7478 def initialize(transport) @transport = transport end |
Instance Method Details
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's expiry alert settings
The lead time feeds both the feed's upcoming bucket and the poller's
daily alert scan. An organization that never saved reads the shipped
defaults (enabled, 60 days).
Requires permission: org:settings:write.
GET /api/org/orgId/expiring/settings
7498 7499 7500 7501 7502 7503 7504 7505 |
# File 'lib/infrawrench/client.rb', line 7498 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/expiring/settings", path_params: { "orgId" => org_id }, request_options: ) end |
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Update the expiry alert settings
Every field is optional so a single toggle can be saved on its own.
leadDays must be a whole number from 1 to 365. Saving never resets the
alert cooldown.
Requires permission: org:settings:write.
PUT /api/org/orgId/expiring/settings
Raises on 400: Bad request
7526 7527 7528 7529 7530 7531 7532 7533 7534 |
# File 'lib/infrawrench/client.rb', line 7526 def update(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/expiring/settings", path_params: { "orgId" => org_id }, body: body, request_options: ) end |