Class: Courier::Models::NotificationTemplateSummary

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/notification_template_summary.rb,
sig/courier/models/notification_template_summary.rbs

Defined Under Namespace

Modules: State

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(id:, created:, creator:, name:, state:, tags:, subscription_topic_id: nil, topic_id: nil, updated: nil, updater: nil) ⇒ Object

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

V2 (CDS) template summary returned in list responses.

Parameters:

  • id (String)
  • created (Integer)

    Epoch milliseconds when the template was created.

  • creator (String)

    User ID of the creator.

  • name (String)
  • state (Symbol, Courier::Models::NotificationTemplateSummary::State)
  • tags (Array<String>)
  • subscription_topic_id (String) (defaults to: nil)

    The linked subscription (preference) topic of the published version. Omitted whe

  • topic_id (String) (defaults to: nil)

    Alias of subscription_topic_id, provided under the same name V1 list items use f

  • updated (Integer) (defaults to: nil)

    Epoch milliseconds of last update.

  • updater (String) (defaults to: nil)

    User ID of the last updater.



# File 'lib/courier/models/notification_template_summary.rb', line 64

Instance Attribute Details

#createdInteger

Epoch milliseconds when the template was created.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


15
# File 'lib/courier/models/notification_template_summary.rb', line 15

required :created, Integer

#creatorString

User ID of the creator.

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/courier/models/notification_template_summary.rb', line 21

required :creator, String

#idString

Parameters:

  • value (String)

Returns:

  • (String)


9
# File 'lib/courier/models/notification_template_summary.rb', line 9

required :id, String

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/courier/models/notification_template_summary.rb', line 26

required :name, String

#stateSymbol, Courier::Models::NotificationTemplateSummary::State

Parameters:

  • value (Courier::Models::NotificationTemplateSummary::state)

Returns:



31
# File 'lib/courier/models/notification_template_summary.rb', line 31

required :state, enum: -> { Courier::NotificationTemplateSummary::State }

#subscription_topic_idString?

The linked subscription (preference) topic of the published version. Omitted when no topic is linked or the template has never been published.

Parameters:

  • (String)

Returns:

  • (String, nil)


43
# File 'lib/courier/models/notification_template_summary.rb', line 43

optional :subscription_topic_id, String

#tagsArray<String>

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


36
# File 'lib/courier/models/notification_template_summary.rb', line 36

required :tags, Courier::Internal::Type::ArrayOf[String]

#topic_idString?

Alias of subscription_topic_id, provided under the same name V1 list items use for the linked topic. Always carries the same value as subscription_topic_id.

Parameters:

  • (String)

Returns:

  • (String, nil)


50
# File 'lib/courier/models/notification_template_summary.rb', line 50

optional :topic_id, String

#updatedInteger?

Epoch milliseconds of last update.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


56
# File 'lib/courier/models/notification_template_summary.rb', line 56

optional :updated, Integer

#updaterString?

User ID of the last updater.

Parameters:

  • (String)

Returns:

  • (String, nil)


62
# File 'lib/courier/models/notification_template_summary.rb', line 62

optional :updater, String

Instance Method Details

#to_hash{

Returns:

  • ({)


59
# File 'sig/courier/models/notification_template_summary.rbs', line 59

def to_hash: -> {