Class: Trycourier::Models::InboundBulkMessage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/trycourier/models/inbound_bulk_message.rb

Defined Under Namespace

Modules: Content

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(event:, brand: nil, content: nil, data: nil, locale: nil, override: nil, template: nil) ⇒ Object

Some parameter documentations has been truncated, see Trycourier::Models::InboundBulkMessage for more details.

Bulk message definition. Supports two formats:

  • V1 format: Requires event field (event ID or notification ID)

  • V2 format: Optionally use template (notification ID) or content (Elemental content) in addition to event

Parameters:

  • event (String)

    Event ID or Notification ID (required). Can be either a

  • brand (String, nil) (defaults to: nil)
  • content (Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent, nil) (defaults to: nil)

    Elemental content (optional, for V2 format). When provided, this will be used

  • data (Hash{Symbol=>Object}, nil) (defaults to: nil)
  • locale (Hash{Symbol=>Hash{Symbol=>Object}}, nil) (defaults to: nil)
  • override (Hash{Symbol=>Object}, nil) (defaults to: nil)
  • template (String, nil) (defaults to: nil)

    Notification ID or template ID (optional, for V2 format). When provided,



# File 'lib/trycourier/models/inbound_bulk_message.rb', line 50


Instance Attribute Details

#brandString?

Returns:

  • (String, nil)


17
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 17

optional :brand, String, nil?: true

#contentTrycourier::Models::ElementalContentSugar, ...

Elemental content (optional, for V2 format). When provided, this will be used instead of the notification associated with the event field.



24
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 24

optional :content, union: -> { Trycourier::InboundBulkMessage::Content }, nil?: true

#dataHash{Symbol=>Object}?

Returns:

  • (Hash{Symbol=>Object}, nil)


29
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 29

optional :data, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true

#eventString

Event ID or Notification ID (required). Can be either a Notification ID (e.g., “FRH3QXM9E34W4RKP7MRC8NZ1T8V8”) or a custom Event ID (e.g., “welcome-email”) mapped to a notification.

Returns:

  • (String)


12
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 12

required :event, String

#localeHash{Symbol=>Hash{Symbol=>Object}}?

Returns:

  • (Hash{Symbol=>Hash{Symbol=>Object}}, nil)


34
35
36
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 34

optional :locale,
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown]],
nil?: true

#overrideHash{Symbol=>Object}?

Returns:

  • (Hash{Symbol=>Object}, nil)


41
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 41

optional :override, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true

#templateString?

Notification ID or template ID (optional, for V2 format). When provided, this will be used instead of the notification associated with the event field.

Returns:

  • (String, nil)


48
# File 'lib/trycourier/models/inbound_bulk_message.rb', line 48

optional :template, String, nil?: true