Class: Courier::Resources::Inbound
- Inherits:
-
Object
- Object
- Courier::Resources::Inbound
- Defined in:
- lib/courier/resources/inbound.rb,
sig/courier/resources/inbound.rbs
Overview
Record an inbound event that triggers the journeys and automations mapped to it.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Inbound
constructor
private
A new instance of Inbound.
-
#track_event(event:, message_id:, properties:, type:, user_id: nil, request_options: {}) ⇒ Courier::Models::InboundTrackEventResponse
Some parameter documentations has been truncated, see Models::InboundTrackEventParams for more details.
Constructor Details
#initialize(client:) ⇒ Inbound
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 Inbound.
44 45 46 |
# File 'lib/courier/resources/inbound.rb', line 44 def initialize(client:) @client = client end |
Instance Method Details
#track_event(event:, message_id:, properties:, type:, user_id: nil, request_options: {}) ⇒ Courier::Models::InboundTrackEventResponse
Some parameter documentations has been truncated, see Models::InboundTrackEventParams for more details.
Records an inbound event that can trigger a journey. Requires an event name, a messageId you generate, a type, and a properties object.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/courier/resources/inbound.rb', line 30 def track_event(params) parsed, = Courier::InboundTrackEventParams.dump_request(params) @client.request( method: :post, path: "inbound/courier", body: parsed, model: Courier::Models::InboundTrackEventResponse, options: ) end |