Class: Knockapi::Resources::Channels::Bulk
- Inherits:
-
Object
- Object
- Knockapi::Resources::Channels::Bulk
- Defined in:
- lib/knockapi/resources/channels/bulk.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Bulk
constructor
private
A new instance of Bulk.
-
#update_message_status(channel_id, action, archived: nil, delivery_status: nil, engagement_status: nil, has_tenant: nil, newer_than: nil, older_than: nil, recipient_ids: nil, tenants: nil, trigger_data: nil, workflows: nil, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Some parameter documentations has been truncated, see Models::Channels::BulkUpdateMessageStatusParams for more details.
Constructor Details
#initialize(client:) ⇒ Bulk
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 Bulk.
60 61 62 |
# File 'lib/knockapi/resources/channels/bulk.rb', line 60 def initialize(client:) @client = client end |
Instance Method Details
#update_message_status(channel_id, action, archived: nil, delivery_status: nil, engagement_status: nil, has_tenant: nil, newer_than: nil, older_than: nil, recipient_ids: nil, tenants: nil, trigger_data: nil, workflows: nil, request_options: {}) ⇒ Knockapi::Models::BulkOperation
Some parameter documentations has been truncated, see Models::Channels::BulkUpdateMessageStatusParams for more details.
Bulk update the status of messages for a specific channel. The channel is specified by the ‘channel_id` parameter. The action to perform is specified by the `action` parameter, where the action is a status change action (e.g. `archive`, `unarchive`).
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/knockapi/resources/channels/bulk.rb', line 46 def (channel_id, action, params = {}) parsed, = Knockapi::Channels::BulkUpdateMessageStatusParams.dump_request(params) @client.request( method: :post, path: ["v1/channels/%1$s/messages/bulk/%2$s", channel_id, action], body: parsed, model: Knockapi::BulkOperation, options: ) end |