Class: Courier::Models::NotificationTemplateWritePayload

Inherits:
NotificationTemplatePayload show all
Defined in:
lib/courier/models/notification_template_write_payload.rb,
sig/courier/models/notification_template_write_payload.rbs

Instance Attribute Summary collapse

Attributes inherited from NotificationTemplatePayload

#brand, #content, #name, #routing, #subscription, #tags

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(alias_: nil) ⇒ NotificationTemplateWritePayload

Some parameter documentations has been truncated, see Courier::Models::NotificationTemplateWritePayload for more details.

Template fields accepted in POST and PUT request bodies, nested under a notification key.

Parameters:

  • alias_ (String, nil) (defaults to: nil)

    Send-time alias for this template — the value you pass as event to POST /send.

  • alias_: (String, nil) (defaults to: nil)


# File 'lib/courier/models/notification_template_write_payload.rb', line 18

Instance Attribute Details

#alias_String?

Send-time alias for this template — the value you pass as event to POST /send. Writes accept a single alias only. Optional, with three distinct meanings. Omit it to leave any existing aliases untouched. Send a string to make this the template's only alias — a template that already resolved from several aliases keeps just this one and the rest are detached. Send null to remove every alias from the template. An alias may not be claimed by another template — doing so returns 409 — and may not begin with "tenant/".

Parameters:

  • _ (String, nil)

Returns:

  • (String, nil)


16
# File 'lib/courier/models/notification_template_write_payload.rb', line 16

optional :alias_, String, api_name: :alias, nil?: true

Instance Method Details

#to_hash{ alias_: String? }

Returns:

  • ({ alias_: String? })


12
# File 'sig/courier/models/notification_template_write_payload.rbs', line 12

def to_hash: -> { alias_: String? }