Class: Courier::Models::NotificationTemplateResponse

Inherits:
NotificationTemplatePayload show all
Defined in:
lib/courier/models/notification_template_response.rb

Overview

Defined Under Namespace

Modules: State

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

Response for GET /notifications/#id, POST /notifications, and PUT /notifications/#id. Returns all template fields at the top level.

Parameters:

  • id (String)

    The template ID.

  • created (Integer)

    Epoch milliseconds when the template was created.

  • creator (String)

    User ID of the creator.

  • state (Symbol, Courier::Models::NotificationTemplateResponse::State)

    The template state. Always uppercase.

  • 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_response.rb', line 43

Instance Attribute Details

#createdInteger

Epoch milliseconds when the template was created.

Returns:

  • (Integer)


17
# File 'lib/courier/models/notification_template_response.rb', line 17

required :created, Integer

#creatorString

User ID of the creator.

Returns:

  • (String)


23
# File 'lib/courier/models/notification_template_response.rb', line 23

required :creator, String

#idString

The template ID.

Returns:

  • (String)


11
# File 'lib/courier/models/notification_template_response.rb', line 11

required :id, String

#stateSymbol, Courier::Models::NotificationTemplateResponse::State

The template state. Always uppercase.



29
# File 'lib/courier/models/notification_template_response.rb', line 29

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

#updatedInteger?

Epoch milliseconds of last update.

Returns:

  • (Integer, nil)


35
# File 'lib/courier/models/notification_template_response.rb', line 35

optional :updated, Integer

#updaterString?

User ID of the last updater.

Returns:

  • (String, nil)


41
# File 'lib/courier/models/notification_template_response.rb', line 41

optional :updater, String