Class: Pago::V2026_04::Models::MetricsIntervalsLimits
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Date interval limits to get metrics for each interval.
Constant Summary collapse
- JSON_KEYS =
{ hour: "hour", day: "day", week: "week", month: "month", year: "year" }.freeze
- REQUIRED_KEYS =
["hour", "day", "week", "month", "year"].freeze
Instance Attribute Summary collapse
- #day ⇒ Models::MetricsIntervalLimit readonly
- #hour ⇒ Models::MetricsIntervalLimit readonly
- #month ⇒ Models::MetricsIntervalLimit readonly
- #week ⇒ Models::MetricsIntervalLimit readonly
- #year ⇒ Models::MetricsIntervalLimit readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hour:, day:, week:, month:, year:) ⇒ MetricsIntervalsLimits
constructor
A new instance of MetricsIntervalsLimits.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(hour:, day:, week:, month:, year:) ⇒ MetricsIntervalsLimits
Returns a new instance of MetricsIntervalsLimits.
30863 30864 30865 30866 30867 30868 30869 30870 30871 30872 30873 30874 30875 30876 |
# File 'lib/pago/v2026_04/models.rb', line 30863 def initialize( hour:, day:, week:, month:, year: ) super() assign(:hour, hour) assign(:day, day) assign(:week, week) assign(:month, month) assign(:year, year) end |
Instance Attribute Details
#day ⇒ Models::MetricsIntervalLimit (readonly)
30852 30853 30854 |
# File 'lib/pago/v2026_04/models.rb', line 30852 def day @day end |
#hour ⇒ Models::MetricsIntervalLimit (readonly)
30849 30850 30851 |
# File 'lib/pago/v2026_04/models.rb', line 30849 def hour @hour end |
#month ⇒ Models::MetricsIntervalLimit (readonly)
30858 30859 30860 |
# File 'lib/pago/v2026_04/models.rb', line 30858 def month @month end |
#week ⇒ Models::MetricsIntervalLimit (readonly)
30855 30856 30857 |
# File 'lib/pago/v2026_04/models.rb', line 30855 def week @week end |
#year ⇒ Models::MetricsIntervalLimit (readonly)
30861 30862 30863 |
# File 'lib/pago/v2026_04/models.rb', line 30861 def year @year end |
Class Method Details
.from_json(data) ⇒ MetricsIntervalsLimits?
30880 30881 30882 30883 30884 30885 30886 30887 30888 30889 30890 30891 30892 30893 30894 30895 |
# File 'lib/pago/v2026_04/models.rb', line 30880 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( hour: (data.key?("hour") ? Models::MetricsIntervalLimit.from_json(data["hour"]) : ::Pago::UNSET), day: (data.key?("day") ? Models::MetricsIntervalLimit.from_json(data["day"]) : ::Pago::UNSET), week: (data.key?("week") ? Models::MetricsIntervalLimit.from_json(data["week"]) : ::Pago::UNSET), month: (data.key?("month") ? Models::MetricsIntervalLimit.from_json(data["month"]) : ::Pago::UNSET), year: (data.key?("year") ? Models::MetricsIntervalLimit.from_json(data["year"]) : ::Pago::UNSET) ), data ) end |