Class: Courier::Models::TopicDigestResponse

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

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(categories:, schedules:, template_id:, audience_id: nil, created: nil, trigger_empty: nil, updated: nil) ⇒ Object

A topic's digest configuration.

Parameters:

  • categories (Array<Courier::Models::TopicDigestCategory>) —

    Retention rules per category key.

  • schedules (Array<Courier::Models::TopicDigestScheduleResponse>) —

    The digest's delivery cadences, each with its server-assigned schedule_id.

  • template_id (String) —

    The notification template that renders the digest.

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

    The audience the digest is scoped to, when set.

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

    ISO-8601 timestamp of when the digest was configured.

  • trigger_empty (Boolean) (defaults to: nil) —

    Whether the digest is delivered even when nothing was collected.

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

    ISO-8601 timestamp of the last update.



# File 'lib/courier/models/topic_digest_response.rb', line 48

Instance Attribute Details

#audience_id ⇒ String?

The audience the digest is scoped to, when set.

Parameters:

  • (String)

Returns:

  • (String, nil)


28
# File 'lib/courier/models/topic_digest_response.rb', line 28

optional :audience_id, String

#categories ⇒ Array<Courier::Models::TopicDigestCategory>

Retention rules per category key.

Parameters:

Returns:



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

required :categories, -> { Courier::Internal::Type::ArrayOf[Courier::TopicDigestCategory] }

#created ⇒ String?

ISO-8601 timestamp of when the digest was configured.

Parameters:

  • (String)

Returns:

  • (String, nil)


34
# File 'lib/courier/models/topic_digest_response.rb', line 34

optional :created, String

#schedules ⇒ Array<Courier::Models::TopicDigestScheduleResponse>

The digest's delivery cadences, each with its server-assigned schedule_id.



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

required :schedules, -> { Courier::Internal::Type::ArrayOf[Courier::TopicDigestScheduleResponse] }

#template_id ⇒ String

The notification template that renders the digest.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/courier/models/topic_digest_response.rb', line 22

required :template_id, String

#trigger_empty ⇒ Boolean?

Whether the digest is delivered even when nothing was collected.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


40
# File 'lib/courier/models/topic_digest_response.rb', line 40

optional :trigger_empty, Courier::Internal::Type::Boolean

#updated ⇒ String?

ISO-8601 timestamp of the last update.

Parameters:

  • (String)

Returns:

  • (String, nil)


46
# File 'lib/courier/models/topic_digest_response.rb', line 46

optional :updated, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


47
# File 'sig/courier/models/topic_digest_response.rbs', line 47

def to_hash: -> {