Class: Courier::Models::NotificationTemplatePayload
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::NotificationTemplatePayload
- Defined in:
- lib/courier/models/notification_template_payload.rb,
sig/courier/models/notification_template_payload.rbs
Direct Known Subclasses
NotificationTemplateResponse, NotificationTemplateWritePayload
Defined Under Namespace
Classes: Brand, Routing, Subscription
Instance Attribute Summary collapse
-
#brand ⇒ Courier::Models::NotificationTemplatePayload::Brand?
Brand reference, or null for no brand.
-
#content ⇒ Courier::Models::NotificationTemplateContent
Elemental content definition.
-
#email ⇒ Courier::Models::NotificationTemplateEmail?
Email header fields for the template's email channel: the From, Reply-to, CC and BCC values set in the Studio email channel settings.
-
#name ⇒ String
Display name for the template.
-
#routing ⇒ Courier::Models::NotificationTemplatePayload::Routing?
Routing strategy reference, or null for none.
-
#subscription ⇒ Courier::Models::NotificationTemplatePayload::Subscription?
Subscription topic reference, or null for none.
-
#tags ⇒ Array<String>
Tags for categorization.
Instance Method Summary collapse
-
#initialize(strategy_id:) ⇒ NotificationTemplatePayload
constructor
Routing strategy reference, or null for none.
- #to_hash ⇒ { brand: Courier::NotificationTemplatePayload::Brand?, content: Courier::NotificationTemplateContent, name: String, routing: Courier::NotificationTemplatePayload::Routing?, subscription: Courier::NotificationTemplatePayload::Subscription?, tags: ::Array[String], email: Courier::NotificationTemplateEmail? }
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(strategy_id:) ⇒ NotificationTemplatePayload
Routing strategy reference, or null for none.
|
|
# File 'lib/courier/models/notification_template_payload.rb', line 56
|
Instance Attribute Details
#brand ⇒ Courier::Models::NotificationTemplatePayload::Brand?
Brand reference, or null for no brand.
10 |
# File 'lib/courier/models/notification_template_payload.rb', line 10 required :brand, -> { Courier::NotificationTemplatePayload::Brand }, nil?: true |
#content ⇒ Courier::Models::NotificationTemplateContent
Elemental content definition.
16 |
# File 'lib/courier/models/notification_template_payload.rb', line 16 required :content, -> { Courier::NotificationTemplateContent } |
#email ⇒ Courier::Models::NotificationTemplateEmail?
Email header fields for the template's email channel: the From, Reply-to, CC and
BCC values set in the Studio email channel settings. Each value may use template
variables, such as {{data.cc}}, which are resolved at send time. Reads omit
email when no header is set, and omit each unset field. Writes treat it as
optional, with three meanings. Omit it to keep the stored headers. Send null to
clear all four. Send an object to replace all four: a field the object leaves
out is cleared. Other email channel settings, such as the subject, are kept
either way. Headers only apply while content has an email channel; with no
email channel they are not stored.
54 |
# File 'lib/courier/models/notification_template_payload.rb', line 54 optional :email, -> { Courier::NotificationTemplateEmail }, nil?: true |
#name ⇒ String
Display name for the template.
22 |
# File 'lib/courier/models/notification_template_payload.rb', line 22 required :name, String |
#routing ⇒ Courier::Models::NotificationTemplatePayload::Routing?
Routing strategy reference, or null for none.
28 |
# File 'lib/courier/models/notification_template_payload.rb', line 28 required :routing, -> { Courier::NotificationTemplatePayload::Routing }, nil?: true |
#subscription ⇒ Courier::Models::NotificationTemplatePayload::Subscription?
Subscription topic reference, or null for none.
34 |
# File 'lib/courier/models/notification_template_payload.rb', line 34 required :subscription, -> { Courier::NotificationTemplatePayload::Subscription }, nil?: true |
#tags ⇒ Array<String>
Tags for categorization. Send empty array for none.
40 |
# File 'lib/courier/models/notification_template_payload.rb', line 40 required :tags, Courier::Internal::Type::ArrayOf[String] |
Instance Method Details
#to_hash ⇒ { brand: Courier::NotificationTemplatePayload::Brand?, content: Courier::NotificationTemplateContent, name: String, routing: Courier::NotificationTemplatePayload::Routing?, subscription: Courier::NotificationTemplatePayload::Subscription?, tags: ::Array[String], email: Courier::NotificationTemplateEmail? }
39 40 41 42 43 44 45 46 47 |
# File 'sig/courier/models/notification_template_payload.rbs', line 39
def to_hash: -> {
brand: Courier::NotificationTemplatePayload::Brand?,
content: Courier::NotificationTemplateContent,
name: String,
routing: Courier::NotificationTemplatePayload::Routing?,
subscription: Courier::NotificationTemplatePayload::Subscription?,
tags: ::Array[String],
email: Courier::NotificationTemplateEmail?
}
|