Class: Notiflows::Resources::Deliveries
- Inherits:
-
Object
- Object
- Notiflows::Resources::Deliveries
- Defined in:
- lib/notiflows/resources/deliveries.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Deliveries
constructor
private
A new instance of Deliveries.
-
#list(after: nil, before: nil, channel_id: nil, created_after: nil, created_before: nil, limit: nil, status: nil, topic: nil, request_options: {}) ⇒ Notiflows::Internal::CursorPage<Notiflows::Models::Delivery>
Retrieve a paginated list of all deliveries in your project.
-
#retrieve(id, request_options: {}) ⇒ Notiflows::Models::Delivery
Retrieve details of a single delivery attempt.
Constructor Details
#initialize(client:) ⇒ Deliveries
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 Deliveries.
72 73 74 |
# File 'lib/notiflows/resources/deliveries.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#list(after: nil, before: nil, channel_id: nil, created_after: nil, created_before: nil, limit: nil, status: nil, topic: nil, request_options: {}) ⇒ Notiflows::Internal::CursorPage<Notiflows::Models::Delivery>
Retrieve a paginated list of all deliveries in your project.
A delivery represents a single attempt to send a notification through a specific channel. Use filters to narrow down results by channel, status, or time range.
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/notiflows/resources/deliveries.rb', line 57 def list(params = {}) parsed, = ::Notiflows::DeliveryListParams.dump_request(params) @client.request( method: :get, path: "deliveries", query: parsed, page: ::Notiflows::Internal::CursorPage, model: ::Notiflows::Delivery, options: ) end |
#retrieve(id, request_options: {}) ⇒ Notiflows::Models::Delivery
Retrieve details of a single delivery attempt.
Includes the rendered content (data), channel information, and all timestamp
tracking (sent, seen, read, clicked, archived).
20 21 22 23 24 25 26 27 |
# File 'lib/notiflows/resources/deliveries.rb', line 20 def retrieve(id, params = {}) @client.request( method: :get, path: ["deliveries/%1$s", id], model: ::Notiflows::Delivery, options: params[:request_options] ) end |