Class: Courier::Models::Notifications::Previews::PreviewResult
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::Notifications::Previews::PreviewResult
- Defined in:
- lib/courier/models/notifications/previews/preview_result.rb,
sig/courier/models/notifications/previews/preview_result.rbs
Instance Attribute Summary collapse
-
#device_id ⇒ String
The device this result is for, by
PreviewDevice.id. -
#failure_reason ⇒ Symbol, ...
Why one device's render failed, when its
statusisFAILEDand the cause has a public name. -
#screenshot_url ⇒ String?
Short-lived signed URL for the full-sized image.
-
#status ⇒ Symbol, Courier::Models::Notifications::Previews::PreviewResultStatus
One device's outcome.
-
#thumbnail_url ⇒ String?
Short-lived signed URL for the grid-sized image.
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
31 |
# File 'sig/courier/models/notifications/previews/preview_result.rbs', line 31
def initialize: (
|
Instance Attribute Details
#device_id ⇒ String
The device this result is for, by PreviewDevice.id.
12 |
# File 'lib/courier/models/notifications/previews/preview_result.rb', line 12 required :device_id, String |
#failure_reason ⇒ Symbol, ...
Why one device's render failed, when its status is FAILED and the cause has
a public name. DELIVERY_FAILED means the rendering service could not deliver
the message to its own capture mailbox — infrastructure, not anything wrong with
the template.
44 |
# File 'lib/courier/models/notifications/previews/preview_result.rb', line 44 optional :failure_reason, enum: -> { Courier::Notifications::Previews::PreviewResultFailureReason } |
#screenshot_url ⇒ String?
Short-lived signed URL for the full-sized image. Null until the screenshot exists. Re-signed on every read, so fetch it rather than storing it.
19 |
# File 'lib/courier/models/notifications/previews/preview_result.rb', line 19 required :screenshot_url, String, nil?: true |
#status ⇒ Symbol, Courier::Models::Notifications::Previews::PreviewResultStatus
One device's outcome. COMPLETED means the screenshot exists and its URLs are
populated. UNSUPPORTED, TIMED_OUT and FAILED are all terminal, and none
stands in for another — UNSUPPORTED means the device was retired at the
vendor, TIMED_OUT means it did not report in time.
28 |
# File 'lib/courier/models/notifications/previews/preview_result.rb', line 28 required :status, enum: -> { Courier::Notifications::Previews::PreviewResultStatus } |
#thumbnail_url ⇒ String?
Short-lived signed URL for the grid-sized image. Null until the screenshot exists. Re-signed on every read, so fetch it rather than storing it.
35 |
# File 'lib/courier/models/notifications/previews/preview_result.rb', line 35 required :thumbnail_url, String, nil?: true |
Instance Method Details
#to_hash ⇒ {
39 |
# File 'sig/courier/models/notifications/previews/preview_result.rbs', line 39
def to_hash: -> {
|