Class: Courier::Models::PreviewDevice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::PreviewDevice
- Defined in:
- lib/courier/models/preview_device.rb,
sig/courier/models/preview_device.rbs
Defined Under Namespace
Instance Attribute Summary collapse
-
#app ⇒ String
The mail app.
-
#category ⇒ Symbol, Courier::Models::PreviewDevice::Category
Where the app runs.
-
#id ⇒ String
The device's identifier, used in
device_idswhen creating a device set or a run. -
#name ⇒ String
Display name.
-
#os ⇒ String
The operating system.
-
#os_version ⇒ String
The operating system's version.
-
#platform ⇒ String?
What the app runs on — the browser for webmail (
chrome,edge,firefox), the phone for mobile (iphone,pixel). -
#platform_version ⇒ String?
Which one of the platform — the phone model for mobile (
15_pro_max,10). -
#theme ⇒ Symbol, Courier::Models::PreviewDevice::Theme
Whether the email is rendered in light or dark mode.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, app:, category:, name:, os:, os_version:, platform:, platform_version:, theme:) ⇒ Object
constructor
Some parameter documentations has been truncated, see PreviewDevice for more details.
- #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(id:, app:, category:, name:, os:, os_version:, platform:, platform_version:, theme:) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::PreviewDevice for more details.
One mail app on one platform, operating system and theme that a preview can be
rendered on. Reference data, identical for every workspace. Every field is
always present; platform and platform_version are null where they do not
apply.
|
|
# File 'lib/courier/models/preview_device.rb', line 70
|
Instance Attribute Details
#app ⇒ String
The mail app. For webmail it is the service (outlook_com, gmail_com); for
mobile the app (apple_mail, gmail); for desktop the app together with the
version it is sold under (outlook_2019, outlook_microsoft_365,
apple_mail_16), because that version is what separates one desktop Outlook
from another.
21 |
# File 'lib/courier/models/preview_device.rb', line 21 required :app, String |
#category ⇒ Symbol, Courier::Models::PreviewDevice::Category
Where the app runs.
27 |
# File 'lib/courier/models/preview_device.rb', line 27 required :category, enum: -> { Courier::PreviewDevice::Category } |
#id ⇒ String
The device's identifier, used in device_ids when creating a device set or a
run.
11 |
# File 'lib/courier/models/preview_device.rb', line 11 required :id, String |
#name ⇒ String
Display name. Render it as-is rather than parsing it. It is also what separates the two 120-dpi Outlook renders from their 100% siblings, which are otherwise identical field for field.
35 |
# File 'lib/courier/models/preview_device.rb', line 35 required :name, String |
#os ⇒ String
The operating system.
41 |
# File 'lib/courier/models/preview_device.rb', line 41 required :os, String |
#os_version ⇒ String
The operating system's version. Always set.
47 |
# File 'lib/courier/models/preview_device.rb', line 47 required :os_version, String |
#platform ⇒ String?
What the app runs on — the browser for webmail (chrome, edge, firefox),
the phone for mobile (iphone, pixel). Null for desktop, where the app runs
on nothing but the OS.
55 |
# File 'lib/courier/models/preview_device.rb', line 55 required :platform, String, nil?: true |
#platform_version ⇒ String?
Which one of the platform — the phone model for mobile (15_pro_max, 10).
Null for webmail, which always renders in the current browser, and for desktop.
62 |
# File 'lib/courier/models/preview_device.rb', line 62 required :platform_version, String, nil?: true |
#theme ⇒ Symbol, Courier::Models::PreviewDevice::Theme
Whether the email is rendered in light or dark mode.
68 |
# File 'lib/courier/models/preview_device.rb', line 68 required :theme, enum: -> { Courier::PreviewDevice::Theme } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/courier/models/preview_device.rb', line 107
|
Instance Method Details
#to_hash ⇒ {
47 |
# File 'sig/courier/models/preview_device.rbs', line 47
def to_hash: -> {
|