Class: Pago::V2026_04::Models::MetricDashboardUpdate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema for updating a metrics dashboard.
Constant Summary collapse
- JSON_KEYS =
{ name: "name", metrics: "metrics" }.freeze
- REQUIRED_KEYS =
[].freeze
Instance Attribute Summary collapse
-
#metrics ⇒ Array<String>?
readonly
List of metric slugs to display in this dashboard.
-
#name ⇒ String?
readonly
Display name for the dashboard.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name: ::Pago::UNSET, metrics: ::Pago::UNSET) ⇒ MetricDashboardUpdate
constructor
A new instance of MetricDashboardUpdate.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(name: ::Pago::UNSET, metrics: ::Pago::UNSET) ⇒ MetricDashboardUpdate
Returns a new instance of MetricDashboardUpdate.
29941 29942 29943 29944 29945 29946 29947 29948 |
# File 'lib/pago/v2026_04/models.rb', line 29941 def initialize( name: ::Pago::UNSET, metrics: ::Pago::UNSET ) super() assign(:name, name) assign(:metrics, metrics) end |
Instance Attribute Details
#metrics ⇒ Array<String>? (readonly)
List of metric slugs to display in this dashboard.
29939 29940 29941 |
# File 'lib/pago/v2026_04/models.rb', line 29939 def metrics @metrics end |
#name ⇒ String? (readonly)
Display name for the dashboard.
29935 29936 29937 |
# File 'lib/pago/v2026_04/models.rb', line 29935 def name @name end |
Class Method Details
.from_json(data) ⇒ MetricDashboardUpdate?
29952 29953 29954 29955 29956 29957 29958 29959 29960 29961 29962 29963 29964 |
# File 'lib/pago/v2026_04/models.rb', line 29952 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( name: (data.key?("name") ? data["name"] : ::Pago::UNSET), metrics: (data.key?("metrics") ? data["metrics"] : ::Pago::UNSET) ), data ) end |