Class: Courier::Models::TopicDigestScheduleRequest
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::TopicDigestScheduleRequest
- Defined in:
- lib/courier/models/topic_digest_schedule_request.rb,
sig/courier/models/topic_digest_schedule_request.rbs
Instance Attribute Summary collapse
-
#day_of_month ⇒ Integer?
Required when
frequencyismonthly. -
#day_of_week ⇒ Symbol, ...
Required when
frequencyisweekly. -
#days_of_week ⇒ Array<Symbol, Courier::Models::DigestDayOfWeek>?
Required when
frequencyiscustom_days. -
#disabled ⇒ Boolean?
Whether the schedule is disabled.
-
#frequency ⇒ Symbol, Courier::Models::DigestFrequency
How often a digest is delivered.
-
#is_default ⇒ Boolean?
The schedule recipients are placed on when they have not chosen one.
-
#schedule_id ⇒ String?
Identifier of an existing schedule to update.
-
#time ⇒ String?
24-hour local delivery time,
HH:MM. -
#timezone ⇒ String?
IANA timezone the
timeand day fields are expressed in, e.g.
Instance Method Summary collapse
-
#initialize(frequency:, day_of_month: nil, day_of_week: nil, days_of_week: nil, disabled: nil, is_default: nil, schedule_id: nil, time: nil, timezone: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see TopicDigestScheduleRequest for more details.
- #to_hash ⇒ {
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(frequency:, day_of_month: nil, day_of_week: nil, days_of_week: nil, disabled: nil, is_default: nil, schedule_id: nil, time: nil, timezone: nil) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::TopicDigestScheduleRequest for more details.
One delivery cadence for a topic's digest. Supply schedule_id to update an
existing schedule in place; omit it and one is assigned and returned. The
schedules array is a full replacement, so a stored schedule absent from it is
deleted along with its delivery rule.
Updating by schedule_id replaces that schedule rather than merging into it:
any field you leave out is cleared. Two of those change delivery silently — an
omitted timezone reverts the schedule to UTC, and an omitted is_default can
leave the topic with no default schedule, which is what recipients who have not
chosen one fall back to. Restate every field you want to keep.
|
|
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 65
|
Instance Attribute Details
#day_of_month ⇒ Integer?
Required when frequency is monthly.
17 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 17 optional :day_of_month, Integer |
#day_of_week ⇒ Symbol, ...
Required when frequency is weekly.
23 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 23 optional :day_of_week, enum: -> { Courier::DigestDayOfWeek } |
#days_of_week ⇒ Array<Symbol, Courier::Models::DigestDayOfWeek>?
Required when frequency is custom_days.
29 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 29 optional :days_of_week, -> { Courier::Internal::Type::ArrayOf[enum: Courier::DigestDayOfWeek] } |
#disabled ⇒ Boolean?
Whether the schedule is disabled.
35 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 35 optional :disabled, Courier::Internal::Type::Boolean |
#frequency ⇒ Symbol, Courier::Models::DigestFrequency
How often a digest is delivered. instant delivers immediately without
batching, and is the one value that takes no time.
11 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 11 required :frequency, enum: -> { Courier::DigestFrequency } |
#is_default ⇒ Boolean?
The schedule recipients are placed on when they have not chosen one. Set this explicitly rather than relying on array position.
42 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 42 optional :is_default, Courier::Internal::Type::Boolean |
#schedule_id ⇒ String?
Identifier of an existing schedule to update. Omit when creating a new one.
48 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 48 optional :schedule_id, String |
#time ⇒ String?
24-hour local delivery time, HH:MM. Required for every frequency except
instant.
55 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 55 optional :time, String |
#timezone ⇒ String?
IANA timezone the time and day fields are expressed in, e.g.
America/New_York. Absent means UTC. Delivery follows the same local wall-clock
across daylight-saving changes.
63 |
# File 'lib/courier/models/topic_digest_schedule_request.rb', line 63 optional :timezone, String |
Instance Method Details
#to_hash ⇒ {
67 |
# File 'sig/courier/models/topic_digest_schedule_request.rbs', line 67
def to_hash: -> {
|