Class: Courier::Models::Notifications::Previews::PreviewRun
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::Notifications::Previews::PreviewRun
- Defined in:
- lib/courier/models/notifications/previews/preview_run.rb,
sig/courier/models/notifications/previews/preview_run.rbs
Overview
Instance Attribute Summary collapse
-
#created_at ⇒ String
ISO-8601 timestamp of when the run was created.
-
#device_ids ⇒ Array<String>
The devices this run was submitted for, snapshotted when the run was created.
-
#failure_reason ⇒ Symbol, ...
Why the run failed, when
statusisFAILED. -
#id ⇒ String
Unique identifier for the preview run.
-
#status ⇒ Symbol, Courier::Models::Notifications::Previews::PreviewRunStatus
Where the run itself has got to.
-
#template_id ⇒ String
The template that was rendered.
-
#template_version ⇒ String?
The version of the template that was rendered —
draft, or a zero-padded published version such asv002.
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
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 ⇒ Object
39 |
# File 'sig/courier/models/notifications/previews/preview_run.rbs', line 39
def initialize: (
|
Instance Attribute Details
#created_at ⇒ String
ISO-8601 timestamp of when the run was created.
19 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 19 required :created_at, String |
#device_ids ⇒ Array<String>
The devices this run was submitted for, snapshotted when the run was created.
25 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 25 required :device_ids, Courier::Internal::Type::ArrayOf[String] |
#failure_reason ⇒ Symbol, ...
Why the run failed, when status is FAILED. NO_EMAIL_CHANNEL and
TEMPLATE_NOT_SUPPORTED mean there was nothing to render;
ALL_DEVICES_UNSUPPORTED means every requested device has been retired and the
request can be fixed by choosing others.
49 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 49 optional :failure_reason, enum: -> { Courier::Notifications::Previews::PreviewRunFailureReason } |
#id ⇒ String
Unique identifier for the preview run.
13 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 13 required :id, String |
#status ⇒ Symbol, Courier::Models::Notifications::Previews::PreviewRunStatus
Where the run itself has got to. PENDING and RENDERED mean Courier is still
preparing the email, SUBMITTED means it is with the rendering service, and
COMPLETED means every device has reported. FAILED is the run as a whole
failing — an individual device failing never fails the run.
34 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 34 required :status, enum: -> { Courier::Notifications::Previews::PreviewRunStatus } |
#template_id ⇒ String
The template that was rendered.
40 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 40 required :template_id, String |
#template_version ⇒ String?
The version of the template that was rendered — draft, or a zero-padded
published version such as v002. Absent until the render settles.
56 |
# File 'lib/courier/models/notifications/previews/preview_run.rb', line 56 optional :template_version, String |
Instance Method Details
#to_hash ⇒ {
49 |
# File 'sig/courier/models/notifications/previews/preview_run.rbs', line 49
def to_hash: -> {
|