Class: Courier::Models::VersionNode

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/version_node.rb

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(created:, creator:, version:, has_changes: nil) ⇒ Object

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

A version entry for a notification template.

Parameters:

  • created (Integer)

    Epoch milliseconds when this version was created.

  • creator (String)

    User ID of the version creator.

  • version (String)

    Version identifier. One of “draft”, “published:vNNN” (current published version)

  • has_changes (Boolean) (defaults to: nil)

    Whether the draft has unpublished changes. Only present on the draft version.



# File 'lib/courier/models/version_node.rb', line 31


Instance Attribute Details

#createdInteger

Epoch milliseconds when this version was created.

Returns:

  • (Integer)


10
# File 'lib/courier/models/version_node.rb', line 10

required :created, Integer

#creatorString

User ID of the version creator.

Returns:

  • (String)


16
# File 'lib/courier/models/version_node.rb', line 16

required :creator, String

#has_changesBoolean?

Whether the draft has unpublished changes. Only present on the draft version.

Returns:

  • (Boolean, nil)


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

optional :has_changes, Courier::Internal::Type::Boolean

#versionString

Version identifier. One of “draft”, “published:vNNN” (current published version), or “vNNN” (historical version).

Returns:

  • (String)


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

required :version, String