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: {}) ⇒ NotificationGetMetricsParams
constructor
Some parameter documentations has been truncated, see NotificationGetMetricsParams for more details.
- #to_hash ⇒ { id: String, end_: Time, granularity: Courier::Models::NotificationGetMetricsParams::granularity, lookback: String, start: Time, request_options: Courier::RequestOptions }
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: {}) ⇒ NotificationGetMetricsParams
Some parameter documentations has been truncated, see Courier::Models::NotificationGetMetricsParams for more details.
|
|
# File 'lib/courier/models/notification_get_metrics_params.rb', line 50
|
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). Leave it out when you send start and end:
combining them returns 400. With none of the three, the window is the last 30
days. A malformed or non-positive duration returns 400.
40 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 40 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.
48 |
# File 'lib/courier/models/notification_get_metrics_params.rb', line 48 optional :start, Time |
Instance Method Details
#to_hash ⇒ { id: String, end_: Time, granularity: Courier::Models::NotificationGetMetricsParams::granularity, lookback: String, start: Time, request_options: Courier::RequestOptions }
46 47 48 49 50 51 52 53 |
# File 'sig/courier/models/notification_get_metrics_params.rbs', line 46
def to_hash: -> {
id: String,
end_: Time,
granularity: Courier::Models::NotificationGetMetricsParams::granularity,
lookback: String,
start: Time,
request_options: Courier::RequestOptions
}
|