Class: Infrawrench::DigestRecipientsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::DigestRecipientsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.digest.recipients
Instance Method Summary collapse
-
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Add a digest email recipient.
-
#delete(recipient_id:, org_id: nil, request_options: nil) ⇒ Hash
Remove a digest email recipient.
-
#get(org_id: nil, request_options: nil) ⇒ Hash
List the organization's digest email recipients.
-
#initialize(transport) ⇒ DigestRecipientsNamespace
constructor
private
A new instance of DigestRecipientsNamespace.
Constructor Details
#initialize(transport) ⇒ DigestRecipientsNamespace
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 DigestRecipientsNamespace.
6561 6562 6563 |
# File 'lib/infrawrench/client.rb', line 6561 def initialize(transport) @transport = transport end |
Instance Method Details
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Add a digest email recipient
Adding an address the organization already has is a no-op that returns the existing entry, so a double submit cannot double-deliver.
POST /api/org/orgId/digest/recipients
Raises on 400: Bad request
6581 6582 6583 6584 6585 6586 6587 6588 6589 |
# File 'lib/infrawrench/client.rb', line 6581 def create(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/digest/recipients", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(recipient_id:, org_id: nil, request_options: nil) ⇒ Hash
Remove a digest email recipient
DELETE /api/org/orgId/digest/recipients/recipientId
Raises on 404: Not found
6603 6604 6605 6606 6607 6608 6609 6610 |
# File 'lib/infrawrench/client.rb', line 6603 def delete(recipient_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/digest/recipients/{recipientId}", path_params: { "orgId" => org_id, "recipientId" => recipient_id }, request_options: ) end |
#get(org_id: nil, request_options: nil) ⇒ Hash
List the organization's digest email recipients
Email is a digest-only transport, so its destinations are an organization-level address list rather than a per-channel trigger. Addresses need not belong to Infrawrench users — a finance alias is a valid recipient.
GET /api/org/orgId/digest/recipients
6627 6628 6629 6630 6631 6632 6633 6634 |
# File 'lib/infrawrench/client.rb', line 6627 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/digest/recipients", path_params: { "orgId" => org_id }, request_options: ) end |