Class: Courier::Models::NotificationGetMetricsParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::NotificationGetMetricsParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/courier/models/notification_get_metrics_params.rb,
sig/courier/models/notification_get_metrics_params.rbs
Overview
Defined Under Namespace
Modules: Granularity
Instance Attribute Summary collapse
-
#end_ ⇒ Time?
The end of the window, as an ISO 8601 timestamp with an offset.
-
#granularity ⇒ Symbol, ...
The size of each bucket in the series.
- #id ⇒ String
-
#lookback ⇒ String?
The length of the window, counted back from now, as an ISO 8601 duration (
P30D,P12W,PT12H). -
#start ⇒ Time?
The inclusive start of the window, as an ISO 8601 timestamp with an offset (
2026-04-01T00:00:00Z).
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize(id:, end_: nil, granularity: nil, lookback: nil, start: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see NotificationGetMetricsParams for more details.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(id:, end_: nil, granularity: nil, lookback: nil, start: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::NotificationGetMetricsParams for more details.
|
|
# File 'lib/courier/models/notification_get_metrics_params.rb', line 49
|
Instance Attribute Details
#end_ ⇒ Time?
The end of the window, as an ISO 8601 timestamp with an offset. Must be supplied
together with start. An end in the future is accepted and not clamped — the
trailing buckets come back empty.
21 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 21 optional :end_, Time |
#granularity ⇒ Symbol, ...
The size of each bucket in the series. Defaults to DAY. WEEK buckets start
on Sunday. A fine granularity caps the window it can cover: HOUR spans at most
7 days and DAY at most 90 days, and a wider window returns 400 — request a
coarser granularity instead. WEEK and MONTH are uncapped, subject to the
1000-bucket limit on a single response.
31 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 31 optional :granularity, enum: -> { Courier::NotificationGetMetricsParams::Granularity } |
#id ⇒ String
13 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 13 required :id, String |
#lookback ⇒ String?
The length of the window, counted back from now, as an ISO 8601 duration
(P30D, P12W, PT12H). Defaults to P30D, and is ignored when start and
end are supplied. A malformed or non-positive duration returns 400.
39 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 39 optional :lookback, String |
#start ⇒ Time?
The inclusive start of the window, as an ISO 8601 timestamp with an offset
(2026-04-01T00:00:00Z). Must be supplied together with end and be earlier
than it; either one alone returns 400.
47 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 47 optional :start, Time |
Instance Method Details
#to_hash ⇒ {
46 |
# File 'sig/courier/models/notification_get_metrics_params.rbs', line 46
def to_hash: -> {
|