Class: Pago::V2026_04::Models::MetricDashboardSchema
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A user-defined metrics dashboard.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", name: "name", metrics: "metrics", organization_id: "organization_id" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "name", "metrics", "organization_id"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#id ⇒ String
readonly
The ID of the object.
-
#metrics ⇒ Array<String>
readonly
List of metric slugs displayed in this dashboard.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String
readonly
Display name for the dashboard.
-
#organization_id ⇒ String
readonly
The ID of the organization owning this dashboard.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, name:, metrics:, organization_id:) ⇒ MetricDashboardSchema
constructor
A new instance of MetricDashboardSchema.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, name:, metrics:, organization_id:) ⇒ MetricDashboardSchema
Returns a new instance of MetricDashboardSchema.
29887 29888 29889 29890 29891 29892 29893 29894 29895 29896 29897 29898 29899 29900 29901 29902 |
# File 'lib/pago/v2026_04/models.rb', line 29887 def initialize( created_at:, modified_at:, id:, name:, metrics:, organization_id: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:name, name) assign(:metrics, metrics) assign(:organization_id, organization_id) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
29865 29866 29867 |
# File 'lib/pago/v2026_04/models.rb', line 29865 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
29873 29874 29875 |
# File 'lib/pago/v2026_04/models.rb', line 29873 def id @id end |
#metrics ⇒ Array<String> (readonly)
List of metric slugs displayed in this dashboard.
29881 29882 29883 |
# File 'lib/pago/v2026_04/models.rb', line 29881 def metrics @metrics end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
29869 29870 29871 |
# File 'lib/pago/v2026_04/models.rb', line 29869 def modified_at @modified_at end |
#name ⇒ String (readonly)
Display name for the dashboard.
29877 29878 29879 |
# File 'lib/pago/v2026_04/models.rb', line 29877 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning this dashboard.
29885 29886 29887 |
# File 'lib/pago/v2026_04/models.rb', line 29885 def organization_id @organization_id end |
Class Method Details
.from_json(data) ⇒ MetricDashboardSchema?
29906 29907 29908 29909 29910 29911 29912 29913 29914 29915 29916 29917 29918 29919 29920 29921 29922 |
# File 'lib/pago/v2026_04/models.rb', line 29906 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), metrics: (data.key?("metrics") ? data["metrics"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET) ), data ) end |