Class: Courier::Models::DeviceSet

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

Overview

See Also:

  • Courier::Resources::Previews#archive_device_set

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_at:, device_ids:, name:, updated_at:, archived_at: nil) ⇒ Object

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

A named, reusable list of preview devices.

Parameters:

  • id (String) —

    Unique identifier for the device set.

  • created_at (String) —

    ISO-8601 timestamp of when the set was created.

  • device_ids (Array<String>) —

    The devices in this set, by PreviewDevice.id.

  • name (String) —

    Human-readable name.

  • updated_at (String) —

    ISO-8601 timestamp of when the set was last written.

  • archived_at (String) (defaults to: nil) —

    ISO-8601 timestamp of when the set was archived. Present only on the archive res



# File 'lib/courier/models/device_set.rb', line 44

Instance Attribute Details

#archived_at ⇒ String?

ISO-8601 timestamp of when the set was archived. Present only on the archive response, which is the one place the state is observable.

Parameters:

  • (String)

Returns:

  • (String, nil)


42
# File 'lib/courier/models/device_set.rb', line 42

optional :archived_at, String

#created_at ⇒ String

ISO-8601 timestamp of when the set was created.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :created_at, String

#device_ids ⇒ Array<String>

The devices in this set, by PreviewDevice.id.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


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

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

#id ⇒ String

Unique identifier for the device set.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#name ⇒ String

Human-readable name.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#updated_at ⇒ String

ISO-8601 timestamp of when the set was last written.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :updated_at, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


37
# File 'sig/courier/models/device_set.rbs', line 37

def to_hash: -> {