Class: Courier::Models::TopicDigestScheduleResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/topic_digest_schedule_response.rb,
sig/courier/models/topic_digest_schedule_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(schedule_id:, created: nil, day_of_month: nil, day_of_week: nil, days_of_week: nil, disabled: nil, frequency: nil, is_default: nil, time: nil, timezone: nil, updated: nil) ⇒ Object

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

A delivery cadence for a topic's digest, with its assigned id.

Parameters:

  • schedule_id (String) —

    The schedule's identifier, assigned by the server. This is the value the `/diges

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

    ISO-8601 timestamp of when the schedule was created.

  • day_of_month (Integer) (defaults to: nil) —

    Day of the month, 1-31.

  • day_of_week (Symbol, Courier::Models::DigestDayOfWeek) (defaults to: nil) —

    A day of the week. Accepted case-insensitively, returned lowercase.

  • days_of_week (Array<Symbol, Courier::Models::DigestDayOfWeek>) (defaults to: nil)
  • disabled (Boolean) (defaults to: nil) —

    Whether the schedule is disabled.

  • frequency (Symbol, Courier::Models::DigestFrequency) (defaults to: nil) —

    Omitted for a stored schedule this enum cannot express. Those schedules never fi

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

    Whether this is the schedule recipients are placed on by default.

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

    24-hour local delivery time, HH:MM.

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

    IANA timezone the schedule is expressed in. Absent means UTC.

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

    ISO-8601 timestamp of the last update.



# File 'lib/courier/models/topic_digest_schedule_response.rb', line 82

Instance Attribute Details

#created ⇒ String?

ISO-8601 timestamp of when the schedule was created.

Parameters:

  • (String)

Returns:

  • (String, nil)


25
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 25

optional :created, String

#day_of_month ⇒ Integer?

Day of the month, 1-31.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

optional :day_of_month, Integer

#day_of_week ⇒ Symbol, ...

A day of the week. Accepted case-insensitively, returned lowercase.

Returns:



37
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 37

optional :day_of_week, enum: -> { Courier::DigestDayOfWeek }

#days_of_week ⇒ Array<Symbol, Courier::Models::DigestDayOfWeek>?

Returns:



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

optional :days_of_week, -> { Courier::Internal::Type::ArrayOf[enum: Courier::DigestDayOfWeek] }

#disabled ⇒ Boolean?

Whether the schedule is disabled.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

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

#frequency ⇒ Symbol, ...

Omitted for a stored schedule this enum cannot express. Those schedules never fire, but their schedule_id is still returned so the /digests/* endpoints remain reachable for them.

Returns:



56
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 56

optional :frequency, enum: -> { Courier::DigestFrequency }

#is_default ⇒ Boolean?

Whether this is the schedule recipients are placed on by default.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


62
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 62

optional :is_default, Courier::Internal::Type::Boolean

#schedule_id ⇒ String

The schedule's identifier, assigned by the server. This is the value the /digests/schedules/{schedule_id} endpoints are keyed by.

Two formats are in circulation and only one is safe to drop into a URL. Schedules created through the API are sch_01m26xfcn3endt3nxy4e2kx2rh and need no encoding. Schedules created in the Preferences Editor before that format are sch/{uuid} and contain a literal /, so they must be URL-encoded as sch%2F{uuid} — unencoded, the path does not match the route and the response is a bare 404 that reads like a broken endpoint. Existing ids are never migrated.

Parameters:

  • value (String)

Returns:

  • (String)


19
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 19

required :schedule_id, String

#time ⇒ String?

24-hour local delivery time, HH:MM.

Parameters:

  • (String)

Returns:

  • (String, nil)


68
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 68

optional :time, String

#timezone ⇒ String?

IANA timezone the schedule is expressed in. Absent means UTC.

Parameters:

  • (String)

Returns:

  • (String, nil)


74
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 74

optional :timezone, String

#updated ⇒ String?

ISO-8601 timestamp of the last update.

Parameters:

  • (String)

Returns:

  • (String, nil)


80
# File 'lib/courier/models/topic_digest_schedule_response.rb', line 80

optional :updated, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


81
# File 'sig/courier/models/topic_digest_schedule_response.rbs', line 81

def to_hash: -> {