Class: Courier::Models::DigestInstance

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

Defined Under Namespace

Modules: Status

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(digest_instance_id:, event_count:, status:, user_id:, categories: nil, category_key_counts: nil, created_at: nil, disabled: nil, tenant_id: nil) ⇒ Object

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

Parameters:

  • digest_instance_id (String)

    A unique identifier for the digest instance.

  • event_count (Integer)

    The total number of events received for this instance.

  • status (Symbol, Courier::Models::DigestInstance::Status)

    The status of the digest instance. ‘IN_PROGRESS` instances are still accumulatin

  • user_id (String)

    The ID of the user this digest instance belongs to.

  • categories (Array<Courier::Models::DigestCategory>) (defaults to: nil)

    The categories configured for the digest.

  • category_key_counts (Hash{Symbol=>Integer}) (defaults to: nil)

    A map of category key to the number of events received for that category.

  • created_at (String) (defaults to: nil)

    An ISO 8601 timestamp of when the digest instance was created.

  • disabled (Boolean) (defaults to: nil)

    Whether the digest instance has been disabled.

  • tenant_id (String, nil) (defaults to: nil)

    The ID of the tenant this digest instance belongs to, if any.



# File 'lib/courier/models/digest_instance.rb', line 61

Instance Attribute Details

#categoriesArray<Courier::Models::DigestCategory>?

The categories configured for the digest.

Returns:



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

optional :categories, -> { Courier::Internal::Type::ArrayOf[Courier::DigestCategory] }

#category_key_countsHash{Symbol=>Integer}?

A map of category key to the number of events received for that category.

Returns:

  • (Hash{Symbol=>Integer}, nil)


41
# File 'lib/courier/models/digest_instance.rb', line 41

optional :category_key_counts, Courier::Internal::Type::HashOf[Integer]

#created_atString?

An ISO 8601 timestamp of when the digest instance was created.

Returns:

  • (String, nil)


47
# File 'lib/courier/models/digest_instance.rb', line 47

optional :created_at, String

#digest_instance_idString

A unique identifier for the digest instance.

Returns:

  • (String)


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

required :digest_instance_id, String

#disabledBoolean?

Whether the digest instance has been disabled.

Returns:

  • (Boolean, nil)


53
# File 'lib/courier/models/digest_instance.rb', line 53

optional :disabled, Courier::Internal::Type::Boolean

#event_countInteger

The total number of events received for this instance.

Returns:

  • (Integer)


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

required :event_count, Integer

#statusSymbol, Courier::Models::DigestInstance::Status

The status of the digest instance. ‘IN_PROGRESS` instances are still accumulating events; `COMPLETED` instances have been released.



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

required :status, enum: -> { Courier::DigestInstance::Status }

#tenant_idString?

The ID of the tenant this digest instance belongs to, if any.

Returns:

  • (String, nil)


59
# File 'lib/courier/models/digest_instance.rb', line 59

optional :tenant_id, String, nil?: true

#user_idString

The ID of the user this digest instance belongs to.

Returns:

  • (String)


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

required :user_id, String